{
  "openapi": "3.0.3",
  "info": {
    "title": "BM Parts B2B API — Процес відвантаження товару",
    "description": "Підмножина повного OpenAPI-опису B2B API: лише методи, що використовуються в туторіалі «Повний процес відвантаження товару» (створення отримувача, налаштувань доставки, кошика, пошук і додавання товару, пречек, рейси та відвантаження). Приклади запитів і відповідей — реальні дані, отримані живими викликами до тестового середовища (devapi.bm.parts).",
    "version": "2.0.0",
    "contact": {
      "name": "BM Parts Developer Support"
    }
  },
  "servers": [
    {
      "url": "/",
      "description": "Current server"
    }
  ],
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    {
      "name": "Delivery"
    },
    {
      "name": "Processing"
    },
    {
      "name": "Search"
    },
    {
      "name": "Shopping Cart"
    }
  ],
  "paths": {
    "/delivery/receivers": {
      "post": {Те
        "tags": [
          "Delivery"
        ],
        "summary": "Створити отримувача",
        "description": "Метод возвращает статус 201 Created при успешном создании контактного лица.",
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "receiver": {
                      "$ref": "#/components/schemas/ReceiverOutputSchema"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "receiver": {
                    "full_name": "Четвоертинський Іван Андрійович",
                    "phone": "388095432101",
                    "uuid": "8203005056BA39E811F19551E0F4F5DA"
                  },
                  "success": true
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "surname": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 50,
                    "pattern": "^[A-Za-zА-Яа-яґєіїҐЄІЇ']+$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 50,
                    "pattern": "^[A-Za-zА-Яа-яґєіїҐЄІЇ']+$"
                  },
                  "middle_name": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 50,
                    "pattern": "^[A-Za-zА-Яа-яґєіїҐЄІЇ']+$"
                  },
                  "phone": {
                    "type": "string",
                    "pattern": "^\\+?(\\d{12})$"
                  }
                }
              },
              "example": {
                "surname": "Четвоертинський",
                "name": "Іван",
                "middle_name": "Андрійович",
                "phone": "+380965432101"
              }
            }
          }
        }
      }
    },
    "/delivery/configs": {
      "get": {
        "tags": [
          "Delivery"
        ],
        "summary": "Налаштування доставки",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configs": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "configs"
                    }
                  }
                },
                "examples": {
                  "Приклад відповіді": {
                    "value": {
                      "configs": [
                        {
                          "return_money": false,
                          "address_delivery": false,
                          "name": "Автостанція, ПІБ, Дніпро, Мінімальне страхування",
                          "uuid": "D84ED7B2695E4779906BA945C1DA7ACE",
                          "city": {
                            "region": {
                              "name": "Дніпропетровська область"
                            },
                            "name": "Дніпро"
                          },
                          "receiver": {
                            "full_name": "ПІБ"
                          },
                          "carrier_warehouse": null,
                          "full_insurance": false,
                          "is_default": false,
                          "carrier": {
                            "name": "Автостанція",
                            "uuid": "A1D5CECB05F23C9D430E95281E004524"
                          },
                          "flat": "",
                          "address": "",
                          "house": "",
                          "restricted_delivery": false,
                          "is_paid_delivery": false
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "configs": [
                    {
                      "uuid": "92DB0П5056BAD76D31EC9099ABAD38B4",
                      "name": "Самовивіз, Луцьк РЦ, Четвертинський Іван Петрович",
                      "carrier": {
                        "uuid": "927D8673D92E46174374F9AB37AF08FB",
                        "name": "Самовивіз"
                      },
                      "carrier_warehouse": {
                        "name": "Луцьк РЦ",
                        "address": "вул. Корсака Івана 1",
                        "max_weight": 0
                      },
                      "city": {
                        "name": "Луцьк РЦ",
                        "region": {
                          "name": "Волинська область"
                        }
                      },
                      "receiver": {
                        "full_name": "Четвертинський Іван Петрович"
                      },
                      "is_default": false
                    }
                  ]
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці"
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "cart_uuid"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "q"
          },
          {
            "name": "order_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UUID замовлення, можна передавати декілька (необов’язковий)."
          },
          {
            "name": "product_uuid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UUID товару (необов’язковий)."
          }
        ]
      },
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Створення налаштування доставки",
        "description": "Метод повертає  статус 201 CREATED при успішному створенні налаштування\nдоставки.",
        "responses": {
          "422": {
            "description": "Помилка валідації",
            "content": {
              "application/json": {
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/api/v2/"
                }
              }
            }
          },
          "201": {
            "description": "Налаштування доставки створено",
            "content": {
              "application/json": {
                "example": {
                  "success": true,
                  "message": null,
                  "config": {
                    "uuid": "8203005056BA39E811F1955C6A61C00C",
                    "name": "Нова пошта, Луцьк, Луцьк (1), Четвоертинський Іван Андрійович, Мінімальне страхування",
                    "carrier": {
                      "uuid": "B4466E1779A2E30B435620CEA0330826",
                      "name": "Нова пошта"
                    },
                    "carrier_warehouse": {
                      "name": "Луцьк (1)",
                      "address": "Відділення №1: вул. Корсака Івана, 1 (поруч з Адреналін-Сіті)",
                      "max_weight": 0
                    },
                    "city": {
                      "name": "Луцьк",
                      "region": {
                        "name": "Волинська область"
                      }
                    },
                    "receiver": {
                      "full_name": "Четвоертинський Іван Андрійович"
                    },
                    "address": "",
                    "house": "",
                    "flat": "",
                    "note": "",
                    "full_insurance": false,
                    "return_money": false,
                    "address_delivery": false
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "receiver": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "city": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "carrier": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "carrier_warehouse": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "full_insurance": {
                    "type": "boolean"
                  },
                  "is_default": {
                    "type": "boolean"
                  },
                  "building": {
                    "type": "string"
                  },
                  "apartment": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  },
                  "latitude": {
                    "type": "string",
                    "pattern": "^(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,17})?))$",
                    "description": "Вказано неправильне значення широти"
                  },
                  "longitude": {
                    "type": "string",
                    "pattern": "^(?:180(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\\.[0-9]{1,17})?))$",
                    "description": "Вказано неправильне значення довготи"
                  }
                }
              },
              "example": {
                "receiver": "8203005056BA39E811F19551E0F4F5DA",
                "city": "92AF000C2947F7AE11E2D3FFF549A166",
                "carrier": "B4466E1779A2E30B435620CEA0330826",
                "carrier_warehouse": "9680000C2947F7AE11E3524BCCEB032E",
                "is_default": true
              }
            }
          }
        }
      }
    },
    "/delivery/config/confirm": {
      "post": {
        "tags": [
          "Delivery"
        ],
        "summary": "Підтвердження створення налаштування доставки",
        "description": "У випадку успішного підтвердження повертається статус 201",
        "responses": {
          "422": {
            "description": "Помилка валідації"
          }
        },
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента"
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Код підтвердження з смс"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": true,
                "description": "Довільний JSON (ключі визначаються клієнтом)"
              }
            }
          }
        }
      }
    },
    "/shopping/carts": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Створення кошика",
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "carts": {
                      "$ref": "#/components/schemas/ShoppingCartSchema"
                    }
                  }
                },
                "example": {
                  "carts": {
                    "warehouse": {
                      "uuid": "ACF9000C2947F7AE11E28A2B02C4AD32",
                      "name": "Луцьк РЦ"
                    },
                    "weight": 0.0,
                    "currency_name": "ГРН",
                    "total": 0.0,
                    "products": [],
                    "products_count": 0,
                    "comment": "",
                    "owner": {
                      "uuid": "81EE005056AC66D611EA4E45FCEC98E5",
                      "name": "Контрагент [000034215]",
                      "f": 1
                    },
                    "uuid": "ca97cacb8c824d999bddfaa5a7660491",
                    "name": "string"
                  }
                }
              }
            }
          },
          "422": {
            "description": "Помилка валідації"
          }
        },
        "parameters": [
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента"
          },
          {
            "name": "id_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShoppingCartCreateRequestSchema"
              },
              "example": {
                "name": "Замовлення для СТО №1"
              }
            }
          }
        }
      }
    },
    "/search/products": {
      "get": {
        "tags": [
          "Search"
        ],
        "summary": "Пошук товарів по каталогу",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchProductsResponseSchema"
                },
                "example": {
                  "products": {
                    "90DFDE6FDE75833F4ECFF1B18F3EDD86": {
                      "article": "765155-9007W",
                      "brand": "GARRETT",
                      "name": "Турбіна MB Sprinter 218/318/418/518 3.0CDI OM642 (заводська реставрація)",
                      "price": "28767.54",
                      "currency_name": "ГРН",
                      "available": true,
                      "in_stocks": [
                        {
                          "uuid": "ACF9000C2947F7AE11E28A2B02C4AD32",
                          "name": "Луцьк РЦ",
                          "quantity": "6",
                          "is_main": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            },
            "description": "Номер сторінки"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Кількість елементів на сторінці"
          },
          {
            "name": "products_as",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "obj",
                "arr"
              ],
              "default": "obj"
            },
            "description": "Формат повернення товарів"
          },
          {
            "name": "cart_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID кошика для кількості в кошику"
          },
          {
            "name": "with_extra",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "with_extra"
          }
        ]
      }
    },
    "/shopping/cart/{cart_uuid}/product/{product_uuid}/{quantity}": {
      "post": {
        "tags": [
          "Shopping Cart"
        ],
        "summary": "Додавання товару до кошика",
        "responses": {
          "201": {
            "description": "Створено",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cart": {
                      "$ref": "#/components/schemas/ShoppingCartSchema"
                    },
                    "previous_quantity": {
                      "type": "object",
                      "description": "previous_quantity"
                    },
                    "position_quantity": {
                      "type": "object",
                      "description": "position_quantity"
                    },
                    "position_total": {
                      "type": "object",
                      "description": "position_total"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "previous_quantity": 0,
                  "position_quantity": 1,
                  "position_total": 28767.54,
                  "cart": {
                    "uuid": "c1c0ba183035451aa05409752e5684f4",
                    "products_count": 1,
                    "total": 28767.54,
                    "weight": 8.4,
                    "warehouse": {
                      "uuid": "ACF9000C2947F7AE11E28A2B02C4AD32",
                      "name": "Луцьк РЦ"
                    },
                    "currency_name": "ГРН"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "cart_uuid"
          },
          {
            "name": "product_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "product_uuid"
          },
          {
            "name": "quantity",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "quantity"
          },
          {
            "name": "id_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора"
          },
          {
            "name": "with_extra",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "with_extra"
          }
        ]
      }
    },
    "/processing/cart/{cart_uuid}/pre_check": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Перевірити доступність відвантаження корзини",
        "description": "У випадку, якщо ID корзини не передано вернеться відповідь 404 NOT FOUND.",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "allowed": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "object",
                      "description": "message"
                    }
                  }
                },
                "examples": {
                  "allowed": {
                    "summary": "Кошик дозволено відвантажити",
                    "value": {
                      "allowed": true,
                      "error": false,
                      "message": null
                    }
                  },
                  "blocked_unsigned_documents": {
                    "summary": "Реальний приклад — непідписані електронні документи",
                    "value": {
                      "allowed": false,
                      "error": true,
                      "message": "Відвантаження заборонено. Наявні непідписані електронні документи."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Не знайдено"
          },
          "422": {
            "description": "Помилка валідації"
          }
        },
        "parameters": [
          {
            "name": "cart_uuid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "cart_uuid"
          }
        ]
      }
    },
    "/processing/departures": {
      "get": {
        "tags": [
          "Processing"
        ],
        "summary": "Отримати список доступних виїздів",
        "description": "is_working_time Позначає чи клієнт працює в цей час",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "departures": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      },
                      "description": "departures"
                    }
                  }
                },
                "example": {
                  "departures": [
                    {
                      "name": "Експрес-самовивіз (отримання через 15 хв)",
                      "route_at": "2026-08-11T00:00:00Z",
                      "route_code": "000000264",
                      "uuid": "c9acc64dc12fb07d04197cb92861688b 2026-08-11T00:00:00Z",
                      "departure_at": "2026-08-11T00:00:00Z",
                      "key": "c9acc64dc12fb07d04197cb92861688b",
                      "expired_at": "2026-08-11T20:45:00Z",
                      "is_working_time": true,
                      "message": null
                    },
                    {
                      "name": "завтра",
                      "route_at": "2026-08-12T00:00:00Z",
                      "route_code": "000000264",
                      "uuid": "498b15b20b9f39aa7acc03f328d3f8bd 2026-08-12T00:00:00Z",
                      "departure_at": "2026-08-12T00:00:00Z",
                      "key": "498b15b20b9f39aa7acc03f328d3f8bd",
                      "expired_at": "2026-08-12T20:45:00Z",
                      "is_working_time": true,
                      "message": null
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "delivery_config передано без warehouse (обидва документовані як опційні, але на практиці обов'язкові разом)",
            "content": {
              "application/json": {
                "example": {
                  "message": "Помилка перевірки параметрів запиту",
                  "documentation_url": "https://developer.bm.parts/api/v2/"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "delivery_config",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "delivery_config"
          },
          {
            "name": "warehouse",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "warehouse"
          }
        ]
      }
    },
    "/processing/sync": {
      "post": {
        "tags": [
          "Processing"
        ],
        "summary": "Відвантажити корзину (синхронно)",
        "description": "Данный метод позволяет сформировать реализацию из корзины и передать документ в обработку\nсотрудникам склада и логистики BM Parts. После успешного создания документа это сразу отразится\nна вашем долге и кредитной линии.\n\nСхему запросов можно увидеть на рисунке. В зеленой зоне показаны данные, которые могут быть вынесены в\nконстанты.\n\nВ случае, если по товару изменилась цена за время работы с корзиной, будет возвращен следующий ответ:\n\nБлок processing_report",
        "responses": {
          "200": {
            "description": "Успішний запит",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cart": {
                      "type": "string",
                      "description": "**Обязательный** `ID корзины <shopping.html#get-shopping-carts>`_"
                    },
                    "delivery_config": {
                      "type": "string",
                      "description": "`ID настройки доставки <delivery.html#get-delivery-configs>`_"
                    },
                    "warehouse": {
                      "type": "string",
                      "description": "`ID склада <company.html#get-company-warehouses>`_ с которого отгружать корзину"
                    },
                    "key": {
                      "type": "string",
                      "description": "`Ключ <processing.html#get-processing-departures>`_"
                    },
                    "expired_at": {
                      "type": "string",
                      "description": "`Время жизни ключа <processing.html#get-processing-departures>`_"
                    },
                    "route_code": {
                      "type": "string",
                      "description": "`Код рейса <processing.html#get-processing-departures>`_"
                    },
                    "route_at": {
                      "type": "string",
                      "description": "`Дата и время рейса <processing.html#get-processing-departures>`_"
                    },
                    "departure_at": {
                      "type": "string",
                      "description": "`Время выезда курьера со склада <processing.html#get-processing-departures>`_"
                    },
                    "comment": {
                      "type": "string",
                      "description": "Комментарий к отгрузке"
                    },
                    "save_unprocessed": {
                      "type": "boolean",
                      "description": "Сохранять неотгруженные товары. По умолчанию, да Данный метод позволяет сформировать реализацию из корзины и передать документ в обработку сотрудникам склада и логистики BM Parts. После успешного создания документа это сразу отразится на вашем долге и кредитной линии. Схему запросов можно увидеть на рисунке. В зеленой зоне показаны данные, которые могут быть вынесены в константы. .. image:: _static/processing_sync.png .. note:: Для упрощенной отгрузки опустите параметры key, departure_at, expired_at, route_at. .. note:: Метод выполняет **синхронную** отгрузку заказа, таймаут по данному запросу может составлять до 30 сек. В случае, если по товару изменилась цена за время работы с корзиной, будет возвращен следующий ответ: .. code-block:: json { \"result\": false, \"error\": \"price_error\", \"document\": null, \"processing_report\": null, \"changed_prices\": [ { \"code\": \"000027828\", \"article\": \"5303 988 7004\", \"name\": \"Турбина MB Sprinter 313 2.2CDI OM611 (без картонной коробки)\", \"brand_code\": 182, \"brand_name\": \"3K\", \"count\": 1, \"price_old\": 500, \"price_new\": 290 } ], \"saved_unshipped\": null, \"download_unshipped\": null } Пример, если не удалось отгрузить ни один товар: .. code-block:: json { \"result\": false, \"error\": \"По вашему заказу не отгружен ни один товар. Причина: отсутствие товара на складе.\", \"document\": null, \"processing_report\": null, \"changed_prices\": null, \"saved_unshipped\": null, \"download_unshipped\": null } Пример ответа когда документ заказ покупателя создан успешно: .. code-block:: json { \"result\": true, \"error\": null, \"document\": { \"uuid\": \"8191005056BA39E811EBC9F072221C0D\", \"number\": \"ПП001325988\", \"date\": \"2021-06-10T16:33:32Z\", \"sum\": 951.42, \"currency\": \"ГРН\", \"document_type\": \"ЗаказПокупателя\", \"type\": \"000000CC\", \"url\": \"https://api.bm.parts/documents/000000CC/8191005056BA39E811EBC9F072221C0D\" }, \"processing_report\": [ { \"uuid\": \"B18D1CF3FFE6B43B403C1948B8611EAF\", \"article\": \"RAC630\", \"name\": \"Компрессор автомобильный 12V/120W/5.5 BAR (авто откл./фонарь/цифровой манометр PSI)\", \"brand_code\": 741, \"brand_name\": \"RING\", \"planned\": 1, \"shipped\": 1, \"left_until\": 0, \"reserve\": 0, \"ordered\": 0, \"count\": 0 } ], \"changed_prices\": null, \"saved_unshipped\": null, \"download_unshipped\": null } Блок processing_report"
                    },
                    "planned": {
                      "type": "string",
                      "description": "Запланировано отгрузить (штук)"
                    },
                    "shipped": {
                      "type": "string",
                      "description": "Фактически отгружено"
                    },
                    "left_until": {
                      "type": "string",
                      "description": "Неотгружено"
                    },
                    "reserve": {
                      "type": "string",
                      "description": "Зарезервировано, всегда возвращается 0"
                    },
                    "ordered": {
                      "type": "string",
                      "description": "В размещении, всегда возвращается 0"
                    },
                    "count": {
                      "type": "string",
                      "description": "Остаток, всегда возвращается 0"
                    },
                    "result": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "string",
                      "nullable": true
                    },
                    "document": {
                      "type": "string",
                      "nullable": true
                    },
                    "processing_report": {
                      "type": "string",
                      "nullable": true
                    },
                    "changed_prices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "article": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "brand_code": {
                            "type": "integer"
                          },
                          "brand_name": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          },
                          "price_old": {
                            "type": "integer"
                          },
                          "price_new": {
                            "type": "integer"
                          }
                        },
                        "required": [
                          "code",
                          "article",
                          "name",
                          "brand_code",
                          "brand_name",
                          "count",
                          "price_old",
                          "price_new"
                        ]
                      },
                      "nullable": true
                    },
                    "saved_unshipped": {
                      "type": "string",
                      "nullable": true
                    },
                    "download_unshipped": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "examples": {
                  "success": {
                    "summary": "Реалізацію створено",
                    "value": {
                      "result": true,
                      "document": "<order_uuid>",
                      "processing_report": null,
                      "changed_prices": null,
                      "saved_unshipped": null,
                      "download_unshipped": null,
                      "delivery_config": null
                    }
                  },
                  "blocked_unsigned_documents": {
                    "summary": "Реальний приклад — непідписані електронні документи",
                    "value": {
                      "result": false,
                      "error": "Наявні непідписані електронні документи",
                      "document": null,
                      "processing_report": null,
                      "changed_prices": null,
                      "saved_unshipped": null,
                      "download_unshipped": null,
                      "delivery_config": null
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Внутрішня помилка сервера"
          }
        },
        "parameters": [
          {
            "name": "id_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "uuid",
                "code"
              ],
              "default": "uuid"
            },
            "description": "Тип ідентифікатора"
          },
          {
            "name": "client_uuid",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "UUID пов'язаного контрагента"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "delivery_config": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "warehouse": {
                    "type": "string",
                    "pattern": "^([A-F0-9]{32}|[a-f0-9-]{36})$"
                  },
                  "key": {
                    "type": "string"
                  },
                  "expired_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "departure_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "route_code": {
                    "type": "string"
                  },
                  "cart": {
                    "type": "string"
                  },
                  "route_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "comment": {
                    "type": "string"
                  },
                  "save_unprocessed": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "cart": "c1c0ba183035451aa05409752e5684f4",
                "delivery_config": "92DB005056BAD76D11EC9099ABAD38B4",
                "warehouse": "ACF9000C2947F7AE11E28A2B02C4AD32",
                "key": "c9acc64dc12fb07d04197cb92861688b",
                "route_code": "000000264",
                "route_at": "2026-08-11T00:00:00Z",
                "departure_at": "2026-08-11T00:00:00Z",
                "expired_at": "2026-08-11T20:45:00Z"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ShoppingCartSchema": {
        "type": "object",
        "properties": {
          "currency_name": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "nullable": true,
            "maxLength": 50,
            "description": "Наименование"
          },
          "uuid": {
            "type": "string",
            "maxLength": 36,
            "description": "ИД"
          },
          "products_count": {
            "type": "number",
            "nullable": true,
            "description": "КоличествоСтрок"
          },
          "total": {
            "type": "number",
            "nullable": true,
            "description": "Сумма"
          },
          "weight": {
            "type": "number",
            "nullable": true,
            "description": "Вес"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingCartProductSchema"
            }
          },
          "owner": {
            "type": "object"
          },
          "comment": {
            "type": "string",
            "nullable": true,
            "maxLength": 500,
            "description": "Комментарий"
          },
          "warehouse": {
            "$ref": "#/components/schemas/Warehouse"
          }
        }
      },
      "ReceiverOutputSchema": {
        "type": "object",
        "properties": {
          "phone": {
            "readOnly": true
          },
          "full_name": {
            "nullable": true,
            "description": "Наименование"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Уникальный идентификатор"
          },
          "_Fld1335RRef": {
            "type": "string",
            "nullable": true,
            "maxLength": 16,
            "description": "РольКонтактногоЛица"
          },
          "marked": {
            "type": "boolean",
            "nullable": true,
            "description": "ПометкаУдаления"
          },
          "code": {
            "nullable": true,
            "description": "Код"
          },
          "_IsMetadata": {
            "type": "boolean",
            "nullable": true
          },
          "comment": {
            "nullable": true,
            "description": "Комментарий"
          }
        }
      },
      "ShoppingCartProductSchema": {
        "type": "object",
        "properties": {
          "product": {
            "$ref": "#/components/schemas/ProductNested4"
          },
          "price": {
            "nullable": true,
            "description": "Цена"
          },
          "position_total": {
            "type": "number"
          },
          "weight": {
            "nullable": true,
            "description": "Вес"
          },
          "quantity": {
            "nullable": true,
            "description": "Количество"
          }
        }
      },
      "RestrictedDeliverySchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string"
          }
        }
      },
      "ProductNested4": {
        "type": "object",
        "properties": {
          "article": {
            "nullable": true,
            "description": "Артикул"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          },
          "multiplicity": {
            "readOnly": true
          },
          "default_image": {
            "$ref": "#/components/schemas/AdditionalInfoNested"
          },
          "name": {
            "type": "string"
          },
          "brand": {
            "$ref": "#/components/schemas/BrandNestedSchema"
          },
          "restricted_delivery": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RestrictedDeliverySchema"
            }
          },
          "is_paid_delivery": {
            "type": "boolean"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "BrandNestedSchema": {
        "type": "object",
        "properties": {
          "name": {
            "nullable": true,
            "description": "Наименование"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16
          }
        },
        "required": [
          "uuid"
        ]
      },
      "Warehouse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "uuid": {
            "type": "string",
            "maxLength": 16,
            "description": "Уникальный идентификатор"
          }
        },
        "required": [
          "uuid"
        ]
      },
      "AdditionalInfoNested": {
        "type": "object",
        "properties": {
          "file_path": {
            "type": "string",
            "nullable": true,
            "description": "ПутьКФайлуНаДиске"
          }
        }
      },
      "SearchProductsResponseSchema": {
        "type": "object",
        "properties": {
          "found_by": {
            "type": "string",
            "description": "За яким полем знайдено"
          },
          "total": {
            "type": "integer",
            "description": "Загальна кількість результатів"
          },
          "products": {
            "type": "array",
            "description": "Список знайдених товарів",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "ShoppingCartCreateRequestSchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Назва кошика"
          },
          "contract_uuid": {
            "type": "string",
            "description": "UUID договору"
          },
          "warehouse_uuid": {
            "type": "string",
            "description": "UUID складу"
          }
        }
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Signed API access token (see login/token flow)"
      },
      "SessionToken": {
        "type": "apiKey",
        "in": "header",
        "name": "BM-X-Token",
        "description": "Optional session identifier for web clients"
      }
    }
  }
}