> 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

# Get device catalog

GET https://api-sandbox.payabli.com/api/DeviceOrder/catalog

Returns the devices you can order, the available payment options, the
shipping carriers Payabli uses, and the URL of the terms the buyer must
accept before you submit an order.

This endpoint requires the `deviceorder_read` permission.


Reference: https://docs.payabli.com/developers/api-reference/device-orders/get-device-catalog

## 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)

## Response

### 200

Success

- `responseText` (string, required) — Response text for operation: 'Success' or 'Declined'.
- `responseData` (DeviceOrderCatalog, required) — The devices you can order and the options for ordering them.
- `responseCode` (integer, optional) — Code for the response. Learn more in [API Response Codes](/developers/api-reference/api-responses).
- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `roomId` (long, optional) — Field not in use on this endpoint. It always returns `0`.
- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.

## Errors

### 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.

## Types

### DeviceOrderCatalog

The devices you can order and the options for ordering them.

- `items` (list of DeviceOrderCatalogItem, required) — The devices you can order.
- `paymentOptions` (list of DeviceOrderCatalogPaymentOption, required) — The payment options for device orders. The list can include options that aren't available, so show only the options where `enabled` is `true`.
- `termsUrl` (string, required) — The URL of the device ordering terms. Show these terms to the person placing the order, and send `termsAccepted: true` only after they accept them.
- `carriers` (list of string, required) — The shipping carriers Payabli uses to ship device orders.

### PayabliErrorBodyResponseData

Object with detailed error context.

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

### DeviceOrderCatalogItem

A device you can order.

- `id` (long, required) — The device ID. Send it as `deviceProfileId` in the order's `lines`.
- `profileCode` (string, required) — A text identifier for the device.
- `name` (string, required) — The device's display name.
- `make` (string, required) — The device manufacturer.
- `model` (string, required) — The device model.
- `description` (string, required, nullable) — A description of the device.
- `images` (list of string, required) — Images of the device.
- `specifications` (map from string to string, required, nullable) — The device's specifications, as pairs of names and values.
- `retailCost` (double, required) — The price of one unit of the device.
- `shippingRate` (double, required) — The shipping cost for the device.
- `shippingDays` (integer, required) — The estimated number of days to ship the device.
- `supportsBillToPaypoint` (boolean, required) — Reserved for future use. Ignore this field.

### DeviceOrderCatalogPaymentOption

A payment option and whether it's available.

- `code` (string, required) — The payment option, such as `PayNow`. See `paymentOption` on the order request for what each option means.
- `enabled` (boolean, required) — When `true`, you can use this payment option.
- `comingSoon` (boolean, required) — When `true`, the payment option isn't available yet.

## Examples

**Response**

```json
{
  "responseText": "Success",
  "responseData": {
    "items": [
      {
        "id": 67,
        "profileCode": "ingenico-ingenico-dx6000",
        "name": "Ingenico DX6000",
        "make": "Ingenico",
        "model": "DX6000",
        "description": null,
        "images": [],
        "specifications": {
          "Barcode Reader": "No",
          "Printer": "Yes",
          "RAM": "32 GB",
          "Wifi": "Yes"
        },
        "retailCost": 416,
        "shippingRate": 18,
        "shippingDays": 3,
        "supportsBillToPaypoint": false
      }
    ],
    "paymentOptions": [
      {
        "code": "PayNow",
        "enabled": true,
        "comingSoon": false
      },
      {
        "code": "BillToPartner",
        "enabled": false,
        "comingSoon": true
      },
      {
        "code": "BillToPaypoint",
        "enabled": false,
        "comingSoon": true
      }
    ],
    "termsUrl": "https://payabli.com/terms-and-conditions/",
    "carriers": [
      "UPS",
      "FedEx",
      "USPS",
      "DHL"
    ]
  },
  "responseCode": 1,
  "pageIdentifier": null,
  "roomId": 0,
  "isSuccess": true
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.payabli.com/api/DeviceOrder/catalog"

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

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

print(response.json())
```

```javascript
const url = 'https://api-sandbox.payabli.com/api/DeviceOrder/catalog';
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/DeviceOrder/catalog"

	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/DeviceOrder/catalog")

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/DeviceOrder/catalog")
  .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/DeviceOrder/catalog', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/DeviceOrder/catalog");
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/DeviceOrder/catalog")! 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()
```