ShiftDocs

Testing

Simulate an order

POST{host}/api/v1/open/order/{orderId}/simulate/status/{endOrderStatus}

Request Parameters

ParameterDescription
orderIdUnique Order Id for testing order flow
endOrderStatusValid values: DLV (Delivered flow) or RTO_DLV (RTO flow)

Request Example

curl --location --request POST 'http://localhost:8080/api/v1/open/order/250962/simulate/status/DLV' \
--header 'Authorization: Basic XXX' \
--header 'sitecode: CARRIER' \
--header 'Content-Type: application/json'

The response will be of content type text/event-stream. The response is streamed to the caller with status updates for each stage of the simulation.

Sample Streamed Response

{
  "simulationStatusMap": {
    "NEW": {
      "success": true,
      "statusDescription": "Order fetched successfully. Order Current status is NEW. Simulation starting...",
      "inProgress": false,
      "pending": false
    },
    "RTS": {
      "success": true,
      "statusDescription": "All eligible actions (Communication, Financial, Marketplace updates etc) simulated successfully.",
      "inProgress": false,
      "pending": false
    },
    "INT": {
      "success": true,
      "statusDescription": "All eligible actions simulated successfully.",
      "inProgress": false,
      "pending": false
    },
    "OFD": {
      "success": true,
      "statusDescription": "All eligible actions simulated successfully.",
      "inProgress": false,
      "pending": false
    },
    "DLV": {
      "success": true,
      "statusDescription": "All eligible actions simulated successfully.",
      "inProgress": false,
      "pending": false
    }
  }
}

Stuck on an integration?

Your account manager can put you in touch with our tech team.

Talk to us