> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List device orders by organization

GET https://api-sandbox.payabli.com/api/Query/deviceOrders/org/{orgId}

Returns a list of device orders for a single organization. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.

This endpoint requires the `deviceorder_read` permission.


Reference: https://docs.payabli.com/developers/api-reference/device-orders/get-list-of-device-orders-for-an-organization

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `orgId` (integer, required) — The numeric identifier for organization, assigned by Payabli.

### Query parameters

- `exportFormat` (enum, optional) — Export format for file downloads. When specified, returns data as a file instead of JSON.
  - Allowed values: `csv`, `xlsx`
- `fromRecord` (integer, optional, default: 0) — The number of records to skip before starting to collect the result set.
- `limitRecord` (integer, optional, default: 20) — Max number of records to return for the query. Use `0` or negative value to return all records.
- `parameters` (map from string to string, optional) — Collection of field names, conditions, and values used to filter the query. **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.** Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client, for example: \--url [https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?parameters=status(in)=Paid|Dispatched\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?parameters=status\(in\)=Paid|Dispatched\&limitRecord=20) should become: \--url [https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?status(in)=Paid|Dispatched\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?status\(in\)=Paid|Dispatched\&limitRecord=20) See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for more information. **Accepted field names:** * `status` (eq, ne, ct, nct, in, nin) * `paymentStatus` (eq, ne, ct, nct, in, nin) * `orderNumber` (eq, ne, ct, nct, in, nin) * `organizationId` (eq, ne, gt, ge, lt, le, in, nin) * `paypointId` (eq, ne, gt, ge, lt, le, in, nin) * `organizationName` (eq, ne, ct, nct, in, nin) * `paypointName` (eq, ne, ct, nct, in, nin) * `entryName` (eq, ne, ct, nct, in, nin) * `trackingNumber` (eq, ne, ct, nct, in, nin) * `orderDate` (gt, ge, lt, le, eq, ne) * `deliveredAt` (gt, ge, lt, le, eq, ne) * `total` (eq, ne, gt, ge, lt, le, in, nin) **Accepted comparison operators:** * `eq` or empty => equal * `gt` => greater than * `ge` => greater or equal * `lt` => less than * `le` => less or equal * `ne` => not equal * `ct` => contains * `nct` => not contains * `in` => inside array * `nin` => not inside array
- `sortBy` (string, optional) — The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`. Defaults to `desc(orderDate)`, newest orders first.

## Response

### 200

Success

- `Summary` (QuerySummary, required)
- `Records` (list of DeviceOrderQueryRecord, required)

## Errors

### 400 Bad Request Error

Bad request / invalid data.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

### 401 Unauthorized Error

Unauthorized request.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

### 500 Internal Server Error

Internal server error.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

### 503 Service Unavailable Error

Database connection error.

- `isSuccess` (boolean, required) — Always `false` for error responses.
- `responseText` (string, required) — Error text describing what went wrong.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `responseData` (PayabliErrorBodyResponseData, optional) — Object with detailed error context.

## Types

### QuerySummary

- `pageidentifier` (string, required, nullable) — Pagination token for retrieving the next page of results. Returns `null` when there's no additional page.
- `pageSize` (integer, optional) — Number of records on each response page.
- `totalAmount` (double, optional) — Total amount for the records.
- `totalNetAmount` (double, optional) — Total net amount for the records.
- `totalPages` (integer, optional) — Total number of records in response.
- `totalRecords` (integer, optional) — Total number of records in response.

### DeviceOrderQueryRecord

One device order in a list.

- `id` (long, required) — The order's internal ID.
- `orderNumber` (string, required) — The order number.
- `status` (enum, required) — The order's status. - `Placed`: The order was placed. A `PayNow` order stays `Placed` until it's paid. - `Paid`: The `PayNow` order was paid. - `Initiated`: Payabli started fulfilling the order. - `Dispatched`: Payabli shipped the order. - `Delivered`: The order was delivered. - `Canceled`: The order was canceled. This status is final.
  - Allowed values: `Placed`, `Paid`, `Initiated`, `Dispatched`, `Delivered`, `Canceled`
- `orderDate` (datetime, required) — When the order was placed, in UTC.
- `organizationId` (long, required) — The ID of the organization the order is for.
- `organizationName` (string, required) — The name of the organization the order is for.
- `paypointId` (long, required, nullable) — The ID of the paypoint the devices are for. `null` for an organization-level order.
- `paypointName` (string, required, nullable) — The name of the paypoint the devices are for. `null` for an organization-level order.
- `entryName` (string, required, nullable) — The entry name of the paypoint the devices are for. `null` for an organization-level order.
- `units` (integer, required) — The total number of units on the order.
- `deviceSummary` (string, required) — A summary of the devices on the order, for example `1 × Ingenico DX6000`.
- `deviceSubtotal` (double, required) — The total price of the devices, before shipping.
- `shippingTotal` (double, required) — The total shipping cost.
- `total` (double, required) — The order total, including shipping.
- `currency` (string, required) — The currency of the order's amounts.
- `paymentOption` (enum, required) — How the order is paid for. Defaults to `PayNow`. * `PayNow`: The buyer pays by card. After you place the order, collect the card with the embedded component and pay the order with `POST /DeviceOrder/{orderNumber}/pay`. Use `paymentOptions` in the catalog response to see which options are available.
  - Allowed values: `PayNow`
- `paymentStatus` (enum, required) — Where the order's payment stands. - `Pending`: The `PayNow` order isn't paid yet. - `Paid`: The order was charged. - `Voided`: The paid order was canceled before the payment settled. - `Refunded`: The paid order was canceled after the payment settled.
  - Allowed values: `Pending`, `Paid`, `Voided`, `Refunded`
- `paidAt` (datetime, required, nullable) — When the order was paid, in UTC.
- `invoiceNumber` (string, required) — The number of the invoice Payabli created for the order.
- `billTo` (string, required) — The billing address, as one line of text.
- `shipTo` (string, required) — The shipping address, as one line of text.
- `trackingCarrier` (string, required, nullable) — The shipping carrier.
- `trackingNumber` (string, required, nullable) — The carrier's tracking number.
- `expectedShipAt` (datetime, required, nullable) — When Payabli expects to ship the order, in UTC.
- `dispatchedAt` (datetime, required, nullable) — When Payabli shipped the order, in UTC.
- `deliveredAt` (datetime, required, nullable) — When the order was delivered, in UTC.
- `createdBy` (string, required) — Who placed the order.
- `updatedBy` (string, required) — Who last updated the order.
- `updatedAt` (datetime, required) — When the order was last updated, in UTC.

### PayabliErrorBodyResponseData

Object with detailed error context.

- `explanation` (string, optional) — Human-readable explanation of what happened.
- `todoAction` (string, optional) — Suggested resolution.

## Examples

**Response**

```json
{
  "Summary": {
    "pageidentifier": null,
    "pageSize": 5,
    "totalAmount": 0,
    "totalNetAmount": 0,
    "totalPages": 1,
    "totalRecords": 2
  },
  "Records": [
    {
      "id": 36,
      "orderNumber": "DO-000036",
      "status": "Placed",
      "orderDate": "2026-10-16T15:28:48.972394+00:00",
      "organizationId": 900123,
      "organizationName": "Pilgrim Planner",
      "paypointId": 3040,
      "paypointName": "Sunshine Gutters",
      "entryName": "8cfec329267",
      "units": 1,
      "deviceSummary": "1 × Ingenico DX6000",
      "deviceSubtotal": 416,
      "shippingTotal": 18,
      "total": 434,
      "currency": "USD",
      "paymentOption": "PayNow",
      "paymentStatus": "Pending",
      "paidAt": null,
      "invoiceNumber": "INV-2346",
      "billTo": "123 Main St, Austin, TX 78701, US",
      "shipTo": "123 Main St, Austin, TX 78701, US",
      "trackingCarrier": null,
      "trackingNumber": null,
      "expectedShipAt": null,
      "dispatchedAt": null,
      "deliveredAt": null,
      "createdBy": "900123",
      "updatedBy": "900123",
      "updatedAt": "2026-10-16T15:28:48.972394+00:00"
    },
    {
      "id": 35,
      "orderNumber": "DO-000035",
      "status": "Placed",
      "orderDate": "2026-10-16T15:28:47.475824+00:00",
      "organizationId": 900123,
      "organizationName": "Pilgrim Planner",
      "paypointId": 3040,
      "paypointName": "Sunshine Gutters",
      "entryName": "8cfec329267",
      "units": 1,
      "deviceSummary": "1 × Ingenico DX6000",
      "deviceSubtotal": 416,
      "shippingTotal": 18,
      "total": 434,
      "currency": "USD",
      "paymentOption": "PayNow",
      "paymentStatus": "Pending",
      "paidAt": null,
      "invoiceNumber": "INV-2345",
      "billTo": "123 Main St, Austin, TX 78701, US",
      "shipTo": "123 Main St, Austin, TX 78701, US",
      "trackingCarrier": null,
      "trackingNumber": null,
      "expectedShipAt": null,
      "dispatchedAt": null,
      "deliveredAt": null,
      "createdBy": "900123",
      "updatedBy": "900123",
      "updatedAt": "2026-10-16T15:28:47.475824+00:00"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123"

querystring = {"limitRecord":"5"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/deviceOrders/org/900123?limitRecord=5")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```