This API is used for the seller to upload the proof of delivery image for a package, and to generate the URL of the corresponding file. The generated URL is used in the Update Package Delivery Status API to indicate that the parcel has been delivered.
Usage requirements:
- The image format must be
JPEG,PNG, orJPG. - The image size can not exceed 5MB.
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
The image file to upload as binary data in this multipart/form-data field.
Requirements:
- Format:
JPG,JPEG, orPNG. - Resolution: between 100 x 100 and 20,000 x 20,000 pixels.
- File size: no more than 5 MB.
Responses
Section titled “Responses”Success
object
Status code; 0 means success.
Success or failure message.
Request log ID.
object
The URL returned from uploading the image that can be directly opened in a browser.
The image height returned from uploading the image. This height refers to the processed image height, not the original image height. Units: pixels.
The image width returned from uploading the image. This width refers to the processed image width, not the original image width. Units: pixels.
Example
{ "code": 0, "data": { "url": "https://p-pbe38.byted.org/tos-ppdi18n-i-0euhj0x6u9/0a119a90d90b41e3838608bc384", "height": 256, "width": 256 }, "message": "Success", "request_id": "202203070749000101890810281E8C70B7"}