This section explains how to manage customer data using the EverAccounting API. API calls allow you to perform operations such as retrieving customer details, creating new customers, updating existing records, and deleting customers. All API requests require Authorization via a JWT token.
Base URL
yoursite.com/wp-json/eac/v1/
Get Customer List
Retrieve a list of all customers.
Request
Method: GET
URL: yoursite.com/wp-json/eac/v1/customers/
Headers:
Authorization: Bearer <JWT Token>
Response
{
"id": 16,
"name": "Myra Goff",
"company": "Marquez Wilson Trading",
"email": "[email protected]",
"phone": "+1 (735) 973-5995",
"website": "https://www.zirol.tv",
"address": null,
"city": "Voluptates et optio",
"state": "Adipisci hic quaerat",
"postcode": "Inventore dolore fug",
"country": "HN",
"tax_number": "321",
"currency": "USD",
"user_id": null,
"uuid": null,
"created_via": "manual",
"date_updated": false,
"date_created": "2025-01-09T04:14:10"
},
{
"id": 15,
"name": "Gisela Doyle",
"company": "Wynn and Rollins Trading",
"email": "[email protected]",
"phone": "+1 (841) 691-4052",
"website": "https://www.fekunekanomuta.biz",
"address": null,
"city": "Ab velit est id dol",
"state": "Rerum adipisicing co",
"postcode": "Aut eum labore exerc",
"country": "CK",
"tax_number": "580",
"currency": "EUR",
"user_id": null,
"uuid": null,
"created_via": "manual",
"date_updated": false,
"date_created": "2025-01-09T04:14:06"
}
Get Single Customer by ID
Retrieve details for a specific customer.
Request
Method: GET
URL: yoursite.com/wp-json/eac/v1/customers/:id
Path Parameters
id: The Customer ID (required)
Headers:
Authorization: Bearer <JWT Token>
Response
{
"id": 3,
"name": "John Doe",
"company": "Arj Company LTD",
"email": "[email protected]",
"phone": "",
"website": "",
"address": null,
"city": "Florida",
"state": "Florida",
"postcode": "10001",
"country": "US",
"tax_number": "",
"currency": "USD",
"user_id": null,
"uuid": null,
"created_via": "manual",
"date_updated": false,
"date_created": "2025-01-09T04:10:52"
}
Create New Customer
Add a new customer record to the database.
Request
Method: POST
URL: yoursite.com/wp-json/eac/v1/customers/
Headers:
Authorization: Bearer <JWT Token>
Request Body Parameters:
Key | Value | Description |
name | Customer’s Full Name | Required |
company | Company Name | Optional |
Customer Email Address | Optional | |
phone | Customer Phone Number | Optional |
website | Website URL | Optional |
address | Customer Address | Optional |
city | City | Optional |
state | State | Optional |
postcode | Post Code | Optional |
country | Country | Optional |
tax_number | TAX-Number | Optional |
currency | Current Code | Required |
Example Response
{
"id": 17,
"name": "New Customer",
"company": "Company Name",
"email": "[email protected]",
"phone": "+1 234 567 890",
"website": "https://www.customerwebsite.com",
"address": "123 Street",
"city": "CityName",
"state": "StateName",
"postcode": "12345",
"country": "US",
"tax_number": "123456789",
"currency": "USD",
"user_id": null,
"uuid": null,
"created_via": "manual",
"date_updated": false,
"date_created": "2025-02-11T05:00:00"
}
Update Existing Customer
Modify the information of an existing customer.
Request
Method: POST
URL: yoursite.com/wp-json/eac/v1/customers/
Path Parameters:
id: The Customer ID (required)
Headers:
Authorization: Bearer <JWT Token>
Request Body Parameters:
(Provide any fields you wish to update. All optional fields are allowed for modification.)
Key | Value |
name | Customer’s Full Name |
company | Company Name |
Customer Email Address | |
phone | Customer Phone Number |
website | Website URL |
address | Customer Address |
city | City |
state | State |
postcode | Post Code |
country | Country |
tax_number | TAX-Number |
currency | Current Code |
Example Response
{
"id": 3,
"name": "Updated Customer Name",
"company": "Updated Company",
"email": "[email protected]",
"phone": "+1 234 567 890",
"website": "https://www.updatedwebsite.com",
"address": "456 Street",
"city": "Updated City",
"state": "Updated State",
"postcode": "67890",
"country": "US",
"tax_number": "987654321",
"currency": "USD",
"user_id": null,
"uuid": null,
"created_via": "manual",
"date_updated": "2025-02-11T06:00:00",
"date_created": "2025-01-09T04:10:52"
}
Delete Customer
Delete a customer from the system.
Request
Method: DELETE
URL: yoursite.com/wp-json/eac/v1/customers/:id
Path Parameters:
id: The Customer ID (required)
Headers:
Authorization: Bearer <JWT Token>
Example Response
{
"deleted": true,
"previous": {
"id": 2,
"name": "Mr. Maxine Lueilwitz Jr.",
"company": "Apple INC",
"email": "[email protected]",
"phone": "232-593-8909",
"website": "http://reinger.com/quo-molestias-voluptatem-nisi-eos-dolores-quae",
"address": null,
"city": "New York",
"state": "New York",
"postcode": "49172-2298",
"country": "US",
"tax_number": "8.83576E+11",
"currency": "USD",
"uuid": null,
"date_updated": false,
"date_created": "2025-01-09T04:08:07"
}
}
Error Handling
The API returns detailed error messages for failed requests. Common errors include:
- 400 Bad Request: Missing or invalid parameters.
- 401 Unauthorized: Invalid or missing JWT token.
- 404 Not Found: Resource not found.
- 500 Internal Server Error: An error occurred on the server.
Security & Authentication
All API endpoints require authentication via JWT tokens. To obtain a token, log in to your EverAccounting account and use the JWT Token in your requests.