Skip to main content

Створити позиції протоколу POST /api/des-pscan/protocols/{protocolId}/items

Повертає протоколи, операційні документи яких відповідають заданому відношенню. Відповідність має бути точною, з урахуванням регістру та в межах tenant; значення не нормалізуються. Для `relationType=order` параметр `relatedCode` може містити щонайбільше 255 символів. Для `relationType=operation-document` додаткові обмеження щодо довжини не застосовуються.

REQUEST

URL

https://des-pscan.stage.akcyz.edin.ua/

Метод запиту

POST

URL запиту

/api/des-pscan/protocols/{protocolId}/items

PATH параметри

protocolId (string) обов'язково - ідентифікатор протокола

URL параметри

tenant (string) обов'язково - Tenant ідентифікатор

dryRun (boolean) необов'язково

Headers

 

Authorization

Bearer

Content-Type

application/json

REQUEST


JSON Body

об'єкт FillScanningProtocolRequest

 

JSON приклад запиту:

 

{
  "items": [
    {
      "exciseCode": "string",
      "barcode": "string",
      "ssccCode": "string",
      "readableCode": "string",
      "legacyExciseCode": "string",
      "scannedAt": "2026-11-16T15:32:17.297Z",
      "quantity": 0
    }
  ]
}
RESPONSE
  • Статус 202 - Accepted.

Об'єкт FillScanningProtocolResponse.

  •  Статус 400 - Bad request
  • Статус 404 - Not Found.

Некоректне тіло запиту.

JSON приклад відповіді:

{
  "businessUnitId": "string",
  "items": [
    {
      "itemId": "string",
      "scannedBy": "string",
      "scannedAt": "2026-11-16T15:46:18.053Z",
      "exciseCode": "string",
      "barcode": "string",
      "ssccCode": "string",
      "readableCode": "string",
      "legacyExciseCode": "string",
      "quantity": 0,
      "itemSource": "string",
      "itemType": "string",
      "articleId": "string",
      "validationStatus": "string",
      "validationMessage": "string",
      "documentId": "string",
      "validations": {
        "additionalProp1": {
          "options": {
            "propertyNameCaseInsensitive": true
          },
          "parent": "string",
          "root": "string"
        },
        "additionalProp2": {
          "options": {
            "propertyNameCaseInsensitive": true
          },
          "parent": "string",
          "root": "string"
        },
        "additionalProp3": {
          "options": {
            "propertyNameCaseInsensitive": true
          },
          "parent": "string",
          "root": "string"
        }
      }
    }
  ],
  "documentIds": [
    "string"
  ]
}