Ответ на запрос (Response to request)
Формат JSON ответа на запрос получения статуса массива КМ. Коды ошибок приведены в разделе 2.3.15.
Пример JSON ответа (буфер существует)
HTTP/1.1 200 OK
Pragma: no-cache
X-XSS-Protection: 1; mode=block
Expires: 0
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Length: 659
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
{
"poolInfos" : [ {
"status" : "READY",
"quantity" : 9,
"leftInRegistrar" : 0,
"registrarId" : "Virtual Registrar",
"isRegistrarReady" : true,
"registrarErrorCount" : 0,
"lastRegistrarErrorTimestamp" : 0
}, {
"status" : "READY",
"quantity" : 11,
"leftInRegistrar" : 0,
"registrarId" : "Virtual Registrar",
"isRegistrarReady" : true,
"registrarErrorCount" : 0,
"lastRegistrarErrorTimestamp" : 0
} ],
"leftInBuffer" : 0,
72
"totalCodes" : 20,
"poolsExhausted": false,
"unavailableCodes" : 0,
"availableCodes" : 20,
"orderId" : "b024ae09-ef7c-449e-b461-05d8eb116c79",
"gtin" : "01334567894339",
"bufferStatus" : "ACTIVE",
"totalPassed": 0,
"omsId" : "CDF12109-10D3-11E6-8B6F-0050569977A1"
}
Пример JSON ответа (для отклонённого заказа)
HTTP/1.1 200 OK
Pragma: no-cache
X-XSS-Protection: 1; mode=block
Expires: 0
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Content-Length: 659
Content-Type: application/json;charset=UTF-8
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
{
"leftInBuffer" : -1,
"poolsExhausted": false,
"totalCodes" : -1,
"unavailableCodes" : -1,
"availableCodes" : -1,
"orderId" : "6be66e5e-ab2b-4b8b-b2b7-19a71ddefb9d",
"gtin" : "04606038003172",
"bufferStatus" : "REJECTED",
"rejectionReason": "Order declined: Контрольно-логическая проверка
заказа не пройдена. 0106: Значение 04606038003172 в поле 'GTIN' в
документе 'Заказ КМ'{1} не найдено в реестре GTIN.",
"totalPassed": -1,
"omsId": "0206854c-f182-4356-8207-0c2517c3853b"
}