遵循本指南,需要使用api/products
作用域。
-
设置“产品”(如果使用现有的Deliverr产品来履约订单)
-
若要将externalProductId连接到现有的Deliverr产品,请向Link externalProductId端点提出请求,将可定义的externalProductId连接到现有的Deliverr产品。
curl --location --request PATCH '<https://api.deliverr.com/products/v1/product/{productId}/link/{externalProductId}>' \\ --header 'Authorization: Bearer {valid_access_token}'
在此请求中,
productId
应该是现有产品的DSKU值,而externalProductId
则由您定义。
-
-
设置“产品”(如果正在创建新的产品用于订单履约)
-
创建产品,这些产品稍后可用于入库运输计划和创建订单。您可以通过Create Product端点来创建产品。
curl --location --request POST '<https://api.deliverr.com/products/v1/product>' \\ --header 'Authorization: Bearer {valid_access_token}' \\ --header 'Content-Type: application/json' \\ --data-raw '{ "externalProductId": "{seller_product_id}", "sku": "{seller_sku}", "title": "{seller_title}", "category": "OTHER" }'
此响应有一个
productId
字段,该字段与卖家门户的DSKU值相对应。您可以在卖家门户查看创建的产品,网址为:*https://sellerportal.deliverr.com/inventory/{productId}*
-
-
确认产品设置正确
-
创建和/或链接产品后,可以通过运行Get product by externalProductId端点来验证是否已正确连接,并查看是否已获得预期的产品。
curl --location --request GET '<https://api.deliverr.com/products/v1/product/externalId/{externalProductId}>' \\ --header 'Authorization: Bearer {valid_access_token}'
请使用之前链接的externalProductId来进行验证。
-
-
确认产品库存
-
创建产品并成功入库后,可以使用Get Product Inventory端点来确认拥有这些端点的库存。
curl --location --request GET '<https://api.deliverr.com/products/v1/product/{productId}/inventory>' \\ --header 'Authorization: Bearer {valid_access_token}'
您可以通过确保响应中的
availableUnits
字段大于0来确认库存。
-