Get business order
curl --request GET \
--url https://api.khaime.com/api/v1/analytics/orders/{order_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.khaime.com/api/v1/analytics/orders/{order_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.khaime.com/api/v1/analytics/orders/{order_id}', 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.khaime.com/api/v1/analytics/orders/{order_id}",
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: <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.khaime.com/api/v1/analytics/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.khaime.com/api/v1/analytics/orders/{order_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.khaime.com/api/v1/analytics/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyStore Data
Get business order
One order, with its customer and items.
GET
/
api
/
v1
/
analytics
/
orders
/
{order_id}
Get business order
curl --request GET \
--url https://api.khaime.com/api/v1/analytics/orders/{order_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.khaime.com/api/v1/analytics/orders/{order_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.khaime.com/api/v1/analytics/orders/{order_id}', 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.khaime.com/api/v1/analytics/orders/{order_id}",
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: <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.khaime.com/api/v1/analytics/orders/{order_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.khaime.com/api/v1/analytics/orders/{order_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.khaime.com/api/v1/analytics/orders/{order_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyOne order, with its customer and items. It finds only this business’s orders in the key’s environment. Show it only behind a login.
Call this from your server with a
pk_ key. See Store data overview for keys, errors and how to read empty values.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
order_id | integer | Yes | Path parameter. The id from List business orders. |
Request
curl -H "X-API-Key: $KHAIME_API_KEY" \
"https://api.khaime.com/api/v1/analytics/orders/9012"
Response
{
"message": "Order retrieved",
"success": true,
"status": true,
"data": {
"environment": "live",
"id": 9012,
"order_number": "KH-9012",
"amount": {
"minor": 8200,
"currency": "USD"
},
"payment_status": "paid",
"delivery_status": "shipped",
"customer_id": 771,
"created_at": "2026-10-31T14:03:11.000Z",
"customer": {
"id": 771,
"first_name": "Ada",
"last_name": "Obi",
"email": "ada@example.com"
},
"items": [
{
"title": "North Core Hoodie",
"quantity": 1
}
]
}
}
Read it correctly
customerisnullfor a guest or a removed customer.- An id that is not found returns
404withORDER_NOT_FOUND.
