POST api/Customers/Modify
Method for updating information for single customer in DB. Updated record is returned, if successful.
Request Information
URI Parameters
None.
Body Parameters
CustomerData| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
Customer ID (only when modifying) |
integer |
None. |
| Name |
Customer name |
string |
Required |
| Legal |
Customer legal type (O - sole proprietorship, P - company/firm, G - citizens) |
string |
Required |
| Street |
Customer street name |
string |
Required |
| HouseNumber |
Customer house number |
string |
None. |
| PostalCode |
Customer postal code |
string |
Required |
| Town |
Customer town |
string |
Required |
| Phone |
Customer phone |
string |
None. |
| Mobile |
Customer mobile |
string |
None. |
|
Customer email |
string |
Required |
|
| OIB |
Customer OIB |
string |
None. |
Request Formats
application/json, text/json
{
"ID": 1,
"Name": "sample string 2",
"Legal": "sample string 3",
"Street": "sample string 4",
"HouseNumber": "sample string 5",
"PostalCode": "sample string 6",
"Town": "sample string 7",
"Phone": "sample string 8",
"Mobile": "sample string 9",
"Email": "sample string 10",
"OIB": "sample string 11"
}
application/xml, text/xml
<CustomerData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.namjestaj_intermod.hr.Models"> <Email>sample string 10</Email> <HouseNumber>sample string 5</HouseNumber> <ID>1</ID> <Legal>sample string 3</Legal> <Mobile>sample string 9</Mobile> <Name>sample string 2</Name> <OIB>sample string 11</OIB> <Phone>sample string 8</Phone> <PostalCode>sample string 6</PostalCode> <Street>sample string 4</Street> <Town>sample string 7</Town> </CustomerData>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
Collection of CustomerResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ID |
Customer ID |
integer |
Required |
| Code |
Customer code |
string |
Required |
| Name |
Customer name |
string |
Required |
| Legal |
Customer legal type (O - sole proprietorship, P - company/firm, G - citizens) |
string |
Required |
| Address |
Customer address |
string |
Required |
| PostalCode |
Customer postal code |
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 |
| Modified |
Modified datetime |
string |
Required |
Response Formats
application/json, text/json
[
{
"ID": 1,
"Code": "sample string 2",
"Name": "sample string 3",
"Legal": "sample string 4",
"Address": "sample string 5",
"PostalCode": "sample string 6",
"Town": "sample string 7",
"Phone": "sample string 8",
"Mobile": "sample string 9",
"Email": "sample string 10",
"OIB": "sample string 11",
"Modified": "sample string 12"
},
{
"ID": 1,
"Code": "sample string 2",
"Name": "sample string 3",
"Legal": "sample string 4",
"Address": "sample string 5",
"PostalCode": "sample string 6",
"Town": "sample string 7",
"Phone": "sample string 8",
"Mobile": "sample string 9",
"Email": "sample string 10",
"OIB": "sample string 11",
"Modified": "sample string 12"
}
]
application/xml, text/xml
<ArrayOfCustomerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/api.namjestaj_intermod.hr.Models">
<CustomerResponse>
<Address>sample string 5</Address>
<Code>sample string 2</Code>
<Email>sample string 10</Email>
<ID>1</ID>
<Legal>sample string 4</Legal>
<Mobile>sample string 9</Mobile>
<Modified>sample string 12</Modified>
<Name>sample string 3</Name>
<OIB>sample string 11</OIB>
<Phone>sample string 8</Phone>
<PostalCode>sample string 6</PostalCode>
<Town>sample string 7</Town>
</CustomerResponse>
<CustomerResponse>
<Address>sample string 5</Address>
<Code>sample string 2</Code>
<Email>sample string 10</Email>
<ID>1</ID>
<Legal>sample string 4</Legal>
<Mobile>sample string 9</Mobile>
<Modified>sample string 12</Modified>
<Name>sample string 3</Name>
<OIB>sample string 11</OIB>
<Phone>sample string 8</Phone>
<PostalCode>sample string 6</PostalCode>
<Town>sample string 7</Town>
</CustomerResponse>
</ArrayOfCustomerResponse>
