API Reference
Storefront API (Public)
Orders

Orders

Visibility

  • POST /ordersPublic
  • GET /ordersAuthenticated (customer context)
  • GET /orders/track/{order_number}Public tracking

Authentication

  • Storefront key is required for all endpoints in this page.
  • Customer-specific order listing may depend on customer auth/session context.

POST /orders

Converts a cart into an order.

Request Body (CreateOrderRequest)

FieldTypeRequired
cart_idstringYes
customer_namestringYes
customer_phonestringYes
customer_emailstring?No
customer_wilayastring?No
customer_communestring?No
shipping_addressobject?No
payment_methodstring?No
customer_notesstring?No
coupon_codestring?No

Response Fields

FieldType
idstring
order_numberstring?
statusstring
totalnumber
subtotalnumber?
shipping_costnumber?
discountnumber?
payment_statusstring?

GET /orders

Returns paginated customer order history.

GET /orders/track/{order_number}

Returns one order by tracking/order number.

cURL

curl -X POST "https://api.ecommaps.com/api/v1/storefront/orders" \
  -H "x-api-key: sk_eco_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cart_id":"<cart_uuid>","customer_name":"Customer","customer_phone":"0555000000"}'
 
curl -X GET "https://api.ecommaps.com/api/v1/storefront/orders/track/ORD-2026-ABC123" \
  -H "x-api-key: sk_eco_YOUR_KEY"

SDK Example

const order = await ecommapsClient.orders.create({
  cart_id: "<cart_uuid>",
  customer_name: "Customer",
  customer_phone: "0555000000",
});

Error Matrix

StatusScenario
400Invalid order payload
401Missing/invalid auth
404Cart/order not found
422Validation failure
500Order pipeline failure