POST api/ClientProducts/Multiple/AddOrUpdate
Method to add or update client products
Request Information
URI Parameters
None.
URI Example
api/ClientProducts/Multiple/AddOrUpdate
Body Parameters
The clientProducts data
Oresto.API.Models.POST.ClientProducts.ClientProductMultipleAddOrUpdate| Name | Description | Type | Additional information |
|---|---|---|---|
| ClientProducts |
The list of client products |
Collection of Oresto.API.Models.POST.ClientProducts.ClientProduct |
Required |
Request Formats
application/json, text/json
Sample:
{
"ClientProducts": [
{
"WholesalerArticleNumber": "sample string 1",
"ClientNumber": "sample string 2",
"SalesPriceList": 1.0,
"SalesPriceListPromo": 1.0,
"IsExlusive": true
},
{
"WholesalerArticleNumber": "sample string 1",
"ClientNumber": "sample string 2",
"SalesPriceList": 1.0,
"SalesPriceListPromo": 1.0,
"IsExlusive": true
}
]
}
application/xml, text/xml
Sample:
<ClientProductMultipleAddOrUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.ClientProducts">
<ClientProducts>
<ClientProduct>
<ClientNumber>sample string 2</ClientNumber>
<IsExlusive>true</IsExlusive>
<SalesPriceList>1</SalesPriceList>
<SalesPriceListPromo>1</SalesPriceListPromo>
<WholesalerArticleNumber>sample string 1</WholesalerArticleNumber>
</ClientProduct>
<ClientProduct>
<ClientNumber>sample string 2</ClientNumber>
<IsExlusive>true</IsExlusive>
<SalesPriceList>1</SalesPriceList>
<SalesPriceListPromo>1</SalesPriceListPromo>
<WholesalerArticleNumber>sample string 1</WholesalerArticleNumber>
</ClientProduct>
</ClientProducts>
</ClientProductMultipleAddOrUpdate>
application/x-www-form-urlencoded
Sample:
ClientProducts=value
Response Information
Resource Description
A wrapper class with information about the new entities
Oresto.API.Models.POST.ClientProducts.ClientProductMultipleDataAddOrUpdate| Name | Description | Type | Additional information |
|---|---|---|---|
| Errors |
Possible errors that were experienced when processing the request |
Collection of Oresto.API.Models.Shared.ErrorData |
None. |
| ModelStateErrors |
Possible model errors that were experienced when validating the data |
Collection of Oresto.API.Models.Shared.ModelStateErrorData |
None. |
| RequestInformation |
Additional information about the request |
Oresto.API.Models.Shared.RequestInformation |
None. |
Response Formats
application/json, text/json
Sample:
{
"RequestInformation": {
"RequestDuration": 1,
"WholesalerId": 2,
"UserId": 3
},
"ModelStateErrors": [
{
"Key1": "sample string 1",
"Key2": "sample string 2",
"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"
}
]
},
{
"Key1": "sample string 1",
"Key2": "sample string 2",
"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": [
{
"Key1": "sample string 1",
"Key2": "sample string 2",
"Errors": [
"sample string 1",
"sample string 2"
]
},
{
"Key1": "sample string 1",
"Key2": "sample string 2",
"Errors": [
"sample string 1",
"sample string 2"
]
}
]
}
application/xml, text/xml
Sample:
<ClientProductMultipleDataAddOrUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.ClientProducts">
<Errors xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<ErrorData>
<Errors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>sample string 1</d4p1:string>
<d4p1:string>sample string 2</d4p1:string>
</Errors>
<Key1>sample string 1</Key1>
<Key2>sample string 2</Key2>
</ErrorData>
<ErrorData>
<Errors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>sample string 1</d4p1:string>
<d4p1:string>sample string 2</d4p1:string>
</Errors>
<Key1>sample string 1</Key1>
<Key2>sample string 2</Key2>
</ErrorData>
</Errors>
<ModelStateErrors xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<ModelStateErrorData>
<Key1>sample string 1</Key1>
<Key2>sample string 2</Key2>
<ModelStateErrors>
<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>
</ModelStateErrorData>
<ModelStateErrorData>
<Key1>sample string 1</Key1>
<Key2>sample string 2</Key2>
<ModelStateErrors>
<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>
</ModelStateErrorData>
</ModelStateErrors>
<RequestInformation xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
<RequestDuration>1</RequestDuration>
<UserId>3</UserId>
<WholesalerId>2</WholesalerId>
</RequestInformation>
</ClientProductMultipleDataAddOrUpdate>