Delivery routes

Send delivery route data in JSON format.

POST/api/v1/delivery/routes
Method
POST
Content type
application/json
Authentication
Required
Maximum payload
1 MiB
Request frequency
30 requests per 60 seconds

Request headers

Send these headers with every POST request.

Content-Type: application/json
Authorization: Bearer y3m_ABCD2345_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Request fields

Required and optional fields accepted in the JSON request body.

FieldTypeRequirementDescription
numberstringRequiredUnique number used to prevent duplicates.
routeobjectRequiredRoute identification.
route.codestringOptionalExternal route code.
route.typestringRequiredRoute type or weekday.
route.namestringRequiredRoute name.
scheduledDatedateRequiredStart date in YYYY-MM-DD format.
endDatedateOptionalEnd date in YYYY-MM-DD format. Defaults to scheduledDate.
currencystringRequiredThree-letter uppercase currency code.
ordersarrayRequiredBetween 1 and 1,000 delivery orders.
orders[].positionintegerOptionalPositive order position. Supplied positions must be unique.
orders[].customerstringRequiredCustomer name.
orders[].invoiceNumberstringRequiredInvoice number.
orders[].invoiceDatedateRequiredInvoice date in YYYY-MM-DD format.
orders[].phonesstring[]OptionalCustomer phone numbers. The array may be empty.
orders[].citystringRequiredDelivery city.
orders[].addressstringRequiredDelivery address.
orders[].commentstring | nullOptionalDelivery comment.
orders[].productAmountdecimal stringOptionalProduct amount without delivery.
orders[].deliveryAmountdecimal stringOptionalDelivery amount.
orders[].totalAmountdecimal stringOptionalTotal order amount.
orders[].itemQuantityintegerOptionalNon-negative item quantity.
orders[].placeQuantityintegerOptionalNon-negative place quantity.

Error responses

Possible errors returned by this endpoint and how to resolve them.

StatusCodeMeaningResolution
400INVALID_JSONThe request body is not valid JSON.Send one correctly formatted JSON object.
400INVALID_PAYLOADThe JSON body is not an object.Send a JSON object instead of an array, string, number, or null.
401UNAUTHORIZEDThe Authorization header is missing, malformed, or contains an invalid API key.Send a valid API key using the Bearer authorization scheme.
403FORBIDDENThe API key is valid but does not have access to this module.Enable the required module for the key or use another key.
409DUPLICATE_NUMBERA payload with the same number has already been received for this module and resource.Send a new unique number or do not resend the existing payload.
413PAYLOAD_TOO_LARGEThe request body exceeds the 1 MiB limit.Reduce the JSON payload size to 1 MiB or less.
415UNSUPPORTED_MEDIA_TYPEThe Content-Type header is not application/json.Send Content-Type: application/json.
422VALIDATION_ERRORThe JSON is valid but one or more fields do not satisfy the endpoint contract.Use error.details to correct the specified field paths.
429RATE_LIMIT_EXCEEDEDMore than 30 requests were sent within 60 seconds.Wait for the number of seconds specified by the Retry-After header.
500INTERNAL_ERRORAuthentication or rate-limit processing is temporarily unavailable.Retry later. Contact support if the error continues.
500STORAGE_ERRORThe validated payload could not be stored.Retry later. Contact support if the error continues.

Example request

Send this JSON object in the POST request body.

{
  "number": "947",
  "route": {
    "code": "947",
    "type": "Пн",
    "name": "МОЮ Біляєвка"
  },
  "scheduledDate": "2026-10-19",
  "endDate": "2026-10-19",
  "currency": "UAH",
  "orders": [
    {
      "position": 1,
      "customer": "Кобилянський Віталій Валентинович",
      "invoiceNumber": "947/27144",
      "invoiceDate": "2026-10-19",
      "phones": [
        "+380502281669"
      ],
      "city": "Велика Михайлівка",
      "address": "Шкільна вул., 1а",
      "comment": "Біляївка",
      "productAmount": "50.00",
      "deliveryAmount": "3.00",
      "totalAmount": "53.00",
      "itemQuantity": 12,
      "placeQuantity": 2
    },
    {
      "position": 2,
      "customer": "Радіонов Сергій Володимирович",
      "invoiceNumber": "947/28428",
      "invoiceDate": "2026-10-19",
      "phones": [
        "0667603071",
        "+380667603071"
      ],
      "city": "Роздільна",
      "address": "Малиновського вул., 1",
      "comment": null,
      "productAmount": "150.00",
      "deliveryAmount": "9.95",
      "totalAmount": "159.95",
      "itemQuantity": 5,
      "placeQuantity": 1
    }
  ]
}