1. Home
  2. Docs
  3. Dynamic Integration
  4. Endpoint 3 – Retrieving order details based on an order number

Endpoint 3 – Retrieving order details based on an order number

Resource

GET https://demo.com/orderdetails?=$Id
Parameter: $Id

 

We call Endpoint 3 when:

1. Every-time a ROBIN Agent opens an order from Endpoint 2


Endpoint

The “Order details” endpoint shows the details of one order so the ROBIN Agent can see more information of one particular order from the customer.

Once a ROBIN Agent clicks on order shown in the “Order list” from Endpoint 2, Endpoint 3 will be called by the parameter “ID” filled with the order_Number in the object of “orders” from Endpoint 2 “Order list”.

Below I will show you an example:

Endpoint 2 request URL: https://demo.com/orderlist?=email@address.com

The JSON from Endpoint 2

{
    "orders":
    [
        {
            "order_number": "RHQO1234",
            "list_view": {
                "order_number": "RHQO1234",
                "date": "29-01-2014 12:34",
                "status": "In progress"
            }
        }
    ]
}
The ROBIN Agent opens “Order Details” (Endpoint 3) by clicking on order in the “Order List” (Endpoint 2)

 

Endpoint 3 request URL: https://demo.com/orderlist?=$id

Request URL filled: https://demo.com/orderdetails?=RHQO1234

 

The Minimum response

The minimum response from endpoint 3 consists of 1 situation.

Situation 1: return the details of the order

{
     "details_view": 
    [
        {
            "display_as": "details",
            "data": {
                "date": "29-01-2014 12:34",
                "status": "In progress",
                "payment_status": "Partially paid",
                "shipment_status": "Partially shipped"
            }
        }
    ]
}

 

By adding this situation, you’ve set up the bare minimum of endpoint 3; Our ROBIN Agent now sees the details from the requested order.
Now let’s see how we can add some more details so that our ROBIN Agent can help see all the information he needs from the order.

 

Schema of Endpoint 3

KeyTypeRequiredDescriptionExample
display_asStringYesTells ROBIN what to do with the following information"details"
dataObjectYesThis is the object where all the information is stored{}
dateStringNoThe date when the order has been paid"29-01-2018 12:34"
statusStringNoThe actual state of the order"Partially paid"
payment_statusStringNoThe status of the payment"In progress"
shipment_statusStringNoThe status of the shipment"Partially shipped"

Articles