POST

addComing

POST<baseUrl>/?section=productMotion&action=addComing

date і time — обовʼязкові (без них документ не створюється), окрім режиму backdating — тоді дата й час беруться з обʼєкта backdating. formId — рекомендовано передавати (унікальний UUID форми): запобігає дублюванню документа при повторному надсиланні.

Створює нове надходження товарів з використанням черги.

Відповідь: { taskId: "uuid", activeTasksCount: number }

Приклад запиту

{
  "formId": "<uuid>",
  "tradepointId": 1,
  "warehouseId": 3,
  "date": "07-10-2025",
  "time": "21:00:00",
  "backdatingCheckbox": false,
  "provider": {
    "providerId": 42,
    "providerName": "ТОВ Постачальник"
  },
  "expenses": -16,
  "payment": {
    "status": "topay",
    "from": 15
  },
  "products": [
    {
      "nomenclatureId": 27,
      "nomenclatureName": "Чай королівський",
      "barcode": "1234567890123",
      "quantity": 100,
      "cost": 15.5,
      "price": 25,
      "summ": 1550,
      "unit": "pcs",
      "container": null,
      "returnProducts": null,
      "motionId": null,
      "deleted": false,
      "actualPrice": null,
      "savedCost": 15.5
    }
  ],
  "comment": "Надходження товару від постачальника",
  "attachmentFiles": [],
  "changeChannelPrice": false,
  "channelId": null,
  "sumCost": 1550,
  "shiftId": null,
  "clientId": null,
  "projectId": null
}

Параметри запиту

ПараметрТипОпис
timezonestringЗсув часового поясу для дат (напр. "+3", "-2").
editedDocumentstring
terminalIdstring
workerIdstring
draftIdstring
queue_executionstring

Тіло запиту JSON

ПолеТипОпис
attachmentFilesstring
backdatingstring
changeChannelPricestring
channelIdstring
clientIdstring
commentstring
date*string
expensesstring
formIdstring
invoiceImagestring
invoiceImageNamestring
paymentstring
products*string
projectIdstring
providerstring
rrodatastring
shiftIdstring
sumCoststring
time*string
tradepointId*integerID торгової точки.
warehouseId*string

Відповідь

Успіх — status: "done" та обʼєкт data.

Повертає довільний обʼєкт у полі data.

Можливі помилки

  • terminal id is required for cashbox payment
  • warehouse does not belong to tradepoint
  • warehouse is deleted. restore the warehouse to work with documents
  • product quantity must be greater than zero
  • you have to choose the wallet
  • cash box balance cannot be less than zero
  • ERROR CODE: 823144342 | coming error
  • Method not selected
  • error with creating a document
  • access denied
  • enter data