PUT api/Clients
Updates the current client
Request Information
URI Parameters
None.
URI Example
api/Clients
Body Parameters
The new client
Oresto.API.Models.PUT.Clients.Client| Name | Description | Type | Additional information |
|---|---|---|---|
| Active |
Active or not |
boolean |
Required |
| ClientNumber |
The number of the client defined by the wholesaler |
string |
Primary key field Required Max length: 50 |
|
E-mail address |
string |
Required Max length: 100 |
|
| HasPromos |
Wether or not the client has access to promotion prices |
boolean |
Required |
| Location |
Client location information |
Oresto.API.Models.PUT.Clients.Location |
Required |
| MayViewPromoLabels |
If the client may view promotion labels (webshop) |
boolean |
Required |
| Name |
Name of the client |
string |
Required Max length: 50 |
| OrdersMayBeDeliveredToClient |
If orders may be delivered to a client address |
boolean |
Required |
| PhoneNumber |
Phone number |
string |
Max length: 100 |
| Remarks |
Additional remarks for the client |
string |
None. |
| SegmentId |
Client segment Id |
integer |
Foreign key field |
Request Formats
application/json, text/json
{
"ClientNumber": "sample string 1",
"Name": "sample string 2",
"Email": "sample string 3",
"MayViewPromoLabels": true,
"PhoneNumber": "sample string 5",
"SegmentId": 1,
"Remarks": "sample string 6",
"Active": true,
"HasPromos": true,
"OrdersMayBeDeliveredToClient": true,
"Location": {
"StreetName": "sample string 1",
"ExtraAddressLine": "sample string 2",
"StreetNumber": "sample string 3",
"PostalCode": "sample string 4",
"Province": "sample string 5",
"Municipality": "sample string 6",
"CountryCode": "sample string 7"
}
}
application/xml, text/xml
<Client xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.PUT.Clients">
<Active>true</Active>
<ClientNumber>sample string 1</ClientNumber>
<Email>sample string 3</Email>
<HasPromos>true</HasPromos>
<Location>
<CountryCode>sample string 7</CountryCode>
<ExtraAddressLine>sample string 2</ExtraAddressLine>
<Municipality>sample string 6</Municipality>
<PostalCode>sample string 4</PostalCode>
<Province>sample string 5</Province>
<StreetName>sample string 1</StreetName>
<StreetNumber>sample string 3</StreetNumber>
</Location>
<MayViewPromoLabels>true</MayViewPromoLabels>
<Name>sample string 2</Name>
<OrdersMayBeDeliveredToClient>true</OrdersMayBeDeliveredToClient>
<PhoneNumber>sample string 5</PhoneNumber>
<Remarks>sample string 6</Remarks>
<SegmentId>1</SegmentId>
</Client>
application/x-www-form-urlencoded
ClientNumber=value&Name=value&Email=value&MayViewPromoLabels=value&PhoneNumber=value&SegmentId=value&Remarks=value&Active=value&HasPromos=value&OrdersMayBeDeliveredToClient=value&Location=value
Response Information
Resource Description
A wrapper with client entity data
Oresto.API.Models.PUT.Clients.ClientData| Name | Description | Type | Additional information |
|---|---|---|---|
| Errors |
Possible errors that were experienced when processing the request |
Collection of string |
None. |
| ModelStateErrors |
Possible model errors that were experienced when validating the data |
Collection of Oresto.API.Models.Shared.ModelStateError |
None. |
| RequestInformation |
Additional information about the request |
Oresto.API.Models.Shared.RequestInformation |
None. |
Response Formats
application/json, text/json
{
"RequestInformation": {
"RequestDuration": 1,
"WholesalerId": 2,
"UserId": 3
},
"ModelStateErrors": [
{
"Key": "sample string 1",
"Message": "sample string 2",
"Exception": "sample string 3"
},
{
"Key": "sample string 1",
"Message": "sample string 2",
"Exception": "sample string 3"
}
],
"Errors": [
"sample string 1",
"sample string 2"
]
}
application/xml, text/xml
<ClientData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.PUT.Clients">
<Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</Errors>
<ModelStateErrors xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<ModelStateError>
<Exception>sample string 3</Exception>
<Key>sample string 1</Key>
<Message>sample string 2</Message>
</ModelStateError>
<ModelStateError>
<Exception>sample string 3</Exception>
<Key>sample string 1</Key>
<Message>sample string 2</Message>
</ModelStateError>
</ModelStateErrors>
<RequestInformation xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<RequestDuration>1</RequestDuration>
<UserId>3</UserId>
<WholesalerId>2</WholesalerId>
</RequestInformation>
</ClientData>