采购单创建
Webhookprocurements/create
采购单创建时触发。
需要 product 访问权限。最低支持版本:202007。
请求头
X-Shoplazza-Topicstring
触发本次推送的事件,例如 orders/create
示例:
orders/createX-Shoplazza-Hmac-Sha256string
请求体的 HMAC-SHA256 签名(base64 编码),使用应用的 Client Secret 生成,用于验证请求来自 Shoplazza
X-Shoplazza-Shop-Domainstring
产生该事件的店铺域名
示例:
example.myshoplaza.comX-Shoplazza-Api-Versionstring
序列化 payload 使用的 API 版本
示例:
2025-06X-Shoplazza-Deduplication-IDstring
本次推送的去重 ID,同一事件重发时保持不变,用于幂等去重
请求体
- 数据结构
- 示例
procurement object
created_atstring创建时间
location_idinteger目标仓库 ID
notestring备注
pending_quantityinteger在途数
procurement_idinteger采购单 ID
procurement_items object[]
采购单商品
Array [expiration_datestring有效期
idinteger商品项 ID
lot_numberstring批次号
pending_quantityinteger在途数
purchase_pricestring采购价
received_quantityinteger已收数
rejected_quantityinteger拒绝数
shipped_quantityinteger发货数量
shipped_received_quantityinteger收货数量
transfer_quantityinteger购买数 / 转运数
variant_idstring小商品 UUID
variant_skustringSKU
]procurement_nostring采购单编号
received_quantityinteger已收数
rejected_quantityinteger拒绝数
snstring单号
source_idinteger供应商 ID 或仓库 ID
source_typeinteger来源。1 = 供应商 ID,2 = 仓库 ID
stateinteger状态。1 = pending,2 = partial,3 = completed,4 = cancelled
supplier_namestring供应商名称
transfer_quantityinteger购买数 / 转运数
updated_atstring更新时间
{
"procurement": {
"created_at": "string",
"location_id": 0,
"note": "string",
"pending_quantity": 0,
"procurement_id": 0,
"procurement_items": [
{
"expiration_date": "string",
"id": 0,
"lot_number": "string",
"pending_quantity": 0,
"purchase_price": "string",
"received_quantity": 0,
"rejected_quantity": 0,
"shipped_quantity": 0,
"shipped_received_quantity": 0,
"transfer_quantity": 0,
"variant_id": "string",
"variant_sku": "string"
}
],
"procurement_no": "string",
"received_quantity": 0,
"rejected_quantity": 0,
"sn": "string",
"source_id": 0,
"source_type": 0,
"state": 0,
"supplier_name": "string",
"transfer_quantity": 0,
"updated_at": "string"
}
}