Orders

Use this enpoint to fetch, update and cancel a collection of purchases at once.

Retrieve an order

curl request

GET /api/v2/orders/:order_id

curl -i -X GET 'https://core-v2-multi-country.herokuapp.com/api/v2/orders/113' \
-H 'Authorization: Bearer <access_token>' \
-H "Content-type: application/json"

JSON response

{
"apiVersion":"2.0",
"status":200,
"order_id":"113",
"data":[
{
"interest_rate":4.2,
"loan_duration":12,
"facility_status":"pending_collection_customer",
"preferred_option":"pick_up",
"facility_description":null,
"facility_plan":0,
"created_at":"2020-11-25T07:29:57.128Z",
"updated_at":"2020-11-25T07:29:57.128Z",
"item_type":"other",
"item_brand":"16GB A Series Walkman Video MP3",
"item_code":"H0148VPS1T",
"store_name":"QUEENS MOBILE",
"item_value":50000.0,
"delivery_option":"customer_store_pickup",
"item_description":null,
"item_topup":0.0,
"topup_ref":"",
"upfront_fees":0.0,
"source":"sales-rep",
"accepted_terms":"accepted",
"id":"5c8d30d7-235b-43c6-b2f3-eca5909fc6df",
"partner_store_id":"61d273cf-6584-4429-af01-7b4dd2ae9f78",
"order_id":"113"
},...
]
}

Cancel Order

DELETE /api/v2/orders/:order_id

curl request

curl -i -X DELETE 'https://core-v2-multi-country.herokuapp.com/api/v2/orders/113' \
-H 'Authorization: Bearer <access_token>' \
-H "Content-type: application/json"

JSON response

{
"apiVersion": "2.0",
"status": 200,
"data": "Order cancelled successfully"
}