Skip to main content

List and inspect orders

List orders with filters and paging (List orders), then retrieve a single order by ID (Get order details). In the API these are Order resources under /order/Order/....

Prerequisites

  • Bearer access token with earthlife.orders
  • Optional: an OrderID from a previous create or list call
  • Gateway: https://earthlife.sarsatx.com/gateway
export ACCESS_TOKEN="CfDJ8A..."

List with filter and paging

POST /order/Order/GetOrders accepts a GetOrdersFilterRequest JSON body.

curl -X POST "https://earthlife.sarsatx.com/gateway/order/Order/GetOrders" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"PageIndex": 0,
"PageSize": 10,
"SortField": "OrderDate",
"SortOrder": "desc",
"FilterValue": null,
"OrderDateFrom": "2026-01-01T00:00:00Z",
"OrderDateTo": "2026-12-31T23:59:59Z",
"IncludeOrderItems": true
}'

Filter fields

FieldDescription
PageIndexZero-based page index (default 0)
PageSizePage size (default 10)
SortField / SortOrdere.g. OrderDate + desc
FilterValueOptional free-text filter
OrderDateFrom / OrderDateToInclusive date range
IncludeOrderItemsWhen true, include line items in each order

Success

{
"IsSuccess": true,
"Message": null,
"ReturnedValue": [
{
"OrderID": 694,
"OrderNo": "ORD-2026-0694",
"OrderStatusID": 1,
"OrderStatusTitle": "Pending",
"PaymentMethodTypeTitle": "Subscription",
"RefNo": "0",
"NetPrice": 0,
"OrderDate": "2026-09-13T08:00:00Z",
"OrderItems": []
}
],
"TotalCount": 1
}

Use TotalCount with PageIndex / PageSize to page through results.

Failure: unauthorized

curl -X POST "https://earthlife.sarsatx.com/gateway/order/Order/GetOrders" \
-H "Content-Type: application/json" \
-d '{"PageIndex":0,"PageSize":10}'

Without Authorization → HTTP 401.

Failure: wrapper error

{
"IsSuccess": false,
"Message": "Unable to retrieve orders for the current organization.",
"ReturnedValue": null,
"TotalCount": 0
}

Get details by ID

GET /order/Order/GetOrderDetails returns an OrderModel directly (not the list wrapper).

curl -X GET "https://earthlife.sarsatx.com/gateway/order/Order/GetOrderDetails?orderID=694" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Accept: application/json"

Success

{
"OrderID": 694,
"OrderNo": "ORD-2026-0694",
"OrderStatusID": 1,
"OrderStatusTitle": "Pending",
"PaymentMethodTypeTitle": "Subscription",
"UUID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"RefNo": "0",
"Price": 0,
"Tax": 0,
"NetPrice": 0,
"Note": null,
"OrderDate": "2026-09-13T08:00:00Z",
"AddedBy": "user@example.com",
"OrderItems": [
{
"OrderItemID": 2001,
"OrderID": 694,
"ServiceID": 3,
"ServiceName": "مهمة جديدة",
"ServiceNameEn": "Tasking",
"Price": 0,
"Tax": 0,
"Quantity": 1,
"OrderItemDetail": {
"ImageTypeID": 2,
"ImageResolutionID": 4,
"CloudCover": 30,
"ImageProviderName": "auto",
"CaptureAttempFrom": "2026-09-14T09:00:00.000Z",
"CaptureAttempTo": "2026-09-15T09:00:00.000Z",
"IsTopPriority": false
}
}
]
}

Failure: unknown ID

A missing or inaccessible orderID may return an empty/default model or an error depending on deployment. Treat unexpected empty payloads as a miss; confirm the ID via list, and check Errors for HTTP status patterns.

Next steps