GET api/Customer/{id}?searchBy={searchBy}
When calling /api/customer/(GuidAsString) Will return a list of customers. In the case of customerId it will return a list with one customer. In the case of companyId a list of Customers belonging to the given company will be returned. Note that if the company is in affiliation, all customers includning affiliated customers will be returned. This is neccesary since this is a invoice api and invoices can be for affiliated customers as well.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
string formated Guid |
string |
Required |
| searchBy |
Can be customerId or companyId |
string |
Required |
Body Parameters
None.
Response Information
Resource Description
If found a singel costumer or a collection of customers belonging to a company
Collection of Customer| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | globally unique identifier |
None. |
|
| CustomerEId | string |
None. |
|
| CompanyId | globally unique identifier |
None. |
|
| Name | string |
None. |
|
| Address1 | string |
None. |
|
| Address2 | string |
None. |
|
| TelePhone | string |
None. |
|
| CellPhone | string |
None. |
|
| TeleFax | string |
None. |
|
| BankAccountNo | string |
None. |
|
| OrgNo | string |
None. |
|
| ZipCode | string |
None. |
|
| City | string |
None. |
|
| IsInternal | boolean |
None. |
|
| FixedPrice | decimal number |
None. |
|
| Discount | decimal number |
None. |
Response Formats
application/json, text/json
[
{
"Id": "74b83ba3-8f29-41ce-98c3-e517977d922f",
"CustomerEId": "sample string 2",
"CompanyId": "0dfa280f-0322-4c85-ba13-54e12c0bd268",
"Name": "sample string 4",
"Address1": "sample string 5",
"Address2": "sample string 6",
"TelePhone": "sample string 7",
"CellPhone": "sample string 8",
"TeleFax": "sample string 9",
"BankAccountNo": "sample string 10",
"OrgNo": "sample string 11",
"ZipCode": "sample string 12",
"City": "sample string 13",
"IsInternal": true,
"FixedPrice": 15.1,
"Discount": 16.1
},
{
"Id": "74b83ba3-8f29-41ce-98c3-e517977d922f",
"CustomerEId": "sample string 2",
"CompanyId": "0dfa280f-0322-4c85-ba13-54e12c0bd268",
"Name": "sample string 4",
"Address1": "sample string 5",
"Address2": "sample string 6",
"TelePhone": "sample string 7",
"CellPhone": "sample string 8",
"TeleFax": "sample string 9",
"BankAccountNo": "sample string 10",
"OrgNo": "sample string 11",
"ZipCode": "sample string 12",
"City": "sample string 13",
"IsInternal": true,
"FixedPrice": 15.1,
"Discount": 16.1
}
]
text/html
[{"Id":"74b83ba3-8f29-41ce-98c3-e517977d922f","CustomerEId":"sample string 2","CompanyId":"0dfa280f-0322-4c85-ba13-54e12c0bd268","Name":"sample string 4","Address1":"sample string 5","Address2":"sample string 6","TelePhone":"sample string 7","CellPhone":"sample string 8","TeleFax":"sample string 9","BankAccountNo":"sample string 10","OrgNo":"sample string 11","ZipCode":"sample string 12","City":"sample string 13","IsInternal":true,"FixedPrice":15.1,"Discount":16.1},{"Id":"74b83ba3-8f29-41ce-98c3-e517977d922f","CustomerEId":"sample string 2","CompanyId":"0dfa280f-0322-4c85-ba13-54e12c0bd268","Name":"sample string 4","Address1":"sample string 5","Address2":"sample string 6","TelePhone":"sample string 7","CellPhone":"sample string 8","TeleFax":"sample string 9","BankAccountNo":"sample string 10","OrgNo":"sample string 11","ZipCode":"sample string 12","City":"sample string 13","IsInternal":true,"FixedPrice":15.1,"Discount":16.1}]
application/xml, text/xml
<ArrayOfCustomer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Westmatic.Wash8.GenericWebApi.Models">
<Customer>
<Address1>sample string 5</Address1>
<Address2>sample string 6</Address2>
<BankAccountNo>sample string 10</BankAccountNo>
<CellPhone>sample string 8</CellPhone>
<City>sample string 13</City>
<CompanyId>0dfa280f-0322-4c85-ba13-54e12c0bd268</CompanyId>
<CustomerEId>sample string 2</CustomerEId>
<Discount>16.1</Discount>
<FixedPrice>15.1</FixedPrice>
<Id>74b83ba3-8f29-41ce-98c3-e517977d922f</Id>
<IsInternal>true</IsInternal>
<Name>sample string 4</Name>
<OrgNo>sample string 11</OrgNo>
<TeleFax>sample string 9</TeleFax>
<TelePhone>sample string 7</TelePhone>
<ZipCode>sample string 12</ZipCode>
</Customer>
<Customer>
<Address1>sample string 5</Address1>
<Address2>sample string 6</Address2>
<BankAccountNo>sample string 10</BankAccountNo>
<CellPhone>sample string 8</CellPhone>
<City>sample string 13</City>
<CompanyId>0dfa280f-0322-4c85-ba13-54e12c0bd268</CompanyId>
<CustomerEId>sample string 2</CustomerEId>
<Discount>16.1</Discount>
<FixedPrice>15.1</FixedPrice>
<Id>74b83ba3-8f29-41ce-98c3-e517977d922f</Id>
<IsInternal>true</IsInternal>
<Name>sample string 4</Name>
<OrgNo>sample string 11</OrgNo>
<TeleFax>sample string 9</TeleFax>
<TelePhone>sample string 7</TelePhone>
<ZipCode>sample string 12</ZipCode>
</Customer>
</ArrayOfCustomer>