Get an order
curl --request GET \
--url https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orderNumber": "<string>",
"status": "<string>",
"total": 123,
"finalTotal": 123,
"productsCount": 123,
"date": "<string>",
"customerName": "<string>",
"customerPhone": {},
"note": {},
"items": [
{}
]
}API reference
Get an order
Retrieve an order by its order number or ID.
GET
https://api.mymorabaa.com
/
external
/
v1
/
orders
/
{orderNumberOrId}
Get an order
curl --request GET \
--url https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mymorabaa.com/external/v1/orders/{orderNumberOrId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"orderNumber": "<string>",
"status": "<string>",
"total": 123,
"finalTotal": 123,
"productsCount": 123,
"date": "<string>",
"customerName": "<string>",
"customerPhone": {},
"note": {},
"items": [
{}
]
}Returns an order created with the same API key. Your key needs the
orders:find scope.
Headers
string
required
Your API key. You can use
Authorization: Api-Key your_key instead.Path parameters
string
required
Order number or order GUID.
Request example
curl "$MORABAA_API_URL/external/v1/orders/ORD-1042" \
--header "X-Api-Key: $MORABAA_API_KEY"
Response
UUID
required
Order ID.
string
required
Order number.
string
required
Current order status.
number
required
Order subtotal.
number
required
Final order total.
integer
required
Total item quantity.
string
required
Order date and time in ISO 8601 format.
string
required
Customer name.
string | null
Customer phone.
string | null
Order note.
object[]
required
Order items. Each item contains
productId, combinationId, name, quantity, singlePrice, and totalPrice.{
"id": "55555555-5555-5555-5555-555555555555",
"orderNumber": "ORD-1042",
"status": "Pending",
"total": 20000,
"finalTotal": 20000,
"productsCount": 2,
"date": "2026-08-16T10:30:00+03:00",
"customerName": "Ahmed Ali",
"customerPhone": "+9647700000000",
"note": "Leave at reception",
"items": [{
"productId": "11111111-1111-1111-1111-111111111111",
"combinationId": null,
"name": "Arabic coffee",
"quantity": 2,
"singlePrice": 10000,
"totalPrice": 20000
}]
}
Errors
| Status | Cause |
|---|---|
401 | The API key is missing or invalid. |
403 | The key lacks the orders:find scope. |
404 | No accessible order matches orderNumberOrId. |
429 | The rate limit was exceeded. |
500 | An unexpected error occurred. |
{
"error": "order_not_found",
"message": "No order matches the given identifier."
}
⌘I