> 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.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 vendorTo 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`.### RequestPOST [https://api-sandbox.payabli.com/api/Vendor/single/\{entry}](https://api-sandbox.payabli.com/api/Vendor/single/\{entry})```curl CreateVendor
curl -X POST https://api-sandbox.payabli.com/api/Vendor/single/8cfec329267 \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: application/json" \
     -d '{
  "vendorNumber": "1234",
  "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": "<string>",
  "payeeName1": "<string>",
  "payeeName2": "<string>",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "zip": "33139"
}'
``````typescript CreateVendor
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.vendor.addVendor("8cfec329267", {
        vendorNumber: "1234",
        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: "<string>",
        payeeName1: "<string>",
        payeeName2: "<string>",
        paymentMethod: "managed",
        phone: "5555555555",
        remitAddress1: "123 Walnut Street",
        remitAddress2: "Suite 900",
        remitCity: "Miami",
        remitCountry: "US",
        remitState: "FL",
        remitZip: "31113",
        state: "FL",
        vendorStatus: 1,
        zip: "33139",
    });
}
main();

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

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.vendor.add_vendor(
    entry="8cfec329267",
    vendor_number="1234",
    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="<string>",
    payee_name_1="<string>",
    payee_name_2="<string>",
    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",
)

``````java CreateVendor
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiClient;
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) {
        PayabliPayabliApiClient client = PayabliPayabliApiClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.vendor().addVendor(
            "8cfec329267",
            VendorData
                .builder()
                .vendorNumber("1234")
                .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("<string>")
                .payeeName1("<string>")
                .payeeName2("<string>")
                .paymentMethod("managed")
                .phone("5555555555")
                .remitAddress1("123 Walnut Street")
                .remitAddress2("Suite 900")
                .remitCity("Miami")
                .remitCountry("US")
                .remitState("FL")
                .remitZip("31113")
                .state("FL")
                .vendorStatus(1)
                .zip("33139")
                .build()
        );
    }
}
``````ruby CreateVendor
require "payabli"

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

client.vendor.add_vendor(
  entry: "8cfec329267",
  vendor_number: "1234",
  address_1: "123 Ocean Drive",
  address_2: "Suite 400",
  billing_data: {
    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: [{
    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: "<string>",
  payee_name_1: "<string>",
  payee_name_2: "<string>",
  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 CreateVendor
using PayabliPayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Vendor.AddVendorAsync(
            "8cfec329267",
            new VendorData {
                VendorNumber = "1234",
                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 = "<string>",
                PayeeName1 = "<string>",
                PayeeName2 = "<string>",
                PaymentMethod = "managed",
                Phone = "5555555555",
                RemitAddress1 = "123 Walnut Street",
                RemitAddress2 = "Suite 900",
                RemitCity = "Miami",
                RemitCountry = "US",
                RemitState = "FL",
                RemitZip = "31113",
                State = "FL",
                VendorStatus = 1,
                Zip = "33139"
            }
        );
    }

}

``````go CreateVendor
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() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.VendorData{
        VendorNumber: payabli.String(
            "1234",
        ),
        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(
            "<string>",
        ),
        PayeeName1: payabli.String(
            "<string>",
        ),
        PayeeName2: payabli.String(
            "<string>",
        ),
        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,
        ),
        Zip: payabli.String(
            "33139",
        ),
    }
    client.Vendor.AddVendor(
        context.TODO(),
        "8cfec329267",
        request,
    )
}

``````php CreateVendor
<?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(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->vendor->addVendor(
    '8cfec329267',
    new VendorData([
        'vendorNumber' => '1234',
        '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' => '<string>',
        'payeeName1' => '<string>',
        'payeeName2' => '<string>',
        'paymentMethod' => 'managed',
        'phone' => '5555555555',
        'remitAddress1' => '123 Walnut Street',
        'remitAddress2' => 'Suite 900',
        'remitCity' => 'Miami',
        'remitCountry' => 'US',
        'remitState' => 'FL',
        'remitZip' => '31113',
        'state' => 'FL',
        'vendorStatus' => 1,
        'zip' => '33139',
    ]),
);

``````swift CreateVendor
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "vendorNumber": "1234",
  "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": "<string>",
  "payeeName1": "<string>",
  "payeeName2": "<string>",
  "paymentMethod": "managed",
  "phone": "5555555555",
  "remitAddress1": "123 Walnut Street",
  "remitAddress2": "Suite 900",
  "remitCity": "Miami",
  "remitCountry": "US",
  "remitState": "FL",
  "remitZip": "31113",
  "state": "FL",
  "vendorStatus": 1,
  "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
}
```The value returned in `responseData` is the vendor ID, and is used to manage the vendor via the API## Field requirements and validationWhen you create or update a vendor, Payabli validates each field according to the following rules.### General information fieldsThese 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.                             |
| `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.                                     |
| `vendorStatus` | Optional | `1` (Active), `0` (Inactive), or `-99` (Deleted)                  | If provided, must be a recognized value.                        |### Address fieldsAddress 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 addressThese 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 addressThe 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. |### State and country validationThe `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**"Invalid or missing Vendor Number"**:The `vendorNumber` field was left blank or contained only spaces. Provide a non-empty value.**"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 vendorsYou 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 CSVTo 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 e56ce00572.### RequestPOST [https://api-sandbox.payabli.com/api/Import/vendorsForm/\{entry}](https://api-sandbox.payabli.com/api/Import/vendorsForm/\{entry})```curl ImportVendor
curl -X POST https://api-sandbox.payabli.com/api/Import/vendorsForm/8cfec329267 \
     -H "requestToken: <apiKey>" \
     -H "Content-Type: multipart/form-data" \
     -F file=@<file1>
``````typescript ImportVendor
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.import.importVendor("8cfec329267", );
}
main();

``````python ImportVendor
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

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

``````java ImportVendor
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiClient;
import io.github.payabli.api.resources.import_.requests.ImportVendorRequest;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiClient client = PayabliPayabliApiClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.import_().importVendor(
            "8cfec329267",
            ImportVendorRequest
                .builder()
                .build()
        );
    }
}
``````ruby ImportVendor
require "payabli"

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

client.import.import_vendor(entry: "8cfec329267")

``````csharp ImportVendor
using PayabliPayabliApi;
using System.Threading.Tasks;
using System.IO;
using System.Text;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

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

}

``````go ImportVendor
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() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.ImportVendorRequest{
        File: strings.NewReader(
            "",
        ),
    }
    client.Import.ImportVendor(
        context.TODO(),
        "8cfec329267",
        request,
    )
}

``````php ImportVendor
<?php

namespace Example;

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

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

``````swift ImportVendor
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "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 PartnerHub or PayHub.### Response (200)```json
{
  "responseText": "Success",
  "isSuccess": true,
  "pageIdentifier": "null",
  "responseCode": 1,
  "responseData": {
    "added": 26,
    "errors": [
      "errors",
      "errors"
    ],
    "rejected": 2
  }
}
```The responseData object contains the number of records added and rejected. The errors field contains any errors that occurred during the import process.
Next stepsAfter 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.## Manage vendorsYou 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 statusIn vendor endpoints and endpoints that return vendor data, the vendor status field is `VendorStatus`.| Value    | Key |
| -------- | --- |
| Inactive | 0   |
| Active   | 1   |
| Deleted  | -99 |## Enrich vendorsYou 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 resourcesSee these related resources to help you get the most out of Payabli.- **[Entities overview](/guides/platform-entities-overview)** - Understand how entities like organizations, suborganizations, 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