Skip to main content

Create Order

POST {{baseUrl}}/public/orders

Description

This endpoint allows you to create a new order by sending a POST request with the necessary information in the request body.

Request

  • Headers:

    • Content-Type: application/json
    • Accept: /*
  • URL: {{baseUrl}}/public/orders

Request Body

{
"customerDetails": {
"customerId": "",
"tenantId": "",
"customerName": "",
"customerAddress": ""
},
"orderId": "",
"orderReference": "",
"productDetails": [
{
"quantity": "",
"skuName": "",
"productId": "",
"product": {
"id": "",
"uuid": "",
"createdAt": "",
"updatedAt": "",
"tenantId": "",
"merchantId": "",
"businessId": "",
"name": "",
"description": "",
"sku": "",
"category": "",
"subCategories": "",
"brand": "",
"countryCode": "",
"productPublicId": "",
"minimumOrderQuantity": "",
"costPrice": {
"price": "",
"unitQuantity": "",
"unitPrice": ""
},
"sellingPrice": {
"price": "",
"unitQuantity": "",
"unitPrice": ""
},
"promotion": {
"id": "",
"uuid": "",
"createdAt": "",
"updatedAt": "",
"tenantId": "",
"merchantId": "",
"name": "",
"description": "",
"discountType": "FIXED",
"amount": "",
"percentage": "",
"endDate": "",
"isActive": ""
},
"quantityOnHand": "",
"reorderLevel": "",
"stockLevel": "LOW",
"unit": "",
"weight": "",
"visibility": "",
"images": ["", ""],
"clusters": ["", ""]
}
},
{
"quantity": "",
"skuName": "",
"productId": "",
"product": {
"id": "",
"uuid": "",
"createdAt": "",
"updatedAt": "",
"tenantId": "",
"merchantId": "",
"businessId": "",
"name": "",
"description": "",
"sku": "",
"category": "",
"subCategories": "",
"brand": "",
"countryCode": "",
"productPublicId": "",
"minimumOrderQuantity": "",
"costPrice": {
"price": "",
"unitQuantity": "",
"unitPrice": ""
},
"sellingPrice": {
"price": "",
"unitQuantity": "",
"unitPrice": ""
},
"promotion": {
"id": "",
"uuid": "",
"createdAt": "",
"updatedAt": "",
"tenantId": "",
"merchantId": "",
"name": "",
"description": "",
"discountType": "FIXED",
"amount": "",
"percentage": "",
"endDate": "",
"isActive": ""
},
"quantityOnHand": "",
"reorderLevel": "",
"stockLevel": "OUT_OF_STOCK",
"unit": "",
"weight": "",
"visibility": "",
"images": ["", ""],
"clusters": ["", ""]
}
}
],
"additionalProperties": {
"incididuntd": {},
"do1ad": {},
"reprehenderit_cfc": {}
}
}

Sample Response

{
"message": "<string>",
"data": {
"id": "<string>",
"merchantId": "<string>",
"reference": "<string>",
"totalAmount": "<double>",
"status": "PROCESSING",
"purchaseDate": "<date>",
"extra": {
"processedCount": "<long>",
"errors": [
"<string>",
"<string>"
]
},
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"orderDetails": [
{
"id": "<string>",
"product": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"category": "<string>",
"subCategories": [
"<string>",
"<string>"
],
"brand": "<string>",
"productPublicId": "<string>",
"costPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"quantityOnHand": "<integer>",
"minimumOrderQuantity": "<integer>",
"reorderLevel": "<integer>",
"stockLevel": "HIGH",
"unit": "<string>",
"weight": "<double>",
"visibility": "<boolean>",
"images": [
"<string>",
"<string>"
],
"businessId": "<string>",
"merchantId": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"clusters": [
{
"value": "<Circular reference to #/components/schemas/ProductDto detected>"
},
{
"value": "<Circular reference to #/components/schemas/ProductDto detected>"
}
],
"business": {
"get_id": "<string>",
"name": "<string>",
"photo": "<string>",
"wallet": {
"consequat_a": {},
"reprehenderitc3c": {}
},
"address": {
"country": "<string>",
"latitude": "<integer>",
"lga": "<string>",
"name": "<string>",
"state": "<string>",
"longitude": "<integer>"
},
"location": {
"coordinates": [
"<long>",
"<long>"
],
"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": {
"virtualBankCode": "<long>"
},
"id": "<string>",
"fullName": "<string>"
},
"businessHandle": "<string>",
"shippingFee": "<double>",
"phone": "<string>",
"category": "<string>",
"active": "<boolean>",
"acceptingOrder": "<boolean>",
"isDistributor": "<boolean>",
"isManufacturer": "<boolean>"
}
},
"productPublicId": "<string>",
"quantity": "<integer>",
"amount": "<double>",
"extra": {
"enimb4d": {},
"in_8": {},
"veniamae": {}
},
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>"
},
{
"id": "<string>",
"product": {
"id": "<string>",
"name": "<string>",
"description": "<string>",
"sku": "<string>",
"category": "<string>",
"subCategories": [
"<string>",
"<string>"
],
"brand": "<string>",
"productPublicId": "<string>",
"costPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"sellingPrice": {
"price": "<double>",
"unitQuantity": "<integer>",
"unitPrice": "<double>"
},
"quantityOnHand": "<integer>",
"minimumOrderQuantity": "<integer>",
"reorderLevel": "<integer>",
"stockLevel": "HIGH",
"unit": "<string>",
"weight": "<double>",
"visibility": "<boolean>",
"images": [
"<string>",
"<string>"
],
"businessId": "<string>",
"merchantId": "<string>",
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>",
"clusters": [
{
"value": "<Circular reference to #/components/schemas/ProductDto detected>"
},
{
"value": "<Circular reference to #/components/schemas/ProductDto detected>"
}
],
"business": {
"get_id": "<string>",
"name": "<string>",
"photo": "<string>",
"wallet": {
"exercitation6_e": {},
"id_b5": {},
"pariatur5": {}
},
"address": {
"country": "<string>",
"latitude": "<integer>",
"lga": "<string>",
"name": "<string>",
"state": "<string>",
"longitude": "<integer>"
},
"location": {
"coordinates": [
"<long>",
"<long>"
],
"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": {
"virtualBankCode": "<long>"
},
"id": "<string>",
"fullName": "<string>"
},
"businessHandle": "<string>",
"shippingFee": "<double>",
"phone": "<string>",
"category": "<string>",
"active": "<boolean>",
"acceptingOrder": "<boolean>",
"isDistributor": "<boolean>",
"isManufacturer": "<boolean>"
}
},
"productPublicId": "<string>",
"quantity": "<integer>",
"amount": "<double>",
"extra": {
"fugiat9f": {},
"pariatur88": {}
},
"createdAt": "<dateTime>",
"updatedAt": "<dateTime>"
}
]
},
"meta": {
"currentPage": "<long>",
"from": "<long>",
"to": "<long>",
"perPage": "<long>",
"total": "<long>",
"lastPage": "<long>"
}
}

LANGUAGE

AUTHORIZATION

Bearer

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!