Skip to content

Order Update callbacks

Upon registering for callbacks (ORDER_UPDATE mentioned in Receiving Callbacks), you will receive callbacks for different stages of the order. The data will be a snapshot of the complete current order view.

Success Payload:

{
  "type": "ORDER_VIEW",
  "requestContext": {
    "requestId": "OMS2402220921362644329327",
    "transactionId": "OD2401121901140533863584"
  },
  "response": {
    "id": "OD2401121901140533863584",
    "items": [
      {
        "itemId": "OI2401121901140543863671",
        "name": "cold drink",
        "platformItemId": "L1213:FC12",
        "serviceProviderItemId": "sp123242",
        "fulfillmentId": "OF2405200539030657485731",
        "quantity": {
          "count": 3
        },
        "price": {
          "value": 15000
        },
        "sellingPrice": {
          "value": 12500
        },
        "images": [
          {
            "image": "https://cdn.phonepe.com/23982938"
          }
        ],
        "prescriptionRequired": true,
        "displayMeasurement": "2L"
      }
    ],
    "orderState": "COMPLETED",
    "serviceProvider": {
      "id": "P1",
      "platformId": "L1289313"
    },
    "billing": {
      "name": "Loren Lpsum",
      "address": {
        "building": "410 Lorem Lpsum",
        "locality": "----",
        "city": "Vadodara",
        "state": "Gujarat",
        "country": "IND",
        "pincode": "390011",
        "formattedAddress": "Room No 410, Lorem Lpsum Training Institute",
        "lat": 22.28182220459,
        "lon": 73.202598571777
      },
      "email": "[email protected]",
      "phone": "8686868686",
      "createdAt": 1713773187000,
      "updatedAt": 1713773187000
    },
    "fulfillments": [
      {
        "fulfillmentId": "OF2405200539030657485731",
        "type": "STORE",
        "ownerType": "RETAIL_SERVICE_PROVIDER",
        "end": {
          "address": {
            "building": "410 Lorem Lpsum",
            "locality": "----",
            "city": "Vadodara",
            "state": "Gujarat",
            "country": "IND",
            "pincode": "390011",
            "formattedAddress": "Room No 410, Lorem Lpsum Training Institute",
            "lat": 22.28182220459,
            "lon": 73.202598571777
          },
          "contact": {
            "phone": "8686868686"
          },
          "person": {
            "name": "Loren Lpsum"
          }
        },
        "fulfillmentState": "PACKED",
        "fulfilmentStatusHistory": {
          "PACKED": {
            "actual": {
              "endTime": 1722576698000
            },
            "expected": {
              "endTime": 1722576698000
            },
            "promised": {
              "endTime": 1722573098000
            }
          },
          "PACKING": {
            "actual": {
              "endTime": 1722572438000
            }
          }
        }
      },
      {
        "fulfillmentId": "OF2405200539030657485732",
        "type": "DELIVERY",
        "ownerType": "RETAIL_SERVICE_PROVIDER",
        "end": {
          "address": {
            "building": "410 Lorem Lpsum",
            "locality": "----",
            "city": "Vadodara",
            "state": "Gujarat",
            "country": "IND",
            "pincode": "390011",
            "formattedAddress": "Room No 410, Lorem Lpsum Training Institute",
            "lat": 22.28182220459,
            "lon": 73.202598571777
          },
          "contact": {
            "phone": "8686868686"
          },
          "person": {
            "name": "Loren Lpsum"
          }
        },
        "fulfillmentState": "OUT_FOR_DELIVERY",
        "fulfilmentStatusHistory": {
          "SEARCHING_FOR_AGENT": {
            "actual": {
              "endTime": 1722576698000
            }
          },
          "AGENT_ASSIGNED": {
            "actual": {
              "endTime": 1722577843000
            }
          },
          "OUT_FOR_DELIVERY": {
            "actual": {
              "endTime": 1722578383000
            }
          },
          "DELIVERED": {
            "expected": {
              "endTime": 1722581983000
            },
            "promised": {
              "endTime": 1722578383000
            }
          }
        }
      }
    ],
    "quote": {
      "price": {
        "value": 43200
      },
      "breakUp": [
        {
          "referenceId": "OI2401121901140543863671",
          "type": "ITEM",
          "quotationLevel": "ITEM",
          "quantity": {
            "count": 3
          },
          "title": "Hindalco Freshwrapp Aluminium Foil 50 GRAM",
          "price": {
            "value": 37500
          }
        },
        {
          "referenceId": "OF2405200539030657485731",
          "type": "PACKING",
          "quotationLevel": "FULFILLMENT",
          "title": "Packing charges",
          "price": {
            "value": 0
          }
        },
        {
          "referenceId": "OF2405200539030657485732",
          "type": "DELIVERY",
          "quotationLevel": "FULFILLMENT",
          "title": "Delivery charges",
          "price": {
            "value": 5000
          }
        },
        {
          "referenceId": "C2407091549138061253438",
          "type": "TAX",
          "quotationLevel": "ORDER",
          "title": "Total Tax",
          "price": {
            "value": 700
          }
        }
      ]
    },
    "actions": [
      {
        "type": "CANCEL_ORDER",
        "channel": "TSP",
        "createdAt": "1732517746206"
      }
    ],
    "createdAt": "1713773187000",
    "updatedAt": "1713773187000"
  }
}

Error Payload:

{
  "requestContext": {
    "requestId": "OMS2402220921362644329327",
    "transactionId": "OD2401121901140533863584"
  },
  "error": {
    "errorCode": "NOT_FOUND",
    "message": "Order id OD2401121901140533863584 not found"
  }
}

Expected Response:
The following response is expected from the API exposed by you.

{
  "status": "ACK",
  "requestContext": {
    "requestId": "OMS2402220921362644329327",
    "transactionId": "OD2401121901140533863584"
  }
}