{ "openapi": "3.1.0", "info": { "title": "Havvo Express Partner API", "description": "API для интеграции партнеров Havvo Express: клиенты, заявки, грузы, перемещения, лейблы, тарифы, справочники, просмотр финансов и вебхуки. Создание, изменение и удаление платежей недоступны.", "version": "1.0.0" }, "paths": { "/api/partner/v1/account": { "get": { "tags": [ "partner-api-v1" ], "summary": "Api Account", "description": "Return the partner identity derived from the API key and enabled scopes.", "operationId": "api_account_api_partner_v1_account_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AccountView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks": { "get": { "tags": [ "partner-api-v1" ], "summary": "Api Webhooks", "operationId": "api_webhooks_api_partner_v1_webhooks_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookView" }, "title": "Response Api Webhooks Api Partner V1 Webhooks Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "post": { "tags": [ "partner-api-v1" ], "summary": "Api Create Webhook", "operationId": "api_create_webhook_api_partner_v1_webhooks_post", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 8, "maxLength": 200 }, { "type": "null" } ], "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}": { "get": { "tags": [ "partner-api-v1" ], "summary": "Api Webhook", "operationId": "api_webhook_api_partner_v1_webhooks__webhook_id__get", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "delete": { "tags": [ "partner-api-v1" ], "summary": "Api Delete Webhook", "operationId": "api_delete_webhook_api_partner_v1_webhooks__webhook_id__delete", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "patch": { "tags": [ "partner-api-v1" ], "summary": "Update Webhook Events", "operationId": "update_webhook_events_api_partner_v1_webhooks__webhook_id__patch", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEventsUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients": { "get": { "tags": [ "partner-api-v1" ], "summary": "Clients", "operationId": "clients_api_partner_v1_clients_get", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": "string", "maxLength": 200, "default": "", "title": "Q" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "updated_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated From" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 30 }, { "type": "null" } ], "title": "Status" } }, { "name": "contact", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 320 }, { "type": "null" } ], "title": "Contact" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderPage_ClientView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "post": { "tags": [ "partner-api-v1" ], "summary": "Create Client", "operationId": "create_client_api_partner_v1_clients_post", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 8, "maxLength": 200 }, { "type": "null" } ], "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicClientCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}": { "get": { "tags": [ "partner-api-v1" ], "summary": "Client", "operationId": "client_api_partner_v1_clients__client_id__get", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "patch": { "tags": [ "partner-api-v1" ], "summary": "Update Client", "operationId": "update_client_api_partner_v1_clients__client_id__patch", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "delete": { "tags": [ "partner-api-v1" ], "summary": "Unlink Client", "description": "Archive the relationship through the legacy client DELETE endpoint.", "operationId": "unlink_client_api_partner_v1_clients__client_id__delete", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}/addresses": { "get": { "tags": [ "partner-api-v1" ], "summary": "Client Addresses", "operationId": "client_addresses_api_partner_v1_clients__client_id__addresses_get", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_AddressView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "post": { "tags": [ "partner-api-v1" ], "summary": "Create Client Address", "operationId": "create_client_address_api_partner_v1_clients__client_id__addresses_post", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "Idempotency-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 8, "maxLength": 200 }, { "type": "null" } ], "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}/addresses/{address_id}": { "put": { "tags": [ "partner-api-v1" ], "summary": "Replace Client Address", "operationId": "replace_client_address_api_partner_v1_clients__client_id__addresses__address_id__put", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "address_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Address Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddressView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "delete": { "tags": [ "partner-api-v1" ], "summary": "Deactivate Client Address", "operationId": "deactivate_client_address_api_partner_v1_clients__client_id__addresses__address_id__delete", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "address_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Address Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders": { "get": { "tags": [ "partner-api-v1" ], "summary": "Orders", "operationId": "orders_api_partner_v1_orders_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "operational_status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Operational Status" } }, { "name": "created_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created From" } }, { "name": "created_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Created To" } }, { "name": "updated_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Updated From" } }, { "name": "tracking_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Tracking Code" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "external_tracking_code", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "External Tracking Code" } }, { "name": "legacy_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Legacy Id" } }, { "name": "external_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "External Id" } }, { "name": "sort", "in": "query", "required": false, "schema": { "enum": [ "newest", "oldest" ], "type": "string", "default": "newest", "title": "Sort" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderPage_OrderListItem_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "post": { "tags": [ "partner-api-v1" ], "summary": "Create Order", "description": "Create a partner-owned order using the same validation and price lock as the CRM.", "operationId": "create_order_api_partner_v1_orders_post", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderSummary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/preview": { "post": { "tags": [ "partner-api-v1" ], "summary": "Preview Order", "description": "Calculate a partner's order without creating an order or a payment.", "operationId": "preview_order_api_partner_v1_orders_preview_post", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderDraftInput" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderPreviewResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}": { "get": { "tags": [ "partner-api-v1" ], "summary": "Order", "operationId": "order_api_partner_v1_orders__order_id__get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "delete": { "tags": [ "partner-api-v1" ], "summary": "Delete Order", "description": "Soft-delete an own order only while it is NEW; the retention policy still applies.", "operationId": "delete_order_api_partner_v1_orders__order_id__delete", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderReasonRequest" } } } }, "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "patch": { "tags": [ "partner-api-v1" ], "summary": "Update Partner Order", "description": "Edit the comment using the portal's permissions and lifecycle rules.", "operationId": "update_partner_order_api_partner_v1_orders__order_id__patch", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderQuickUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MutationView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "put": { "tags": [ "partner-api-v1" ], "summary": "Replace Partner Order", "description": "Replace a NEW order through shared price, ownership and received-cargo checks.", "operationId": "replace_partner_order_api_partner_v1_orders__order_id__put", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MutationView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/items/{item_id}": { "get": { "tags": [ "partner-api-v1" ], "summary": "Declared Item", "description": "Return one declared cargo item and its current mutation capabilities.", "operationId": "declared_item_api_partner_v1_orders__order_id__items__item_id__get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclaredItemView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "patch": { "tags": [ "partner-api-v1" ], "summary": "Patch Declared Item", "description": "Edit one unreceived cargo item without replacing the rest of the order.", "operationId": "patch_declared_item_api_partner_v1_orders__order_id__items__item_id__patch", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclaredItemPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclaredItemView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "delete": { "tags": [ "partner-api-v1" ], "summary": "Delete Declared Item", "description": "Soft-delete one unreceived cargo item while preserving audit and finance history.", "operationId": "delete_declared_item_api_partner_v1_orders__order_id__items__item_id__delete", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CargoMutationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclaredItemView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/items/{item_id}/cancel": { "post": { "tags": [ "partner-api-v1" ], "summary": "Cancel Declared Item", "description": "Cancel one unreceived cargo item while preserving the order history.", "operationId": "cancel_declared_item_api_partner_v1_orders__order_id__items__item_id__cancel_post", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "item_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Item Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CargoMutationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeclaredItemView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/cargo": { "get": { "tags": [ "partner-api-v1" ], "summary": "Order Cargo", "description": "Return accepted cargo pieces, their dimensions, current stage and package.", "operationId": "order_cargo_api_partner_v1_orders__order_id__cargo_get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_CargoView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/cargo/{cargo_id}/movements": { "get": { "tags": [ "partner-api-v1" ], "summary": "Cargo Movements", "operationId": "cargo_movements_api_partner_v1_cargo__cargo_id__movements_get", "parameters": [ { "name": "cargo_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Cargo Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_MovementView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/labels": { "get": { "tags": [ "partner-api-v1" ], "summary": "Labels", "description": "Return print-ready label data for every cargo piece and package of an order.", "operationId": "labels_api_partner_v1_orders__order_id__labels_get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LabelsView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/pricing": { "get": { "tags": [ "partner-api-v1" ], "summary": "Pricing", "description": "Published partner prices with fallback to the common tariff performed by pricing core.", "operationId": "pricing_api_partner_v1_pricing_get", "parameters": [ { "name": "direction_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Direction Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PricingView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/finance/summary": { "get": { "tags": [ "partner-api-v1" ], "summary": "Finance Summary", "operationId": "finance_summary_api_partner_v1_finance_summary_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FinanceView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/finance/ledger": { "get": { "tags": [ "partner-api-v1" ], "summary": "Finance Ledger", "operationId": "finance_ledger_api_partner_v1_finance_ledger_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 160 }, { "type": "null" } ], "title": "Cursor" } }, { "name": "order_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Order Id" } }, { "name": "client_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" } }, { "name": "cargo_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cargo Id" } }, { "name": "currency", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^[A-Z]{3}$" }, { "type": "null" } ], "title": "Currency" } }, { "name": "occurred_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Occurred From" } }, { "name": "occurred_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Occurred To" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LedgerPage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/finance/debts": { "get": { "tags": [ "partner-api-v1" ], "summary": "Finance Debts", "operationId": "finance_debts_api_partner_v1_finance_debts_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "cursor", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cursor" } }, { "name": "order_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Order Id" } }, { "name": "client_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" } }, { "name": "cargo_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cargo Id" } }, { "name": "currency", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^[A-Z]{3}$" }, { "type": "null" } ], "title": "Currency" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_OrderDebt_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/finance/payments": { "get": { "tags": [ "partner-api-v1" ], "summary": "Payments", "operationId": "payments_api_partner_v1_finance_payments_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "occurred_from", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Occurred From" } }, { "name": "occurred_to", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Occurred To" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 30 }, { "type": "null" } ], "title": "Status" } }, { "name": "currency", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "pattern": "^[A-Z]{3}$" }, { "type": "null" } ], "title": "Currency" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Page_PaymentView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/prohibited-goods": { "get": { "tags": [ "partner-api-v1" ], "summary": "Prohibited Goods Catalog", "description": "Published partner restrictions, grouped by authorized direction; one page counts rules.", "operationId": "prohibited_goods_catalog_api_partner_v1_reference_prohibited_goods_get", "parameters": [ { "name": "direction_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Direction Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0, "title": "Offset" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PublicFeedPage" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/directions": { "get": { "tags": [ "partner-api-v1" ], "summary": "Directions", "operationId": "directions_api_partner_v1_reference_directions_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_DirectionView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/cargo-types": { "get": { "tags": [ "partner-api-v1" ], "summary": "Cargo Types", "operationId": "cargo_types_api_partner_v1_reference_cargo_types_get", "parameters": [ { "name": "direction_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Direction Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_CargoTypeView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/branches": { "get": { "tags": [ "partner-api-v1" ], "summary": "Branches", "operationId": "branches_api_partner_v1_reference_branches_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_BranchView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/services": { "get": { "tags": [ "partner-api-v1" ], "summary": "Services", "operationId": "services_api_partner_v1_reference_services_get", "parameters": [ { "name": "direction_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Direction Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_ServiceView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/client-types": { "get": { "tags": [ "partner-api-v1" ], "summary": "Client Types", "operationId": "client_types_api_partner_v1_reference_client_types_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Items_NamedCode_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/geography": { "get": { "tags": [ "partner-api-v1" ], "summary": "Geography", "operationId": "geography_api_partner_v1_reference_geography_get", "parameters": [ { "name": "country_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Country Id" } }, { "name": "region_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" } }, { "name": "include_cities", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Include Cities" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeographyView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/cities": { "get": { "tags": [ "partner-api-v1" ], "summary": "Reference Cities", "description": "Bounded city sync; use next_cursor as after_id for the next page.", "operationId": "reference_cities_api_partner_v1_reference_cities_get", "parameters": [ { "name": "country_id", "in": "query", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Country Id" } }, { "name": "region_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" } }, { "name": "after_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "After Id" } }, { "name": "q", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Q" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 1000, "minimum": 1, "default": 100, "title": "Limit" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_CityView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/capabilities": { "get": { "tags": [ "partner-api-v1" ], "summary": "Capabilities", "description": "Describe effective key scopes and the prerequisite for shared create core.", "operationId": "capabilities_api_partner_v1_capabilities_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CapabilitiesView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}/deliveries": { "get": { "tags": [ "partner-api-v1" ], "summary": "Webhook Deliveries", "operationId": "webhook_deliveries_api_partner_v1_webhooks__webhook_id__deliveries_get", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Limit" } }, { "name": "before_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Before Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CursorPage_DeliveryView_" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry": { "post": { "tags": [ "partner-api-v1" ], "summary": "Retry Webhook Delivery", "operationId": "retry_webhook_delivery_api_partner_v1_webhooks__webhook_id__deliveries__delivery_id__retry_post", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "delivery_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Delivery Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IdStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/cancel": { "post": { "tags": [ "partner-api-v1" ], "summary": "Cancel Order", "description": "Business cancellation: NEW, active and no received cargo; preserve the order.", "operationId": "cancel_order_api_partner_v1_orders__order_id__cancel_post", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrderReasonRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}/contacts": { "put": { "tags": [ "partner-api-v1" ], "summary": "Replace Client Contacts", "operationId": "replace_client_contacts_api_partner_v1_clients__client_id__contacts_put", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactsReplace" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MutationView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}/private-data": { "put": { "tags": [ "partner-api-v1" ], "summary": "Replace Client Private Data", "operationId": "replace_client_private_data_api_partner_v1_clients__client_id__private_data_put", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrivateDataCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MutationView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/clients/{client_id}/archive": { "post": { "tags": [ "partner-api-v1" ], "summary": "Archive Client", "operationId": "archive_client_api_partner_v1_clients__client_id__archive_post", "parameters": [ { "name": "client_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Client Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}/rotate-secret": { "post": { "tags": [ "partner-api-v1" ], "summary": "Rotate Webhook Secret", "operationId": "rotate_webhook_secret_api_partner_v1_webhooks__webhook_id__rotate_secret_post", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}/test": { "post": { "tags": [ "partner-api-v1" ], "summary": "Test Webhook Endpoint", "operationId": "test_webhook_endpoint_api_partner_v1_webhooks__webhook_id__test_post", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IdStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/webhooks/{webhook_id}/verify": { "post": { "tags": [ "partner-api-v1" ], "summary": "Verify Webhook Endpoint", "operationId": "verify_webhook_endpoint_api_partner_v1_webhooks__webhook_id__verify_post", "parameters": [ { "name": "webhook_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Webhook Id" } }, { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "202": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IdStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/labels.pdf": { "get": { "tags": [ "partner-api-v1" ], "summary": "Labels Pdf", "operationId": "labels_pdf_api_partner_v1_orders__order_id__labels_pdf_get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/labels.zpl": { "get": { "tags": [ "partner-api-v1" ], "summary": "Labels Zpl", "operationId": "labels_zpl_api_partner_v1_orders__order_id__labels_zpl_get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/finance/payments/{payment_id}/statement.pdf": { "get": { "tags": [ "partner-api-v1" ], "summary": "Payment Statement", "operationId": "payment_statement_api_partner_v1_finance_payments__payment_id__statement_pdf_get", "parameters": [ { "name": "payment_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Payment Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/cancellation-reasons": { "get": { "tags": [ "partner-api-v1" ], "summary": "Cancellation Reasons", "operationId": "cancellation_reasons_api_partner_v1_reference_cancellation_reasons_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReasonPolicy" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/reference/statuses": { "get": { "tags": [ "partner-api-v1" ], "summary": "Public Statuses", "operationId": "public_statuses_api_partner_v1_reference_statuses_get", "parameters": [ { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusRegistry" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/keys/current/rotate": { "post": { "tags": [ "partner-api-v1" ], "summary": "Rotate Current Key", "operationId": "rotate_current_key_api_partner_v1_keys_current_rotate_post", "parameters": [ { "name": "Idempotency-Key", "in": "header", "required": true, "schema": { "type": "string", "minLength": 8, "maxLength": 200, "title": "Idempotency-Key" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyRotationRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KeyRotationView" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } }, "/api/partner/v1/orders/{order_id}/external-id": { "put": { "tags": [ "partner-api-v1" ], "summary": "Set External Order Id", "operationId": "set_external_order_id_api_partner_v1_orders__order_id__external_id_put", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalOrderReference" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalOrderReference" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] }, "get": { "tags": [ "partner-api-v1" ], "summary": "External Order Id", "operationId": "external_order_id_api_partner_v1_orders__order_id__external_id_get", "parameters": [ { "name": "order_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", "title": "Order Id" } }, { "name": "X-Havvo-Api-Key", "in": "header", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "X-Havvo-Api-Key" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExternalOrderReference" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [ { "HavvoApiKey": [] } ] } } }, "components": { "schemas": { "AccountView": { "properties": { "partner_id": { "type": "string", "title": "Partner Id", "description": "Stable public partner ID assigned at registration." }, "code": { "type": "string", "title": "Code", "description": "Alias of the public partner ID." }, "partner_uuid": { "type": "string", "format": "uuid", "title": "Partner Uuid", "description": "Compatibility UUID for existing order pricing and party inputs." }, "name": { "type": "string", "title": "Name" }, "legal_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Legal Name" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "status": { "type": "string", "title": "Status" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" } }, "type": "object", "required": [ "partner_id", "code", "partner_uuid", "name", "legal_name", "country_id", "status", "scopes" ], "title": "AccountView" }, "AddressCreate": { "properties": { "label": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Label" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "region_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" }, "city_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "City Id" }, "region_name": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "Region Name" }, "city_name": { "type": "string", "maxLength": 200, "minLength": 1, "title": "City Name" }, "address_line": { "type": "string", "maxLength": 1000, "title": "Address Line", "default": "" }, "street": { "anyOf": [ { "type": "string", "maxLength": 300 }, { "type": "null" } ], "title": "Street" }, "house": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "House" }, "apartment": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Apartment" }, "landmark": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Landmark" }, "postal_code": { "anyOf": [ { "type": "string", "maxLength": 30 }, { "type": "null" } ], "title": "Postal Code" }, "latitude": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Latitude" }, "longitude": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Longitude" }, "is_primary": { "type": "boolean", "title": "Is Primary", "default": false } }, "type": "object", "required": [ "country_id", "city_name" ], "title": "AddressCreate" }, "AddressView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "region_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" }, "city_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "City Id" }, "region_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Region Name" }, "city_name": { "type": "string", "title": "City Name" }, "address_line": { "type": "string", "title": "Address Line" }, "street": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Street" }, "house": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "House" }, "apartment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Apartment" }, "landmark": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Landmark" }, "postal_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Postal Code" }, "latitude": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Latitude" }, "longitude": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Longitude" }, "is_primary": { "type": "boolean", "title": "Is Primary" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "label", "country_id", "region_id", "city_id", "region_name", "city_name", "address_line", "street", "house", "apartment", "landmark", "postal_code", "latitude", "longitude", "is_primary", "status" ], "title": "AddressView" }, "AllocationView": { "properties": { "order_id": { "type": "string", "format": "uuid", "title": "Order Id" }, "amount": { "type": "string", "title": "Amount" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" } }, "type": "object", "required": [ "order_id", "amount", "currency" ], "title": "AllocationView" }, "BranchView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "code": { "type": "string", "title": "Code" }, "name": { "type": "string", "title": "Name" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "region_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" }, "city_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "City Id" }, "timezone": { "type": "string", "title": "Timezone" }, "address": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Address" }, "can_origin": { "type": "boolean", "title": "Can Origin" }, "can_destination": { "type": "boolean", "title": "Can Destination" }, "can_transit": { "type": "boolean", "title": "Can Transit" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "code", "name", "country_id", "region_id", "city_id", "timezone", "address", "can_origin", "can_destination", "can_transit", "status" ], "title": "BranchView" }, "CancelView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "version": { "type": "integer", "title": "Version" }, "prohibited_goods_evaluation": { "anyOf": [ { "$ref": "#/components/schemas/OrderGoodsEvaluation" }, { "type": "null" } ] }, "operational_status": { "type": "string", "title": "Operational Status" } }, "type": "object", "required": [ "id", "version", "operational_status" ], "title": "CancelView" }, "CapabilitiesView": { "properties": { "policy": { "$ref": "#/components/schemas/PolicyView" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "webhook_events": { "items": { "type": "string" }, "type": "array", "title": "Webhook Events" }, "order_creation_principal_ready": { "type": "boolean", "title": "Order Creation Principal Ready" }, "finance_write": { "type": "boolean", "title": "Finance Write" }, "limits_per_minute": { "$ref": "#/components/schemas/QuotasView" }, "rate_limit_enabled": { "type": "boolean", "title": "Rate Limit Enabled" } }, "type": "object", "required": [ "policy", "scopes", "webhook_events", "order_creation_principal_ready", "finance_write", "limits_per_minute", "rate_limit_enabled" ], "title": "CapabilitiesView" }, "CargoDebt": { "properties": { "cargo_id": { "type": "string", "format": "uuid", "title": "Cargo Id" }, "charged": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Charged" }, "amount": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Amount", "description": "Outstanding amount when the order allocations establish this cargo's share." } }, "type": "object", "required": [ "cargo_id", "charged", "amount" ], "title": "CargoDebt" }, "CargoLockReason": { "type": "string", "enum": [ "CARGO_ACCEPTED", "ORDER_CANCELLED", "ORDER_INACTIVE", "ITEM_CANCELLED", "ITEM_DELETED" ] }, "CargoMutationRequest": { "properties": { "expected_version": { "type": "integer", "minimum": 1.0, "title": "Expected Version" }, "expected_total": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" } ], "title": "Expected Total" }, "reason": { "type": "string", "maxLength": 1000, "minLength": 1, "title": "Reason" } }, "type": "object", "required": [ "expected_version", "expected_total", "reason" ], "title": "CargoMutationRequest" }, "CargoPrice": { "properties": { "cargo_type_id": { "type": "string", "format": "uuid", "title": "Cargo Type Id" }, "cargo_type_code": { "type": "string", "title": "Cargo Type Code" }, "cargo_type_name_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Cargo Type Name I18N" }, "calculation_unit": { "type": "string", "title": "Calculation Unit" }, "base_price": { "type": "string", "title": "Base Price" }, "minimum_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Minimum Weight" }, "price_source": { "type": "string", "title": "Price Source" }, "override_weight_from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Weight From" }, "override_weight_to": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Override Weight To" }, "tiers": { "items": { "$ref": "#/components/schemas/PriceTier" }, "type": "array", "title": "Tiers" } }, "type": "object", "required": [ "cargo_type_id", "cargo_type_code", "cargo_type_name_i18n", "calculation_unit", "base_price", "minimum_weight", "price_source", "override_weight_from", "override_weight_to", "tiers" ], "title": "CargoPrice" }, "CargoTypeView": { "properties": { "code": { "type": "string", "title": "Code" }, "name": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "code", "name", "id", "status" ], "title": "CargoTypeView" }, "CargoView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "barcode": { "type": "string", "title": "Barcode" }, "cargo_type_id": { "type": "string", "format": "uuid", "title": "Cargo Type Id" }, "quantity": { "type": "integer", "title": "Quantity" }, "actual_weight": { "type": "string", "title": "Actual Weight" }, "volumetric_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Volumetric Weight" }, "calculation_weight": { "type": "string", "title": "Calculation Weight" }, "dimensions_cm": { "$ref": "#/components/schemas/Dimensions" }, "current_stage": { "type": "string", "title": "Current Stage" }, "package": { "anyOf": [ { "$ref": "#/components/schemas/PackageView" }, { "type": "null" } ] }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "barcode", "cargo_type_id", "quantity", "actual_weight", "volumetric_weight", "calculation_weight", "dimensions_cm", "current_stage", "package", "created_at", "updated_at" ], "title": "CargoView" }, "CdekPickupPointSnapshot": { "properties": { "code": { "type": "string", "maxLength": 40, "minLength": 1, "title": "Code" }, "name": { "type": "string", "maxLength": 200, "minLength": 1, "title": "Name" }, "address": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Address" }, "city": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "City" }, "latitude": { "anyOf": [ { "type": "number", "maximum": 90.0, "minimum": -90.0 }, { "type": "null" } ], "title": "Latitude" }, "longitude": { "anyOf": [ { "type": "number", "maximum": 180.0, "minimum": -180.0 }, { "type": "null" } ], "title": "Longitude" }, "work_time": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ], "title": "Work Time" }, "distance_km": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Distance Km" }, "selection_source": { "type": "string", "enum": [ "automatic", "manual" ], "title": "Selection Source" } }, "type": "object", "required": [ "code", "name", "selection_source" ], "title": "CdekPickupPointSnapshot" }, "CityView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "name": { "type": "string", "title": "Name" }, "name_i18n": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Name I18N" }, "region_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Region Id" } }, "type": "object", "required": [ "id", "country_id", "name", "name_i18n", "region_id" ], "title": "CityView" }, "ClientPatch": { "properties": { "display_name": { "anyOf": [ { "type": "string", "maxLength": 300, "minLength": 2 }, { "type": "null" } ], "title": "Display Name" }, "first_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Last Name" }, "patronymic": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Patronymic" }, "legal_name": { "anyOf": [ { "type": "string", "maxLength": 300 }, { "type": "null" } ], "title": "Legal Name" }, "tax_number": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Tax Number" }, "language_code": { "anyOf": [ { "type": "string", "pattern": "^[a-z]{2,3}(?:-[a-z0-9]{2,8})?$" }, { "type": "null" } ], "title": "Language Code" } }, "type": "object", "title": "ClientPatch" }, "ClientView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "custom_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Id" }, "client_type": { "type": "string", "title": "Client Type" }, "display_name": { "type": "string", "title": "Display Name" }, "first_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Name" }, "patronymic": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Patronymic" }, "legal_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Legal Name" }, "tax_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tax Number" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "language_code": { "type": "string", "title": "Language Code" }, "status": { "type": "string", "title": "Status" }, "can_create_orders": { "type": "boolean", "title": "Can Create Orders" }, "version": { "type": "integer", "title": "Version" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" }, "contacts": { "items": { "$ref": "#/components/schemas/ContactView" }, "type": "array", "title": "Contacts" }, "private_data": { "anyOf": [ { "$ref": "#/components/schemas/PrivateView" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "custom_id", "client_type", "display_name", "first_name", "last_name", "patronymic", "legal_name", "tax_number", "country_id", "language_code", "status", "can_create_orders", "version", "created_at", "updated_at", "contacts", "private_data" ], "title": "ClientView" }, "ConfirmationChallenge": { "properties": { "rule_id": { "type": "string", "format": "uuid", "title": "Rule Id" }, "rule_version": { "type": "integer", "title": "Rule Version" }, "item_index": { "type": "integer", "title": "Item Index" }, "expires_at": { "type": "string", "format": "date-time", "title": "Expires At" }, "token": { "type": "string", "title": "Token" } }, "type": "object", "required": [ "rule_id", "rule_version", "item_index", "expires_at", "token" ], "title": "ConfirmationChallenge" }, "ContactCreate": { "properties": { "type": { "type": "string", "pattern": "^(phone|email)$", "title": "Type" }, "value": { "type": "string", "maxLength": 320, "minLength": 3, "title": "Value" }, "is_primary": { "type": "boolean", "title": "Is Primary", "default": false } }, "type": "object", "required": [ "type", "value" ], "title": "ContactCreate" }, "ContactView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "value": { "type": "string", "title": "Value" }, "is_primary": { "type": "boolean", "title": "Is Primary" }, "is_verified": { "type": "boolean", "title": "Is Verified" } }, "type": "object", "required": [ "id", "type", "value", "is_primary", "is_verified" ], "title": "ContactView" }, "ContactsReplace": { "properties": { "contacts": { "items": { "$ref": "#/components/schemas/ContactCreate" }, "type": "array", "maxItems": 100, "title": "Contacts" } }, "additionalProperties": false, "type": "object", "required": [ "contacts" ], "title": "ContactsReplace" }, "CountryView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "iso2": { "type": "string", "title": "Iso2" }, "iso3": { "type": "string", "title": "Iso3" }, "name": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name" } }, "type": "object", "required": [ "id", "iso2", "iso3", "name" ], "title": "CountryView" }, "CursorPage_CityView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/CityView" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "next_cursor" ], "title": "CursorPage[CityView]" }, "CursorPage_DeliveryView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DeliveryView" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "next_cursor" ], "title": "CursorPage[DeliveryView]" }, "CursorPage_OrderDebt_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/OrderDebt" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "next_cursor" ], "title": "CursorPage[OrderDebt]" }, "DebtView": { "properties": { "currency": { "type": "string", "title": "Currency" }, "amount": { "type": "string", "title": "Amount" } }, "type": "object", "required": [ "currency", "amount" ], "title": "DebtView" }, "DeclaredItemInput": { "properties": { "prohibited_goods_rule_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "maxItems": 100, "title": "Prohibited Goods Rule Ids" }, "entry_type": { "type": "string", "pattern": "^(package|unpacked)$", "title": "Entry Type", "default": "package" }, "package_key": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Package Key" }, "packaging_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Packaging Name" }, "cargo_type_id": { "type": "string", "format": "uuid", "title": "Cargo Type Id" }, "external_tracking_code": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "External Tracking Code" }, "additional_tracking_codes": { "items": { "type": "string" }, "type": "array", "maxItems": 100, "title": "Additional Tracking Codes" }, "additional_tracking_comments": { "items": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": "array", "maxItems": 100, "title": "Additional Tracking Comments" }, "description": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Description" }, "quantity": { "type": "integer", "minimum": 1.0, "title": "Quantity", "default": 1 }, "declared_weight": { "anyOf": [ { "type": "number", "maximum": 100000.0, "exclusiveMinimum": 0.0 }, { "type": "string" } ], "title": "Declared Weight" }, "length_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Length Cm" }, "width_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Width Cm" }, "height_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Height Cm" }, "declared_value": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Declared Value" } }, "type": "object", "required": [ "cargo_type_id", "declared_weight" ], "title": "DeclaredItemInput" }, "DeclaredItemPatch": { "properties": { "description": { "anyOf": [ { "type": "string", "maxLength": 1000 }, { "type": "null" } ], "title": "Description" }, "external_tracking_code": { "anyOf": [ { "type": "string", "maxLength": 200 }, { "type": "null" } ], "title": "External Tracking Code" }, "cargo_type_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Cargo Type Id" }, "packaging_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Packaging Name" }, "quantity": { "anyOf": [ { "type": "integer", "maximum": 2147483647.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Quantity" }, "declared_weight": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Declared Weight" }, "length_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Length Cm" }, "width_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Width Cm" }, "height_cm": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Height Cm" }, "declared_value": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Declared Value" }, "expected_total": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Expected Total" }, "expected_version": { "type": "integer", "minimum": 1.0, "title": "Expected Version" } }, "additionalProperties": false, "type": "object", "required": [ "expected_version" ], "title": "DeclaredItemPatch" }, "DeclaredItemView": { "properties": { "is_editable": { "type": "boolean", "title": "Is Editable" }, "can_cancel": { "type": "boolean", "title": "Can Cancel" }, "can_delete": { "type": "boolean", "title": "Can Delete" }, "locked_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Locked At" }, "lock_reason": { "anyOf": [ { "$ref": "#/components/schemas/CargoLockReason" }, { "type": "null" } ] }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "cargo_type_id": { "type": "string", "format": "uuid", "title": "Cargo Type Id" }, "external_tracking_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Tracking Code" }, "packaging_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Packaging Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "quantity": { "type": "integer", "title": "Quantity" }, "declared_weight": { "type": "string", "title": "Declared Weight" }, "length_cm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Length Cm" }, "width_cm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Width Cm" }, "height_cm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Height Cm" }, "declared_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Declared Value" }, "status": { "type": "string", "title": "Status" }, "lifecycle_state": { "type": "string", "title": "Lifecycle State" }, "version": { "type": "integer", "title": "Version" } }, "type": "object", "required": [ "is_editable", "can_cancel", "can_delete", "locked_at", "lock_reason", "id", "cargo_type_id", "external_tracking_code", "packaging_name", "description", "quantity", "declared_weight", "length_cm", "width_cm", "height_cm", "declared_value", "status", "lifecycle_state", "version" ], "title": "DeclaredItemView" }, "DeliveryView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_id": { "type": "string", "format": "uuid", "title": "Event Id" }, "event_type": { "type": "string", "title": "Event Type" }, "status": { "type": "string", "title": "Status" }, "attempt_count": { "type": "integer", "title": "Attempt Count" }, "response_status": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Response Status" }, "next_attempt_at": { "type": "string", "format": "date-time", "title": "Next Attempt At" }, "delivered_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Delivered At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" } }, "type": "object", "required": [ "id", "event_id", "event_type", "status", "attempt_count", "response_status", "next_attempt_at", "delivered_at", "created_at" ], "title": "DeliveryView" }, "Dimensions": { "properties": { "length": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Length" }, "width": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Width" }, "height": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Height" } }, "type": "object", "required": [ "length", "width", "height" ], "title": "Dimensions" }, "DirectionView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "code": { "type": "string", "title": "Code" }, "name": { "type": "string", "title": "Name" }, "origin_branch_id": { "type": "string", "format": "uuid", "title": "Origin Branch Id" }, "destination_branch_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Destination Branch Id" }, "route_template_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Route Template Id" }, "delivery_mode": { "anyOf": [ { "$ref": "#/components/schemas/ModeView" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "code", "name", "origin_branch_id", "destination_branch_id", "route_template_id", "delivery_mode" ], "title": "DirectionView" }, "EventView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "payload": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object", "title": "Payload" }, "occurred_at": { "type": "string", "format": "date-time", "title": "Occurred At" } }, "type": "object", "required": [ "id", "type", "payload", "occurred_at" ], "title": "EventView" }, "ExternalOrderReference": { "properties": { "external_id": { "type": "string", "maxLength": 200, "minLength": 1, "title": "External Id" } }, "additionalProperties": false, "type": "object", "required": [ "external_id" ], "title": "ExternalOrderReference" }, "FinanceView": { "properties": { "wallets": { "items": { "$ref": "#/components/schemas/WalletView" }, "type": "array", "title": "Wallets" }, "debts": { "items": { "$ref": "#/components/schemas/DebtView" }, "type": "array", "title": "Debts" } }, "type": "object", "required": [ "wallets", "debts" ], "title": "FinanceView" }, "GeographyView": { "properties": { "countries": { "items": { "$ref": "#/components/schemas/CountryView" }, "type": "array", "title": "Countries" }, "regions": { "items": { "$ref": "#/components/schemas/RegionView" }, "type": "array", "title": "Regions" }, "cities": { "items": { "$ref": "#/components/schemas/CityView" }, "type": "array", "title": "Cities" } }, "type": "object", "required": [ "countries", "regions", "cities" ], "title": "GeographyView" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "IdStatus": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "status" ], "title": "IdStatus" }, "ItemPricePreview": { "properties": { "cargo_type_id": { "type": "string", "format": "uuid", "title": "Cargo Type Id" }, "external_tracking_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "External Tracking Code" }, "entry_type": { "anyOf": [ { "type": "string", "enum": [ "package", "unpacked" ] }, { "type": "null" } ], "title": "Entry Type" }, "package_key": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Package Key" }, "quantity": { "type": "integer", "title": "Quantity", "default": 1 }, "pricing_quantity": { "type": "integer", "title": "Pricing Quantity", "default": 1 }, "logistic_quantity": { "type": "integer", "title": "Logistic Quantity", "default": 1 }, "measurement_basis": { "type": "string", "enum": [ "per_unit", "total" ], "title": "Measurement Basis", "default": "total" }, "actual_weight": { "type": "string", "title": "Actual Weight" }, "volumetric_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Volumetric Weight" }, "calculation_weight": { "type": "string", "title": "Calculation Weight" }, "calculation_unit": { "type": "string", "title": "Calculation Unit", "default": "kg" }, "unit_actual_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Actual Weight" }, "total_actual_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Total Actual Weight" }, "unit_volumetric_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Volumetric Weight" }, "total_volumetric_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Total Volumetric Weight" }, "unit_calculation_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Calculation Weight" }, "total_calculation_weight": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Total Calculation Weight" }, "unit_declared_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Unit Declared Value" }, "total_declared_value": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Total Declared Value" }, "unit_price": { "type": "string", "title": "Unit Price" }, "amount": { "type": "string", "title": "Amount" }, "source": { "type": "string", "title": "Source" } }, "type": "object", "required": [ "cargo_type_id", "external_tracking_code", "actual_weight", "volumetric_weight", "calculation_weight", "unit_price", "amount", "source" ], "title": "ItemPricePreview" }, "Items_AddressView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/AddressView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[AddressView]" }, "Items_BranchView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/BranchView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[BranchView]" }, "Items_CargoTypeView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/CargoTypeView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[CargoTypeView]" }, "Items_CargoView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/CargoView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[CargoView]" }, "Items_DirectionView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/DirectionView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[DirectionView]" }, "Items_MovementView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/MovementView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[MovementView]" }, "Items_NamedCode_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/NamedCode" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[NamedCode]" }, "Items_ServiceView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ServiceView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "items" ], "title": "Items[ServiceView]" }, "JsonValue": {}, "KeyRotationRequest": { "properties": { "grace_seconds": { "type": "integer", "maximum": 900.0, "minimum": 30.0, "title": "Grace Seconds", "default": 300 } }, "additionalProperties": false, "type": "object", "title": "KeyRotationRequest" }, "KeyRotationView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "name": { "type": "string", "title": "Name" }, "prefix": { "type": "string", "title": "Prefix" }, "masked_key": { "type": "string", "title": "Masked Key" }, "scopes": { "items": { "type": "string" }, "type": "array", "title": "Scopes" }, "status": { "type": "string", "title": "Status" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Token" }, "previous_valid_until": { "type": "string", "format": "date-time", "title": "Previous Valid Until" } }, "type": "object", "required": [ "id", "name", "prefix", "masked_key", "scopes", "status", "expires_at", "last_used_at", "created_at", "previous_valid_until" ], "title": "KeyRotationView" }, "LabelOrder": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "number": { "type": "integer", "title": "Number" }, "tracking_code": { "type": "string", "title": "Tracking Code" } }, "type": "object", "required": [ "id", "number", "tracking_code" ], "title": "LabelOrder" }, "LabelView": { "properties": { "entity_type": { "type": "string", "title": "Entity Type" }, "entity_id": { "type": "string", "format": "uuid", "title": "Entity Id" }, "barcode": { "type": "string", "title": "Barcode" }, "caption": { "type": "string", "title": "Caption" }, "weight": { "type": "string", "title": "Weight" } }, "type": "object", "required": [ "entity_type", "entity_id", "barcode", "caption", "weight" ], "title": "LabelView" }, "LabelsView": { "properties": { "order": { "$ref": "#/components/schemas/LabelOrder" }, "cargo_labels": { "items": { "$ref": "#/components/schemas/LabelView" }, "type": "array", "title": "Cargo Labels" }, "package_labels": { "items": { "$ref": "#/components/schemas/LabelView" }, "type": "array", "title": "Package Labels" } }, "type": "object", "required": [ "order", "cargo_labels", "package_labels" ], "title": "LabelsView" }, "LedgerOperation": { "properties": { "operation_id": { "type": "string", "title": "Operation Id" }, "operation_type": { "type": "string", "enum": [ "charge", "recalculation", "price_snapshot", "payment", "adjustment", "refund", "wallet", "wallet_opening", "wallet_snapshot", "allocation", "allocation_reversal" ], "title": "Operation Type" }, "occurred_at": { "type": "string", "format": "date-time", "title": "Occurred At" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" }, "amount": { "type": "string", "title": "Amount", "description": "Face amount of the operation." }, "balance_type": { "type": "string", "enum": [ "wallet", "order", "payment" ], "title": "Balance Type" }, "balance_id": { "type": "string", "format": "uuid", "title": "Balance Id", "description": "ID of the wallet, order or payment whose balance changed." }, "balance_change": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Balance Change", "description": "Signed change, in the currency and balance identified by this row." }, "balance_before": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Balance Before" }, "balance_after": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Balance After" }, "payment_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Payment Id" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "client_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Client Ids" }, "order_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Order Ids" }, "cargo_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Cargo Ids" } }, "type": "object", "required": [ "operation_id", "operation_type", "occurred_at", "currency", "amount", "balance_type", "balance_id", "balance_change", "balance_before", "balance_after", "payment_id", "status", "client_ids", "order_ids", "cargo_ids" ], "title": "LedgerOperation" }, "LedgerPage": { "properties": { "items": { "items": { "$ref": "#/components/schemas/LedgerOperation" }, "type": "array", "title": "Items" }, "next_cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "next_cursor" ], "title": "LedgerPage" }, "MatchReason": { "type": "string", "enum": [ "exact", "word_boundary", "explicit_selection" ] }, "ModeView": { "properties": { "code": { "type": "string", "title": "Code" }, "name": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name" }, "id": { "type": "string", "format": "uuid", "title": "Id" } }, "type": "object", "required": [ "code", "name", "id" ], "title": "ModeView" }, "MovementView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "event_type": { "type": "string", "title": "Event Type" }, "branch_id": { "type": "string", "format": "uuid", "title": "Branch Id" }, "branch_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Branch Name" }, "quantity_before": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Quantity Before" }, "quantity_after": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Quantity After" }, "weight_before": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Weight Before" }, "weight_after": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Weight After" }, "payload": { "additionalProperties": { "$ref": "#/components/schemas/JsonValue" }, "type": "object", "title": "Payload" }, "occurred_at": { "type": "string", "format": "date-time", "title": "Occurred At" } }, "type": "object", "required": [ "id", "event_type", "branch_id", "branch_name", "quantity_before", "quantity_after", "weight_before", "weight_after", "payload", "occurred_at" ], "title": "MovementView" }, "MutationView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "version": { "type": "integer", "title": "Version" }, "prohibited_goods_evaluation": { "anyOf": [ { "$ref": "#/components/schemas/OrderGoodsEvaluation" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "version" ], "title": "MutationView" }, "NamedCode": { "properties": { "code": { "type": "string", "title": "Code" }, "name": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name" } }, "type": "object", "required": [ "code", "name" ], "title": "NamedCode" }, "OrderCreateRequest": { "properties": { "source_channel": { "type": "string", "pattern": "^(crm|cabinet|mobile|partner_api|import)$", "title": "Source Channel" }, "direction_id": { "type": "string", "format": "uuid", "title": "Direction Id" }, "route_version_id": { "type": "string", "format": "uuid", "title": "Route Version Id" }, "tariff_version_id": { "type": "string", "format": "uuid", "title": "Tariff Version Id" }, "parties": { "items": { "$ref": "#/components/schemas/PartyInput" }, "type": "array", "title": "Parties" }, "items": { "items": { "$ref": "#/components/schemas/DeclaredItemInput" }, "type": "array", "minItems": 1, "title": "Items" }, "services": { "items": { "$ref": "#/components/schemas/SelectedServiceInput" }, "type": "array", "title": "Services" }, "comment": { "anyOf": [ { "type": "string", "maxLength": 5000 }, { "type": "null" } ], "title": "Comment" }, "pricing_client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pricing Client Id" }, "pricing_partner_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pricing Partner Id" }, "prohibited_goods_confirmations": { "items": { "type": "string", "maxLength": 180, "minLength": 1, "format": "password", "writeOnly": true }, "type": "array", "maxItems": 1000, "title": "Prohibited Goods Confirmations" }, "expected_total": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" } ], "title": "Expected Total" } }, "type": "object", "required": [ "source_channel", "direction_id", "route_version_id", "tariff_version_id", "items", "expected_total" ], "title": "OrderCreateRequest" }, "OrderDebt": { "properties": { "order_id": { "type": "string", "format": "uuid", "title": "Order Id" }, "client_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Client Ids", "description": "Related partner clients, including archived links. Amount is per order." }, "cargo": { "items": { "$ref": "#/components/schemas/CargoDebt" }, "type": "array", "title": "Cargo" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" }, "charged": { "type": "string", "title": "Charged" }, "allocated": { "type": "string", "title": "Allocated" }, "amount": { "type": "string", "title": "Amount" } }, "type": "object", "required": [ "order_id", "client_ids", "cargo", "currency", "charged", "allocated", "amount" ], "title": "OrderDebt" }, "OrderDraftInput": { "properties": { "source_channel": { "type": "string", "pattern": "^(crm|cabinet|mobile|partner_api|import)$", "title": "Source Channel" }, "direction_id": { "type": "string", "format": "uuid", "title": "Direction Id" }, "route_version_id": { "type": "string", "format": "uuid", "title": "Route Version Id" }, "tariff_version_id": { "type": "string", "format": "uuid", "title": "Tariff Version Id" }, "parties": { "items": { "$ref": "#/components/schemas/PartyInput" }, "type": "array", "title": "Parties" }, "items": { "items": { "$ref": "#/components/schemas/DeclaredItemInput" }, "type": "array", "minItems": 1, "title": "Items" }, "services": { "items": { "$ref": "#/components/schemas/SelectedServiceInput" }, "type": "array", "title": "Services" }, "comment": { "anyOf": [ { "type": "string", "maxLength": 5000 }, { "type": "null" } ], "title": "Comment" }, "pricing_client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pricing Client Id" }, "pricing_partner_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Pricing Partner Id" } }, "type": "object", "required": [ "source_channel", "direction_id", "route_version_id", "tariff_version_id", "items" ], "title": "OrderDraftInput" }, "OrderGoodsEvaluation": { "properties": { "enforcement_mode": { "type": "string", "enum": [ "off", "observe", "enforce" ], "title": "Enforcement Mode" }, "direction_id": { "type": "string", "format": "uuid", "title": "Direction Id" }, "app_code": { "type": "string", "enum": [ "crm", "cabinet", "partner", "mobile" ], "title": "App Code" }, "effective_mode": { "anyOf": [ { "type": "string", "enum": [ "block", "confirm", "inform" ] }, { "type": "null" } ], "title": "Effective Mode" }, "matches": { "items": { "$ref": "#/components/schemas/OrderGoodsMatch" }, "type": "array", "title": "Matches" }, "confirmation_challenges": { "items": { "$ref": "#/components/schemas/ConfirmationChallenge" }, "type": "array", "title": "Confirmation Challenges" } }, "type": "object", "required": [ "enforcement_mode", "direction_id", "app_code", "effective_mode" ], "title": "OrderGoodsEvaluation" }, "OrderGoodsMatch": { "properties": { "rule_id": { "type": "string", "format": "uuid", "title": "Rule Id" }, "rule_code": { "type": "string", "title": "Rule Code" }, "rule_version": { "type": "integer", "title": "Rule Version" }, "item_index": { "type": "integer", "title": "Item Index" }, "item_hash": { "type": "string", "title": "Item Hash" }, "action_mode": { "type": "string", "enum": [ "block", "confirm", "inform" ], "title": "Action Mode" }, "reason": { "$ref": "#/components/schemas/MatchReason" }, "title_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Title I18N" }, "client_message_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Client Message I18N" } }, "type": "object", "required": [ "rule_id", "rule_code", "rule_version", "item_index", "item_hash", "action_mode", "reason", "title_i18n", "client_message_i18n" ], "title": "OrderGoodsMatch" }, "OrderListItem": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "number": { "type": "integer", "title": "Number" }, "tracking_code": { "type": "string", "title": "Tracking Code" }, "operational_status": { "type": "string", "title": "Operational Status" }, "fulfillment_state": { "type": "string", "title": "Fulfillment State" }, "financial_status": { "type": "string", "title": "Financial Status" }, "lifecycle_state": { "type": "string", "title": "Lifecycle State" }, "estimated_total": { "type": "string", "title": "Estimated Total" }, "currency": { "type": "string", "title": "Currency" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "number", "tracking_code", "operational_status", "fulfillment_state", "financial_status", "lifecycle_state", "estimated_total", "currency", "created_at", "updated_at" ], "title": "OrderListItem" }, "OrderPage_ClientView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ClientView" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" }, "next_cursor": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "total", "limit", "offset", "next_cursor" ], "title": "OrderPage[ClientView]" }, "OrderPage_OrderListItem_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/OrderListItem" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" }, "next_cursor": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Next Cursor" } }, "type": "object", "required": [ "items", "total", "limit", "offset", "next_cursor" ], "title": "OrderPage[OrderListItem]" }, "OrderPartyView": { "properties": { "role": { "type": "string", "title": "Role" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "partner_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Partner Id" }, "name": { "type": "string", "title": "Name" }, "custom_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Custom Id" }, "phone": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Phone" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "address": { "anyOf": [ { "$ref": "#/components/schemas/PartyAddress" }, { "type": "null" } ] }, "payment_share": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Payment Share" } }, "type": "object", "required": [ "role", "client_id", "partner_id", "name", "custom_id", "phone", "email", "address", "payment_share" ], "title": "OrderPartyView" }, "OrderPreviewResponse": { "properties": { "prohibited_goods_evaluation": { "anyOf": [ { "$ref": "#/components/schemas/OrderGoodsEvaluation" }, { "type": "null" } ] }, "tariff_plan_id": { "type": "string", "format": "uuid", "title": "Tariff Plan Id" }, "tariff_version_id": { "type": "string", "format": "uuid", "title": "Tariff Version Id" }, "route_version_id": { "type": "string", "format": "uuid", "title": "Route Version Id" }, "currency_code": { "type": "string", "title": "Currency Code" }, "items": { "items": { "$ref": "#/components/schemas/ItemPricePreview" }, "type": "array", "title": "Items" }, "services": { "items": { "$ref": "#/components/schemas/ServicePricePreview" }, "type": "array", "title": "Services" }, "estimated_total": { "type": "string", "title": "Estimated Total" }, "warnings": { "items": { "type": "string" }, "type": "array", "title": "Warnings" }, "quantity_semantics": { "type": "string", "const": "total", "title": "Quantity Semantics", "default": "total" } }, "type": "object", "required": [ "tariff_plan_id", "tariff_version_id", "route_version_id", "currency_code", "items", "estimated_total", "warnings" ], "title": "OrderPreviewResponse" }, "OrderQuickUpdate": { "properties": { "comment": { "anyOf": [ { "type": "string", "maxLength": 5000 }, { "type": "null" } ], "title": "Comment" } }, "type": "object", "title": "OrderQuickUpdate" }, "OrderReasonRequest": { "properties": { "reason": { "type": "string", "maxLength": 500, "minLength": 2, "title": "Reason" } }, "type": "object", "required": [ "reason" ], "title": "OrderReasonRequest" }, "OrderSummary": { "properties": { "prohibited_goods_evaluation": { "anyOf": [ { "$ref": "#/components/schemas/OrderGoodsEvaluation" }, { "type": "null" } ] }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "public_number": { "type": "integer", "title": "Public Number" }, "tracking_code": { "type": "string", "title": "Tracking Code" }, "operational_status": { "type": "string", "title": "Operational Status" }, "fulfillment_state": { "type": "string", "title": "Fulfillment State" }, "financial_status": { "type": "string", "title": "Financial Status" }, "lifecycle_state": { "type": "string", "title": "Lifecycle State" }, "estimated_total": { "type": "string", "title": "Estimated Total" }, "paid_total": { "type": "string", "title": "Paid Total", "default": "0" }, "external_paid": { "type": "string", "title": "External Paid", "default": "0" }, "balance_paid": { "type": "string", "title": "Balance Paid", "default": "0" }, "bonus_paid": { "type": "string", "title": "Bonus Paid", "default": "0" }, "currency_code": { "type": "string", "title": "Currency Code" }, "version": { "type": "integer", "title": "Version" }, "tariff_recalculated": { "type": "boolean", "title": "Tariff Recalculated", "default": false } }, "type": "object", "required": [ "id", "public_number", "tracking_code", "operational_status", "fulfillment_state", "financial_status", "lifecycle_state", "estimated_total", "currency_code", "version" ], "title": "OrderSummary" }, "OrderView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "number": { "type": "integer", "title": "Number" }, "tracking_code": { "type": "string", "title": "Tracking Code" }, "operational_status": { "type": "string", "title": "Operational Status" }, "fulfillment_state": { "type": "string", "title": "Fulfillment State" }, "financial_status": { "type": "string", "title": "Financial Status" }, "lifecycle_state": { "type": "string", "title": "Lifecycle State" }, "items": { "items": { "$ref": "#/components/schemas/DeclaredItemView" }, "type": "array", "title": "Items" }, "events": { "items": { "$ref": "#/components/schemas/EventView" }, "type": "array", "title": "Events" }, "parties": { "items": { "$ref": "#/components/schemas/OrderPartyView" }, "type": "array", "title": "Parties" }, "price_components": { "anyOf": [ { "items": { "$ref": "#/components/schemas/PriceComponentView" }, "type": "array" }, { "type": "null" } ], "title": "Price Components" }, "estimated_total": { "type": "string", "title": "Estimated Total" }, "currency": { "type": "string", "title": "Currency" }, "version": { "type": "integer", "title": "Version" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "number", "tracking_code", "operational_status", "fulfillment_state", "financial_status", "lifecycle_state", "items", "events", "parties", "price_components", "estimated_total", "currency", "version", "created_at", "updated_at" ], "title": "OrderView" }, "PackageView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "barcode": { "type": "string", "title": "Barcode" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "barcode", "status" ], "title": "PackageView" }, "Page_PaymentView_": { "properties": { "items": { "items": { "$ref": "#/components/schemas/PaymentView" }, "type": "array", "title": "Items" }, "total": { "type": "integer", "title": "Total" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" } }, "type": "object", "required": [ "items", "total", "limit", "offset" ], "title": "Page[PaymentView]" }, "PartyAddress": { "properties": { "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Label" }, "country_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Country Id" }, "region_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Region Name" }, "city_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "City Name" }, "address_line": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Address Line" }, "postal_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Postal Code" } }, "type": "object", "title": "PartyAddress" }, "PartyInput": { "properties": { "role": { "type": "string", "pattern": "^(sender|receiver|partner|payer)$", "title": "Role" }, "client_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Client Id" }, "partner_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Partner Id" }, "payment_share": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Payment Share" }, "address_id": { "anyOf": [ { "type": "string", "format": "uuid" }, { "type": "null" } ], "title": "Address Id" }, "cdek_delivery_point_code": { "anyOf": [ { "type": "string", "maxLength": 40 }, { "type": "null" } ], "title": "Cdek Delivery Point Code" }, "cdek_delivery_point": { "anyOf": [ { "$ref": "#/components/schemas/CdekPickupPointSnapshot" }, { "type": "null" } ] } }, "type": "object", "required": [ "role" ], "title": "PartyInput" }, "PaymentView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "amount": { "type": "string", "title": "Amount" }, "unallocated_amount": { "type": "string", "title": "Unallocated Amount" }, "method": { "type": "string", "title": "Method" }, "currency": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Currency" }, "status": { "type": "string", "title": "Status" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Comment" }, "occurred_at": { "type": "string", "format": "date-time", "title": "Occurred At" }, "allocations": { "items": { "$ref": "#/components/schemas/AllocationView" }, "type": "array", "title": "Allocations" } }, "type": "object", "required": [ "id", "amount", "unallocated_amount", "method", "currency", "status", "comment", "occurred_at", "allocations" ], "title": "PaymentView" }, "PolicyView": { "properties": { "direction_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Direction Ids" }, "branch_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Branch Ids" }, "service_ids": { "anyOf": [ { "items": { "type": "string", "format": "uuid" }, "type": "array" }, { "type": "null" } ], "title": "Service Ids" }, "operations": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Operations" } }, "type": "object", "required": [ "direction_ids", "branch_ids", "service_ids", "operations" ], "title": "PolicyView" }, "PriceComponentView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "description": { "type": "string", "title": "Description" }, "amount": { "type": "string", "title": "Amount" }, "currency": { "type": "string", "title": "Currency" }, "status": { "type": "string", "title": "Status" } }, "type": "object", "required": [ "id", "type", "description", "amount", "currency", "status" ], "title": "PriceComponentView" }, "PriceTier": { "properties": { "weight_from": { "type": "string", "title": "Weight From" }, "weight_to": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Weight To" }, "price": { "type": "string", "title": "Price" }, "aggregation_scope": { "type": "string", "title": "Aggregation Scope" } }, "type": "object", "required": [ "weight_from", "weight_to", "price", "aggregation_scope" ], "title": "PriceTier" }, "PricingView": { "properties": { "scope": { "type": "string", "title": "Scope" }, "partner_id": { "type": "string", "format": "uuid", "title": "Partner Id" }, "items": { "items": { "$ref": "#/components/schemas/TariffView" }, "type": "array", "title": "Items" } }, "type": "object", "required": [ "scope", "partner_id", "items" ], "title": "PricingView" }, "PrivateDataCreate": { "properties": { "passport_series": { "anyOf": [ { "type": "string", "maxLength": 30 }, { "type": "null" } ], "title": "Passport Series" }, "passport_number": { "anyOf": [ { "type": "string", "maxLength": 50 }, { "type": "null" } ], "title": "Passport Number" }, "passport_iin": { "anyOf": [ { "type": "string", "maxLength": 50 }, { "type": "null" } ], "title": "Passport Iin" }, "passport_issued_by": { "anyOf": [ { "type": "string", "maxLength": 300 }, { "type": "null" } ], "title": "Passport Issued By" }, "passport_issued_date": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "null" } ], "title": "Passport Issued Date" } }, "type": "object", "title": "PrivateDataCreate" }, "PrivateView": { "properties": { "passport_series": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Passport Series" }, "passport_number": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Passport Number" }, "passport_iin": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Passport Iin" }, "passport_issued_by": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Passport Issued By" }, "passport_issued_date": { "anyOf": [ { "type": "string", "format": "date" }, { "type": "null" } ], "title": "Passport Issued Date" } }, "type": "object", "required": [ "passport_series", "passport_number", "passport_iin", "passport_issued_by", "passport_issued_date" ], "title": "PrivateView" }, "PublicClientCreate": { "properties": { "client_type": { "type": "string", "pattern": "^(individual|legal)$", "title": "Client Type" }, "display_name": { "type": "string", "maxLength": 300, "minLength": 2, "title": "Display Name" }, "first_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "First Name" }, "last_name": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Last Name" }, "patronymic": { "anyOf": [ { "type": "string", "maxLength": 120 }, { "type": "null" } ], "title": "Patronymic" }, "legal_name": { "anyOf": [ { "type": "string", "maxLength": 300 }, { "type": "null" } ], "title": "Legal Name" }, "tax_number": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Tax Number" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "language_code": { "type": "string", "pattern": "^[a-z]{2,3}(?:-[a-z0-9]{2,8})?$", "title": "Language Code", "default": "ru" }, "contacts": { "items": { "$ref": "#/components/schemas/ContactCreate" }, "type": "array", "maxItems": 100, "title": "Contacts" }, "private_data": { "anyOf": [ { "$ref": "#/components/schemas/PrivateDataCreate" }, { "type": "null" } ] } }, "additionalProperties": false, "type": "object", "required": [ "client_type", "display_name", "country_id" ], "title": "PublicClientCreate" }, "PublicFeedPage": { "properties": { "global_rules": { "items": { "$ref": "#/components/schemas/PublicRule" }, "type": "array", "title": "Global Rules" }, "direction_rules": { "additionalProperties": { "items": { "$ref": "#/components/schemas/PublicRule" }, "type": "array" }, "propertyNames": { "format": "uuid" }, "type": "object", "title": "Direction Rules" }, "limit": { "type": "integer", "title": "Limit" }, "offset": { "type": "integer", "title": "Offset" }, "next_offset": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Next Offset" } }, "type": "object", "required": [ "global_rules", "direction_rules", "limit", "offset", "next_offset" ], "title": "PublicFeedPage" }, "PublicRule": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "code": { "type": "string", "title": "Code" }, "version": { "type": "integer", "title": "Version" }, "action_mode": { "type": "string", "enum": [ "block", "confirm", "inform" ], "title": "Action Mode" }, "scope_mode": { "type": "string", "enum": [ "all_directions", "selected_directions" ], "title": "Scope Mode" }, "direction_ids": { "items": { "type": "string", "format": "uuid" }, "type": "array", "title": "Direction Ids" }, "priority": { "type": "integer", "title": "Priority" }, "starts_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Starts At" }, "ends_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Ends At" }, "title_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Title I18N" }, "client_message_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Client Message I18N" } }, "type": "object", "required": [ "id", "code", "version", "action_mode", "scope_mode", "direction_ids", "priority", "starts_at", "ends_at", "title_i18n", "client_message_i18n" ], "title": "PublicRule" }, "PublicTransition": { "properties": { "action": { "type": "string", "title": "Action" }, "source": { "type": "string", "title": "Source" }, "target": { "type": "string", "title": "Target" }, "requirements": { "items": { "type": "string" }, "type": "array", "title": "Requirements" } }, "type": "object", "required": [ "action", "source", "target", "requirements" ], "title": "PublicTransition" }, "QuotasView": { "properties": { "partner": { "type": "integer", "title": "Partner" }, "key_read": { "type": "integer", "title": "Key Read" }, "key_write": { "type": "integer", "title": "Key Write" } }, "type": "object", "required": [ "partner", "key_read", "key_write" ], "title": "QuotasView" }, "ReasonPolicy": { "properties": { "mode": { "type": "string", "title": "Mode" }, "min_length": { "type": "integer", "title": "Min Length" }, "max_length": { "type": "integer", "title": "Max Length" } }, "type": "object", "required": [ "mode", "min_length", "max_length" ], "title": "ReasonPolicy" }, "RegionView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "country_id": { "type": "string", "format": "uuid", "title": "Country Id" }, "name": { "type": "string", "title": "Name" }, "name_i18n": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Name I18N" } }, "type": "object", "required": [ "id", "country_id", "name", "name_i18n" ], "title": "RegionView" }, "SelectedServiceInput": { "properties": { "service_id": { "type": "string", "format": "uuid", "title": "Service Id" }, "quantity": { "anyOf": [ { "type": "number", "exclusiveMinimum": 0.0 }, { "type": "string" } ], "title": "Quantity", "default": "1" }, "override_amount": { "anyOf": [ { "type": "number", "minimum": 0.0 }, { "type": "string" }, { "type": "null" } ], "title": "Override Amount" } }, "type": "object", "required": [ "service_id" ], "title": "SelectedServiceInput" }, "ServicePricePreview": { "properties": { "service_id": { "type": "string", "format": "uuid", "title": "Service Id" }, "calculation_unit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Calculation Unit" }, "base_amount": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Base Amount" }, "quantity": { "type": "string", "title": "Quantity" }, "unit_amount": { "type": "string", "title": "Unit Amount" }, "amount": { "type": "string", "title": "Amount" }, "currency_code": { "type": "string", "title": "Currency Code" }, "source": { "type": "string", "title": "Source" } }, "type": "object", "required": [ "service_id", "quantity", "unit_amount", "amount", "currency_code", "source" ], "title": "ServicePricePreview" }, "ServiceView": { "properties": { "code": { "type": "string", "title": "Code" }, "name": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name" }, "id": { "type": "string", "format": "uuid", "title": "Id" }, "status": { "type": "string", "title": "Status" }, "description": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "title": "Description" }, "calculation_unit": { "type": "string", "title": "Calculation Unit" }, "application_scope": { "type": "string", "title": "Application Scope" }, "requires_process": { "type": "boolean", "title": "Requires Process" } }, "type": "object", "required": [ "code", "name", "id", "status", "description", "calculation_unit", "application_scope", "requires_process" ], "title": "ServiceView" }, "StatusRegistry": { "properties": { "operational": { "items": { "type": "string" }, "type": "array", "title": "Operational" }, "financial": { "items": { "type": "string" }, "type": "array", "title": "Financial" }, "lifecycle": { "items": { "type": "string" }, "type": "array", "title": "Lifecycle" }, "cargo": { "items": { "type": "string" }, "type": "array", "title": "Cargo" }, "unknown_values_allowed": { "type": "boolean", "title": "Unknown Values Allowed" }, "public_transitions": { "items": { "$ref": "#/components/schemas/PublicTransition" }, "type": "array", "title": "Public Transitions" } }, "type": "object", "required": [ "operational", "financial", "lifecycle", "cargo", "unknown_values_allowed", "public_transitions" ], "title": "StatusRegistry" }, "TariffView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "code": { "type": "string", "title": "Code" }, "name": { "type": "string", "title": "Name" }, "name_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Name I18N" }, "direction_id": { "type": "string", "format": "uuid", "title": "Direction Id" }, "direction_name": { "type": "string", "title": "Direction Name" }, "delivery_mode_id": { "type": "string", "format": "uuid", "title": "Delivery Mode Id" }, "delivery_mode_code": { "type": "string", "title": "Delivery Mode Code" }, "delivery_mode_name_i18n": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Delivery Mode Name I18N" }, "currency_code": { "type": "string", "title": "Currency Code" }, "version": { "type": "integer", "title": "Version" }, "tariff_version_id": { "type": "string", "format": "uuid", "title": "Tariff Version Id" }, "route_version_id": { "type": "string", "format": "uuid", "title": "Route Version Id" }, "effective_from": { "type": "string", "format": "date-time", "title": "Effective From" }, "average_delivery_days": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Average Delivery Days" }, "prices": { "items": { "$ref": "#/components/schemas/CargoPrice" }, "type": "array", "title": "Prices" } }, "type": "object", "required": [ "id", "code", "name", "name_i18n", "direction_id", "direction_name", "delivery_mode_id", "delivery_mode_code", "delivery_mode_name_i18n", "currency_code", "version", "tariff_version_id", "route_version_id", "effective_from", "average_delivery_days", "prices" ], "title": "TariffView" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "WalletView": { "properties": { "currency": { "type": "string", "title": "Currency" }, "balance": { "type": "string", "title": "Balance" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "currency", "balance", "updated_at" ], "title": "WalletView" }, "WebhookCreate": { "properties": { "url": { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri", "title": "Url" }, "events": { "items": { "type": "string", "enum": [ "cargo.moved", "cargo.status_changed", "order.created", "order.deleted", "order.status_changed" ] }, "type": "array", "minItems": 1, "title": "Events" } }, "type": "object", "required": [ "url", "events" ], "title": "WebhookCreate" }, "WebhookEventsUpdate": { "properties": { "events": { "items": { "type": "string" }, "type": "array", "minItems": 1, "title": "Events" } }, "additionalProperties": false, "type": "object", "required": [ "events" ], "title": "WebhookEventsUpdate" }, "WebhookView": { "properties": { "id": { "type": "string", "format": "uuid", "title": "Id" }, "url": { "type": "string", "title": "Url" }, "events": { "items": { "type": "string" }, "type": "array", "title": "Events" }, "status": { "type": "string", "title": "Status" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "signing_secret": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Signing Secret" } }, "type": "object", "required": [ "id", "url", "events", "status", "created_at" ], "title": "WebhookView" } }, "securitySchemes": { "HavvoApiKey": { "type": "apiKey", "in": "header", "name": "X-Havvo-Api-Key", "description": "Ключ из кабинета партнера; секрет показывается один раз." } } }, "servers": [ { "url": "https://havvo-test.gocrm.uz/api/partner/v1", "description": "Havvo Express API" } ] }