Продажа
Параметры
Header:
INTENT_OPERATION_TYPE
- SALE
Auth-token
- Токен авторизации (опционально). Подробнее
Тело запроса: Sale
Примеры
Успех
Запрос:
{
"cashier": "Кассир",
"itemList": [
{
"nameTitle": "Товар 1",
"codeNumber": "1",
"typeCode": "0",
"price": "4",
"amount": "1"
},
{
"nameTitle": "Товар 2",
"codeNumber": "234002634987",
"typeCode": "1",
"markings": [
{
"si": "midom0im20m03223d-2-d"
},
{
"ukz": "2321987121CAC"
}
],
],
"price": "1",
"amount": "9999.99",
"isPercentDiscount": false,
"discount": "9999.98",
"isPercentIncrease": true,
"increase": "50",
"section":{
"code": 123,
"name": "бакалея"
}
},
{
"codeNumber": "20",
"price": "4",
"amount": "1",
"isPercentDiscount": true,
"discount": "1"
}
],
"cash": "15",
"cashless": "0",
"certificate": "0",
"isPercentIncrease": false,
"chequeIncrease": "10",
"isPercentDiscount": true,
"chequeDiscount": "10",
"tpTaxNumber": 193141246,
"printCheque": false,
"prefix": [{"Text": {"text": "тексттекст"}}, {"QrCode": {"qrCode" : "BASE64"}}],
"suffix": [{"Text": {"text": "тексттекст"}}, {"QrCode": {"qrCode" : "BASE64"}}],
"operationId": "123"
}
Ответ BaseResponse:
{
"dateTime": "2022-01-22T12:00:00+03:00",
"messageDetail": "Успешная оплата",
"messageTitle": "Успех",
"numberCheck": "1234",
"registerNumberSKO": "123456789",
"resultCode": 200,
"rrn": "",
"type": "SALE",
"uid": "461F60C220B2010407CF1091",
"total": "7.97",
"change": "7.03",
"isPrintSuccess": true,
"uuid": "j1923-123mi1-123j19"
"payments": [
{
"type": "Cash",
"sum": "15"
}
]
}
Ошибка (не передано имя кассира)
Запрос:
{
"itemList": [
{
"nameTitle": "Товар 1",
"codeNumber": "1",
"typeCode": "0",
"price": "4",
"amount": "1"
},
{
"nameTitle": "Товар 2",
"codeNumber": "10",
"typeCode": "0",
"price": "1",
"amount": "9999.99",
"isPercentDiscount": false,
"discount": "9999.98"
},
{
"codeNumber": "20",
"price": "4",
"amount": "1",
"isPercentDiscount": true,
"discount": "1"
}
],
"cash": "15",
"cashless": "0",
"certificate": "0"
}
Ответ BaseResponse:
{
"messageDetail": "Не передано имя кассира",
"messageTitle": "Ошибка",
"resultCode": 435,
"type": "SALE"
}
Ошибка (превышен лимит цены)
Запрос:
{
"cashier": "Кассир",
"itemList": [
{
"nameTitle": "Товар 9999",
"codeNumber": "999",
"typeCode": "0",
"price": "99999999",
"amount": "9999.99",
"isPercentDiscount": false,
"discount": "9999.98"
}
],
"cash": "15",
"cashless": "0",
"certificate": "0"
}
Ответ BaseResponse:
{
"messageDetail": "Максимально допустимая цена 99999999999.99",
"messageTitle": "Ошибка",
"resultCode": 414,
"type": "SALE"
}