Vendors API


The Vendors API lets you manage vendor (supplier) records in EverAccounting. You can:

  • Retrieve a list of vendors
  • Get details for a single vendor
  • Create new vendors
  • Update existing vendor records
  • Delete vendors

All requests require authentication with a JWT token.

Base URL

yoursite.com/wp-json/eac/v1/

Get Vendor List

Retrieve a list of all vendors.

Method: GET
URL: yoursite.com/wp-json/eac/v1/vendors/
Headers:
  Authorization: Bearer <JWT Token>

Response Example

[
  {
    "id": 10,
    "name": "John Supplies",
    "company": "Supply Co. LLC",
    "email": "[email protected]",
    "phone": "+1 555-123-4567",
    "website": "https://www.supplyco.com",
    "address": "123 Main Street",
    "city": "New York",
    "state": "NY",
    "postcode": "10001",
    "country": "US",
    "tax_number": "98-7654321",
    "currency": "USD",
    "user_id": null,
    "uuid": null,
    "created_via": "manual",
    "date_updated": false,
    "date_created": "2025-02-15T10:00:00"
  },
  {
    "id": 11,
    "name": "Acme Parts",
    "company": "Acme Inc.",
    "email": "[email protected]",
    "phone": "+1 555-987-6543",
    "website": "https://www.acme.com",
    "address": "456 Industrial Ave",
    "city": "Chicago",
    "state": "IL",
    "postcode": "60601",
    "country": "US",
    "tax_number": "12-3456789",
    "currency": "USD",
    "user_id": null,
    "uuid": null,
    "created_via": "manual",
    "date_updated": false,
    "date_created": "2025-02-15T11:00:00"
  }
]

Get Single Vendor by ID

Retrieve details for a specific vendor.

Request

Method: GET
URL: yoursite.com/wp-json/eac/v1/vendors/:id
Path Parameters:
  id โ€” The Vendor ID (required)
Headers:
  Authorization: Bearer <JWT Token>

Response Example

{
  "id": 10,
  "name": "John Supplies",
  "company": "Supply Co. LLC",
  "email": "[email protected]",
  "phone": "+1 555-123-4567",
  "website": "https://www.supplyco.com",
  "address": "123 Main Street",
  "city": "New York",
  "state": "NY",
  "postcode": "10001",
  "country": "US",
  "tax_number": "98-7654321",
  "currency": "USD",
  "user_id": null,
  "uuid": null,
  "created_via": "manual",
  "date_updated": false,
  "date_created": "2025-02-15T10:00:00"
}

Create New Vendor

Add a new vendor to the system.

Request

Method: POST
URL: yoursite.com/wp-json/eac/v1/vendors/
Headers:
  Authorization: Bearer <JWT Token>
  Content-Type: application/json

Body Parameters

KeyValue ExampleDescriptionRequired
nameJohn SuppliesVendor full nameโœ”
companySupply Co. LLCCompany nameOptional
email[email protected]Email addressOptional
phone+1 555-123-4567Phone numberOptional
websitehttps://www.supplyco.comWebsite URLOptional
address123 Main StreetStreet addressOptional
cityNew YorkCityOptional
stateNYStateOptional
postcode10001ZIP codeOptional
countryUSCountry (ISO code)Optional
tax_number98-7654321Vendor tax IDOptional
currencyUSDCurrency code (ISO 4217)โœ”

Example Request Body

{
  "name": "John Supplies",
  "company": "Supply Co. LLC",
  "email": "[email protected]",
  "phone": "+1 555-123-4567",
  "website": "https://www.supplyco.com",
  "address": "123 Main Street",
  "city": "New York",
  "state": "NY",
  "postcode": "10001",
  "country": "US",
  "tax_number": "98-7654321",
  "currency": "USD"
}

Response Example

{
  "id": 12,
  "name": "John Supplies",
  "company": "Supply Co. LLC",
  "email": "[email protected]",
  "phone": "+1 555-123-4567",
  "website": "https://www.supplyco.com",
  "address": "123 Main Street",
  "city": "New York",
  "state": "NY",
  "postcode": "10001",
  "country": "US",
  "tax_number": "98-7654321",
  "currency": "USD",
  "user_id": null,
  "uuid": null,
  "created_via": "manual",
  "date_updated": false,
  "date_created": "2025-02-15T12:00:00"
}

Update Existing Vendor

Modify vendor details.

Request

Method: POST
URL: yoursite.com/wp-json/eac/v1/vendors/:id
Path Parameters:
  id โ€” The Vendor ID (required)
Headers:
  Authorization: Bearer <JWT Token>
  Content-Type: application/json

Example Request Body

{
  "name": "Acme Parts",
  "company": "Acme Inc.",
  "email": "[email protected]",
  "phone": "+1 555-987-6543",
  "website": "https://www.acme.com",
  "address": "456 Industrial Ave",
  "city": "Chicago",
  "state": "IL",
  "postcode": "60601",
  "country": "US",
  "tax_number": "12-3456789",
  "currency": "USD"
}

Response Example

{
  "id": 11,
  "name": "Acme Parts",
  "company": "Acme Inc.",
  "email": "[email protected]",
  "phone": "+1 555-987-6543",
  "website": "https://www.acme.com",
  "address": "456 Industrial Ave",
  "city": "Chicago",
  "state": "IL",
  "postcode": "60601",
  "country": "US",
  "tax_number": "12-3456789",
  "currency": "USD",
  "user_id": null,
  "uuid": null,
  "created_via": "manual",
  "date_updated": "2025-02-15T13:00:00",
  "date_created": "2025-02-15T11:00:00"
}

Delete Vendor

Remove a vendor from the system.

Request

Method: DELETE
URL: yoursite.com/wp-json/eac/v1/vendors/:id
Path Parameters:
  id โ€” The Vendor ID (required)
Headers:
  Authorization: Bearer <JWT Token>

Response Example

{
  "deleted": true,
  "previous": {
    "id": 10,
    "name": "John Supplies",
    "company": "Supply Co. LLC",
    "email": "[email protected]",
    "phone": "+1 555-123-4567",
    "website": "https://www.supplyco.com",
    "address": "123 Main Street",
    "city": "New York",
    "state": "NY",
    "postcode": "10001",
    "country": "US",
    "tax_number": "98-7654321",
    "currency": "USD",
    "date_created": "2025-02-15T10:00:00"
  }
}

Error Handling

  • 400 Bad Request โ€“ Missing or invalid parameters.
  • 401 Unauthorized โ€“ Invalid or missing JWT token.
  • 404 Not Found โ€“ Vendor not found.
  • 500 Internal Server Error โ€“ Server issue.

Security & Authentication

All endpoints require a valid JWT token. Log in to EverAccounting to generate a token, and include it in the Authorization header:

Authorization: Bearer <JWT Token>


โ† Previous
Next โ†’