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
Key | Value Example | Description | Required |
---|---|---|---|
name | John Supplies | Vendor full name | โ |
company | Supply Co. LLC | Company name | Optional |
[email protected] | Email address | Optional | |
phone | +1 555-123-4567 | Phone number | Optional |
website | https://www.supplyco.com | Website URL | Optional |
address | 123 Main Street | Street address | Optional |
city | New York | City | Optional |
state | NY | State | Optional |
postcode | 10001 | ZIP code | Optional |
country | US | Country (ISO code) | Optional |
tax_number | 98-7654321 | Vendor tax ID | Optional |
currency | USD | Currency 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>