Fruugo Ship Orders
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
| Version | Date | Created / Updated | Notes |
|---|---|---|---|
| v1.0 | 15/01/2024 | Hristiyan | First publish |
All validations, triggers and standardizations are as per Order management general requirements
API Docs : https://developer.fruugo.com/#tag/orders-v3/operation/shipOrders API Call : POST https://order-api.fruugo.com/v3/orders/ship
Example request :
{
"orders": [
{
"type": "ship",
"orderId": "string",
"itemQuantities": [
{
"productId": "string",
"skuId": "string",
"quantity": 1
}
],
"trackingUrl": "string",
"trackingCode": "string"
}
]
}
Request Mapping :
| Fruugo Field | Required | Hemi Field | Notes | ||
|---|---|---|---|---|---|
orders |
|||||
type |
Yes | N/A | Hardcoded as "ship" |
||
orderId |
Yes | Orders > Marketplace Order ID |
|||
itemQuantities |
|||||
productId |
No | N/A | |||
skuId |
No | See notes | Based on the Order Shipment Row > Order Item ID we should identify which is the SKU and send it when sending the shipping info. |
||
quantity |
No | Order Shipment Row > Quantity |
|||
trackingUrl |
No | Order Shipment > Tracking URL |
|||
trackingCode |
No | Order Shipment > Tracking Number |
Example responses :
202 Request has been accepted for processing, and update will be performed asynchronously.
This is the successful request. We should then expect a response from Fruugo via the web-hook endpoint that we have provided.
400 Bad Request
Example response :
[
{
"type": "field",
"field": "productId",
"message": "must not be null"
},
{
"type": "field",
"field": "skuIds",
"message": "size must be between 1 and 200"
}
]
This bad request should not happen but incase it happens we should store all errors in Order Errors with type Shipping.
429 Request has been rejected due to exceeding rate limit. Retry after delay specified in "Retry-After" response header.
Incase we receive this we should just retry the request after the specified “Retry-After” in the header.
Callback payload sample :
{
"value": {
"type": "ShipResponseList",
"merchantId": 444,
"correlationId": "c3145570-0731-45db-9c9a-33f97d588400",
"payload": "{'transactionType':'ship','responses':[{'success':true,'errorMessage':null,'orderId':'9164260001000444','shipmentId':'3463462','itemStatuses':[{ 'productId': 'STOCK005' 'skuId': 'STOCK-IS-1000-WITHV20' 'quantity': 1 'status': 'SHIPPED'}] }]}"
}
}
We want to be looking for the success status in the response :
- If we have
success: true we mark the order as shipped and we store theshipmentIdinOrder Shipment>External Id - If we have
success: false, we want to store theerrorMessageinOrder Errorswith typeShippingfor the relevantorderId