> For the complete documentation index, see [llms.txt](https://help.alternativepayments.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.alternativepayments.io/getting-started/accounts-payable-api/vendors.md).

# Vendors

Vendors represent entities that your organization pays. They are the Accounts Payable equivalent of Customers in the Accounts Receivable API.

## Endpoints

| Method | Path                                              | Description                         |
| ------ | ------------------------------------------------- | ----------------------------------- |
| POST   | `/vendors`                                        | Create a vendor                     |
| GET    | `/vendors`                                        | List vendors (paginated)            |
| GET    | `/vendors/{id}`                                   | Get vendor by ID                    |
| PATCH  | `/vendors/{id}`                                   | Update vendor fields                |
| POST   | `/vendors/{id}/deactivate`                        | Deactivate a vendor                 |
| POST   | `/vendors/{id}/reactivate`                        | Reactivate a vendor                 |
| GET    | `/vendors/{id}/bank-account`                      | Get vendor bank account             |
| POST   | `/vendors/{id}/bank-account`                      | Add or update vendor bank account   |
| POST   | `/vendors/{id}/data-request`                      | Send vendor data collection request |
| GET    | `/vendors/{id}/data-requests`                     | List vendor data requests           |
| POST   | `/vendors/{id}/data-requests/{request_id}/resend` | Resend a data request               |

***

## Create Vendor

```
POST /vendors
```

Creates a new vendor. Optionally include bank account details inline.

### Request Body

```json
{
  "name": "Acme Corp",
  "email": "billing@acme.com",
  "phone": "+1-555-0100",
  "category": "Software",
  "tax_id": "12-3456789",
  "street_address": "123 Main St",
  "city": "New York",
  "state": "NY",
  "postal_code": "10001",
  "country": "US",
  "bank_account": {
    "bank_name": "Chase",
    "routing_number": "021000021",
    "account_number": "123456789",
    "account_type": "checking"
  }
}
```

| Field            | Type   | Required | Description                                                                                                                                             |
| ---------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`           | string | Yes      | Vendor display name                                                                                                                                     |
| `email`          | string | No       | Vendor contact email                                                                                                                                    |
| `phone`          | string | No       | Vendor phone number                                                                                                                                     |
| `category`       | string | No       | Vendor category. Must be one of: `Software`, `Hardware`, `Services`, `Utilities`, `Rent`, `Insurance`, `Telecommunications`, `Office Supplies`, `Other` |
| `tax_id`         | string | No       | Tax identification number                                                                                                                               |
| `street_address` | string | No       | Street address                                                                                                                                          |
| `city`           | string | No       | City                                                                                                                                                    |
| `state`          | string | No       | State/province code                                                                                                                                     |
| `postal_code`    | string | No       | Postal/ZIP code                                                                                                                                         |
| `country`        | string | No       | 2-letter ISO country code (e.g. `US`, `CA`)                                                                                                             |
| `bank_account`   | object | No       | Inline bank account creation                                                                                                                            |

### Response (201 Created)

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Acme Corp",
  "email": "billing@acme.com",
  "phone": "+1-555-0100",
  "is_active": true,
  "category": "Software",
  "tax_id": "12-3456789",
  "street_address": "123 Main St",
  "city": "New York",
  "state": "NY",
  "postal_code": "10001",
  "country": "US",
  "origin": "manual",
  "created_at": "2026-04-01T00:00:00Z",
  "updated_at": "2026-04-01T00:00:00Z"
}
```

***

## List Vendors

```
GET /vendors
```

Returns a paginated list of vendors.

### Query Parameters

Standard pagination parameters (`limit`, `after`, `before`).

### Response (200 OK)

```json
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Acme Corp",
      "email": "billing@acme.com",
      "is_active": true,
      "origin": "manual",
      "created_at": "2026-04-01T00:00:00Z",
      "updated_at": "2026-04-01T00:00:00Z"
    }
  ],
  "has_next_page": false,
  "has_previous_page": false,
  "start_cursor": "abc123",
  "end_cursor": "abc123"
}
```

***

## Get Vendor

```
GET /vendors/{id}
```

Returns vendor details by ID.

### Response (200 OK)

Same shape as the vendor object in the Create Vendor response.

***

## Update Vendor

```
PATCH /vendors/{id}
```

Updates one or more vendor fields. Only include fields you want to change.

### Request Body

```json
{
  "name": "Acme Corp International",
  "email": "ap@acme.com"
}
```

All fields are optional. Only provided fields are updated.

***

## Deactivate / Reactivate Vendor

```
POST /vendors/{id}/deactivate
POST /vendors/{id}/reactivate
```

Toggles vendor active status. Deactivated vendors cannot receive new bills or payments.

### Response (200 OK)

```json
{
  "vendor_id": "550e8400-e29b-41d4-a716-446655440000",
  "is_active": false
}
```

***

## Get Vendor Bank Account

```
GET /vendors/{id}/bank-account
```

Returns the vendor's bank account details. Account number is masked (last 4 digits only).

### Response (200 OK)

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "bank_name": "Chase",
  "account_mask": "****6789",
  "account_type": "checking",
  "payment_method_id": "550e8400-e29b-41d4-a716-446655440002"
}
```

***

## Add/Update Vendor Bank Account

```
POST /vendors/{id}/bank-account
```

Creates or replaces the vendor's bank account.

### Request Body

```json
{
  "bank_name": "Chase",
  "routing_number": "021000021",
  "account_number": "123456789",
  "account_type": "checking"
}
```

| Field            | Type   | Required | Description             |
| ---------------- | ------ | -------- | ----------------------- |
| `bank_name`      | string | Yes      | Bank name               |
| `routing_number` | string | Yes      | ABA routing number      |
| `account_number` | string | Yes      | Account number          |
| `account_type`   | string | Yes      | `checking` or `savings` |

***

## Vendor Data Requests

Send a self-service data collection link to a vendor so they can submit their banking and tax information directly.

### Create Data Request

```
POST /vendors/{id}/data-request
```

### List Data Requests

```
GET /vendors/{id}/data-requests
```

### Resend Data Request

```
POST /vendors/{id}/data-requests/{request_id}/resend
```

### Data Request Response

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440003",
  "vendor_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "requested",
  "created_at": "2026-04-01T00:00:00Z",
  "expires_at": "2026-04-15T00:00:00Z",
  "submitted_at": null
}
```

**Data Request Statuses:** `requested`, `complete`, `email_failed`, `expired`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.alternativepayments.io/getting-started/accounts-payable-api/vendors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
