> 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

# Check device ordering status

GET https://api-sandbox.payabli.com/api/DeviceOrder/enabled/{entry}

Checks whether device ordering is enabled for an organization or
paypoint. Call this first, and hide device ordering from your users
when `enabled` is `false`.

This endpoint always returns `200`. If you aren't authorized for the
entry, it returns `false`, so you can't use it to check whether an
entry exists.

This endpoint requires one of the `deviceorder_read` or `pos_read` permissions.


Reference: https://docs.payabli.com/developers/api-reference/device-orders/check-device-ordering-enabled

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

- `entry` (string, required) — The entity's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry)

## Response

### 200

Success

- `enabled` (boolean, required) — When `true`, device ordering is enabled for the entry.

## Errors

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

### PayabliErrorBodyResponseData

Object with detailed error context.

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

## Examples

### DeviceOrderingEnabled

**Response**

```json
{
  "enabled": true
}
```

**SDK Code**

```python DeviceOrderingEnabled
import requests

url = "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267"

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

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

print(response.json())
```

```javascript DeviceOrderingEnabled
const url = 'https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267';
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 DeviceOrderingEnabled
package main

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

func main() {

	url := "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267"

	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 DeviceOrderingEnabled
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")

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 DeviceOrderingEnabled
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp DeviceOrderingEnabled
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift DeviceOrderingEnabled
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")! 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()
```

### DeviceOrderingNotEnabled

**Response**

```json
{
  "enabled": false
}
```

**SDK Code**

```python DeviceOrderingNotEnabled
import requests

url = "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267"

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

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

print(response.json())
```

```javascript DeviceOrderingNotEnabled
const url = 'https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267';
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 DeviceOrderingNotEnabled
package main

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

func main() {

	url := "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267"

	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 DeviceOrderingNotEnabled
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")

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 DeviceOrderingNotEnabled
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp DeviceOrderingNotEnabled
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift DeviceOrderingNotEnabled
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/DeviceOrder/enabled/8cfec329267")! 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()
```