Create Order
POST /public/orders
Request body
- Media Type:
application/json
Example Value
{
"orderId": "string",
"orderReference": "string",
"productDetails": [
{
"productId": "string",
"product": {
"id": 0,
"uuid": "string",
"createdAt": "2024-07-18T16:59:48.793Z",
"updatedAt": "2024-07-18T16:59:48.793Z",
"tenantId": "string",
"merchantId": "string",
"businessId": "string",
"name": "string",
"description": "string",
"sku": "string",
"category": "string",
"subCategories": "string",
"brand": "string",
"countryCode": "string",
"productPublicId": "string",
"minimumOrderQuantity": 0,
"costPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"sellingPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
},
"promotion": {
"id": 0,
"uuid": "string",
"createdAt": "2024-07-18T16:59:48.804Z",
"updatedAt": "2024-07-18T16:59:48.804Z",
"tenantId": "string",
"merchantId": "string",
"name": "string",
"description": "string",
"discountType": "FIXED",
"amount": 0,
"percentage": 0,
"endDate": "2024-07-18T16:59:48.804Z",
"isActive": true
},
"quantityOnHand": 0,
"reorderLevel": 0,
"stockLevel": "OUT_OF_STOCK",
"unit": "string",
"weight": 0,
"visibility": true,
"images": [
"string"
],
"clusters": [
0
]
},
"skuName": "string",
"quantity": 0
}
],
"customerDetails": {
"customerId": "string",
"tenantId": "string",
"customerName": "string",
"customerAddress": "string"
},
"additionalProperties": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}
### Responses
#### 200 OK
- Media Type: `application/json`
#### Example Value
```json
{
"message": "string",
"data": {
"id": "string",
"merchantId": "string",
"reference": "string",
"totalAmount": 0,
"status": "PROCESSING",
"purchaseDate": "2024-07-18",
"extra": {
"processedCount": 0,
"errors": [
"string"
]
},
"createdAt": "2024-07-18T16:59:48.822Z",
"updatedAt": "2024-07-18T16:59:48.822Z",
"orderDetails": [
{
"id": "string",
"product": {
"id": "string",
"name": "string",
"description": "string",
"sku": "string",
"category": "string",
"subCategories": [
"string"
],
"brand": "string",
"productPublicId": "string",
"costPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"sellingPrice": {
"price": 0,
"unitQuantity": 0,
"unitPrice": 0
},
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
},
"quantityOnHand": 0,
"minimumOrderQuantity": 0,
"reorderLevel": 0,
"stockLevel": "OUT_OF_STOCK",
"unit": "string",
"weight": 0,
"visibility": true,
"images": [
"string"
],
"businessId": "string",
"merchantId": "string",
"vatRatio": 0,
"createdAt": "2024-07-18T16:59:48.822Z",
"updatedAt": "2024-07-18T16:59:48.823Z",
"clusters": [
"string"
],
"business": {
"get_id": "string",
"name": "string",
"email": "string",
"photo": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"address": {
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0
},
"location": {
"coordinates": [
0
],
"type": "string"
},
"user": "string",
"owner": {
"profileTenant": "string",
"city": {
"code": "string",
"name": "string"
},
"country": {
"code": "string",
"name": "string",
"currency": "string"
},
"firstName": "string",
"lastName": "string",
"phone": "string",
"photo": "string",
"state": {
"code": "string",
"name": "string"
},
"username": "string",
"wallet": {
"userId": "string",
"virtualBankCode": "string",
"floatAccountId": "string",
"floatAccountUuid": "string",
"floatAccountNumber": "string",
"commissionAccountId": "string"
},
"id": "string",
"fullName": "string"
},
"businessHandle": "string",
"shippingFee": 0,
"phone": "string",
"category": "string",
"active": true,
"acceptingOrder": true,
"isDistributor": true,
"isManufacturer": true,
"isHead": true,
"extraLocationPrice": 0,
"distance": 0,
"kycDetails": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"pickUpAddresses": [
{
"country": "string",
"latitude": 0,
"lga": "string",
"name": "string",
"state": "string",
"longitude": 0,
"location": {
"coordinates": [
0
],
"type": "string"
}
}
],
"priceMargin": {
"type": "FIXED",
"source": "BUSINESS",
"value": 0,
"enabled": true
}
}
},
"productPublicId": "string",
"quantity": 0,
"amount": 0,
"extra": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
},
"createdAt": "2024-07-18T16:59:48.823Z",
"updatedAt": "2024-07-18T16:59:48.823Z"
}
]
},
"meta": {
"currentPage": 0,
"from": 0,
"to": 0,
"perPage": 0,
"total": 0,
"lastPage": 0
}
}
LANGUAGE
CURL REQUEST
curl --request POST \
--url /public/orders \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!