POST api/ArticleSaleInformation
Provides Information about the requested Articles. These data are calculated based on the given card and client and may differ based on these parameter.
Request Information
URI Parameters
None.
Body Parameters
ArticleSaleInformationRequestModel| Name | Description | Type | Additional information |
|---|---|---|---|
| RequestedArticleNumbers |
A collection of article numbers for the articles which should be returned. |
Collection of string |
None. |
| CardNumber |
The card number of the customer card If not available you can use the License Plate instead. |
string |
None. |
| CardUID |
The UID of the customercard, if RFID card This is optional. The prefered identification should be done via the Card Number |
integer |
None. |
| LicensePlate |
The license plate of the customer This is optional. The prefered identification should be done via the Card Number |
string |
None. |
| ClientNumber |
The current Client Number (Unique POS ID number) |
byte |
None. |
Request Formats
application/json, text/json
{
"RequestedArticleNumbers": [
"sample string 1",
"sample string 2"
],
"CardNumber": "sample string 1",
"CardUID": 1,
"LicensePlate": "sample string 2",
"ClientNumber": 64
}
application/xml, text/xml
<ArticleSaleInformationRequestModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CardNumber>sample string 1</CardNumber>
<CardUID>1</CardUID>
<LicensePlate>sample string 2</LicensePlate>
<ClientNumber>64</ClientNumber>
<RequestedArticleNumbers>
<string>sample string 1</string>
<string>sample string 2</string>
</RequestedArticleNumbers>
</ArticleSaleInformationRequestModel>
Response Information
Resource Description
ArticleSaleInformationResponseModel| Name | Description | Type | Additional information |
|---|---|---|---|
| Articles |
A list of articles |
Collection of ArticleSaleData |
None. |
| PriceGroupGivenCard |
The price group for the given card |
byte |
None. |
Response Formats
application/json, text/json
{
"Articles": [
{
"ArticleNumber": "sample string 1",
"ArticleLabel": "sample string 2",
"IsSaleAllowed": true,
"PriceGivenCard": 4.0,
"IsSpecialPrice": true,
"PriceGroupPrices": [
{
"PriceGroup": 64,
"Price": 2.0
},
{
"PriceGroup": 64,
"Price": 2.0
}
]
},
{
"ArticleNumber": "sample string 1",
"ArticleLabel": "sample string 2",
"IsSaleAllowed": true,
"PriceGivenCard": 4.0,
"IsSpecialPrice": true,
"PriceGroupPrices": [
{
"PriceGroup": 64,
"Price": 2.0
},
{
"PriceGroup": 64,
"Price": 2.0
}
]
}
],
"PriceGroupGivenCard": 64
}
application/xml, text/xml
<ArticleSaleInformationResponseModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Articles>
<ArticleSaleData>
<ArticleNumber>sample string 1</ArticleNumber>
<ArticleLabel>sample string 2</ArticleLabel>
<IsSaleAllowed>true</IsSaleAllowed>
<PriceGivenCard>4</PriceGivenCard>
<IsSpecialPrice>true</IsSpecialPrice>
<PriceGroupPrices>
<PriceGroupPriceInformation>
<PriceGroup>64</PriceGroup>
<Price>2</Price>
</PriceGroupPriceInformation>
<PriceGroupPriceInformation>
<PriceGroup>64</PriceGroup>
<Price>2</Price>
</PriceGroupPriceInformation>
</PriceGroupPrices>
</ArticleSaleData>
<ArticleSaleData>
<ArticleNumber>sample string 1</ArticleNumber>
<ArticleLabel>sample string 2</ArticleLabel>
<IsSaleAllowed>true</IsSaleAllowed>
<PriceGivenCard>4</PriceGivenCard>
<IsSpecialPrice>true</IsSpecialPrice>
<PriceGroupPrices>
<PriceGroupPriceInformation>
<PriceGroup>64</PriceGroup>
<Price>2</Price>
</PriceGroupPriceInformation>
<PriceGroupPriceInformation>
<PriceGroup>64</PriceGroup>
<Price>2</Price>
</PriceGroupPriceInformation>
</PriceGroupPrices>
</ArticleSaleData>
</Articles>
<PriceGroupGivenCard>64</PriceGroupGivenCard>
</ArticleSaleInformationResponseModel>
Error Handling
HTTP Status Codes
An expected error is indicated through the HTTP Status Code 400. In this case you can read the details about the error in the body of the response. Make sure you always check for the HTTP Status Code 200, since many things can go wrong. Unexpected errors are sended with HTTP Status Code 500 for example.
Application Error Codes
| Code | Name | Description |
|---|---|---|
|
|
CardNotFound |
The given customer card was not found |
|
|
ClientNotFound |
The given Client was not found in the system |
|
|
ClientNotAllowed |
The given client can not be used by the given card |
|
|
CardLocked |
The given card is locked. |
Error Formats
application/json, text/json
{
"Data": null,
"ApplicationErrorCode": 4,
"ApplicationMessage": "CardLocked"
}
application/xml, text/xml
<Error xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ApplicationErrorCode>4</ApplicationErrorCode> <ApplicationMessage>CardLocked</ApplicationMessage> </Error>