> 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

# Manage vendors with the API

> Learn how to add and manage vendors with the Payabli API

Vendors are the entities that provide goods or services to paypoints and organizations. They're who gets paid in money out (pay out) transactions. Before you can use vendors in bills and payouts, you must add them. This guide explains how to add and manage vendors using the Payabli API.

> **Note**
>
> Payabli supports payouts to US and Canadian vendors only. International vendors aren't supported, and as a best practice you should avoid adding them in Payabli.

## Create a vendor

To create a vendor record, send a POST request to the `/api/Vendor/single/{entry}` endpoint.

For complete details, see the [API reference](/developers/api-reference/vendor/create-vendor) for this endpoint.

This example creates a new vendor record in the entrypoint `8cfec329267`.

### Request

POST [https://api-sandbox.payabli.com/api/Vendor/single/\{entry}](https://api-sandbox.payabli.com/api/Vendor/single/\{entry})

```curl
curl -X POST https://api-sandbox.payabli.com/api/Vendor/single/8cfec329267 \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: application/json" \
     -d '{
  "vendorNumber": "VEN-123",
  "address1": "123 Ocean Drive",
  "address2": "Suite 400",
  "billingData": {
    "accountNumber": "123123123",
    "bankAccountFunction": 0,
    "bankAccountHolderName": "Gruzya Adventure Outfitters LLC",
    "bankAccountHolderType": "Business",
    "bankName": "Country Bank",
    "id": 123,
    "routingAccount": "123123123",
    "typeAccount": "Checking"
  },
  "city": "Miami",
  "contacts": [
    {
      "contactEmail": "example@email.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    }
  ],
  "country": "US",
  "customerVendorAccount": "A-37622",
  "ein": "12-3456789",
  "email": "example@email.com",
  "internalReferenceId": 123,
  "locationCode": "MIA123",
  "mcc": "7777",
  "name1": "Herman'\''s Coatings and Masonry",
  "name2": "HCM Services",
  "payeeName1": "Herman Martinez",
  "payeeName2": "Herman Coatings",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "issue1099": true,
  "zip": "33139"
}'
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.vendor.addVendor("8cfec329267", {
        vendorNumber: "VEN-123",
        address1: "123 Ocean Drive",
        address2: "Suite 400",
        billingData: {
            accountNumber: "123123123",
            bankAccountFunction: 0,
            bankAccountHolderName: "Gruzya Adventure Outfitters LLC",
            bankAccountHolderType: "Business",
            bankName: "Country Bank",
            id: 123,
            routingAccount: "123123123",
            typeAccount: "Checking",
        },
        city: "Miami",
        contacts: [
            {
                contactEmail: "example@email.com",
                contactName: "Herman Martinez",
                contactPhone: "3055550000",
                contactTitle: "Owner",
            },
        ],
        country: "US",
        customerVendorAccount: "A-37622",
        ein: "12-3456789",
        email: "example@email.com",
        internalReferenceId: 123,
        locationCode: "MIA123",
        mcc: "7777",
        name1: "Herman's Coatings and Masonry",
        name2: "HCM Services",
        payeeName1: "Herman Martinez",
        payeeName2: "Herman Coatings",
        paymentMethod: "managed",
        phone: "5555555555",
        remitAddress1: "123 Walnut Street",
        remitAddress2: "Suite 900",
        remitCity: "Miami",
        remitCountry: "US",
        remitState: "FL",
        remitZip: "31113",
        state: "FL",
        vendorStatus: 1,
        issue1099: true,
        zip: "33139",
    });
}
main();

```

```python
from payabli import payabli, BillingData, Contacts

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.vendor.add_vendor(
    entry="8cfec329267",
    vendor_number="VEN-123",
    address_1="123 Ocean Drive",
    address_2="Suite 400",
    billing_data=BillingData(
        account_number="123123123",
        bank_account_function=0,
        bank_account_holder_name="Gruzya Adventure Outfitters LLC",
        bank_account_holder_type="Business",
        bank_name="Country Bank",
        id=123,
        routing_account="123123123",
        type_account="Checking",
    ),
    city="Miami",
    contacts=[
        Contacts(
            contact_email="example@email.com",
            contact_name="Herman Martinez",
            contact_phone="3055550000",
            contact_title="Owner",
        )
    ],
    country="US",
    customer_vendor_account="A-37622",
    ein="12-3456789",
    email="example@email.com",
    internal_reference_id=123,
    location_code="MIA123",
    mcc="7777",
    name_1="Herman\'s Coatings and Masonry",
    name_2="HCM Services",
    payee_name_1="Herman Martinez",
    payee_name_2="Herman Coatings",
    payment_method="managed",
    phone="5555555555",
    remit_address_1="123 Walnut Street",
    remit_address_2="Suite 900",
    remit_city="Miami",
    remit_country="US",
    remit_state="FL",
    remit_zip="31113",
    state="FL",
    vendor_status=1,
    issue_1099=True,
    zip="33139",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.types.BankAccountHolderType;
import io.github.payabli.api.types.BillingData;
import io.github.payabli.api.types.Contacts;
import io.github.payabli.api.types.TypeAccount;
import io.github.payabli.api.types.VendorData;
import java.util.Arrays;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.vendor().addVendor(
            "8cfec329267",
            VendorData
                .builder()
                .vendorNumber("VEN-123")
                .address1("123 Ocean Drive")
                .address2("Suite 400")
                .billingData(
                    BillingData
                        .builder()
                        .accountNumber("123123123")
                        .bankAccountFunction(0)
                        .bankAccountHolderName("Gruzya Adventure Outfitters LLC")
                        .bankAccountHolderType(BankAccountHolderType.BUSINESS)
                        .bankName("Country Bank")
                        .id(123)
                        .routingAccount("123123123")
                        .typeAccount(TypeAccount.CHECKING)
                        .build()
                )
                .city("Miami")
                .contacts(
                    Arrays.asList(
                        Contacts
                            .builder()
                            .contactEmail("example@email.com")
                            .contactName("Herman Martinez")
                            .contactPhone("3055550000")
                            .contactTitle("Owner")
                            .build()
                    )
                )
                .country("US")
                .customerVendorAccount("A-37622")
                .ein("12-3456789")
                .email("example@email.com")
                .internalReferenceId(123L)
                .locationCode("MIA123")
                .mcc("7777")
                .name1("Herman's Coatings and Masonry")
                .name2("HCM Services")
                .payeeName1("Herman Martinez")
                .payeeName2("Herman Coatings")
                .paymentMethod("managed")
                .phone("5555555555")
                .remitAddress1("123 Walnut Street")
                .remitAddress2("Suite 900")
                .remitCity("Miami")
                .remitCountry("US")
                .remitState("FL")
                .remitZip("31113")
                .state("FL")
                .vendorStatus(1)
                .issue1099(true)
                .zip("33139")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.vendor.add_vendor(
  entry: "8cfec329267",
  vendor_number: "VEN-123",
  address_1: "123 Ocean Drive",
  address_2: "Suite 400",
  billing_data: {
    accountNumber: "123123123",
    bankAccountFunction: 0,
    bankAccountHolderName: "Gruzya Adventure Outfitters LLC",
    bankAccountHolderType: "Business",
    bankName: "Country Bank",
    id: 123,
    routingAccount: "123123123",
    typeAccount: "Checking"
  },
  city: "Miami",
  contacts: [{
    contactEmail: "example@email.com",
    contactName: "Herman Martinez",
    contactPhone: "3055550000",
    contactTitle: "Owner"
  }],
  country: "US",
  customer_vendor_account: "A-37622",
  ein: "12-3456789",
  email: "example@email.com",
  internal_reference_id: 123,
  location_code: "MIA123",
  mcc: "7777",
  name_1: "Herman's Coatings and Masonry",
  name_2: "HCM Services",
  payee_name_1: "Herman Martinez",
  payee_name_2: "Herman Coatings",
  payment_method: "managed",
  phone: "5555555555",
  remit_address_1: "123 Walnut Street",
  remit_address_2: "Suite 900",
  remit_city: "Miami",
  remit_country: "US",
  remit_state: "FL",
  remit_zip: "31113",
  state: "FL",
  vendor_status: 1,
  zip: "33139"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Vendor.AddVendorAsync(
            entry: "8cfec329267",
            request: new VendorData {
                VendorNumber = "VEN-123",
                Address1 = "123 Ocean Drive",
                Address2 = "Suite 400",
                BillingData = new BillingData {
                    AccountNumber = "123123123",
                    BankAccountFunction = 0,
                    BankAccountHolderName = "Gruzya Adventure Outfitters LLC",
                    BankAccountHolderType = BankAccountHolderType.Business,
                    BankName = "Country Bank",
                    Id = 123,
                    RoutingAccount = "123123123",
                    TypeAccount = TypeAccount.Checking
                },
                City = "Miami",
                Contacts = new List<Contacts>(){
                    new Contacts {
                        ContactEmail = "example@email.com",
                        ContactName = "Herman Martinez",
                        ContactPhone = "3055550000",
                        ContactTitle = "Owner"
                    },
                }
                ,
                Country = "US",
                CustomerVendorAccount = "A-37622",
                Ein = "12-3456789",
                Email = "example@email.com",
                InternalReferenceId = 123L,
                LocationCode = "MIA123",
                Mcc = "7777",
                Name1 = "Herman's Coatings and Masonry",
                Name2 = "HCM Services",
                PayeeName1 = "Herman Martinez",
                PayeeName2 = "Herman Coatings",
                PaymentMethod = "managed",
                Phone = "5555555555",
                RemitAddress1 = "123 Walnut Street",
                RemitAddress2 = "Suite 900",
                RemitCity = "Miami",
                RemitCountry = "US",
                RemitState = "FL",
                RemitZip = "31113",
                State = "FL",
                VendorStatus = 1,
                Issue1099 = true,
                Zip = "33139"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() error {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.VendorData{
        VendorNumber: payabli.String(
            "VEN-123",
        ),
        Address1: payabli.String(
            "123 Ocean Drive",
        ),
        Address2: payabli.String(
            "Suite 400",
        ),
        BillingData: &payabli.BillingData{
            AccountNumber: payabli.String(
                "123123123",
            ),
            BankAccountFunction: payabli.Int(
                0,
            ),
            BankAccountHolderName: payabli.String(
                "Gruzya Adventure Outfitters LLC",
            ),
            BankAccountHolderType: payabli.BankAccountHolderTypeBusiness.Ptr(),
            BankName: payabli.String(
                "Country Bank",
            ),
            Id: payabli.Int(
                123,
            ),
            RoutingAccount: payabli.String(
                "123123123",
            ),
            TypeAccount: payabli.TypeAccountChecking.Ptr(),
        },
        City: payabli.String(
            "Miami",
        ),
        Contacts: &payabli.ContactsField{
            &payabli.Contacts{
                ContactEmail: payabli.String(
                    "example@email.com",
                ),
                ContactName: payabli.String(
                    "Herman Martinez",
                ),
                ContactPhone: payabli.String(
                    "3055550000",
                ),
                ContactTitle: payabli.String(
                    "Owner",
                ),
            },
        },
        Country: payabli.String(
            "US",
        ),
        CustomerVendorAccount: payabli.String(
            "A-37622",
        ),
        Ein: payabli.String(
            "12-3456789",
        ),
        Email: payabli.String(
            "example@email.com",
        ),
        InternalReferenceId: payabli.Int64(
            int64(123),
        ),
        LocationCode: payabli.String(
            "MIA123",
        ),
        Mcc: payabli.String(
            "7777",
        ),
        Name1: payabli.String(
            "Herman's Coatings and Masonry",
        ),
        Name2: payabli.String(
            "HCM Services",
        ),
        PayeeName1: payabli.String(
            "Herman Martinez",
        ),
        PayeeName2: payabli.String(
            "Herman Coatings",
        ),
        PaymentMethod: payabli.String(
            "managed",
        ),
        Phone: payabli.String(
            "5555555555",
        ),
        RemitAddress1: payabli.String(
            "123 Walnut Street",
        ),
        RemitAddress2: payabli.String(
            "Suite 900",
        ),
        RemitCity: payabli.String(
            "Miami",
        ),
        RemitCountry: payabli.String(
            "US",
        ),
        RemitState: payabli.String(
            "FL",
        ),
        RemitZip: payabli.String(
            "31113",
        ),
        State: payabli.String(
            "FL",
        ),
        VendorStatus: payabli.Int(
            1,
        ),
        Issue1099: payabli.Bool(
            true,
        ),
        Zip: payabli.String(
            "33139",
        ),
    }
    _, err := client.Vendor.AddVendor(
        context.TODO(),
        "8cfec329267",
        request,
    )
    if err != nil {
        return err
    }
    return nil
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Types\VendorData;
use Payabli\Types\BillingData;
use Payabli\Types\BankAccountHolderType;
use Payabli\Types\TypeAccount;
use Payabli\Types\Contacts;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->vendor->addVendor(
    '8cfec329267',
    new VendorData([
        'vendorNumber' => 'VEN-123',
        'address1' => '123 Ocean Drive',
        'address2' => 'Suite 400',
        'billingData' => new BillingData([
            'accountNumber' => '123123123',
            'bankAccountFunction' => 0,
            'bankAccountHolderName' => 'Gruzya Adventure Outfitters LLC',
            'bankAccountHolderType' => BankAccountHolderType::Business->value,
            'bankName' => 'Country Bank',
            'id' => 123,
            'routingAccount' => '123123123',
            'typeAccount' => TypeAccount::Checking->value,
        ]),
        'city' => 'Miami',
        'contacts' => [
            new Contacts([
                'contactEmail' => 'example@email.com',
                'contactName' => 'Herman Martinez',
                'contactPhone' => '3055550000',
                'contactTitle' => 'Owner',
            ]),
        ],
        'country' => 'US',
        'customerVendorAccount' => 'A-37622',
        'ein' => '12-3456789',
        'email' => 'example@email.com',
        'internalReferenceId' => 123,
        'locationCode' => 'MIA123',
        'mcc' => '7777',
        'name1' => "Herman's Coatings and Masonry",
        'name2' => 'HCM Services',
        'payeeName1' => 'Herman Martinez',
        'payeeName2' => 'Herman Coatings',
        'paymentMethod' => 'managed',
        'phone' => '5555555555',
        'remitAddress1' => '123 Walnut Street',
        'remitAddress2' => 'Suite 900',
        'remitCity' => 'Miami',
        'remitCountry' => 'US',
        'remitState' => 'FL',
        'remitZip' => '31113',
        'state' => 'FL',
        'vendorStatus' => 1,
        'issue1099' => true,
        'zip' => '33139',
    ]),
);

```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "vendorNumber": "VEN-123",
  "address1": "123 Ocean Drive",
  "address2": "Suite 400",
  "billingData": [
    "accountNumber": "123123123",
    "bankAccountFunction": 0,
    "bankAccountHolderName": "Gruzya Adventure Outfitters LLC",
    "bankAccountHolderType": "Business",
    "bankName": "Country Bank",
    "id": 123,
    "routingAccount": "123123123",
    "typeAccount": "Checking"
  ],
  "city": "Miami",
  "contacts": [
    [
      "contactEmail": "example@email.com",
      "contactName": "Herman Martinez",
      "contactPhone": "3055550000",
      "contactTitle": "Owner"
    ]
  ],
  "country": "US",
  "customerVendorAccount": "A-37622",
  "ein": "12-3456789",
  "email": "example@email.com",
  "internalReferenceId": 123,
  "locationCode": "MIA123",
  "mcc": "7777",
  "name1": "Herman's Coatings and Masonry",
  "name2": "HCM Services",
  "payeeName1": "Herman Martinez",
  "payeeName2": "Herman Coatings",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "issue1099": true,
  "zip": "33139"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Vendor/single/8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

A successful request returns a JSON response. The IdVendor is returned as `responseData`.

### Response (200)

```json
{
  "responseText": "Success",
  "isSuccess": true,
  "responseCode": 1,
  "responseData": 3890
}
```

> **Check**
>
> The value returned in `responseData` is the vendor ID, and is used to manage the vendor via the API

## Field requirements and validation

When you create or update a vendor, Payabli validates each field according to the following rules.

### General information fields

These fields identify the vendor and apply to every create or update request.

| Field          | Required | Format                                                            | Notes                                                                                                                                                                |
| -------------- | -------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `vendorNumber` | Required | Any text, can't be blank                                          | Must be unique within the paypoint, regardless of `locationCode`.                                                                                                    |
| `name1`        | Required | Letters, numbers, spaces, and: `. , ' & ( ) # - : /`. ASCII only. | Primary business or legal name. Can't be blank.                                                                                                                      |
| `name2`        | Optional | Same as `name1`                                                   | Alternate or trade name. Only validated if provided.                                                                                                                 |
| `email`        | Optional | Valid email format                                                | Only validated if provided.                                                                                                                                          |
| `phone`        | Optional | Valid phone number, digits only                                   | Can't contain non-digit characters like hyphens or parentheses.                                                                                                      |
| `ein`          | Optional | Nine digits as `XX-XXXXXXX`                                       | Only validated if provided.                                                                                                                                          |
| `issue1099`    | Optional | `true` or `false`                                                 | Whether a 1099 tax form is issued to the vendor. Defaults to `false` when you create a vendor. If you leave it out of an update, the vendor keeps its current value. |
| `vendorStatus` | Optional | `1` (Active), `0` (Inactive), or `-99` (Deleted)                  | If provided, must be a recognized value.                                                                                                                             |

### Address fields

Address fields follow an all-or-nothing rule: if you provide any address field, then all required address fields must be present and valid. You can't submit a partial address. This applies to the primary address and remittance address independently. You can provide one without the other, but each group must be complete.

#### Primary address

These fields make up the vendor's main business address.

| Field      | Required    | Format                                                                                           |
| ---------- | ----------- | ------------------------------------------------------------------------------------------------ |
| `address1` | Conditional | Letters, numbers, spaces, and: `. , # ' - & /`                                                   |
| `address2` | Optional    | Same as `address1`                                                                               |
| `city`     | Conditional | Same as `address1`                                                                               |
| `state`    | Conditional | Valid US state (`CA`, `NY`) or Canadian province (`ON`, `BC`) abbreviation                       |
| `zip`      | Conditional | US: five digits (`12345`) or ZIP+4 (`12345-6789`). Spaces are converted to dashes automatically. |
| `country`  | Optional    | `US` or `CA` only. Defaults to `US` if not provided.                                             |

#### Remittance address

The remittance address is where payment should be sent when it's different from the primary address. The same validation rules apply.

| Field           | Required                                                       |
| --------------- | -------------------------------------------------------------- |
| `remitAddress1` | Conditional                                                    |
| `remitAddress2` | Optional                                                       |
| `remitCity`     | Conditional                                                    |
| `remitState`    | Conditional                                                    |
| `remitZip`      | Conditional                                                    |
| `remitCountry`  | Optional. `US` or `CA` only. Defaults to `US` if not provided. |

#### PO Box addresses

When the address is a PO Box, put only the PO Box on the first address line and the rest of the address on the second line. USPS address validation drops detail that shares a line with a PO Box, which can leave a check undeliverable at a shared PO Box.

For the full address `PO Box 29652 Dept# 880662`, send:

| Field                         | Value          |
| ----------------------------- | -------------- |
| `address1` or `remitAddress1` | `PO Box 29652` |
| `address2` or `remitAddress2` | `Dept# 880662` |

### State and country validation

The `state` value is validated against the `country` value:

| Country value        | State validation                                                            |
| -------------------- | --------------------------------------------------------------------------- |
| `US` or not provided | Must be a valid US state abbreviation, such as `TX`, `FL`, or `CA`          |
| `CA`                 | Must be a valid Canadian province abbreviation, such as `ON`, `QC`, or `BC` |
| Any other value      | Rejected with an invalid country code error                                 |

### Common validation errors

#### Error messages and how to resolve them

**"Invalid or missing Vendor Number"**:The `vendorNumber` field was left blank or contained only spaces. Provide a non-empty value.

**"Duplicated vendor under entry"**:Another vendor in the paypoint already uses this `vendorNumber`. This check includes inactive vendors and vendors with a different `locationCode`. Use a different `vendorNumber`, or update the existing vendor. The API returns error code `3436`.

**"Invalid Vendor Name"**:The `name1` field was blank or contained characters that aren't permitted. Remove special characters like `@`, `!`, `$`, `%`, `^`, `*`, `+`, `=`, `[`, `]`, or non-ASCII characters.

**"Missing Address Line 1"**:You provided some address fields (like `city` or `zip`) but omitted `address1`. Either provide a complete address or remove all address fields.

**"Missing City"**:`address1` was provided but `city` was blank. All four fields (`address1`, `city`, `state`, and `zip`) must be supplied together.

**"Missing or invalid State / Province"**:The `state` field was blank, or it doesn't match a recognized US state or Canadian province abbreviation.

**"Missing ZIP / Postal Code"**:`address1` was provided but `zip` was blank. Provide a valid ZIP code alongside the other required fields.

**"Invalid country code"**:The `country` field contains a value other than `US` or `CA`.

**"Invalid EIN"**:The `ein` value doesn't match the `XX-XXXXXXX` format (two digits, a dash, then seven digits).

**"Invalid email address"**:The `email` value isn't a properly formatted email address.

**"Invalid phone number"**:The `phone` value doesn't match a recognized phone number format.

**"Invalid vendor status"**:The `vendorStatus` value isn't one of the accepted options: `1`, `0`, or `-99`.

**"Invalid characters in name or address"**:A name or address field contains characters that aren't permitted. See the allowed character lists in the tables above.

## Import vendors

You can import a list of vendors into Payabli using the API. This is useful if you have many vendors to add at once, or if you want to automate the process. Before you get started, download the example CSV file and open it with the editor of your choice. Use it as an example to help you build your import file.

Download CSV

To set a vendor's 1099 flag, include the optional `issue1099` column with `true` or `false`. A blank value is `false`.

To import a list of vendors, send a POST request to the /api/Import/vendorsForm/\{entrypoint} endpoint, with an attached CSV file.

This example imports vendorImport.csv for the entrypoint `8cfec329267`.

### Request

POST [https://api-sandbox.payabli.com/api/Import/vendorsForm/\{entry}](https://api-sandbox.payabli.com/api/Import/vendorsForm/\{entry})

```curl
curl -X POST https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267 \
     -H "Authorization: Bearer <token>" \
     -H "Content-Type: multipart/form-data" \
     -F file=@<file1>
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";
import * as fs from "fs";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.import.importVendor("8cfec329267", {
        file: fs.createReadStream("/path/to/your/file"),
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.import_.import_vendor(
    entry="8cfec329267",
    file="example_file",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.import_.requests.ImportVendorRequest;
import java.io.File;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.import_().importVendor(
            "8cfec329267",
            new File("path/to/file"),
            ImportVendorRequest
                .builder()
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.import.import_vendor(
  entry: "8cfec329267",
  file: "/path/to/your/file"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;
using System.IO;
using System.Text;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Import.ImportVendorAsync(
            entry: "8cfec329267",
            request: new ImportVendorRequest {
                File = new FileParameter(){
                    Stream = new MemoryStream(Encoding.UTF8.GetBytes("[bytes]"))
                }
            }
        );
    }

}

```

```go
package example

import (
    context "context"
    strings "strings"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() error {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ImportVendorRequest{
        File: strings.NewReader(
            "",
        ),
    }
    _, err := client.Import.ImportVendor(
        context.TODO(),
        "8cfec329267",
        request,
    )
    if err != nil {
        return err
    }
    return nil
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Import\Requests\ImportVendorRequest;
use Payabli\Utils\File;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->import->importVendor(
    '8cfec329267',
    new ImportVendorRequest([
        'file' => File::createFromString("example_file", "example_file"),
    ]),
);

```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
]
let parameters = [
  [
    "name": "file",
    "fileName": "<file1>"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

A successful request returns a JSON response with the number of added and rejected records, and any errors. The imported data is now available for use, and you can confirm by checking the Payabli Portal.

The import rejects a line with the error `Duplicated vendor under entry` if another vendor in the paypoint already uses its vendor number, even under a different location code.

### Response (200)

```json
{
  "responseText": "Success",
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseCode": 1,
  "responseData": {
    "added": 26,
    "errors": [
      "errors",
      "errors"
    ],
    "rejected": 2
  }
}
```

> **Check**
>
> The responseData object contains the number of records added and rejected. The errors field contains any errors that occurred during the import process.

Next steps

After you import vendors, you can manage them with the API. For example, you can update vendor information, manage payment methods, and create bills associated with specific vendors.

## List vendors

To retrieve a list of vendors for an entrypoint, send a GET request to `/api/Query/vendors/{entry}`. For organization-wide results, use `/api/Query/vendors/org/{orgId}`.

### Request

GET [https://api-sandbox.payabli.com/api/Query/vendors/\{entry}](https://api-sandbox.payabli.com/api/Query/vendors/\{entry})

```curl
curl -G https://api-sandbox.payabli.com/api/Query/vendors/8cfec329267 \
     -H "Authorization: Bearer <token>" \
     -d fromRecord=251 \
     -d limitRecord=0 \
     -d sortBy=desc(field_name)
```

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        bearerAuth: {
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET",
        },
    });
    await client.query.listVendors("8cfec329267", {
        fromRecord: 251,
        limitRecord: 0,
        sortBy: "desc(field_name)",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.query.list_vendors(
    entry="8cfec329267",
    from_record=251,
    limit_record=0,
    sort_by="desc(field_name)",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.query.requests.ListVendorsRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.query().listVendors(
            "8cfec329267",
            ListVendorsRequest
                .builder()
                .fromRecord(251)
                .limitRecord(0)
                .sortBy("desc(field_name)")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.query.list_vendors(
  entry: "8cfec329267",
  from_record: 251,
  limit_record: 0,
  sort_by: "desc(field_name)"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Query.ListVendorsAsync(
            entry: "8cfec329267",
            request: new ListVendorsRequest {
                FromRecord = 251,
                LimitRecord = 0,
                SortBy = "desc(field_name)"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() error {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ListVendorsRequest{
        FromRecord: payabli.Int(
            251,
        ),
        LimitRecord: payabli.Int(
            0,
        ),
        SortBy: payabli.String(
            "desc(field_name)",
        ),
    }
    _, err := client.Query.ListVendors(
        context.TODO(),
        "8cfec329267",
        request,
    )
    if err != nil {
        return err
    }
    return nil
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Query\Requests\ListVendorsRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->query->listVendors(
    '8cfec329267',
    new ListVendorsRequest([
        'fromRecord' => 251,
        'limitRecord' => 0,
        'sortBy' => 'desc(field_name)',
    ]),
);

```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/vendors/8cfec329267?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")! 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()
```

The response returns matching vendors in `Records` and aggregate totals in `Summary`. Use `Summary.totalRecords` and `Summary.totalPages` with the `fromRecord` and `limitRecord` query parameters to page through results.

### Response (200)

```json
{
  "Records": [
    {
      "VendorNumber": "VEN-123",
      "Name1": "Herman's Coatings",
      "Name2": "Herman's Coating Supply Company, LLC",
      "EIN": "123456789",
      "Phone": "2125551234",
      "Email": "example@email.com",
      "RemitEmail": null,
      "Address1": "123 Ocean Drive",
      "Address2": "Suite 400",
      "City": "Bristol",
      "State": "GA",
      "Zip": "31113",
      "Country": "US",
      "Mcc": "7777",
      "LocationCode": "LOC123",
      "Issue1099": false,
      "Contacts": [
        {
          "ContactName": "Eric Martinez",
          "ContactEmail": "eric@martinezcoatings.com",
          "ContactTitle": "Owner",
          "ContactPhone": "5555555555"
        }
      ],
      "BillingData": {
        "id": 123456,
        "nickname": "Main Checking Account",
        "bankName": "Example Bank",
        "routingAccount": "123456789",
        "accountNumber": "9876543210",
        "typeAccount": "Checking",
        "bankAccountHolderName": "John Doe",
        "bankAccountHolderType": "Business",
        "bankAccountFunction": 2,
        "verified": true,
        "status": 1,
        "services": [],
        "default": true,
        "accountId": "bank-account-001"
      },
      "PaymentMethod": null,
      "VendorStatus": 1,
      "VendorId": 456,
      "EnrollmentStatus": null,
      "Summary": {
        "ActiveBills": 2,
        "PendingBills": 4,
        "InTransitBills": 3,
        "PaidBills": 18,
        "OverdueBills": 1,
        "ApprovedBills": 5,
        "DisapprovedBills": 1,
        "TotalBills": 34,
        "ActiveBillsAmount": 1250.75,
        "PendingBillsAmount": 2890.5,
        "InTransitBillsAmount": 1675.25,
        "PaidBillsAmount": 15420.8,
        "OverdueBillsAmount": 425,
        "ApprovedBillsAmount": 3240.9,
        "DisapprovedBillsAmount": 180,
        "TotalBillsAmount": 25083.2
      },
      "PaypointLegalname": "Sunshine Services, LLC",
      "PaypointId": 3040,
      "PaypointDbaname": "Sunshine Gutters",
      "PaypointEntryname": "d193cf9a46",
      "ParentOrgName": "PropertyManager Pro",
      "ParentOrgId": 1000,
      "CreatedDate": "2022-07-01T15:00:01Z",
      "LastUpdated": "2022-07-01T15:00:01Z",
      "remitAddress1": "123 Walnut Street",
      "remitAddress2": "Suite 900",
      "remitCity": "Miami",
      "remitState": "FL",
      "remitZip": "31113",
      "remitCountry": "US",
      "payeeName1": "payeeName1",
      "payeeName2": "payeeName2",
      "customField1": "",
      "customField2": "",
      "customerVendorAccount": "123-456",
      "InternalReferenceId": 1000000,
      "PaymentPortalUrl": "https://greenfield-landscaping.com/pay",
      "CardAccepted": "yes",
      "AchAccepted": "unable to determine",
      "CheckAccepted": "no",
      "EnrichmentStatus": "fully_enriched",
      "EnrichedBy": "web_search",
      "EnrichedAt": "2026-03-05T14:22:10Z",
      "EnrichmentId": "enrich-3890-a1b2c3d4",
      "additionalData": null,
      "externalPaypointID": "Paypoint-100",
      "StoredMethods": [],
      "VendorStatusLabel": "Active"
    }
  ],
  "Summary": {
    "pageidentifier": "null",
    "pageSize": 20,
    "totalAmount": 200,
    "totalNetAmount": 77.22,
    "totalPages": 1,
    "totalRecords": 1
  }
}
```

Filter and sort results with query parameters — for example, `vendorNumber(eq)=VEN-123`, `name(ct)=supply`, or `status(in)=1|0` (the status filter field is `status`, not the record's `VendorStatus`). The full list of filterable fields is on the [List vendors by paypoint](/developers/api-reference/vendor/get-list-of-vendors-for-entrypoint) API reference; for operator syntax and pagination, see the [Filters and conditions reference](/guides/pay-ops-reporting-overview#filters-and-conditions-reference).

## Vendor payment history

To show a vendor's payment history, query the payouts endpoint filtered by vendor. Send a GET request to `/api/Query/payouts/{entry}` with a `vendorNumber` or `vendorId` filter:

```bash
curl -X GET "https://api.payabli.com/api/Query/payouts/$ENTRY_POINT?vendorNumber(eq)=VEN-123" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

Each record carries a numeric payout transaction status. See the [Pay Out status reference](/guides/pay-out-status-reference#payout-transaction-statuses) to decode it when rendering history.

## Manage vendors

You can use the API to manage existing vendors, including updating their information, deleting them, and retrieving their details. See these endpoint references for more information:

* [Update Vendor](/developers/api-reference/vendor/update-vendor)
* [Delete Vendor](/developers/api-reference/vendor/delete-vendor)
* [Get Vendor](/developers/api-reference/vendor/get-vendor)

## Vendor status

In vendor endpoints and endpoints that return vendor data, the vendor status field is `VendorStatus`.

| Value    | Key |
| -------- | --- |
| Inactive | 0   |
| Active   | 1   |
| Deleted  | -99 |

Inactive vendors keep their vendor number, so no other vendor in the paypoint can use it. Deleted vendors release their vendor number.

## Enrich vendors

You can use AI-powered vendor enrichment to automatically gather payment acceptance info and contact information for your vendors. Enrichment scans invoices and searches the web to fill in vendor details, reducing manual research. See [Vendor enrichment](/guides/pay-out-vendor-enrichment-overview) for an overview, or [Enrich vendors with the API](/guides/pay-out-developer-vendor-enrichment-integrate) for implementation details.

## Related resources

See these related resources to help you get the most out of Payabli.

#### Related topics

* **[Entities overview](/guides/platform-entities-overview)** - Understand how entities like organizations, sub-organizations, paypoints, customers, and vendors work in Payabli
* **[Vendor enrichment](/guides/pay-out-vendor-enrichment-overview)** - Automate vendor payment research with AI-powered enrichment
* **[Enrich vendors with the API](/guides/pay-out-developer-vendor-enrichment-integrate)** - Use the API to enrich vendors with payment acceptance info and contact information