Items API Guide: Fetch, Create, Update & Delete Items


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:

ParameterDescription
idThe 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):

ParameterTypeDescription
nameStringName of the item
typeStringType of item (standard, etc.)
descriptionStringDescription of the item
unitStringUnit of measurement (e.g., box, piece)
priceNumberSelling price of the item
costNumberCost price of the item
tax_idsNumberAssociated tax ID
category_idNumberCategory 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:

ParameterDescription
idThe 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:

ParameterDescription
idThe 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.