来自 Shopee 官方资料快照 ·
- 当前资料结构化阅读页
- 固定快照已留存,可追溯
- 官方原文可核对
资料正文
§1 What is the Entrega Expressa Channel?
This channel allows the seller to use their own logistics for quoting and shipping instant orders.
- The shipping quote is made from the quote URL provided by the seller.
- Shipping price and delivery time are provided by the seller.
- Order tracking is simplified, with the seller being responsible for sending “dispatched”, “delivered” or “delivery failed” events via OpenAPI.
Note: This channel will be made available to specific sellers whose products are not supported by Shopee's own logistics due to dimensions and weight, in accordance with the rules established by Shopee's sales team.
§2 Shipping Quote URL
This tool allows sellers to send Shopee estimated shipping costs and delivery times, which will be displayed to buyers at the time of purchase. To use this feature, sellers must meet the pre-established approval requirements.
*The seller has the option to integrate directly with Shopee to connect their quote URL or connect via an Integrator-HUB.
§3 Requirements for approval/integration
Unlike other integration types, the quotation and order status update API integration (from Entrega Expressa channel) requires review and approval from the Shopee team before it can go live. To be approved by the Shopee team, you must:
- Freight Quote API Contract Compliance:Configure and make the URL available via the HTTP POST method.Each request must contain only one item from one seller.The URL has no specific structure, providing flexibility in configuration.
- Default payload for quote request and response (and validation with Shopee URL)
- Response time limit of 200ms.
- Contingency table registered directly through the Seller Center.
- Error monitoring (and development of requested messages)
- Status update API development (“update_tracking_status);Note: The above requirements must be met by the seller's "own system" or their ERP/HUB/Integration. It's worth noting that without them, orders will be canceled, as the flow cannot be performed manually via Seller Central.Note 2: Anyone who develops the quote API must also develop the status update API;Note 3: The Entrega Expressa APP is only used for quotation URLs. To use any API, it is necessary to create a second APP;
- Send confirmation email and approval from the Shopee team via ticket(involving all the criteria above).
To be able to perform the integration and tests above, it is also necessary:
a) Create a new Entrega Expressa APP on the Open Platform and authorize sellers to this APP
b) Have an APP that is capable of calling OpenAPI to update status (and also authorize sellers to this APP)
Once all these steps have been completed, it will be necessary to create at least 2 test orders, which will need to be processed to the delivered and canceled statuses, to release the HUB as an approved channel.
§4 Quotation API Request and Response Flow
Shopee will be calling Quotation API in 2 scenarios, which have different request and response parameters.
- Quotation API Request and Response (Default)
- Quotation API Request and Response (Fallback)
§5 Quotation API Request and Response (Default)
Quotation API Request and Response (Default)
§6 Request parameters (query)
Request parameters (query)
URL Request Parameters:
| Name | Example | HTTP Address |
|---|---|---|
| URL | https://api.frete/ | URL provided by ERP or seller |
| Name | Type | Example | Description |
|---|---|---|---|
| partner_id | int | 1 | The partner ID is assigned after successful registration. Required for all requests. |
| timestamp | timestamp | 1610000000 | Indicates the request timestamp. Required for all requests. Expires in 5 minutes. |
| sign | string | e318d3e932719916a9f9ebb57e2011961bd47abfa54a36e040d050d8931596e2 | Signature generated by the base string "{}{}{}"%(parnter_id, api full path, timestamp) and partner_key via HMAC-SHA256 algorithm. More details:https://open.shopee.com/documents?module=87&type=2&id=58&version=2 |
Body Request Parameters:
| Request Parameters | ||||||
|---|---|---|---|---|---|---|
| Parameter Name | Type | Mandatory | Example | Description | ||
| channel_id | int | TRUE | 90026 | Unique identifier for the logistic channel in Shopee. | ||
| shop_id | int | TRUE | 112345678 | This is the unique identifier for each seller. | ||
| origin_zip_code | string | TRUE | 12345000 | Seller's zip code with 8 digits, only numbers without periods and dashes | ||
| destination_zip_code | string | TRUE | 12345000 | Buyer's zip code with 8 digits, only numbers without periods and dashes | ||
| destination_lat_long | object | TRUE | - | "Latitude x Longitude" of buyer's delivery location. | ||
| latitude | float | TRUE | -46.73540209999999 | Latitude of buyer's delivery location. Value should be within -90 <= x <= 90. The value is provided for reference purposes only and precision may vary. | ||
| longitude | float | TRUE | -23.5745851 | Longitude of buyer's delivery location. Value should be within -180 <= x <= 180. The value is provided for reference purposes only and precision may vary. | ||
| items | array | TRUE | - | Product list | ||
| item_id | int | TRUE | 12345678 | Item identification on Shopee | ||
| sku | string | FALSE | item_sku | SKU registered by the seller on Shopee | ||
| model_id | int | FALSE | 12345678 | Identification of the model registered on Shopee. Note: in PDP quotes, the model_id and category_id are sent as zero, but on the checkout page they are sent normally. | ||
| model_sku | string | FALSE | model_sku | Model SKU registered by the seller on Shopee | ||
| category_id | int | TRUE | 12345678 | Item category registered on Shopee. Note: in PDP quotes, the model_id and category_id are sent as zero, but on the checkout page they are sent normally | ||
| quantity | int | TRUE | 12345678 | Quantity of same items | ||
| price | float | FALSE | 150.4 | Product price | ||
| dimensions | object | TRUE | - | Product dimensions | ||
| length | int | TRUE | 10 | Length in centimeters for 1 quantity | ||
| width | int | TRUE | 10 | Width in centimeters for 1 quantity | ||
| height | int | TRUE | 10 | Height in centimeters for 1 quantity | ||
| weight | int | TRUE | 100 | Weight in grams for 1 quantity |
Response Parameters / Quote Response (error):
| Name | Type | Mandatory | Example | Description |
|---|---|---|---|---|
| error | string | True | - | Identifier of the quote made by the seller |
| message | string | True | - | Buyer's zip code |
| request_id | string | True | - | API call identifier |
Response Parameters / Quote Response (success):
| Response Parameters | |||||||
|---|---|---|---|---|---|---|---|
| Name | Type | Mandatory | Example | Description | |||
| channel_id | int | TRUE | 90026 | Unique identifier for the logistic channel in Shopee. | |||
| quotation_id | int | TRUE | 091234000 | Identifier of the quote made by the seller | |||
| destination_zip_code | string | TRUE | 091234000 | Buyer's zip code | |||
| destination_lat_long | double | FALSE | - | "Latitude x Longitude" of buyers delivery location. | |||
| latitude | float | FALSE | -46.73540209999999 | Latitude of buyer's delivery location. Value should be within -90 <= x <= 90. | |||
| longitude | float | FALSE | -23.5745851 | Longitude of buyer's delivery location. Value should be within -180 <= x <= 180. | |||
| packages | array | TRUE | - | Package List | |||
| dimensions | object | TRUE | - | Product dimensions | |||
| length | int | TRUE | 10 | Length in centimeters | |||
| width | int | TRUE | 10 | Width in centimeters | |||
| height | int | TRUE | 10 | Height in centimeters | |||
| weight | int | TRUE | 100 | Weight in grams | |||
| items | array | TRUE | - | Product list | |||
| item_id | int | TRUE | 12345678 | Item identification on Shopee | |||
| sku | string | FALSE | sku_item | SKU registered by the seller on Shopee | |||
| model_id | int | FALSE | 12345678 | Identification of the model registered on Shopee | |||
| model_sku | string | FALSE | model_sku | Model SKU registered by the seller on Shopee | |||
| category_id | int | FALSE | 12345678 | Item category registered on Shopee. | |||
| quantity | int | TRUE | 2 | Quantity of items | |||
| price | int | TRUE | 150.4 | Product price | |||
| dimensions | object | TRUE | - | Product dimensions | |||
| length | int | TRUE | 10 | Length in centimeters | |||
| width | int | TRUE | 10 | Width in centimeters | |||
| height | int | TRUE | 10 | Height in centimeters | |||
| weight | int | TRUE | 100 | Weight in grams | |||
| quotations | array | TRUE | - | List of shipping quotes | |||
| price | float | TRUE | 150.4 | Shipping cost displayed to the buyer | |||
| handling_time | int | TRUE | 20 | Order preparation time in minutes. It must always be greater than or equal to 1. This time includes the seller's time to issue the invoice and organize shipping. | |||
| shipping_time | int | TRUE | 10 | Order transportation time in minutes. | |||
| promise_time | int | TRUE | 30 | Sum of handling time + shipping time in minutes | |||
| service_code | string | TRUE | M1020 | Code that identifies the carrier in the context of the seller (code will return in the “shipping_carrier” parameter in the get_order_detail API, e.g. “Entrega Expressa - M1020”.) | |||
| fallback_promise_time | int | TRUE | 30 | Average order preparation and shipping time in minutes, served as fallback value in case of quotation API error. |
§7 Default response for errors not mapped in the error table
Default response for errors not mapped in the error table
Use HTTP status code 500
{
"request_id": "65e9e26dd9d2565e9e26dd9d64",
"error": "Internal system error",
"message": "internal system error"
}
Expected error codes
| HTTP status code | Error | Message | ActiveContingency |
|---|---|---|---|
| 200 | success API call, error Empty | success API call, error Empty | False |
| 403 | error_partner_id | there is no partner_id in query | False |
| 403 | error_partner_id | partner_id is invalid | False |
| 403 | error_ sign | there is no sign in query | False |
| 403 | error_ sign | your sign is invalid | False |
| 403 | error_timestamp | there is no timestamp in query | False |
| 403 | error_timestamp | your timestamp is invalid | False |
| 403 | error_ shop_id | there is no shop_id in body | False |
| 403 | error_ shop_id | The shop_id is invalid | False |
| 403 | Invalid origin_zip_code | The origin_zip_code is invalid | False |
| 403 | invalid destination_zip_code | The destination_zip_code is invalid | False |
| 403 | error_destination_zip_code | No shipping channel is available. | False |
| 403 | Invalid item_id | The item_id is invalid | False |
| 403 | Invalid model_id | The model_id is invalid | False |
| 403 | Invalid sku | The sku is not valid | False |
| 403 | invalid category_id | The category_id is invalid | False |
| 403 | invalid quantity | The quantity is invalid | False |
| 403 | invalid price | The price is invalid | False |
| 403 | error_dimensions | The dimensions is invalid | False |
| 403 | error_length | The length is invalid | False |
| 403 | error_width | The width is invalid | False |
| 403 | error_height | The height is invalid | False |
| 403 | error_weight | The weight is invalid | False |
| 500 | Internal system error | internal system error | True |
§8 Quotation API Request and Response (Fallback)
Quotation API Request and Response (Fallback)
Request Parameters (Body)
| Name | Type | Mandatory | Example | Description |
|---|---|---|---|---|
| shop_id | int | TRUE | 112345678 | Unique identifier for each seller |
Response Parameters (Body)
| Name | Type | Mandatory | Example | Description |
|---|---|---|---|---|
| shop_id | int | TRUE | 112345678 | Unique identifier for each seller |
| fallback_promise_time | int | TRUE | 30 | Average order preparation and shipping time in minutes, served as fallback value for display of shipping time to buyer, or when quotation API fails. |
§9 Response validation (with Shopee URL)
Response validation (with Shopee URL)
- To ensure the response is in the expected format, we have a URL that should be used to validate and report any necessary corrections.
- URL: "https://seller-quotation-api.uat.shps-br-services.com/validate_quotation_endpoint"
- Within the "x-quotation-id" parameter, you must use the URL that will be registered with Shopee.
- Here is an example payload showing how to use the response format validation URL:
§10 Response Time Limit (of the quotation)
- Considering that checkout is the most critical moment in the user experience during the purchase, it is essential to ensure the best possible experience for the buyer.
- The response time limit is 200ms. A load test is required to ensure this requirement is met.
- Response times longer than 200ms will not be permitted, making integration impossible. Therefore, optimizing this parameter is crucial to providing the best possible customer experience.
§11 Contingency Table
- This feature is intended to support freight calculation, in case there is a problem with freight quotation via API (timeout or return 500 for requests).
§12 Shipping Value Settings for Contingency
Shipping Value Settings for Contingency
- For the contingency to work, the seller must register the shipping values and enable the Entrega Expressa channel , according to the steps described below.
- In Seller Centre, go to Shipping Settings and click the Channel Settings button:
§13 Filling in the contingency freight value
Filling in the contingency freight value
Next, the screen will load to enter the shipping cost. Shipping costs can be entered by state (single value) or by city. This setting can only be done by mart shops (which will automatically apply for all outlet shops) and normal shops (shops that are not on mart-outlet structure). We strongly encourage setting this up before toggling on Entrega Expressa channel.
Single shipping cost per state
- Select states
- Fill in the shipping cost field
- Click Save
Single shipping cost per city
- Select states
- Disable the Flat rate button for this area
- Uncheck the Select All Cities option and select the cities you want to inform the shipping cost.
- Fill in the Rate field for the respective cities
- Click Save
§14 Serviceable Area Settings
This feature is intended to support seller’s serviceable area settings, to identify if the buyer’s address is within seller’s serviceable settings. This setting should be done by outlet shops / normal shops (not on mart-outlet structure). Please note that this setting is mandatory before toggling on Entrega Expressa channel. Without serviceable area settings set, channel will always display as unsupported to buyer. To upload serviceable settings:
- Seller to upload serviceable area settings via /api/v2/logistics/upload_polygonIf you upload 2 KML files, we will take the latest file upload
- Once uploaded, seller can check the status of serviceable area settings upload via /api/v2/logistics/check_polygon_update_status
§15 Arrange Shipment
Seller will arrange shipment via ship_order API. Please note that order_status will be updated to PROCESSED status after arranging shipment, and will be returned in get_package_detail API. get_order_detail order_status will still return READY_TO_SHIP.
Here are the links to the API documentation:
§16 Order Status and Tracking
Order status and tracking updates will be performed via the Tracking Update API and will be based on the order number created in Shopee (Order ID, also known as OrderSN). The tracking number will also be required.
To update the tracking number and order status, use the v2.logistics.update_tracking_status (OpenAPI) endpoint. The possible statuses are:
- Order Sent (logistics_pickup_done)The URL and tracking number can be sent when updating the order status to Shipped.
- Order Delivered (logistics_delivery_done)The Delivered status will only be received if the order already has the Shipped status.OTP code verification: For Entrega Expressa channel, it is mandatory to have OTP code verification. Shopee will be generating the OTP code after seller arranges shipment. When seller is delivering the parcel to buyer, it is mandatory for seller to retrieve OTP code from buyer, and send it in API request when attempting to update tracking_status to logistics_delivery_done.
- Delivery Failure (logistics_delivery_failed)The Delivery Failure status will only be received if the order already has the Shipped status.Failed reason: For Entrega Expressa channel, it is mandatory for seller to send failed_reason when updating tracking_status to logistics_delivery_failed.
IMPORTANT : after sending the Order Delivered or Delivery Failed statuses, no further status updates will be allowed, as both are finalizing statuses;
*the tracking_number and tracking_url parameters should only be sent when updating the status to logistics_pickup_done .
Here is a link to the API documentation “ /api/v2/logistics/update_tracking_status”.
