The Items API in EverAccounting allows you to retrieve, create, update, and delete products and services seamlessly. This guide provides detailed instructions on interacting with the API using different methods.
Get All Items
Endpoint:
GET yoursite.com/wp-json/eac/v1/items
Headers:
Authorization: Bearer your-jwt-token
Query Parameters:
None required
Example Response:
[
{
"id": 4,
"type": "standard",
"name": "L DELL",
"description": "test",
"unit": "box",
"price": 20,
"cost": 18,
"taxes": [],
"category_id": 3,
"date_updated": false,
"date_created": "2025-02-03T05:00:34"
},
{
"id": 3,
"type": "standard",
"name": "Asus Laptop 2024L",
"description": "Test",
"unit": "box",
"price": 200,
"cost": 180,
"taxes": [],
"category_id": 3,
"date_updated": "2025-02-03T05:02:46",
"date_created": "2025-01-23T09:02:39"
}
]
Get a Single Item by ID
Endpoint:
GET yoursite.com/wp-json/eac/v1/items/:id
Headers:
Authorization: Bearer your-jwt-token
Path Parameter:
Parameter | Description |
id | The ID of the item you want to retrieve. |
Example Response:
{
"id": 3,
"type": "standard",
"name": "Asus Laptop 2024L",
"description": "Test",
"unit": "box",
"price": 200,
"cost": 180,
"taxes": [],
"category_id": 3,
"date_updated": "2025-02-03T05:02:46",
"date_created": "2025-01-23T09:02:39"
}
Create a New Item
Endpoint:
POST yoursite.com/wp-json/eac/v1/items/
Headers:
Authorization: Bearer your-jwt-token
Content-Type: application/json
Body Parameters (Form Data):
Parameter | Type | Description |
name | String | Name of the item |
type | String | Type of item (standard, etc.) |
description | String | Description of the item |
unit | String | Unit of measurement (e.g., box, piece) |
price | Number | Selling price of the item |
cost | Number | Cost price of the item |
tax_ids | Number | Associated tax ID |
category_id | Number | Category ID |
Example Request (Form Data):
{
"name": "Asus Laptop 2024L",
"type": "standard",
"description": "Test",
"unit": "box",
"price": 200,
"cost": 180,
"tax_ids": 1,
"category_id": 3
}
Update an Item
Endpoint:
POST yoursite.com/wp-json/eac/v1/items/:id
Headers:
Authorization: Bearer your-jwt-token
Content-Type: application/json
Path Parameter:
Parameter | Description |
id | The ID of the item to update. |
Body Parameters (Form Data):
Same as creating an item.
Example Request (Form Data):
{
"name": "Asus Laptop 2024L",
"type": "standard",
"description": "Test",
"unit": "box",
"price": 200,
"cost": 180,
"tax_ids": 1,
"category_id": 3
}
Delete an Item
Endpoint:
DELETE yoursite.com/wp-json/eac/v1/items/:id
Headers:
Authorization: Bearer your-jwt-token
Path Parameter:
Parameter | Description |
id | The ID of the item to delete. |
The Items API in EverAccounting allows you to manage your products or services effortlessly. Use the provided endpoints to fetch, create, update, and delete items securely.