Partner API v1

合作伙伴集成文档

Havvo Express Partner API

60 API · REST · Webhooks

  1. 密钥
  2. 首次请求
  3. 订单
  4. Webhook
  5. 上线

1. 用途

本 API 用于合作伙伴的服务器集成。API 密钥确定合作伙伴身份,仅允许访问自己的客户、订单、货物和财务数据。地址:https://havvo-test.gocrm.uz/api/partner/v1。

2. 接入和密钥

Havvo 注册合作伙伴并分配不可变的 partner_id。员工或 integration admin 可生成密钥;密钥只显示一次,应存入 secret manager。

3. 请求规则

使用 JSON/UTF-8、UTC 和 ISO 8601。重要 POST 请求必须发送 Idempotency-Key,并记录 X-Request-Id。金额使用 decimal 字符串。

4. Scopes

通过 /account 和 /capabilities 获取实际权限,并遵循最小权限原则。

5. 客户

合作伙伴只能查看和修改自己的客户。DELETE 会归档客户并保留历史订单;只有 Havvo 员工可以恢复。

6. 订单和货物

流程:参考数据 → /orders/preview → POST /orders → /external-id → 标签 → /webhooks。任一货物入库后订单结构锁定;未入库货物在到仓前仍可修改或取消。

7. 标签

支持 JSON、PDF 和 ZPL,同时显示 Havvo ID 和合作伙伴外部 ID。

8. Webhooks

使用 HMAC-SHA256 验证 <timestamp>.<raw_body> 的 X-Havvo-Signature。按 event_id 去重,快速返回 2xx,并在队列中异步处理。

9. 财务

完整财务台账只读,包括欠款、计费、付款、退款和调整。各币种余额必须分开,不得自动按汇率合计。operation_id 稳定不变。

10. 参考数据

ID 从 /reference/ 获取,价格从 pricing 获取;不要把显示名称当作 ID。

11. 测试环境

验证 create → update → partial receive → label → webhook → finance,以及幂等重试。

12. 上线检查

检查密钥、HTTPS webhook、签名、retry/backoff、decimal 和不含秘密的日志。

13. 资料

可下载 OpenAPI、Postman 和 Python SDK。

14. 错误

401—密钥;403—scope;404—不存在或属于其他伙伴;409—状态冲突;422—数据;429—Retry-After;5xx—backoff。

15. 端到端场景

接收并验证 webhook,按事件 ID 去重,然后通过 GET 重新读取资源。

16. 兼容性

主版本位于 URL;应安全忽略新的可选字段和未知 enum 值。

API 方法参考

GET/api/partner/v1/account

账户和密钥

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
scope from GET /capabilities
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/account" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
partner_idstring是Immutable public partner identifier.partner-demo
codestring是Alias of the public partner ID.string
partner_uuidstring是Compatibility UUID for existing order pricing and party inputs.00000000-0000-4000-8000-000000000001
namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
statusstring是Current public resource state.active
scopesarray<string>是公共契约中的“scopes”值;其类型和必填要求显示在旁边。["string"]
{
  "partner_id": "string",
  "code": "string",
  "partner_uuid": "00000000-0000-4000-8000-000000000001",
  "name": "string",
  "legal_name": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "status": "string",
  "scopes": [
    "string"
  ]
}
GET/api/partner/v1/capabilities

账户和密钥

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
scope from GET /capabilities
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/capabilities" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
policyobject是公共契约中的“policy”值;其类型和必填要求显示在旁边。{"direction_ids": ["00000000-0000-4000-8000-000000000001"], "branch_ids": ["00000000-0000-4000-8000-000000000001"], "service_ids": ["00000000-0000-4000-8000-000000000001"], "operations": ["string"]}
policy.direction_idsarray<string> | null是公共契约中的“direction ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
policy.branch_idsarray<string> | null是公共契约中的“branch ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
policy.service_idsarray<string> | null是公共契约中的“service ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
policy.operationsarray<string> | null是公共契约中的“operations”值;其类型和必填要求显示在旁边。["string"]
scopesarray<string>是公共契约中的“scopes”值;其类型和必填要求显示在旁边。["string"]
webhook_eventsarray<string>是公共契约中的“webhook events”值;其类型和必填要求显示在旁边。["string"]
order_creation_principal_readyboolean是公共契约中的“order creation principal ready”值;其类型和必填要求显示在旁边。True
finance_writeboolean是公共契约中的“finance write”值;其类型和必填要求显示在旁边。True
limits_per_minuteobject是公共契约中的“limits per minute”值;其类型和必填要求显示在旁边。{"partner": 1, "key_read": 1, "key_write": 1}
limits_per_minute.partnerinteger是公共契约中的“partner”值;其类型和必填要求显示在旁边。1
limits_per_minute.key_readinteger是公共契约中的“key read”值;其类型和必填要求显示在旁边。1
limits_per_minute.key_writeinteger是公共契约中的“key write”值;其类型和必填要求显示在旁边。1
rate_limit_enabledboolean是公共契约中的“rate limit enabled”值;其类型和必填要求显示在旁边。True
{
  "policy": {
    "direction_ids": null,
    "branch_ids": null,
    "service_ids": null,
    "operations": null
  },
  "scopes": [
    "string"
  ],
  "webhook_events": [
    "string"
  ],
  "order_creation_principal_ready": true,
  "finance_write": true,
  "limits_per_minute": {
    "partner": 1,
    "key_read": 1,
    "key_write": 1
  },
  "rate_limit_enabled": true
}
GET/api/partner/v1/cargo/{cargo_id}/movements

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
cargo:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/cargo/{cargo_id}/movements" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
cargo_idpath是UUID of a cargo piece within an order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "event_type": "string", "branch_id": "00000000-0000-4000-8000-000000000001", "branch_name": "string", "quantity_before": 1, "quantity_after": 1, "weight_before": "string", "weight_after": "string", "payload": {}, "occurred_at": "2026-11-30T10:00:00Z"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.event_typestring是公共契约中的“event type”值;其类型和必填要求显示在旁边。string
items.branch_idstring是公共契约中的“branch id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.branch_namestring | null是公共契约中的“branch name”值;其类型和必填要求显示在旁边。string
items.quantity_beforeinteger | null是公共契约中的“quantity before”值;其类型和必填要求显示在旁边。1
items.quantity_afterinteger | null是公共契约中的“quantity after”值;其类型和必填要求显示在旁边。1
items.weight_beforestring | null是公共契约中的“weight before”值;其类型和必填要求显示在旁边。string
items.weight_afterstring | null是公共契约中的“weight after”值;其类型和必填要求显示在旁边。string
items.payloadobject是公共契约中的“payload”值;其类型和必填要求显示在旁边。{}
items.occurred_atstring是Business event time in ISO 8601 with timezone.2026-11-30T10:00:00Z
{
  "items": [
    {
      "id": null,
      "event_type": null,
      "branch_id": null,
      "branch_name": null,
      "quantity_before": null,
      "quantity_after": null,
      "weight_before": null,
      "weight_after": null,
      "payload": null,
      "occurred_at": null
    }
  ]
}
GET/api/partner/v1/clients

客户

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/clients" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
qquery否公共契约中的“q”值;其类型和必填要求显示在旁边。
limitquery否Maximum number of items in the page.
offsetquery否公共契约中的“offset”值;其类型和必填要求显示在旁边。
before_idquery否公共契约中的“before id”值;其类型和必填要求显示在旁边。
updated_fromquery否公共契约中的“updated from”值;其类型和必填要求显示在旁边。
statusquery否Current public resource state.
contactquery否公共契约中的“contact”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "custom_id": "string", "client_type": "string", "display_name": "string", "first_name": "string", "last_name": "string", "patronymic": "string", "legal_name": "string", "tax_number": "string", "country_id": "00000000-0000-4000-8000-000000000001", "language_code": "string", "status": "string", "can_create_orders": true, "version": 1, "created_at": "2026-11-30T10:00:00Z", "updated_at": "2026-11-30T10:00:00Z", "contacts": [], "private_data": null}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
items.client_typestring是Client type: individual for a person or legal for an organization.individual
items.display_namestring是Display name of the person or organization.ООО Partner Demo
items.first_namestring | null是Person's first name.Алишер
items.last_namestring | null是Person's last name.Каримов
items.patronymicstring | null是Person's patronymic; omit when it is not used.Акмалович
items.legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
items.tax_numberstring | null是Organization tax number; omit when it is not applicable in the client's country.309123456
items.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
items.language_codestring是Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
items.statusstring是Current public resource state.active
items.can_create_ordersboolean是公共契约中的“can create orders”值;其类型和必填要求显示在旁边。True
items.versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
items.created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
items.updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
items.contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
items.contacts.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
items.contacts.valuestring是Value formatted for the selected type.+998901234567
items.contacts.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
items.contacts.is_verifiedboolean是公共契约中的“is verified”值;其类型和必填要求显示在旁边。True
items.private_dataobject | null是Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
totalinteger是公共契约中的“total”值;其类型和必填要求显示在旁边。1
limitinteger是Maximum number of items in the page.50
offsetinteger是公共契约中的“offset”值;其类型和必填要求显示在旁边。1
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "id": null,
      "custom_id": null,
      "client_type": null,
      "display_name": null,
      "first_name": null,
      "last_name": null,
      "patronymic": null,
      "legal_name": null,
      "tax_number": null,
      "country_id": null,
      "language_code": null,
      "status": null,
      "can_create_orders": null,
      "version": null,
      "created_at": null,
      "updated_at": null,
      "contacts": null,
      "private_data": null
    }
  ],
  "total": 1,
  "limit": 1,
  "offset": 1,
  "next_cursor": "00000000-0000-4000-8000-000000000001"
}
POST/api/partner/v1/clients

客户

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
client_typestring是Client type: individual for a person or legal for an organization.individual
display_namestring是Display name of the person or organization.ООО Partner Demo
first_namestring | null否Person's first name.Алишер
last_namestring | null否Person's last name.Каримов
patronymicstring | null否Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null否Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null否Organization tax number; omit when it is not applicable in the client's country.309123456
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
language_codestring否Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
contactsarray<object>否Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean否Marks the primary contact or address; keep only one primary value per type.true
private_dataobject | null否Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/clients" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "client_type": "string",
  "display_name": "string",
  "country_id": "00000000-0000-4000-8000-000000000001"
}'

参数

名称位置必填说明
Idempotency-Keyheader否Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 201, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
client_typestring是Client type: individual for a person or legal for an organization.individual
display_namestring是Display name of the person or organization.ООО Partner Demo
first_namestring | null是Person's first name.Алишер
last_namestring | null是Person's last name.Каримов
patronymicstring | null是Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null是Organization tax number; omit when it is not applicable in the client's country.309123456
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
language_codestring是Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
statusstring是Current public resource state.active
can_create_ordersboolean是公共契约中的“can create orders”值;其类型和必填要求显示在旁边。True
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
contacts.is_verifiedboolean是公共契约中的“is verified”值;其类型和必填要求显示在旁边。True
private_dataobject | null是Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
{
  "id": "00000000-0000-4000-8000-000000000001",
  "custom_id": "string",
  "client_type": "string",
  "display_name": "string",
  "first_name": "string",
  "last_name": "string",
  "patronymic": "string",
  "legal_name": "string",
  "tax_number": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "language_code": "string",
  "status": "string",
  "can_create_orders": true,
  "version": 1,
  "created_at": "2026-11-30T10:00:00Z",
  "updated_at": "2026-11-30T10:00:00Z",
  "contacts": [
    {
      "id": null,
      "type": null,
      "value": null,
      "is_primary": null,
      "is_verified": null
    }
  ],
  "private_data": {
    "passport_series": null,
    "passport_number": null,
    "passport_iin": null,
    "passport_issued_by": null,
    "passport_issued_date": null
  }
}
GET/api/partner/v1/clients/{client_id}

客户

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
client_typestring是Client type: individual for a person or legal for an organization.individual
display_namestring是Display name of the person or organization.ООО Partner Demo
first_namestring | null是Person's first name.Алишер
last_namestring | null是Person's last name.Каримов
patronymicstring | null是Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null是Organization tax number; omit when it is not applicable in the client's country.309123456
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
language_codestring是Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
statusstring是Current public resource state.active
can_create_ordersboolean是公共契约中的“can create orders”值;其类型和必填要求显示在旁边。True
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
contacts.is_verifiedboolean是公共契约中的“is verified”值;其类型和必填要求显示在旁边。True
private_dataobject | null是Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
{
  "id": "00000000-0000-4000-8000-000000000001",
  "custom_id": "string",
  "client_type": "string",
  "display_name": "string",
  "first_name": "string",
  "last_name": "string",
  "patronymic": "string",
  "legal_name": "string",
  "tax_number": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "language_code": "string",
  "status": "string",
  "can_create_orders": true,
  "version": 1,
  "created_at": "2026-11-30T10:00:00Z",
  "updated_at": "2026-11-30T10:00:00Z",
  "contacts": [
    {
      "id": null,
      "type": null,
      "value": null,
      "is_primary": null,
      "is_verified": null
    }
  ],
  "private_data": {
    "passport_series": null,
    "passport_number": null,
    "passport_iin": null,
    "passport_issued_by": null,
    "passport_issued_date": null
  }
}
PATCH/api/partner/v1/clients/{client_id}

客户

部分更新 当前合作伙伴的所选资源

部分更新 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
display_namestring | null否Display name of the person or organization.ООО Partner Demo
first_namestring | null否Person's first name.Алишер
last_namestring | null否Person's last name.Каримов
patronymicstring | null否Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null否Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null否Organization tax number; omit when it is not applicable in the client's country.309123456
language_codestring | null否Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
curl -X PATCH "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "display_name": "string",
  "first_name": "string",
  "last_name": "string",
  "patronymic": "string",
  "legal_name": "string",
  "tax_number": "string",
  "language_code": "string"
}'

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
client_typestring是Client type: individual for a person or legal for an organization.individual
display_namestring是Display name of the person or organization.ООО Partner Demo
first_namestring | null是Person's first name.Алишер
last_namestring | null是Person's last name.Каримов
patronymicstring | null是Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null是Organization tax number; omit when it is not applicable in the client's country.309123456
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
language_codestring是Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
statusstring是Current public resource state.active
can_create_ordersboolean是公共契约中的“can create orders”值;其类型和必填要求显示在旁边。True
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
contacts.is_verifiedboolean是公共契约中的“is verified”值;其类型和必填要求显示在旁边。True
private_dataobject | null是Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
{
  "id": "00000000-0000-4000-8000-000000000001",
  "custom_id": "string",
  "client_type": "string",
  "display_name": "string",
  "first_name": "string",
  "last_name": "string",
  "patronymic": "string",
  "legal_name": "string",
  "tax_number": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "language_code": "string",
  "status": "string",
  "can_create_orders": true,
  "version": 1,
  "created_at": "2026-11-30T10:00:00Z",
  "updated_at": "2026-11-30T10:00:00Z",
  "contacts": [
    {
      "id": null,
      "type": null,
      "value": null,
      "is_primary": null,
      "is_verified": null
    }
  ],
  "private_data": {
    "passport_series": null,
    "passport_number": null,
    "passport_iin": null,
    "passport_issued_by": null,
    "passport_issued_date": null
  }
}
DELETE/api/partner/v1/clients/{client_id}

客户

撤销或归档 当前合作伙伴的所选资源

撤销或归档 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要
curl -X DELETE "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 204, 422

错误处理

422 — validation

GET/api/partner/v1/clients/{client_id}/addresses

客户

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/addresses" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "label": "string", "country_id": "00000000-0000-4000-8000-000000000001", "region_id": "00000000-0000-4000-8000-000000000001", "city_id": "00000000-0000-4000-8000-000000000001", "region_name": "string", "city_name": "string", "address_line": "string", "street": "string", "house": "string", "apartment": "string", "landmark": "string", "postal_code": "string", "latitude": "string", "longitude": "string", "is_primary": true, "status": "string"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.labelstring | null是公共契约中的“label”值;其类型和必填要求显示在旁边。string
items.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
items.region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.city_idstring | null是City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
items.region_namestring | null是公共契约中的“region name”值;其类型和必填要求显示在旁边。string
items.city_namestring是公共契约中的“city name”值;其类型和必填要求显示在旁边。string
items.address_linestring是Full one-line address for display and printing.Tashkent, Amir Temur 1
items.streetstring | null是公共契约中的“street”值;其类型和必填要求显示在旁边。string
items.housestring | null是公共契约中的“house”值;其类型和必填要求显示在旁边。string
items.apartmentstring | null是公共契约中的“apartment”值;其类型和必填要求显示在旁边。string
items.landmarkstring | null是公共契约中的“landmark”值;其类型和必填要求显示在旁边。string
items.postal_codestring | null是Address postal code.100000
items.latitudestring | null是公共契约中的“latitude”值;其类型和必填要求显示在旁边。string
items.longitudestring | null是公共契约中的“longitude”值;其类型和必填要求显示在旁边。string
items.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
items.statusstring是Current public resource state.active
{
  "items": [
    {
      "id": null,
      "label": null,
      "country_id": null,
      "region_id": null,
      "city_id": null,
      "region_name": null,
      "city_name": null,
      "address_line": null,
      "street": null,
      "house": null,
      "apartment": null,
      "landmark": null,
      "postal_code": null,
      "latitude": null,
      "longitude": null,
      "is_primary": null,
      "status": null
    }
  ]
}
POST/api/partner/v1/clients/{client_id}/addresses

客户

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
labelstring | null否公共契约中的“label”值;其类型和必填要求显示在旁边。string
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
region_idstring | null否公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
city_idstring | null否City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
region_namestring | null否公共契约中的“region name”值;其类型和必填要求显示在旁边。string
city_namestring是公共契约中的“city name”值;其类型和必填要求显示在旁边。string
address_linestring否Full one-line address for display and printing.Tashkent, Amir Temur 1
streetstring | null否公共契约中的“street”值;其类型和必填要求显示在旁边。string
housestring | null否公共契约中的“house”值;其类型和必填要求显示在旁边。string
apartmentstring | null否公共契约中的“apartment”值;其类型和必填要求显示在旁边。string
landmarkstring | null否公共契约中的“landmark”值;其类型和必填要求显示在旁边。string
postal_codestring | null否Address postal code.100000
latitudestring | null否公共契约中的“latitude”值;其类型和必填要求显示在旁边。string
longitudestring | null否公共契约中的“longitude”值;其类型和必填要求显示在旁边。string
is_primaryboolean否Marks the primary contact or address; keep only one primary value per type.true
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/addresses" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "country_id": "00000000-0000-4000-8000-000000000001",
  "city_name": "string"
}'

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
Idempotency-Keyheader否Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 201, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
labelstring | null是公共契约中的“label”值;其类型和必填要求显示在旁边。string
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
city_idstring | null是City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
region_namestring | null是公共契约中的“region name”值;其类型和必填要求显示在旁边。string
city_namestring是公共契约中的“city name”值;其类型和必填要求显示在旁边。string
address_linestring是Full one-line address for display and printing.Tashkent, Amir Temur 1
streetstring | null是公共契约中的“street”值;其类型和必填要求显示在旁边。string
housestring | null是公共契约中的“house”值;其类型和必填要求显示在旁边。string
apartmentstring | null是公共契约中的“apartment”值;其类型和必填要求显示在旁边。string
landmarkstring | null是公共契约中的“landmark”值;其类型和必填要求显示在旁边。string
postal_codestring | null是Address postal code.100000
latitudestring | null是公共契约中的“latitude”值;其类型和必填要求显示在旁边。string
longitudestring | null是公共契约中的“longitude”值;其类型和必填要求显示在旁边。string
is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
statusstring是Current public resource state.active
{
  "id": "00000000-0000-4000-8000-000000000001",
  "label": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "region_id": "00000000-0000-4000-8000-000000000001",
  "city_id": "00000000-0000-4000-8000-000000000001",
  "region_name": "string",
  "city_name": "string",
  "address_line": "string",
  "street": "string",
  "house": "string",
  "apartment": "string",
  "landmark": "string",
  "postal_code": "string",
  "latitude": "string",
  "longitude": "string",
  "is_primary": true,
  "status": "string"
}
PUT/api/partner/v1/clients/{client_id}/addresses/{address_id}

客户

完整替换 当前合作伙伴的所选资源

完整替换 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
labelstring | null否公共契约中的“label”值;其类型和必填要求显示在旁边。string
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
region_idstring | null否公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
city_idstring | null否City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
region_namestring | null否公共契约中的“region name”值;其类型和必填要求显示在旁边。string
city_namestring是公共契约中的“city name”值;其类型和必填要求显示在旁边。string
address_linestring否Full one-line address for display and printing.Tashkent, Amir Temur 1
streetstring | null否公共契约中的“street”值;其类型和必填要求显示在旁边。string
housestring | null否公共契约中的“house”值;其类型和必填要求显示在旁边。string
apartmentstring | null否公共契约中的“apartment”值;其类型和必填要求显示在旁边。string
landmarkstring | null否公共契约中的“landmark”值;其类型和必填要求显示在旁边。string
postal_codestring | null否Address postal code.100000
latitudestring | null否公共契约中的“latitude”值;其类型和必填要求显示在旁边。string
longitudestring | null否公共契约中的“longitude”值;其类型和必填要求显示在旁边。string
is_primaryboolean否Marks the primary contact or address; keep only one primary value per type.true
curl -X PUT "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/addresses/{address_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "country_id": "00000000-0000-4000-8000-000000000001",
  "city_name": "string"
}'

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
address_idpath是公共契约中的“address id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
labelstring | null是公共契约中的“label”值;其类型和必填要求显示在旁边。string
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
city_idstring | null是City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
region_namestring | null是公共契约中的“region name”值;其类型和必填要求显示在旁边。string
city_namestring是公共契约中的“city name”值;其类型和必填要求显示在旁边。string
address_linestring是Full one-line address for display and printing.Tashkent, Amir Temur 1
streetstring | null是公共契约中的“street”值;其类型和必填要求显示在旁边。string
housestring | null是公共契约中的“house”值;其类型和必填要求显示在旁边。string
apartmentstring | null是公共契约中的“apartment”值;其类型和必填要求显示在旁边。string
landmarkstring | null是公共契约中的“landmark”值;其类型和必填要求显示在旁边。string
postal_codestring | null是Address postal code.100000
latitudestring | null是公共契约中的“latitude”值;其类型和必填要求显示在旁边。string
longitudestring | null是公共契约中的“longitude”值;其类型和必填要求显示在旁边。string
is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
statusstring是Current public resource state.active
{
  "id": "00000000-0000-4000-8000-000000000001",
  "label": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "region_id": "00000000-0000-4000-8000-000000000001",
  "city_id": "00000000-0000-4000-8000-000000000001",
  "region_name": "string",
  "city_name": "string",
  "address_line": "string",
  "street": "string",
  "house": "string",
  "apartment": "string",
  "landmark": "string",
  "postal_code": "string",
  "latitude": "string",
  "longitude": "string",
  "is_primary": true,
  "status": "string"
}
DELETE/api/partner/v1/clients/{client_id}/addresses/{address_id}

客户

撤销或归档 当前合作伙伴的所选资源

撤销或归档 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要
curl -X DELETE "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/addresses/{address_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
address_idpath是公共契约中的“address id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 204, 422

错误处理

422 — validation

POST/api/partner/v1/clients/{client_id}/archive

客户

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/archive" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
client_typestring是Client type: individual for a person or legal for an organization.individual
display_namestring是Display name of the person or organization.ООО Partner Demo
first_namestring | null是Person's first name.Алишер
last_namestring | null是Person's last name.Каримов
patronymicstring | null是Person's patronymic; omit when it is not used.Акмалович
legal_namestring | null是Full registered name; required only when client_type=legal.ООО Partner Demo
tax_numberstring | null是Organization tax number; omit when it is not applicable in the client's country.309123456
country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
language_codestring是Language used for client notifications and documents. Omit it to use the default Russian language; supported values are ru, uz, and en.ru
statusstring是Current public resource state.active
can_create_ordersboolean是公共契约中的“can create orders”值;其类型和必填要求显示在旁边。True
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean是Marks the primary contact or address; keep only one primary value per type.true
contacts.is_verifiedboolean是公共契约中的“is verified”值;其类型和必填要求显示在旁边。True
private_dataobject | null是Personal identity data. Send only when required for delivery and covered by your lawful basis for processing.null
{
  "id": "00000000-0000-4000-8000-000000000001",
  "custom_id": "string",
  "client_type": "string",
  "display_name": "string",
  "first_name": "string",
  "last_name": "string",
  "patronymic": "string",
  "legal_name": "string",
  "tax_number": "string",
  "country_id": "00000000-0000-4000-8000-000000000001",
  "language_code": "string",
  "status": "string",
  "can_create_orders": true,
  "version": 1,
  "created_at": "2026-11-30T10:00:00Z",
  "updated_at": "2026-11-30T10:00:00Z",
  "contacts": [
    {
      "id": null,
      "type": null,
      "value": null,
      "is_primary": null,
      "is_verified": null
    }
  ],
  "private_data": {
    "passport_series": null,
    "passport_number": null,
    "passport_iin": null,
    "passport_issued_by": null,
    "passport_issued_date": null
  }
}
PUT/api/partner/v1/clients/{client_id}/contacts

客户

完整替换 当前合作伙伴的所选资源

完整替换 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
contactsarray<object>是Client phone numbers and email addresses; send only current contacts and mark one per type as primary.[{"type":"phone","value":"+998901234567","is_primary":true}]
contacts.typestring是Value type from the relevant reference catalog or operation enum.phone
contacts.valuestring是Value formatted for the selected type.+998901234567
contacts.is_primaryboolean否Marks the primary contact or address; keep only one primary value per type.true
curl -X PUT "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/contacts" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "contacts": [
    {
      "type": null,
      "value": null
    }
  ]
}'

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
{
  "id": "00000000-0000-4000-8000-000000000001",
  "version": 1
}
PUT/api/partner/v1/clients/{client_id}/private-data

客户

完整替换 当前合作伙伴的所选资源

完整替换 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
clients:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
passport_seriesstring | null否公共契约中的“passport series”值;其类型和必填要求显示在旁边。string
passport_numberstring | null否公共契约中的“passport number”值;其类型和必填要求显示在旁边。string
passport_iinstring | null否公共契约中的“passport iin”值;其类型和必填要求显示在旁边。string
passport_issued_bystring | null否公共契约中的“passport issued by”值;其类型和必填要求显示在旁边。string
passport_issued_datestring | null否公共契约中的“passport issued date”值;其类型和必填要求显示在旁边。2026-11-30
curl -X PUT "$HAVVO_BASE_URL/api/partner/v1/clients/{client_id}/private-data" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "passport_series": "string",
  "passport_number": "string",
  "passport_iin": "string",
  "passport_issued_by": "string",
  "passport_issued_date": "2026-11-30"
}'

参数

名称位置必填说明
client_idpath是UUID of a client linked to the current partner.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
{
  "id": "00000000-0000-4000-8000-000000000001",
  "version": 1
}
GET/api/partner/v1/finance/debts

财务

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
finance:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/finance/debts" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
limitquery否Maximum number of items in the page.
cursorquery否公共契约中的“cursor”值;其类型和必填要求显示在旁边。
order_idquery否UUID of the current partner's order.
client_idquery否UUID of a client linked to the current partner.
cargo_idquery否UUID of a cargo piece within an order.
currencyquery否Three-letter currency code; balances are never combined.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"order_id": "00000000-0000-4000-8000-000000000001", "client_ids": ["00000000-0000-4000-8000-000000000001"], "cargo": [], "currency": "string", "charged": "string", "allocated": "string", "amount": "string"}]
items.order_idstring是UUID of the current partner's order.00000000-0000-4000-8000-000000000003
items.client_idsarray<string>是Related partner clients, including archived links. Amount is per order.["00000000-0000-4000-8000-000000000001"]
items.cargoarray<object>是公共契约中的“cargo”值;其类型和必填要求显示在旁边。[{"cargo_id": "00000000-0000-4000-8000-000000000001", "charged": "string", "amount": "string"}]
items.cargo.cargo_idstring是UUID of a cargo piece within an order.00000000-0000-4000-8000-000000000004
items.cargo.chargedstring | null是公共契约中的“charged”值;其类型和必填要求显示在旁边。string
items.cargo.amountstring | null是Monetary amount as a decimal string, never float.125.50
items.currencystring | null是Three-letter currency code; balances are never combined.USD
items.chargedstring是公共契约中的“charged”值;其类型和必填要求显示在旁边。string
items.allocatedstring是公共契约中的“allocated”值;其类型和必填要求显示在旁边。string
items.amountstring是Monetary amount as a decimal string, never float.125.50
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "order_id": null,
      "client_ids": null,
      "cargo": null,
      "currency": null,
      "charged": null,
      "allocated": null,
      "amount": null
    }
  ],
  "next_cursor": "00000000-0000-4000-8000-000000000001"
}
GET/api/partner/v1/finance/ledger

财务

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
finance:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/finance/ledger" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
limitquery否Maximum number of items in the page.
cursorquery否公共契约中的“cursor”值;其类型和必填要求显示在旁边。
order_idquery否UUID of the current partner's order.
client_idquery否UUID of a client linked to the current partner.
cargo_idquery否UUID of a cargo piece within an order.
currencyquery否Three-letter currency code; balances are never combined.
occurred_fromquery否公共契约中的“occurred from”值;其类型和必填要求显示在旁边。
occurred_toquery否公共契约中的“occurred to”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"operation_id": "string", "operation_type": "charge", "occurred_at": "2026-11-30T10:00:00Z", "currency": "string", "amount": "string", "balance_type": "wallet", "balance_id": "00000000-0000-4000-8000-000000000001", "balance_change": "string", "balance_before": "string", "balance_after": "string", "payment_id": "00000000-0000-4000-8000-000000000001", "status": "string", "client_ids": ["00000000-0000-4000-8000-000000000001"], "order_ids": ["00000000-0000-4000-8000-000000000001"], "cargo_ids": ["00000000-0000-4000-8000-000000000001"]}]
items.operation_idstring是Stable operation identifier for deduplication.op:00000000-0000-4000-8000-000000000001
items.operation_typestring是公共契约中的“operation type”值;其类型和必填要求显示在旁边。 Enum: charge, recalculation, price_snapshot, payment, adjustment, refund, wallet, wallet_opening, wallet_snapshot, allocation, allocation_reversalcharge
items.occurred_atstring是Business event time in ISO 8601 with timezone.2026-11-30T10:00:00Z
items.currencystring | null是Three-letter currency code; balances are never combined.USD
items.amountstring是Monetary amount as a decimal string, never float.125.50
items.balance_typestring是公共契约中的“balance type”值;其类型和必填要求显示在旁边。 Enum: wallet, order, paymentwallet
items.balance_idstring是ID of the wallet, order or payment whose balance changed.00000000-0000-4000-8000-000000000001
items.balance_changestring | null是Signed change, in the currency and balance identified by this row.string
items.balance_beforestring | null是公共契约中的“balance before”值;其类型和必填要求显示在旁边。string
items.balance_afterstring | null是公共契约中的“balance after”值;其类型和必填要求显示在旁边。string
items.payment_idstring | null是公共契约中的“payment id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.statusstring | null是Current public resource state.active
items.client_idsarray<string>是公共契约中的“client ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
items.order_idsarray<string>是公共契约中的“order ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
items.cargo_idsarray<string>是公共契约中的“cargo ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "operation_id": null,
      "operation_type": null,
      "occurred_at": null,
      "currency": null,
      "amount": null,
      "balance_type": null,
      "balance_id": null,
      "balance_change": null,
      "balance_before": null,
      "balance_after": null,
      "payment_id": null,
      "status": null,
      "client_ids": null,
      "order_ids": null,
      "cargo_ids": null
    }
  ],
  "next_cursor": "string"
}
GET/api/partner/v1/finance/payments

财务

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
finance:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/finance/payments" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
limitquery否Maximum number of items in the page.
offsetquery否公共契约中的“offset”值;其类型和必填要求显示在旁边。
occurred_fromquery否公共契约中的“occurred from”值;其类型和必填要求显示在旁边。
occurred_toquery否公共契约中的“occurred to”值;其类型和必填要求显示在旁边。
statusquery否Current public resource state.
currencyquery否Three-letter currency code; balances are never combined.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "amount": "string", "unallocated_amount": "string", "method": "string", "currency": "string", "status": "string", "comment": "string", "occurred_at": "2026-11-30T10:00:00Z", "allocations": []}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.amountstring是Monetary amount as a decimal string, never float.125.50
items.unallocated_amountstring是公共契约中的“unallocated amount”值;其类型和必填要求显示在旁边。string
items.methodstring是公共契约中的“method”值;其类型和必填要求显示在旁边。string
items.currencystring | null是Three-letter currency code; balances are never combined.USD
items.statusstring是Current public resource state.active
items.commentstring | null是Partner order comment; do not include secrets.Handle with care
items.occurred_atstring是Business event time in ISO 8601 with timezone.2026-11-30T10:00:00Z
items.allocationsarray<object>是公共契约中的“allocations”值;其类型和必填要求显示在旁边。[{"order_id": "00000000-0000-4000-8000-000000000001", "amount": "string", "currency": "string"}]
items.allocations.order_idstring是UUID of the current partner's order.00000000-0000-4000-8000-000000000003
items.allocations.amountstring是Monetary amount as a decimal string, never float.125.50
items.allocations.currencystring | null是Three-letter currency code; balances are never combined.USD
totalinteger是公共契约中的“total”值;其类型和必填要求显示在旁边。1
limitinteger是Maximum number of items in the page.50
offsetinteger是公共契约中的“offset”值;其类型和必填要求显示在旁边。1
{
  "items": [
    {
      "id": null,
      "amount": null,
      "unallocated_amount": null,
      "method": null,
      "currency": null,
      "status": null,
      "comment": null,
      "occurred_at": null,
      "allocations": null
    }
  ],
  "total": 1,
  "limit": 1,
  "offset": 1
}
GET/api/partner/v1/finance/payments/{payment_id}/statement.pdf

财务

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
finance:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/finance/payments/{payment_id}/statement.pdf" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
payment_idpath是公共契约中的“payment id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

GET/api/partner/v1/finance/summary

财务

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
finance:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/finance/summary" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
walletsarray<object>是公共契约中的“wallets”值;其类型和必填要求显示在旁边。[{"currency": "string", "balance": "string", "updated_at": "2026-11-30T10:00:00Z"}]
wallets.currencystring是Three-letter currency code; balances are never combined.USD
wallets.balancestring是Running balance after the operation in the same currency.250.00
wallets.updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
debtsarray<object>是公共契约中的“debts”值;其类型和必填要求显示在旁边。[{"currency": "string", "amount": "string"}]
debts.currencystring是Three-letter currency code; balances are never combined.USD
debts.amountstring是Monetary amount as a decimal string, never float.125.50
{
  "wallets": [
    {
      "currency": null,
      "balance": null,
      "updated_at": null
    }
  ],
  "debts": [
    {
      "currency": null,
      "amount": null
    }
  ]
}
POST/api/partner/v1/keys/current/rotate

账户和密钥

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
scope from GET /capabilities
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
grace_secondsinteger否公共契约中的“grace seconds”值;其类型和必填要求显示在旁边。300
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/keys/current/rotate" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "grace_seconds": 300
}'

参数

名称位置必填说明
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
prefixstring是公共契约中的“prefix”值;其类型和必填要求显示在旁边。string
masked_keystring是公共契约中的“masked key”值;其类型和必填要求显示在旁边。string
scopesarray<string>是公共契约中的“scopes”值;其类型和必填要求显示在旁边。["string"]
statusstring是Current public resource state.active
expires_atstring | null是公共契约中的“expires at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
last_used_atstring | null是公共契约中的“last used at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
tokenstring | null否公共契约中的“token”值;其类型和必填要求显示在旁边。string
previous_valid_untilstring是公共契约中的“previous valid until”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
{
  "id": "00000000-0000-4000-8000-000000000001",
  "name": "string",
  "prefix": "string",
  "masked_key": "string",
  "scopes": [
    "string"
  ],
  "status": "string",
  "expires_at": "2026-11-30T10:00:00Z",
  "last_used_at": "2026-11-30T10:00:00Z",
  "created_at": "2026-11-30T10:00:00Z",
  "previous_valid_until": "2026-11-30T10:00:00Z"
}
GET/api/partner/v1/orders

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
limitquery否Maximum number of items in the page.
offsetquery否公共契约中的“offset”值;其类型和必填要求显示在旁边。
operational_statusquery否Operational order status from the public status catalog.
created_fromquery否公共契约中的“created from”值;其类型和必填要求显示在旁边。
created_toquery否公共契约中的“created to”值;其类型和必填要求显示在旁边。
updated_fromquery否公共契约中的“updated from”值;其类型和必填要求显示在旁边。
tracking_codequery否Public Havvo tracking code.
before_idquery否公共契约中的“before id”值;其类型和必填要求显示在旁边。
external_tracking_codequery否公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。
legacy_idquery否公共契约中的“legacy id”值;其类型和必填要求显示在旁边。
external_idquery否Stable order identifier in the partner system.
sortquery否公共契约中的“sort”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "number": 1, "tracking_code": "string", "operational_status": "string", "fulfillment_state": "string", "financial_status": "string", "lifecycle_state": "string", "estimated_total": "string", "currency": "string", "created_at": "2026-11-30T10:00:00Z", "updated_at": "2026-11-30T10:00:00Z"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.numberinteger是公共契约中的“number”值;其类型和必填要求显示在旁边。1
items.tracking_codestring是Public Havvo tracking code.HV260001234
items.operational_statusstring是Operational order status from the public status catalog.NEW
items.fulfillment_statestring是Delivery fulfillment state.pending
items.financial_statusstring是Order payment or debt state.unpaid
items.lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
items.estimated_totalstring是公共契约中的“estimated total”值;其类型和必填要求显示在旁边。string
items.currencystring是Three-letter currency code; balances are never combined.USD
items.created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
items.updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
totalinteger是公共契约中的“total”值;其类型和必填要求显示在旁边。1
limitinteger是Maximum number of items in the page.50
offsetinteger是公共契约中的“offset”值;其类型和必填要求显示在旁边。1
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "id": null,
      "number": null,
      "tracking_code": null,
      "operational_status": null,
      "fulfillment_state": null,
      "financial_status": null,
      "lifecycle_state": null,
      "estimated_total": null,
      "currency": null,
      "created_at": null,
      "updated_at": null
    }
  ],
  "total": 1,
  "limit": 1,
  "offset": 1,
  "next_cursor": "00000000-0000-4000-8000-000000000001"
}
POST/api/partner/v1/orders

订单和货物

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
source_channelstring是公共契约中的“source channel”值;其类型和必填要求显示在旁边。string
direction_idstring是公共契约中的“direction id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
route_version_idstring是公共契约中的“route version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
tariff_version_idstring是公共契约中的“tariff version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
partiesarray<object>否公共契约中的“parties”值;其类型和必填要求显示在旁边。[{"role": "string"}]
parties.rolestring是公共契约中的“role”值;其类型和必填要求显示在旁边。string
parties.client_idstring | null否UUID of a client linked to the current partner.00000000-0000-4000-8000-000000000002
parties.partner_idstring | null否Immutable public partner identifier.partner-demo
parties.payment_sharenumber | string | null否公共契约中的“payment share”值;其类型和必填要求显示在旁边。1.00
parties.address_idstring | null否公共契约中的“address id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
parties.cdek_delivery_point_codestring | null否公共契约中的“cdek delivery point code”值;其类型和必填要求显示在旁边。string
parties.cdek_delivery_pointobject | null否公共契约中的“cdek delivery point”值;其类型和必填要求显示在旁边。{"code": "string", "name": "string", "selection_source": "automatic"}
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"cargo_type_id": "00000000-0000-4000-8000-000000000001", "declared_weight": "1.00"}]
items.prohibited_goods_rule_idsarray<string>否公共契约中的“prohibited goods rule ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
items.entry_typestring否公共契约中的“entry type”值;其类型和必填要求显示在旁边。package
items.package_keystring | null否公共契约中的“package key”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.packaging_namestring | null否公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.external_tracking_codestring | null否公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
items.additional_tracking_codesarray<string>否公共契约中的“additional tracking codes”值;其类型和必填要求显示在旁边。["string"]
items.additional_tracking_commentsarray<string | null>否公共契约中的“additional tracking comments”值;其类型和必填要求显示在旁边。["string"]
items.descriptionstring | null否公共契约中的“description”值;其类型和必填要求显示在旁边。string
items.quantityinteger否Number of units; must be positive.1
items.declared_weightnumber | string是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。1.00
items.length_cmnumber | string | null否公共契约中的“length cm”值;其类型和必填要求显示在旁边。1.00
items.width_cmnumber | string | null否公共契约中的“width cm”值;其类型和必填要求显示在旁边。1.00
items.height_cmnumber | string | null否公共契约中的“height cm”值;其类型和必填要求显示在旁边。1.00
items.declared_valuenumber | string | null否公共契约中的“declared value”值;其类型和必填要求显示在旁边。1.00
servicesarray<object>否公共契约中的“services”值;其类型和必填要求显示在旁边。[{"service_id": "00000000-0000-4000-8000-000000000001"}]
services.service_idstring是公共契约中的“service id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
services.quantitynumber | string否Number of units; must be positive.1
services.override_amountnumber | string | null否公共契约中的“override amount”值;其类型和必填要求显示在旁边。1.00
commentstring | null否Partner order comment; do not include secrets.Handle with care
pricing_client_idstring | null否公共契约中的“pricing client id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
pricing_partner_idstring | null否公共契约中的“pricing partner id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
prohibited_goods_confirmationsarray<string>否公共契约中的“prohibited goods confirmations”值;其类型和必填要求显示在旁边。["string"]
expected_totalnumber | string是Expected order total after the change; use the value returned by preview.125.50
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/orders" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "source_channel": "string",
  "direction_id": "00000000-0000-4000-8000-000000000001",
  "route_version_id": "00000000-0000-4000-8000-000000000001",
  "tariff_version_id": "00000000-0000-4000-8000-000000000001",
  "items": [
    {
      "cargo_type_id": null,
      "declared_weight": null
    }
  ],
  "expected_total": "1.00"
}'

参数

名称位置必填说明
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 201, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
public_numberinteger是公共契约中的“public number”值;其类型和必填要求显示在旁边。1
tracking_codestring是Public Havvo tracking code.HV260001234
operational_statusstring是Operational order status from the public status catalog.NEW
fulfillment_statestring是Delivery fulfillment state.pending
financial_statusstring是Order payment or debt state.unpaid
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
estimated_totalstring是公共契约中的“estimated total”值;其类型和必填要求显示在旁边。string
paid_totalstring否公共契约中的“paid total”值;其类型和必填要求显示在旁边。0
external_paidstring否公共契约中的“external paid”值;其类型和必填要求显示在旁边。0
balance_paidstring否公共契约中的“balance paid”值;其类型和必填要求显示在旁边。0
bonus_paidstring否公共契约中的“bonus paid”值;其类型和必填要求显示在旁边。0
currency_codestring是公共契约中的“currency code”值;其类型和必填要求显示在旁边。string
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
tariff_recalculatedboolean否公共契约中的“tariff recalculated”值;其类型和必填要求显示在旁边。False
{
  "id": "00000000-0000-4000-8000-000000000001",
  "public_number": 1,
  "tracking_code": "string",
  "operational_status": "string",
  "fulfillment_state": "string",
  "financial_status": "string",
  "lifecycle_state": "string",
  "estimated_total": "string",
  "currency_code": "string",
  "version": 1
}
POST/api/partner/v1/orders/preview

订单和货物

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
source_channelstring是公共契约中的“source channel”值;其类型和必填要求显示在旁边。string
direction_idstring是公共契约中的“direction id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
route_version_idstring是公共契约中的“route version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
tariff_version_idstring是公共契约中的“tariff version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
partiesarray<object>否公共契约中的“parties”值;其类型和必填要求显示在旁边。[{"role": "string"}]
parties.rolestring是公共契约中的“role”值;其类型和必填要求显示在旁边。string
parties.client_idstring | null否UUID of a client linked to the current partner.00000000-0000-4000-8000-000000000002
parties.partner_idstring | null否Immutable public partner identifier.partner-demo
parties.payment_sharenumber | string | null否公共契约中的“payment share”值;其类型和必填要求显示在旁边。1.00
parties.address_idstring | null否公共契约中的“address id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
parties.cdek_delivery_point_codestring | null否公共契约中的“cdek delivery point code”值;其类型和必填要求显示在旁边。string
parties.cdek_delivery_pointobject | null否公共契约中的“cdek delivery point”值;其类型和必填要求显示在旁边。{"code": "string", "name": "string", "selection_source": "automatic"}
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"cargo_type_id": "00000000-0000-4000-8000-000000000001", "declared_weight": "1.00"}]
items.prohibited_goods_rule_idsarray<string>否公共契约中的“prohibited goods rule ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
items.entry_typestring否公共契约中的“entry type”值;其类型和必填要求显示在旁边。package
items.package_keystring | null否公共契约中的“package key”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.packaging_namestring | null否公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.external_tracking_codestring | null否公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
items.additional_tracking_codesarray<string>否公共契约中的“additional tracking codes”值;其类型和必填要求显示在旁边。["string"]
items.additional_tracking_commentsarray<string | null>否公共契约中的“additional tracking comments”值;其类型和必填要求显示在旁边。["string"]
items.descriptionstring | null否公共契约中的“description”值;其类型和必填要求显示在旁边。string
items.quantityinteger否Number of units; must be positive.1
items.declared_weightnumber | string是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。1.00
items.length_cmnumber | string | null否公共契约中的“length cm”值;其类型和必填要求显示在旁边。1.00
items.width_cmnumber | string | null否公共契约中的“width cm”值;其类型和必填要求显示在旁边。1.00
items.height_cmnumber | string | null否公共契约中的“height cm”值;其类型和必填要求显示在旁边。1.00
items.declared_valuenumber | string | null否公共契约中的“declared value”值;其类型和必填要求显示在旁边。1.00
servicesarray<object>否公共契约中的“services”值;其类型和必填要求显示在旁边。[{"service_id": "00000000-0000-4000-8000-000000000001"}]
services.service_idstring是公共契约中的“service id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
services.quantitynumber | string否Number of units; must be positive.1
services.override_amountnumber | string | null否公共契约中的“override amount”值;其类型和必填要求显示在旁边。1.00
commentstring | null否Partner order comment; do not include secrets.Handle with care
pricing_client_idstring | null否公共契约中的“pricing client id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
pricing_partner_idstring | null否公共契约中的“pricing partner id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/orders/preview" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "source_channel": "string",
  "direction_id": "00000000-0000-4000-8000-000000000001",
  "route_version_id": "00000000-0000-4000-8000-000000000001",
  "tariff_version_id": "00000000-0000-4000-8000-000000000001",
  "items": [
    {
      "cargo_type_id": null,
      "declared_weight": null
    }
  ]
}'

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
tariff_plan_idstring是公共契约中的“tariff plan id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
tariff_version_idstring是公共契约中的“tariff version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
route_version_idstring是公共契约中的“route version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
currency_codestring是公共契约中的“currency code”值;其类型和必填要求显示在旁边。string
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"cargo_type_id": "00000000-0000-4000-8000-000000000001", "external_tracking_code": "string", "actual_weight": "string", "volumetric_weight": "string", "calculation_weight": "string", "unit_price": "string", "amount": "string", "source": "string"}]
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
items.entry_typestring | null否公共契约中的“entry type”值;其类型和必填要求显示在旁边。package
items.package_keystring | null否公共契约中的“package key”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.quantityinteger否Number of units; must be positive.1
items.pricing_quantityinteger否公共契约中的“pricing quantity”值;其类型和必填要求显示在旁边。1
items.logistic_quantityinteger否公共契约中的“logistic quantity”值;其类型和必填要求显示在旁边。1
items.measurement_basisstring否公共契约中的“measurement basis”值;其类型和必填要求显示在旁边。 Enum: per_unit, totaltotal
items.actual_weightstring是公共契约中的“actual weight”值;其类型和必填要求显示在旁边。string
items.volumetric_weightstring | null是公共契约中的“volumetric weight”值;其类型和必填要求显示在旁边。string
items.calculation_weightstring是公共契约中的“calculation weight”值;其类型和必填要求显示在旁边。string
items.calculation_unitstring否公共契约中的“calculation unit”值;其类型和必填要求显示在旁边。kg
items.unit_actual_weightstring | null否公共契约中的“unit actual weight”值;其类型和必填要求显示在旁边。string
items.total_actual_weightstring | null否公共契约中的“total actual weight”值;其类型和必填要求显示在旁边。string
items.unit_volumetric_weightstring | null否公共契约中的“unit volumetric weight”值;其类型和必填要求显示在旁边。string
items.total_volumetric_weightstring | null否公共契约中的“total volumetric weight”值;其类型和必填要求显示在旁边。string
items.unit_calculation_weightstring | null否公共契约中的“unit calculation weight”值;其类型和必填要求显示在旁边。string
items.total_calculation_weightstring | null否公共契约中的“total calculation weight”值;其类型和必填要求显示在旁边。string
items.unit_declared_valuestring | null否公共契约中的“unit declared value”值;其类型和必填要求显示在旁边。string
items.total_declared_valuestring | null否公共契约中的“total declared value”值;其类型和必填要求显示在旁边。string
items.unit_pricestring是公共契约中的“unit price”值;其类型和必填要求显示在旁边。string
items.amountstring是Monetary amount as a decimal string, never float.125.50
items.sourcestring是公共契约中的“source”值;其类型和必填要求显示在旁边。string
servicesarray<object>否公共契约中的“services”值;其类型和必填要求显示在旁边。[{"service_id": "00000000-0000-4000-8000-000000000001", "quantity": "string", "unit_amount": "string", "amount": "string", "currency_code": "string", "source": "string"}]
services.service_idstring是公共契约中的“service id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
services.calculation_unitstring | null否公共契约中的“calculation unit”值;其类型和必填要求显示在旁边。string
services.base_amountstring | null否公共契约中的“base amount”值;其类型和必填要求显示在旁边。string
services.quantitystring是Number of units; must be positive.1
services.unit_amountstring是公共契约中的“unit amount”值;其类型和必填要求显示在旁边。string
services.amountstring是Monetary amount as a decimal string, never float.125.50
services.currency_codestring是公共契约中的“currency code”值;其类型和必填要求显示在旁边。string
services.sourcestring是公共契约中的“source”值;其类型和必填要求显示在旁边。string
estimated_totalstring是公共契约中的“estimated total”值;其类型和必填要求显示在旁边。string
warningsarray<string>是公共契约中的“warnings”值;其类型和必填要求显示在旁边。["string"]
quantity_semanticsstring否公共契约中的“quantity semantics”值;其类型和必填要求显示在旁边。total
{
  "tariff_plan_id": "00000000-0000-4000-8000-000000000001",
  "tariff_version_id": "00000000-0000-4000-8000-000000000001",
  "route_version_id": "00000000-0000-4000-8000-000000000001",
  "currency_code": "string",
  "items": [
    {
      "cargo_type_id": null,
      "external_tracking_code": null,
      "actual_weight": null,
      "volumetric_weight": null,
      "calculation_weight": null,
      "unit_price": null,
      "amount": null,
      "source": null
    }
  ],
  "estimated_total": "string",
  "warnings": [
    "string"
  ]
}
GET/api/partner/v1/orders/{order_id}

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
numberinteger是公共契约中的“number”值;其类型和必填要求显示在旁边。1
tracking_codestring是Public Havvo tracking code.HV260001234
operational_statusstring是Operational order status from the public status catalog.NEW
fulfillment_statestring是Delivery fulfillment state.pending
financial_statusstring是Order payment or debt state.unpaid
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"is_editable": true, "can_cancel": true, "can_delete": true, "locked_at": "2026-11-30T10:00:00Z", "lock_reason": null, "id": "00000000-0000-4000-8000-000000000001", "cargo_type_id": "00000000-0000-4000-8000-000000000001", "external_tracking_code": "string", "packaging_name": "string", "description": "string", "quantity": 1, "declared_weight": "string", "length_cm": "string", "width_cm": "string", "height_cm": "string", "declared_value": "string", "status": "string", "lifecycle_state": "string", "version": 1}]
items.is_editableboolean是Whether the declared cargo item can currently be edited.true
items.can_cancelboolean是Whether the declared cargo item can currently be cancelled.true
items.can_deleteboolean是Whether the declared cargo item can currently be soft-deleted.true
items.locked_atstring | null是Time at which cargo mutations became locked; null means no lock.2026-11-30T10:00:00Z
items.lock_reasonstring | null是Reason cargo mutations are locked, for example CARGO_ACCEPTED.CARGO_ACCEPTED
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
items.packaging_namestring | null是公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
items.descriptionstring | null是公共契约中的“description”值;其类型和必填要求显示在旁边。string
items.quantityinteger是Number of units; must be positive.1
items.declared_weightstring是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。string
items.length_cmstring | null是公共契约中的“length cm”值;其类型和必填要求显示在旁边。string
items.width_cmstring | null是公共契约中的“width cm”值;其类型和必填要求显示在旁边。string
items.height_cmstring | null是公共契约中的“height cm”值;其类型和必填要求显示在旁边。string
items.declared_valuestring | null是公共契约中的“declared value”值;其类型和必填要求显示在旁边。string
items.statusstring是Current public resource state.active
items.lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
items.versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
eventsarray<object>是Webhook events listed by GET /capabilities.["order.status_changed"]
events.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
events.typestring是Value type from the relevant reference catalog or operation enum.phone
events.payloadobject是公共契约中的“payload”值;其类型和必填要求显示在旁边。{}
events.occurred_atstring是Business event time in ISO 8601 with timezone.2026-11-30T10:00:00Z
partiesarray<object>是公共契约中的“parties”值;其类型和必填要求显示在旁边。[{"role": "string", "client_id": "00000000-0000-4000-8000-000000000001", "partner_id": "00000000-0000-4000-8000-000000000001", "name": "string", "custom_id": "string", "phone": "string", "email": "string", "address": null, "payment_share": "string"}]
parties.rolestring是公共契约中的“role”值;其类型和必填要求显示在旁边。string
parties.client_idstring | null是UUID of a client linked to the current partner.00000000-0000-4000-8000-000000000002
parties.partner_idstring | null是Immutable public partner identifier.partner-demo
parties.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
parties.custom_idstring | null是公共契约中的“custom id”值;其类型和必填要求显示在旁边。string
parties.phonestring | null是Phone number in international format.+998901234567
parties.emailstring | null是Contact email; not a resource identifier.integration@example.com
parties.addressobject | null是公共契约中的“address”值;其类型和必填要求显示在旁边。{"label": "string", "country_id": "00000000-0000-4000-8000-000000000001", "region_name": "string", "city_name": "string", "address_line": "string", "postal_code": "string"}
parties.payment_sharestring | null是公共契约中的“payment share”值;其类型和必填要求显示在旁边。string
price_componentsarray<object> | null是公共契约中的“price components”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "type": "string", "description": "string", "amount": "string", "currency": "string", "status": "string"}]
estimated_totalstring是公共契约中的“estimated total”值;其类型和必填要求显示在旁边。string
currencystring是Three-letter currency code; balances are never combined.USD
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
{
  "id": "00000000-0000-4000-8000-000000000001",
  "number": 1,
  "tracking_code": "string",
  "operational_status": "string",
  "fulfillment_state": "string",
  "financial_status": "string",
  "lifecycle_state": "string",
  "items": [
    {
      "is_editable": null,
      "can_cancel": null,
      "can_delete": null,
      "locked_at": null,
      "lock_reason": null,
      "id": null,
      "cargo_type_id": null,
      "external_tracking_code": null,
      "packaging_name": null,
      "description": null,
      "quantity": null,
      "declared_weight": null,
      "length_cm": null,
      "width_cm": null,
      "height_cm": null,
      "declared_value": null,
      "status": null,
      "lifecycle_state": null,
      "version": null
    }
  ],
  "events": [
    {
      "id": null,
      "type": null,
      "payload": null,
      "occurred_at": null
    }
  ],
  "parties": [
    {
      "role": null,
      "client_id": null,
      "partner_id": null,
      "name": null,
      "custom_id": null,
      "phone": null,
      "email": null,
      "address": null,
      "payment_share": null
    }
  ],
  "price_components": [],
  "estimated_total": "string",
  "currency": "string",
  "version": 1,
  "created_at": "2026-11-30T10:00:00Z",
  "updated_at": "2026-11-30T10:00:00Z"
}
PUT/api/partner/v1/orders/{order_id}

订单和货物

完整替换 当前合作伙伴的所选资源

完整替换 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
source_channelstring是公共契约中的“source channel”值;其类型和必填要求显示在旁边。string
direction_idstring是公共契约中的“direction id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
route_version_idstring是公共契约中的“route version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
tariff_version_idstring是公共契约中的“tariff version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
partiesarray<object>否公共契约中的“parties”值;其类型和必填要求显示在旁边。[{"role": "string"}]
parties.rolestring是公共契约中的“role”值;其类型和必填要求显示在旁边。string
parties.client_idstring | null否UUID of a client linked to the current partner.00000000-0000-4000-8000-000000000002
parties.partner_idstring | null否Immutable public partner identifier.partner-demo
parties.payment_sharenumber | string | null否公共契约中的“payment share”值;其类型和必填要求显示在旁边。1.00
parties.address_idstring | null否公共契约中的“address id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
parties.cdek_delivery_point_codestring | null否公共契约中的“cdek delivery point code”值;其类型和必填要求显示在旁边。string
parties.cdek_delivery_pointobject | null否公共契约中的“cdek delivery point”值;其类型和必填要求显示在旁边。{"code": "string", "name": "string", "selection_source": "automatic"}
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"cargo_type_id": "00000000-0000-4000-8000-000000000001", "declared_weight": "1.00"}]
items.prohibited_goods_rule_idsarray<string>否公共契约中的“prohibited goods rule ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
items.entry_typestring否公共契约中的“entry type”值;其类型和必填要求显示在旁边。package
items.package_keystring | null否公共契约中的“package key”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.packaging_namestring | null否公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.external_tracking_codestring | null否公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
items.additional_tracking_codesarray<string>否公共契约中的“additional tracking codes”值;其类型和必填要求显示在旁边。["string"]
items.additional_tracking_commentsarray<string | null>否公共契约中的“additional tracking comments”值;其类型和必填要求显示在旁边。["string"]
items.descriptionstring | null否公共契约中的“description”值;其类型和必填要求显示在旁边。string
items.quantityinteger否Number of units; must be positive.1
items.declared_weightnumber | string是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。1.00
items.length_cmnumber | string | null否公共契约中的“length cm”值;其类型和必填要求显示在旁边。1.00
items.width_cmnumber | string | null否公共契约中的“width cm”值;其类型和必填要求显示在旁边。1.00
items.height_cmnumber | string | null否公共契约中的“height cm”值;其类型和必填要求显示在旁边。1.00
items.declared_valuenumber | string | null否公共契约中的“declared value”值;其类型和必填要求显示在旁边。1.00
servicesarray<object>否公共契约中的“services”值;其类型和必填要求显示在旁边。[{"service_id": "00000000-0000-4000-8000-000000000001"}]
services.service_idstring是公共契约中的“service id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
services.quantitynumber | string否Number of units; must be positive.1
services.override_amountnumber | string | null否公共契约中的“override amount”值;其类型和必填要求显示在旁边。1.00
commentstring | null否Partner order comment; do not include secrets.Handle with care
pricing_client_idstring | null否公共契约中的“pricing client id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
pricing_partner_idstring | null否公共契约中的“pricing partner id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
prohibited_goods_confirmationsarray<string>否公共契约中的“prohibited goods confirmations”值;其类型和必填要求显示在旁边。["string"]
expected_totalnumber | string是Expected order total after the change; use the value returned by preview.125.50
curl -X PUT "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "source_channel": "string",
  "direction_id": "00000000-0000-4000-8000-000000000001",
  "route_version_id": "00000000-0000-4000-8000-000000000001",
  "tariff_version_id": "00000000-0000-4000-8000-000000000001",
  "items": [
    {
      "cargo_type_id": null,
      "declared_weight": null
    }
  ],
  "expected_total": "1.00"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
{
  "id": "00000000-0000-4000-8000-000000000001",
  "version": 1
}
PATCH/api/partner/v1/orders/{order_id}

订单和货物

部分更新 当前合作伙伴的所选资源

部分更新 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
commentstring | null否Partner order comment; do not include secrets.Handle with care
curl -X PATCH "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "comment": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
{
  "id": "00000000-0000-4000-8000-000000000001",
  "version": 1
}
DELETE/api/partner/v1/orders/{order_id}

订单和货物

撤销或归档 当前合作伙伴的所选资源

撤销或归档 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
reasonstring是Required human-readable reason for cancellation or deletion audit history.Cargo is no longer required
curl -X DELETE "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "reason": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 204, 422

错误处理

422 — validation

POST/api/partner/v1/orders/{order_id}/cancel

订单和货物

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
reasonstring是Required human-readable reason for cancellation or deletion audit history.Cargo is no longer required
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/cancel" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "reason": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
prohibited_goods_evaluationobject | null否公共契约中的“prohibited goods evaluation”值;其类型和必填要求显示在旁边。{"enforcement_mode": "off", "direction_id": "00000000-0000-4000-8000-000000000001", "app_code": "crm", "effective_mode": "block"}
operational_statusstring是Operational order status from the public status catalog.NEW
{
  "id": "00000000-0000-4000-8000-000000000001",
  "version": 1,
  "operational_status": "string"
}
GET/api/partner/v1/orders/{order_id}/cargo

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
cargo:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/cargo" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "barcode": "string", "cargo_type_id": "00000000-0000-4000-8000-000000000001", "quantity": 1, "actual_weight": "string", "volumetric_weight": "string", "calculation_weight": "string", "dimensions_cm": {"length": null, "width": null, "height": null}, "current_stage": "string", "package": null, "created_at": "2026-11-30T10:00:00Z", "updated_at": "2026-11-30T10:00:00Z"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.barcodestring是Cargo-piece or package barcode.HV-CARGO-0001
items.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.quantityinteger是Number of units; must be positive.1
items.actual_weightstring是公共契约中的“actual weight”值;其类型和必填要求显示在旁边。string
items.volumetric_weightstring | null是公共契约中的“volumetric weight”值;其类型和必填要求显示在旁边。string
items.calculation_weightstring是公共契约中的“calculation weight”值;其类型和必填要求显示在旁边。string
items.dimensions_cmobject是公共契约中的“dimensions cm”值;其类型和必填要求显示在旁边。{"length": "string", "width": "string", "height": "string"}
items.dimensions_cm.lengthstring | null是公共契约中的“length”值;其类型和必填要求显示在旁边。string
items.dimensions_cm.widthstring | null是公共契约中的“width”值;其类型和必填要求显示在旁边。string
items.dimensions_cm.heightstring | null是公共契约中的“height”值;其类型和必填要求显示在旁边。string
items.current_stagestring是公共契约中的“current stage”值;其类型和必填要求显示在旁边。string
items.packageobject | null是公共契约中的“package”值;其类型和必填要求显示在旁边。{"id": "00000000-0000-4000-8000-000000000001", "barcode": "string", "status": "string"}
items.created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
items.updated_atstring是Last record update time in ISO 8601 UTC.2026-11-30T10:05:00Z
{
  "items": [
    {
      "id": null,
      "barcode": null,
      "cargo_type_id": null,
      "quantity": null,
      "actual_weight": null,
      "volumetric_weight": null,
      "calculation_weight": null,
      "dimensions_cm": null,
      "current_stage": null,
      "package": null,
      "created_at": null,
      "updated_at": null
    }
  ]
}
GET/api/partner/v1/orders/{order_id}/external-id

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/external-id" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
external_idstring是Stable order identifier in the partner system.ORDER-2026-0001
{
  "external_id": "string"
}
PUT/api/partner/v1/orders/{order_id}/external-id

订单和货物

完整替换 当前合作伙伴的所选资源

完整替换 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
不需要

数据结构: request

字段类型必填说明示例
external_idstring是Stable order identifier in the partner system.ORDER-2026-0001
curl -X PUT "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/external-id" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "external_id": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
external_idstring是Stable order identifier in the partner system.ORDER-2026-0001
{
  "external_id": "string"
}
GET/api/partner/v1/orders/{order_id}/items/{item_id}

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/items/{item_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
item_idpath是公共契约中的“item id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
is_editableboolean是Whether the declared cargo item can currently be edited.true
can_cancelboolean是Whether the declared cargo item can currently be cancelled.true
can_deleteboolean是Whether the declared cargo item can currently be soft-deleted.true
locked_atstring | null是Time at which cargo mutations became locked; null means no lock.2026-11-30T10:00:00Z
lock_reasonstring | null是Reason cargo mutations are locked, for example CARGO_ACCEPTED.CARGO_ACCEPTED
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
packaging_namestring | null是公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
descriptionstring | null是公共契约中的“description”值;其类型和必填要求显示在旁边。string
quantityinteger是Number of units; must be positive.1
declared_weightstring是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。string
length_cmstring | null是公共契约中的“length cm”值;其类型和必填要求显示在旁边。string
width_cmstring | null是公共契约中的“width cm”值;其类型和必填要求显示在旁边。string
height_cmstring | null是公共契约中的“height cm”值;其类型和必填要求显示在旁边。string
declared_valuestring | null是公共契约中的“declared value”值;其类型和必填要求显示在旁边。string
statusstring是Current public resource state.active
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
{
  "is_editable": true,
  "can_cancel": true,
  "can_delete": true,
  "locked_at": "2026-11-30T10:00:00Z",
  "lock_reason": "CARGO_ACCEPTED",
  "id": "00000000-0000-4000-8000-000000000001",
  "cargo_type_id": "00000000-0000-4000-8000-000000000001",
  "external_tracking_code": "string",
  "packaging_name": "string",
  "description": "string",
  "quantity": 1,
  "declared_weight": "string",
  "length_cm": "string",
  "width_cm": "string",
  "height_cm": "string",
  "declared_value": "string",
  "status": "string",
  "lifecycle_state": "string",
  "version": 1
}
PATCH/api/partner/v1/orders/{order_id}/items/{item_id}

订单和货物

部分更新 当前合作伙伴的所选资源

部分更新 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
descriptionstring | null否公共契约中的“description”值;其类型和必填要求显示在旁边。string
external_tracking_codestring | null否公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
cargo_type_idstring | null否公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
packaging_namestring | null否公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
quantityinteger | null否Number of units; must be positive.1
declared_weightnumber | string | null否公共契约中的“declared weight”值;其类型和必填要求显示在旁边。1.00
length_cmnumber | string | null否公共契约中的“length cm”值;其类型和必填要求显示在旁边。1.00
width_cmnumber | string | null否公共契约中的“width cm”值;其类型和必填要求显示在旁边。1.00
height_cmnumber | string | null否公共契约中的“height cm”值;其类型和必填要求显示在旁边。1.00
declared_valuenumber | string | null否公共契约中的“declared value”值;其类型和必填要求显示在旁边。1.00
expected_totalnumber | string | null否Expected order total after the change; use the value returned by preview.125.50
expected_versioninteger是Cargo item version returned by the latest GET; prevents overwriting concurrent changes.1
curl -X PATCH "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/items/{item_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "expected_version": 1
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
item_idpath是公共契约中的“item id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
is_editableboolean是Whether the declared cargo item can currently be edited.true
can_cancelboolean是Whether the declared cargo item can currently be cancelled.true
can_deleteboolean是Whether the declared cargo item can currently be soft-deleted.true
locked_atstring | null是Time at which cargo mutations became locked; null means no lock.2026-11-30T10:00:00Z
lock_reasonstring | null是Reason cargo mutations are locked, for example CARGO_ACCEPTED.CARGO_ACCEPTED
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
packaging_namestring | null是公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
descriptionstring | null是公共契约中的“description”值;其类型和必填要求显示在旁边。string
quantityinteger是Number of units; must be positive.1
declared_weightstring是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。string
length_cmstring | null是公共契约中的“length cm”值;其类型和必填要求显示在旁边。string
width_cmstring | null是公共契约中的“width cm”值;其类型和必填要求显示在旁边。string
height_cmstring | null是公共契约中的“height cm”值;其类型和必填要求显示在旁边。string
declared_valuestring | null是公共契约中的“declared value”值;其类型和必填要求显示在旁边。string
statusstring是Current public resource state.active
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
{
  "is_editable": true,
  "can_cancel": true,
  "can_delete": true,
  "locked_at": "2026-11-30T10:00:00Z",
  "lock_reason": "CARGO_ACCEPTED",
  "id": "00000000-0000-4000-8000-000000000001",
  "cargo_type_id": "00000000-0000-4000-8000-000000000001",
  "external_tracking_code": "string",
  "packaging_name": "string",
  "description": "string",
  "quantity": 1,
  "declared_weight": "string",
  "length_cm": "string",
  "width_cm": "string",
  "height_cm": "string",
  "declared_value": "string",
  "status": "string",
  "lifecycle_state": "string",
  "version": 1
}
DELETE/api/partner/v1/orders/{order_id}/items/{item_id}

订单和货物

撤销或归档 当前合作伙伴的所选资源

撤销或归档 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
expected_versioninteger是Cargo item version returned by the latest GET; prevents overwriting concurrent changes.1
expected_totalnumber | string是Expected order total after the change; use the value returned by preview.125.50
reasonstring是Required human-readable reason for cancellation or deletion audit history.Cargo is no longer required
curl -X DELETE "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/items/{item_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "expected_version": 1,
  "expected_total": "1.00",
  "reason": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
item_idpath是公共契约中的“item id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
is_editableboolean是Whether the declared cargo item can currently be edited.true
can_cancelboolean是Whether the declared cargo item can currently be cancelled.true
can_deleteboolean是Whether the declared cargo item can currently be soft-deleted.true
locked_atstring | null是Time at which cargo mutations became locked; null means no lock.2026-11-30T10:00:00Z
lock_reasonstring | null是Reason cargo mutations are locked, for example CARGO_ACCEPTED.CARGO_ACCEPTED
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
packaging_namestring | null是公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
descriptionstring | null是公共契约中的“description”值;其类型和必填要求显示在旁边。string
quantityinteger是Number of units; must be positive.1
declared_weightstring是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。string
length_cmstring | null是公共契约中的“length cm”值;其类型和必填要求显示在旁边。string
width_cmstring | null是公共契约中的“width cm”值;其类型和必填要求显示在旁边。string
height_cmstring | null是公共契约中的“height cm”值;其类型和必填要求显示在旁边。string
declared_valuestring | null是公共契约中的“declared value”值;其类型和必填要求显示在旁边。string
statusstring是Current public resource state.active
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
{
  "is_editable": true,
  "can_cancel": true,
  "can_delete": true,
  "locked_at": "2026-11-30T10:00:00Z",
  "lock_reason": "CARGO_ACCEPTED",
  "id": "00000000-0000-4000-8000-000000000001",
  "cargo_type_id": "00000000-0000-4000-8000-000000000001",
  "external_tracking_code": "string",
  "packaging_name": "string",
  "description": "string",
  "quantity": 1,
  "declared_weight": "string",
  "length_cm": "string",
  "width_cm": "string",
  "height_cm": "string",
  "declared_value": "string",
  "status": "string",
  "lifecycle_state": "string",
  "version": 1
}
POST/api/partner/v1/orders/{order_id}/items/{item_id}/cancel

订单和货物

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
orders:write
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
expected_versioninteger是Cargo item version returned by the latest GET; prevents overwriting concurrent changes.1
expected_totalnumber | string是Expected order total after the change; use the value returned by preview.125.50
reasonstring是Required human-readable reason for cancellation or deletion audit history.Cargo is no longer required
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/items/{item_id}/cancel" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "expected_version": 1,
  "expected_total": "1.00",
  "reason": "string"
}'

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
item_idpath是公共契约中的“item id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
is_editableboolean是Whether the declared cargo item can currently be edited.true
can_cancelboolean是Whether the declared cargo item can currently be cancelled.true
can_deleteboolean是Whether the declared cargo item can currently be soft-deleted.true
locked_atstring | null是Time at which cargo mutations became locked; null means no lock.2026-11-30T10:00:00Z
lock_reasonstring | null是Reason cargo mutations are locked, for example CARGO_ACCEPTED.CARGO_ACCEPTED
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
external_tracking_codestring | null是公共契约中的“external tracking code”值;其类型和必填要求显示在旁边。string
packaging_namestring | null是公共契约中的“packaging name”值;其类型和必填要求显示在旁边。string
descriptionstring | null是公共契约中的“description”值;其类型和必填要求显示在旁边。string
quantityinteger是Number of units; must be positive.1
declared_weightstring是公共契约中的“declared weight”值;其类型和必填要求显示在旁边。string
length_cmstring | null是公共契约中的“length cm”值;其类型和必填要求显示在旁边。string
width_cmstring | null是公共契约中的“width cm”值;其类型和必填要求显示在旁边。string
height_cmstring | null是公共契约中的“height cm”值;其类型和必填要求显示在旁边。string
declared_valuestring | null是公共契约中的“declared value”值;其类型和必填要求显示在旁边。string
statusstring是Current public resource state.active
lifecycle_statestring是Lifecycle state: active, cancelled, or deleted.active
versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
{
  "is_editable": true,
  "can_cancel": true,
  "can_delete": true,
  "locked_at": "2026-11-30T10:00:00Z",
  "lock_reason": "CARGO_ACCEPTED",
  "id": "00000000-0000-4000-8000-000000000001",
  "cargo_type_id": "00000000-0000-4000-8000-000000000001",
  "external_tracking_code": "string",
  "packaging_name": "string",
  "description": "string",
  "quantity": 1,
  "declared_weight": "string",
  "length_cm": "string",
  "width_cm": "string",
  "height_cm": "string",
  "declared_value": "string",
  "status": "string",
  "lifecycle_state": "string",
  "version": 1
}
GET/api/partner/v1/orders/{order_id}/labels

标签

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
labels:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/labels" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
orderobject是公共契约中的“order”值;其类型和必填要求显示在旁边。{"id": "00000000-0000-4000-8000-000000000001", "number": 1, "tracking_code": "string"}
order.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
order.numberinteger是公共契约中的“number”值;其类型和必填要求显示在旁边。1
order.tracking_codestring是Public Havvo tracking code.HV260001234
cargo_labelsarray<object>是公共契约中的“cargo labels”值;其类型和必填要求显示在旁边。[{"entity_type": "string", "entity_id": "00000000-0000-4000-8000-000000000001", "barcode": "string", "caption": "string", "weight": "string"}]
cargo_labels.entity_typestring是公共契约中的“entity type”值;其类型和必填要求显示在旁边。string
cargo_labels.entity_idstring是公共契约中的“entity id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
cargo_labels.barcodestring是Cargo-piece or package barcode.HV-CARGO-0001
cargo_labels.captionstring是公共契约中的“caption”值;其类型和必填要求显示在旁边。string
cargo_labels.weightstring是Weight in the contract unit as a decimal string.2.50
package_labelsarray<object>是公共契约中的“package labels”值;其类型和必填要求显示在旁边。[{"entity_type": "string", "entity_id": "00000000-0000-4000-8000-000000000001", "barcode": "string", "caption": "string", "weight": "string"}]
package_labels.entity_typestring是公共契约中的“entity type”值;其类型和必填要求显示在旁边。string
package_labels.entity_idstring是公共契约中的“entity id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
package_labels.barcodestring是Cargo-piece or package barcode.HV-CARGO-0001
package_labels.captionstring是公共契约中的“caption”值;其类型和必填要求显示在旁边。string
package_labels.weightstring是Weight in the contract unit as a decimal string.2.50
{
  "order": {
    "id": "00000000-0000-4000-8000-000000000001",
    "number": 1,
    "tracking_code": "string"
  },
  "cargo_labels": [
    {
      "entity_type": null,
      "entity_id": null,
      "barcode": null,
      "caption": null,
      "weight": null
    }
  ],
  "package_labels": [
    {
      "entity_type": null,
      "entity_id": null,
      "barcode": null,
      "caption": null,
      "weight": null
    }
  ]
}
GET/api/partner/v1/orders/{order_id}/labels.pdf

标签

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
labels:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/labels.pdf" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

GET/api/partner/v1/orders/{order_id}/labels.zpl

标签

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
labels:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/orders/{order_id}/labels.zpl" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
order_idpath是UUID of the current partner's order.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

GET/api/partner/v1/pricing

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
pricing:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/pricing" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
direction_idquery否公共契约中的“direction id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
scopestring是公共契约中的“scope”值;其类型和必填要求显示在旁边。string
partner_idstring是Immutable public partner identifier.partner-demo
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "code": "string", "name": "string", "name_i18n": {}, "direction_id": "00000000-0000-4000-8000-000000000001", "direction_name": "string", "delivery_mode_id": "00000000-0000-4000-8000-000000000001", "delivery_mode_code": "string", "delivery_mode_name_i18n": {}, "currency_code": "string", "version": 1, "tariff_version_id": "00000000-0000-4000-8000-000000000001", "route_version_id": "00000000-0000-4000-8000-000000000001", "effective_from": "2026-11-30T10:00:00Z", "average_delivery_days": 1, "prices": []}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
items.name_i18nobject是公共契约中的“name i18n”值;其类型和必填要求显示在旁边。{}
items.direction_idstring是公共契约中的“direction id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.direction_namestring是公共契约中的“direction name”值;其类型和必填要求显示在旁边。string
items.delivery_mode_idstring是公共契约中的“delivery mode id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.delivery_mode_codestring是公共契约中的“delivery mode code”值;其类型和必填要求显示在旁边。string
items.delivery_mode_name_i18nobject是公共契约中的“delivery mode name i18n”值;其类型和必填要求显示在旁边。{}
items.currency_codestring是公共契约中的“currency code”值;其类型和必填要求显示在旁边。string
items.versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
items.tariff_version_idstring是公共契约中的“tariff version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.route_version_idstring是公共契约中的“route version id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.effective_fromstring是公共契约中的“effective from”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
items.average_delivery_daysinteger | null是公共契约中的“average delivery days”值;其类型和必填要求显示在旁边。1
items.pricesarray<object>是公共契约中的“prices”值;其类型和必填要求显示在旁边。[{"cargo_type_id": "00000000-0000-4000-8000-000000000001", "cargo_type_code": "string", "cargo_type_name_i18n": {}, "calculation_unit": "string", "base_price": "string", "minimum_weight": "string", "price_source": "string", "override_weight_from": "string", "override_weight_to": "string", "tiers": []}]
items.prices.cargo_type_idstring是公共契约中的“cargo type id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.prices.cargo_type_codestring是公共契约中的“cargo type code”值;其类型和必填要求显示在旁边。string
items.prices.cargo_type_name_i18nobject是公共契约中的“cargo type name i18n”值;其类型和必填要求显示在旁边。{}
items.prices.calculation_unitstring是公共契约中的“calculation unit”值;其类型和必填要求显示在旁边。string
items.prices.base_pricestring是公共契约中的“base price”值;其类型和必填要求显示在旁边。string
items.prices.minimum_weightstring | null是公共契约中的“minimum weight”值;其类型和必填要求显示在旁边。string
items.prices.price_sourcestring是公共契约中的“price source”值;其类型和必填要求显示在旁边。string
items.prices.override_weight_fromstring | null是公共契约中的“override weight from”值;其类型和必填要求显示在旁边。string
items.prices.override_weight_tostring | null是公共契约中的“override weight to”值;其类型和必填要求显示在旁边。string
items.prices.tiersarray<object>是公共契约中的“tiers”值;其类型和必填要求显示在旁边。[{"weight_from": "string", "weight_to": "string", "price": "string", "aggregation_scope": "string"}]
{
  "scope": "string",
  "partner_id": "00000000-0000-4000-8000-000000000001",
  "items": [
    {
      "id": null,
      "code": null,
      "name": null,
      "name_i18n": null,
      "direction_id": null,
      "direction_name": null,
      "delivery_mode_id": null,
      "delivery_mode_code": null,
      "delivery_mode_name_i18n": null,
      "currency_code": null,
      "version": null,
      "tariff_version_id": null,
      "route_version_id": null,
      "effective_from": null,
      "average_delivery_days": null,
      "prices": null
    }
  ]
}
GET/api/partner/v1/reference/branches

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/branches" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "code": "string", "name": "string", "country_id": "00000000-0000-4000-8000-000000000001", "region_id": "00000000-0000-4000-8000-000000000001", "city_id": "00000000-0000-4000-8000-000000000001", "timezone": "string", "address": {}, "can_origin": true, "can_destination": true, "can_transit": true, "status": "string"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
items.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
items.region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.city_idstring | null是City UUID from the reference catalog.00000000-0000-4000-8000-000000000011
items.timezonestring是公共契约中的“timezone”值;其类型和必填要求显示在旁边。string
items.addressobject | null是公共契约中的“address”值;其类型和必填要求显示在旁边。{}
items.can_originboolean是公共契约中的“can origin”值;其类型和必填要求显示在旁边。True
items.can_destinationboolean是公共契约中的“can destination”值;其类型和必填要求显示在旁边。True
items.can_transitboolean是公共契约中的“can transit”值;其类型和必填要求显示在旁边。True
items.statusstring是Current public resource state.active
{
  "items": [
    {
      "id": null,
      "code": null,
      "name": null,
      "country_id": null,
      "region_id": null,
      "city_id": null,
      "timezone": null,
      "address": null,
      "can_origin": null,
      "can_destination": null,
      "can_transit": null,
      "status": null
    }
  ]
}
GET/api/partner/v1/reference/cancellation-reasons

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/cancellation-reasons" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
modestring是公共契约中的“mode”值;其类型和必填要求显示在旁边。string
min_lengthinteger是公共契约中的“min length”值;其类型和必填要求显示在旁边。1
max_lengthinteger是公共契约中的“max length”值;其类型和必填要求显示在旁边。1
{
  "mode": "string",
  "min_length": 1,
  "max_length": 1
}
GET/api/partner/v1/reference/cargo-types

订单和货物

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
cargo:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/cargo-types" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
direction_idquery否公共契约中的“direction id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"code": "string", "name": {}, "id": "00000000-0000-4000-8000-000000000001", "status": "string"}]
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.nameobject是公共契约中的“name”值;其类型和必填要求显示在旁边。{}
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.statusstring是Current public resource state.active
{
  "items": [
    {
      "code": null,
      "name": null,
      "id": null,
      "status": null
    }
  ]
}
GET/api/partner/v1/reference/cities

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/cities" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
country_idquery是UUID of an active country from geography.
region_idquery否公共契约中的“region id”值;其类型和必填要求显示在旁边。
after_idquery否公共契约中的“after id”值;其类型和必填要求显示在旁边。
qquery否公共契约中的“q”值;其类型和必填要求显示在旁边。
limitquery否Maximum number of items in the page.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "country_id": "00000000-0000-4000-8000-000000000001", "name": "string", "name_i18n": {}, "region_id": "00000000-0000-4000-8000-000000000001"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
items.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
items.name_i18nobject | null是公共契约中的“name i18n”值;其类型和必填要求显示在旁边。{}
items.region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "id": null,
      "country_id": null,
      "name": null,
      "name_i18n": null,
      "region_id": null
    }
  ],
  "next_cursor": "00000000-0000-4000-8000-000000000001"
}
GET/api/partner/v1/reference/client-types

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/client-types" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"code": "string", "name": {}}]
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.nameobject是公共契约中的“name”值;其类型和必填要求显示在旁边。{}
{
  "items": [
    {
      "code": null,
      "name": null
    }
  ]
}
GET/api/partner/v1/reference/directions

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/directions" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "code": "string", "name": "string", "origin_branch_id": "00000000-0000-4000-8000-000000000001", "destination_branch_id": "00000000-0000-4000-8000-000000000001", "route_template_id": "00000000-0000-4000-8000-000000000001", "delivery_mode": null}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
items.origin_branch_idstring是公共契约中的“origin branch id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.destination_branch_idstring | null是公共契约中的“destination branch id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.route_template_idstring | null是公共契约中的“route template id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.delivery_modeobject | null是公共契约中的“delivery mode”值;其类型和必填要求显示在旁边。{"code": "string", "name": {}, "id": "00000000-0000-4000-8000-000000000001"}
{
  "items": [
    {
      "id": null,
      "code": null,
      "name": null,
      "origin_branch_id": null,
      "destination_branch_id": null,
      "route_template_id": null,
      "delivery_mode": null
    }
  ]
}
GET/api/partner/v1/reference/geography

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/geography" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
country_idquery否UUID of an active country from geography.
region_idquery否公共契约中的“region id”值;其类型和必填要求显示在旁边。
include_citiesquery否公共契约中的“include cities”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
countriesarray<object>是公共契约中的“countries”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "iso2": "string", "iso3": "string", "name": {}}]
countries.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
countries.iso2string是公共契约中的“iso2”值;其类型和必填要求显示在旁边。string
countries.iso3string是公共契约中的“iso3”值;其类型和必填要求显示在旁边。string
countries.nameobject是公共契约中的“name”值;其类型和必填要求显示在旁边。{}
regionsarray<object>是公共契约中的“regions”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "country_id": "00000000-0000-4000-8000-000000000001", "name": "string", "name_i18n": {}}]
regions.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
regions.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
regions.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
regions.name_i18nobject | null是公共契约中的“name i18n”值;其类型和必填要求显示在旁边。{}
citiesarray<object>是公共契约中的“cities”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "country_id": "00000000-0000-4000-8000-000000000001", "name": "string", "name_i18n": {}, "region_id": "00000000-0000-4000-8000-000000000001"}]
cities.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
cities.country_idstring是UUID of an active country from geography.00000000-0000-4000-8000-000000000010
cities.namestring是公共契约中的“name”值;其类型和必填要求显示在旁边。string
cities.name_i18nobject | null是公共契约中的“name i18n”值;其类型和必填要求显示在旁边。{}
cities.region_idstring | null是公共契约中的“region id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
{
  "countries": [
    {
      "id": null,
      "iso2": null,
      "iso3": null,
      "name": null
    }
  ],
  "regions": [
    {
      "id": null,
      "country_id": null,
      "name": null,
      "name_i18n": null
    }
  ],
  "cities": [
    {
      "id": null,
      "country_id": null,
      "name": null,
      "name_i18n": null,
      "region_id": null
    }
  ]
}
GET/api/partner/v1/reference/prohibited-goods

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/prohibited-goods" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
direction_idquery否公共契约中的“direction id”值;其类型和必填要求显示在旁边。
limitquery否Maximum number of items in the page.
offsetquery否公共契约中的“offset”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
global_rulesarray<object>是公共契约中的“global rules”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "code": "string", "version": 1, "action_mode": "block", "scope_mode": "all_directions", "direction_ids": ["00000000-0000-4000-8000-000000000001"], "priority": 1, "starts_at": "2026-11-30T10:00:00Z", "ends_at": "2026-11-30T10:00:00Z", "title_i18n": {}, "client_message_i18n": {}}]
global_rules.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
global_rules.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
global_rules.versioninteger是公共契约中的“version”值;其类型和必填要求显示在旁边。1
global_rules.action_modestring是公共契约中的“action mode”值;其类型和必填要求显示在旁边。 Enum: block, confirm, informblock
global_rules.scope_modestring是公共契约中的“scope mode”值;其类型和必填要求显示在旁边。 Enum: all_directions, selected_directionsall_directions
global_rules.direction_idsarray<string>是公共契约中的“direction ids”值;其类型和必填要求显示在旁边。["00000000-0000-4000-8000-000000000001"]
global_rules.priorityinteger是公共契约中的“priority”值;其类型和必填要求显示在旁边。1
global_rules.starts_atstring | null是公共契约中的“starts at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
global_rules.ends_atstring | null是公共契约中的“ends at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
global_rules.title_i18nobject是公共契约中的“title i18n”值;其类型和必填要求显示在旁边。{}
global_rules.client_message_i18nobject是公共契约中的“client message i18n”值;其类型和必填要求显示在旁边。{}
direction_rulesobject是公共契约中的“direction rules”值;其类型和必填要求显示在旁边。{}
limitinteger是Maximum number of items in the page.50
offsetinteger是公共契约中的“offset”值;其类型和必填要求显示在旁边。1
next_offsetinteger | null是公共契约中的“next offset”值;其类型和必填要求显示在旁边。1
{
  "global_rules": [
    {
      "id": null,
      "code": null,
      "version": null,
      "action_mode": null,
      "scope_mode": null,
      "direction_ids": null,
      "priority": null,
      "starts_at": null,
      "ends_at": null,
      "title_i18n": null,
      "client_message_i18n": null
    }
  ],
  "direction_rules": {},
  "limit": 1,
  "offset": 1,
  "next_offset": 1
}
GET/api/partner/v1/reference/services

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/services" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
direction_idquery否公共契约中的“direction id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"code": "string", "name": {}, "id": "00000000-0000-4000-8000-000000000001", "status": "string", "description": {}, "calculation_unit": "string", "application_scope": "string", "requires_process": true}]
items.codestring是公共契约中的“code”值;其类型和必填要求显示在旁边。string
items.nameobject是公共契约中的“name”值;其类型和必填要求显示在旁边。{}
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.statusstring是Current public resource state.active
items.descriptionobject | null是公共契约中的“description”值;其类型和必填要求显示在旁边。{}
items.calculation_unitstring是公共契约中的“calculation unit”值;其类型和必填要求显示在旁边。string
items.application_scopestring是公共契约中的“application scope”值;其类型和必填要求显示在旁边。string
items.requires_processboolean是公共契约中的“requires process”值;其类型和必填要求显示在旁边。True
{
  "items": [
    {
      "code": null,
      "name": null,
      "id": null,
      "status": null,
      "description": null,
      "calculation_unit": null,
      "application_scope": null,
      "requires_process": null
    }
  ]
}
GET/api/partner/v1/reference/statuses

参考数据和价格

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
reference:read
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/reference/statuses" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
operationalarray<string>是公共契约中的“operational”值;其类型和必填要求显示在旁边。["string"]
financialarray<string>是公共契约中的“financial”值;其类型和必填要求显示在旁边。["string"]
lifecyclearray<string>是公共契约中的“lifecycle”值;其类型和必填要求显示在旁边。["string"]
cargoarray<string>是公共契约中的“cargo”值;其类型和必填要求显示在旁边。["string"]
unknown_values_allowedboolean是公共契约中的“unknown values allowed”值;其类型和必填要求显示在旁边。True
public_transitionsarray<object>是公共契约中的“public transitions”值;其类型和必填要求显示在旁边。[{"action": "string", "source": "string", "target": "string", "requirements": ["string"]}]
public_transitions.actionstring是公共契约中的“action”值;其类型和必填要求显示在旁边。string
public_transitions.sourcestring是公共契约中的“source”值;其类型和必填要求显示在旁边。string
public_transitions.targetstring是公共契约中的“target”值;其类型和必填要求显示在旁边。string
public_transitions.requirementsarray<string>是公共契约中的“requirements”值;其类型和必填要求显示在旁边。["string"]
{
  "operational": [
    "string"
  ],
  "financial": [
    "string"
  ],
  "lifecycle": [
    "string"
  ],
  "cargo": [
    "string"
  ],
  "unknown_values_allowed": true,
  "public_transitions": [
    {
      "action": null,
      "source": null,
      "target": null,
      "requirements": null
    }
  ]
}
GET/api/partner/v1/webhooks

Webhook

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/webhooks" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
statusstring是Current public resource state.active
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
signing_secretstring | null否HMAC secret returned on create/rotation; store in a secret manager.whsec_example
[
  {
    "id": "00000000-0000-4000-8000-000000000001",
    "url": "string",
    "events": [
      "string"
    ],
    "status": "string",
    "created_at": "2026-11-30T10:00:00Z"
  }
]
POST/api/partner/v1/webhooks

Webhook

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
Idempotency-Key required; reuse it only with the same body.

数据结构: request

字段类型必填说明示例
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/webhooks" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "url": "string",
  "events": [
    "cargo.moved"
  ]
}'

参数

名称位置必填说明
Idempotency-Keyheader否Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 201, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
statusstring是Current public resource state.active
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
signing_secretstring | null否HMAC secret returned on create/rotation; store in a secret manager.whsec_example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "url": "string",
  "events": [
    "string"
  ],
  "status": "string",
  "created_at": "2026-11-30T10:00:00Z"
}
GET/api/partner/v1/webhooks/{webhook_id}

Webhook

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
statusstring是Current public resource state.active
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
signing_secretstring | null否HMAC secret returned on create/rotation; store in a secret manager.whsec_example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "url": "string",
  "events": [
    "string"
  ],
  "status": "string",
  "created_at": "2026-11-30T10:00:00Z"
}
PATCH/api/partner/v1/webhooks/{webhook_id}

Webhook

部分更新 当前合作伙伴的所选资源

部分更新 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要

数据结构: request

字段类型必填说明示例
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
curl -X PATCH "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
  "events": [
    "string"
  ]
}'

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
statusstring是Current public resource state.active
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
signing_secretstring | null否HMAC secret returned on create/rotation; store in a secret manager.whsec_example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "url": "string",
  "events": [
    "string"
  ],
  "status": "string",
  "created_at": "2026-11-30T10:00:00Z"
}
DELETE/api/partner/v1/webhooks/{webhook_id}

Webhook

撤销或归档 当前合作伙伴的所选资源

撤销或归档 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要
curl -X DELETE "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 204, 422

错误处理

422 — validation

GET/api/partner/v1/webhooks/{webhook_id}/deliveries

Webhook

返回 当前合作伙伴的所选资源

返回 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要
curl -X GET "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}/deliveries" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
limitquery否Maximum number of items in the page.
before_idquery否公共契约中的“before id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
itemsarray<object>是公共契约中的“items”值;其类型和必填要求显示在旁边。[{"id": "00000000-0000-4000-8000-000000000001", "event_id": "00000000-0000-4000-8000-000000000001", "event_type": "string", "status": "string", "attempt_count": 1, "response_status": 1, "next_attempt_at": "2026-11-30T10:00:00Z", "delivered_at": "2026-11-30T10:00:00Z", "created_at": "2026-11-30T10:00:00Z"}]
items.idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
items.event_idstring是公共契约中的“event id”值;其类型和必填要求显示在旁边。00000000-0000-4000-8000-000000000001
items.event_typestring是公共契约中的“event type”值;其类型和必填要求显示在旁边。string
items.statusstring是Current public resource state.active
items.attempt_countinteger是公共契约中的“attempt count”值;其类型和必填要求显示在旁边。1
items.response_statusinteger | null是公共契约中的“response status”值;其类型和必填要求显示在旁边。1
items.next_attempt_atstring是公共契约中的“next attempt at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
items.delivered_atstring | null是公共契约中的“delivered at”值;其类型和必填要求显示在旁边。2026-11-30T10:00:00Z
items.created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
next_cursorstring | null是Next-page cursor; null means the end of the collection.cursor-value
{
  "items": [
    {
      "id": null,
      "event_id": null,
      "event_type": null,
      "status": null,
      "attempt_count": null,
      "response_status": null,
      "next_attempt_at": null,
      "delivered_at": null,
      "created_at": null
    }
  ],
  "next_cursor": "00000000-0000-4000-8000-000000000001"
}
POST/api/partner/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry

Webhook

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
不需要
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/retry" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
delivery_idpath是公共契约中的“delivery id”值;其类型和必填要求显示在旁边。
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 202, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
statusstring是Current public resource state.active
{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "string"
}
POST/api/partner/v1/webhooks/{webhook_id}/rotate-secret

Webhook

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
Idempotency-Key required; reuse it only with the same body.
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}/rotate-secret" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 200, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
urlstring是Public HTTPS webhook URL without redirects or private IPs.https://partner.example.com/havvo/events
eventsarray<string>是Webhook events listed by GET /capabilities.["order.status_changed"]
statusstring是Current public resource state.active
created_atstring是Server record creation time in ISO 8601 UTC.2026-11-30T10:00:00Z
signing_secretstring | null否HMAC secret returned on create/rotation; store in a secret manager.whsec_example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "url": "string",
  "events": [
    "string"
  ],
  "status": "string",
  "created_at": "2026-11-30T10:00:00Z"
}
POST/api/partner/v1/webhooks/{webhook_id}/test

Webhook

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
Idempotency-Key required; reuse it only with the same body.
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}/test" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 202, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
statusstring是Current public resource state.active
{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "string"
}
POST/api/partner/v1/webhooks/{webhook_id}/verify

Webhook

创建或启动 当前合作伙伴的所选资源

创建或启动 当前合作伙伴的所选资源.

访问
X-Havvo-Api-Key
所需 scope
webhooks:manage
幂等性
Idempotency-Key required; reuse it only with the same body.
curl -X POST "$HAVVO_BASE_URL/api/partner/v1/webhooks/{webhook_id}/verify" \
  -H "X-Havvo-Api-Key: $HAVVO_API_KEY" \
  -H "Accept: application/json"

参数

名称位置必填说明
webhook_idpath是公共契约中的“webhook id”值;其类型和必填要求显示在旁边。
Idempotency-Keyheader是Unique command key. Reuse it only when retrying the unchanged request after a network failure.
X-Havvo-Api-Keyheader否Partner API secret. Send it with every request and never expose it in client-side code or logs.

响应: 202, 422

错误处理

422 — validation

数据结构: response
字段类型必填说明示例
idstring是Unique resource UUID.00000000-0000-4000-8000-000000000001
statusstring是Current public resource state.active
{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "string"
}