Description
Create a new order.
Headers
Authorization
token generated from v1/customer/auth
Parameters
order_timestamp
required, type: datetime
The timestamp which order placed.
order_total
required, type: numeric
Total value of the order.
order_items
required, type: numeric
Total no of unique items in the order.
line_items
required, type: array
order object
Example Request
{
"order_timestamp": "2021-03-26T15:42:36-04:00",
"order_total": 1500,
"order_items": 3,
"line_items": [
{
"order_id": "asdsa3432",
"SKU": "SKU1",
"qty": 1
}
]
}
Example Response
{
"id": 45654654654,
"order_id": "asdsa3432",
"state": "success",
"vouchers": [
{
"voucher_code": "BCP123456",
"pin": "4 charachets / optional*",
"validity": "2024-03-26"
}
],
"redemption_url": "bigcity.in",
"how_to_avail": "< html content >",
"terms": "< html content >",
"note": "Order created successfully.",
"created_at": "2021-03-26T15:42:36-04:00",
"updated_at": "2021-03-26T15:42:36-04:00"
}
Example Of Failuer Response
{
"name": "Unprocessable entity",
"message": "Validation Failed",
"code": 37,
"status": 422,
"type": "yii\\web\\HttpException"
}