Use this API to ship one or more packages in a single request. The API supports TikTok Shipping, Seller Shipping, and In-store Pickup.
TikTok Shipping: Set each package’shandover_methodtoPICKUPfor carrier pickup from the seller’s pickup address, or toDROP_OFFwhen the seller will drop it off at a designated location.Seller Shipping: Provideself_shipment.shipping_provider_idandself_shipment.tracking_numberfor each package. Obtain package IDs from Get Order Detail.In-store Pickup: Confirm shipment and notify the buyer that the order is ready for pickup.
A response with a top-level code of 0 can still contain package-specific failures. Check data.errors before treating every package as shipped.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Identifies the shop. Obtain it from the Get Authorized Shops API.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Input list of packages you would like to batch ship.
object
Package ID.
Possible values:
PICKUP: A shipping provider will pickup the package(s) from the seller’s pickup address.DROP_OFF: The seller will need to drop off the package(s) at a designated location.
Package pickup time slot.
object
The start of the package pickup time slot, as a Unix timestamp in seconds.
The end of the package pickup time slot, as a Unix timestamp in seconds.
Only needed for seller shipping packages. Check the delivery_option field in Get Package Detail to see how to differentiate between TikTok shipping and seller shipping. Use the shipping_provider_id retrieved from the Get Shipping Providers API and upload the corresponding tracking number.
object
For packages with the SEND_BY_SELLER delivery option type (seller shipping), you must provide the package’s tracking number.
For packages with the SEND_BY_SELLER delivery option type (seller shipping), you must provide the shipping provider information. Please use the Get Shipping Providers API to obtain the shipping_provider_id.
Example
{ "packages": [ { "id": "12321312312431", "handover_method": "PICKUP", "pickup_slot": { "start_time": 1623812664, "end_time": 1623812664 }, "self_shipment": { "tracking_number": "JX12345", "shipping_provider_id": "6617675021119438849" } } ]}Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
Package-specific errors for packages that could not be shipped. Check this list even when the top-level response code is 0.
object
The failure reason code.
The failure reason message.
Error detail.
object
Package ID.
Example
{ "code": 0, "data": { "errors": [ { "code": 10007014, "message": "package in freeze status", "detail": { "package_id": "123123123123131" } } ] }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}