POST api/customers
Method for inserting/updating single customer information, based on customer ID. If you dont pass customer ID then API will insert new record, otherwise it will try to update that record. Insert as much customer details as possible.
Request Information
URI Parameters
None.
Body Parameters
CustomerSetRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
Customer ID |
integer |
None. |
| Name |
Customer name |
string |
None. |
| Street |
Customer street address |
string |
None. |
| HouseNumber |
Customer house number |
string |
None. |
| PostalCode |
Postal code |
integer |
None. |
| Place |
Customer town |
string |
None. |
| Phone |
Customer phone |
string |
None. |
| Mobile |
Customer mobile |
string |
None. |
|
Customer email |
string |
None. |
|
| OIB |
Customer OIB |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"ID": 1,
"Name": "sample string 2",
"Street": "sample string 3",
"HouseNumber": "sample string 4",
"PostalCode": 5,
"Place": "sample string 6",
"Phone": "sample string 7",
"Mobile": "sample string 8",
"Email": "sample string 9",
"OIB": "sample string 10"
}
application/xml, text/xml
Sample:
<CustomerSetRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.cpis.tetrada.hr.Models"> <Email>sample string 9</Email> <HouseNumber>sample string 4</HouseNumber> <ID>1</ID> <Mobile>sample string 8</Mobile> <Name>sample string 2</Name> <OIB>sample string 10</OIB> <Phone>sample string 7</Phone> <Place>sample string 6</Place> <PostalCode>5</PostalCode> <Street>sample string 3</Street> </CustomerSetRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Collection of CustomerSetResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
Customer ID |
integer |
Required |
| Name |
Customer name |
string |
Required |
| Address |
Customer address |
string |
Required |
| Town |
Customer town |
string |
Required |
| Phone |
Customer phone |
string |
Required |
| Mobile |
Customer mobile |
string |
Required |
|
Customer email |
string |
Required |
|
| OIB |
Customer OIB |
string |
Required |
Response Formats
application/json, text/json
Sample:
[
{
"ID": 1,
"Name": "sample string 2",
"Address": "sample string 3",
"Town": "sample string 4",
"Phone": "sample string 5",
"Mobile": "sample string 6",
"Email": "sample string 7",
"OIB": "sample string 8"
},
{
"ID": 1,
"Name": "sample string 2",
"Address": "sample string 3",
"Town": "sample string 4",
"Phone": "sample string 5",
"Mobile": "sample string 6",
"Email": "sample string 7",
"OIB": "sample string 8"
}
]
application/xml, text/xml
Sample:
<ArrayOfCustomerSetResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.cpis.tetrada.hr.Models">
<CustomerSetResponse>
<Address>sample string 3</Address>
<Email>sample string 7</Email>
<ID>1</ID>
<Mobile>sample string 6</Mobile>
<Name>sample string 2</Name>
<OIB>sample string 8</OIB>
<Phone>sample string 5</Phone>
<Town>sample string 4</Town>
</CustomerSetResponse>
<CustomerSetResponse>
<Address>sample string 3</Address>
<Email>sample string 7</Email>
<ID>1</ID>
<Mobile>sample string 6</Mobile>
<Name>sample string 2</Name>
<OIB>sample string 8</OIB>
<Phone>sample string 5</Phone>
<Town>sample string 4</Town>
</CustomerSetResponse>
</ArrayOfCustomerSetResponse>