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

GET https://api-sandbox.payabli.com/api/v2/businesses

Lists businesses with optional filtering and pagination.

Reference: https://docs.payabli.com/developers/api-reference/businesses/list-businesses

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

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

## Request

### Query parameters

- `status` (string, optional) — Filter by business status.
- `name` (string, optional) — Filter by legal name.
- `merchantCatCode` (string, optional) — Filter by merchant category code.
- `legalStructure` (string, optional) — Filter by legal structure.
- `limit` (integer, optional) — Number of results per page.
- `page` (integer, optional) — Page number to return.
- `sortBy` (string, optional) — Field to sort by.
- `sortOrder` (string, optional) — Sort direction.

## Response

### 200

A page of businesses.

- `success` (boolean, required) — Whether the request succeeded.
- `message` (string, required, nullable) — A human-readable result message.
- `traceId` (string, required, nullable) — The trace identifier for the request, useful for support.
- `data` (ListBusinessesResponse, required, nullable) — The page of businesses.
- `warnings` (list of BoardingWarning, required, nullable) — Non-blocking warnings.

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

### ListBusinessesResponse

A page of businesses.

- `data` (list of BusinessSummaryResponse, required, nullable) — The businesses on this page.
- `pagination` (Pagination, required, nullable) — Pagination metadata.

### BoardingWarning

A non-blocking warning returned alongside a successful response.

- `code` (string, optional) — A machine-readable warning code.
- `message` (string, optional) — A human-readable description of the warning.

### PayabliErrorBodyResponseData

Object with detailed error context.

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

### BusinessSummaryResponse

A business as it appears in a list response.

- `businessUuid` (string, required) — The business reference.
- `legalName` (string, required, nullable) — The registered legal name of the business.
- `businessStatus` (string, required) — The business's current status.
- `parentReference` (string, required, nullable) — The organization entrypoint the business belongs to.
- `createdAt` (datetime, required) — When the business was created.
- `lastUpdated` (datetime, required) — When the business was last updated.
- `_links` (BusinessLinks, required) — Hypermedia links for the business resource.

### Pagination

Pagination metadata for a list response.

- `page` (integer, optional) — The current page number.
- `totalPages` (integer, optional) — The total number of pages available.
- `totalRecords` (integer, optional) — The total number of records across all pages.
- `pageSize` (integer, optional) — The number of records per page.
- `hasNext` (boolean, optional) — Whether a next page is available.
- `hasPrevious` (boolean, optional) — Whether a previous page is available.

### BusinessLinks

Hypermedia links for a business resource.

- `self` (string, optional) — Relative path to the business resource.

## Examples

**Response**

```json
{
  "success": true,
  "message": "Businesses retrieved successfully",
  "traceId": "0HNNKQIN7BJO2:00000024",
  "data": {
    "data": [
      {
        "businessUuid": "019fed1a-3d6e-75d3-a81e-cba3874b0a55",
        "legalName": "Rose Gardens LLC",
        "businessStatus": "Draft",
        "parentReference": "8cfec329267",
        "createdAt": "2026-08-10T19:15:47.694655",
        "lastUpdated": "2026-08-10T19:15:47.694655",
        "_links": {
          "self": "/v2/businesses/019fed1a-3d6e-75d3-a81e-cba3874b0a55"
        }
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 1,
      "totalRecords": 1,
      "pageSize": 1,
      "hasNext": false,
      "hasPrevious": false
    }
  }
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.payabli.com/api/v2/businesses"

querystring = {"limit":"1","page":"1"}

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

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

print(response.json())
```

```javascript
const url = 'https://api-sandbox.payabli.com/api/v2/businesses?limit=1&page=1';
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/v2/businesses?limit=1&page=1"

	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/v2/businesses?limit=1&page=1")

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/v2/businesses?limit=1&page=1")
  .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/v2/businesses?limit=1&page=1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/v2/businesses?limit=1&page=1");
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/v2/businesses?limit=1&page=1")! 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()
```