Skip to main content
POST
Add order

Endpoint

POST /orders Production URL: https://sam.aragon.morabaa.com/api/orders

Authentication

This endpoint requires app authentication headers:
  • X-App-Id: <APP_ID>
  • X-App-Secret: <APP_SECRET>

Required headers

string
required
App ID credential.
string
required
App secret credential.
Need credentials? Contact info@morabaa.com.
If either header is invalid or missing, the response is 401 Unauthorized.

Request example

Body parameters

string
required
Customer mobile number. Must match the Iraqi mobile format 07[4-9]xxxxxxxx.
string
required
Customer full name. Maximum length is 64 characters.
guid
required
Business ID that will receive the order. It must belong to the authenticated app.
array
required
Order items. At least one item is required.
string
Optional external order identifier from your system. The endpoint accepts this field, but the current implementation does not forward it to the upstream order service.
string
Optional order note.

Item fields

guid
required
Item ID.
string
required
Item name.
int
required
Item local ID in MyMorabaa. Must be greater than 0.
decimal
required
Item price at the time of ordering.
decimal
required
Ordered quantity. Must be greater than 0.
int
Currency ID for the item price. Defaults to 1 and must be greater than 0.
Notes:
  • businessId must belong to the authenticated app.
  • A successful response returns 201 Created.
  • If the upstream order service rejects the order or is unavailable, the response is 502 Bad Gateway.

Response

The response contains the created order ID:
guid
Created order ID.

Headers

X-App-Id
string
required

App ID credential.

X-App-Secret
string
required

App secret credential.

Body

application/json
mobile
string
required

Customer mobile number.

Pattern: ^07[4-9]\d{8}
fullname
string
required

Customer full name.

Maximum string length: 64
businessId
string<uuid>
required

Business ID that will receive the order.

items
object[]
required

Order items.

Minimum array length: 1
externalId
string

Optional external order identifier from your system. The endpoint accepts this field, but the current implementation does not forward it to the upstream order service.

note
string

Optional order note.

Response

Order created successfully.

id
string<uuid>
required

Created order ID.