Top

Items

List items
GET /items
Get the list of all active items with pagination.
Get an item
GET /items/:item_id
Get the details of an item.
Create an item
POST /items
Create a new item.
Update an item
PUT /items/:item_id
Update the details of an item.
Delete an item
DELETE /items/:item_id
Delete the item created.items that are part of transaction cannot be deleted.
Mark item as active.
POST /items/:item_id/active
Mark an inactive item as active.
Mark item as inactive
POST /items/:item_id/inactive
Mark an active item as inactive.

List items

GET  /items

Get the list of all active items with pagination.

Parameters

name string
[100]
Search items by name.
Variants: name_startswith and name_contains
description string
[100]
Search items by description.
Variants: description_startswith and description_contains
rate double Search items by rate.
Variants: rate_less_than, rate_less_equals, rate_greater_than and rate_greater_equals
tax_id
(Not applicable for the US Edition)
string Search items by tax id.
tax_name
(Not applicable for the US Edition)
string
[50]
Name of the tax to be associated.
is_taxable
(US Edition only)
boolean Boolean to track the taxability of the item.
tax_exemption_id
(US Edition only)
string ID of the tax exemption. Mandatory, if is_taxable is false.
account_id string Search items by account id.
filter_by string Filter items by status.
Allowed Values: Status.All, Status.Active and Status.Inactive
search_text string
[100]
Search items by name or description.
sort_column string Sort items.
Allowed Values: name, rate and tax_name

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "items": [
    {
      "item_id": "460000000027009",
      "name": "Hard Drive",
      "status": "active",
      "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
      "rate": 120.00,
      "tax_id": "460000000027005",
      "tax_name": "VAT",
      "tax_percentage": 12.5
    },
    {
      "item_id": "460000000027017",
      "name": "Premium Plan - Web hosting",
      "status": "active",
      "description": "10 GB Space, 300 GB Transfer 100 Email Accounts 10 MySQL Databases",
      "rate": 33.00,
      "tax_id": "460000000027007",
      "tax_name": "Sales Tax",
      "tax_percentage": 10.5
    }
  ],
  "page_context": {
    "page": 1,
    "per_page": 200,
    "has_more_page": false,
    "report_name": "Items",
    "applied_filter": "Status.All",
    "sort_column": "name",
    "sort_order": "A"
  }
}

Get an item

GET  /items/:item_id

Get the details of an item.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "success",
  "item": {
    "item_id": "460000000027009",
    "name": "Hard Drive",
    "status": "active",
    "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
    "rate": 120.00,
    "unit": "Nos",
    "account_id": "460000000000388",
    "account_name": "Sales",
    "tax_id": "460000000027005",
    "tax_name": "VAT",
    "tax_percentage": 12.5,
    "tax_type": "tax"
  }
}

Create an item

POST  /items

Create a new item.

Request attributes

name* string
[100]
Name of the item.
description string
[2000]
Description for the item.
rate* double Price of the item.
account_id string ID of the account to which the item has to be associated with.
tax_id
(Not applicable for the US Edition)
string ID of the tax to be associated to the item.
is_taxable
(US Edition only)
boolean Boolean to track the taxability of the item.
tax_exemption_id
(US Edition only)
string ID of the tax exemption. Mandatory, if is_taxable is false.

Sample Request

{
      "name": "Hard Drive",
      "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
      "rate": 120.00,
      "account_id": "460000000000388",
      "tax_id": "460000000027005"
}

Sample Response

Status: 201 Created
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "The item has been added.",
      "item": {
        "item_id": "460000000027009",
        "name": "Hard Drive",
        "status": "active",
        "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
        "rate": 120.00,
        "unit": "Nos",
        "account_id": "460000000000388",
        "account_name": "Sales",
        "tax_id": "460000000027005",
        "tax_name": "VAT",
        "tax_percentage": 12.5,
        "tax_type": "tax"
      }
    }

Update an item

PUT  /items/:item_id

Update the details of an item.

Request attributes

name* string
[100]
Name of the item.
description string
[2000]
Description for the item.
rate* double Price of the item.
account_id string ID of the account to which the item has to be associated with.
tax_id
(Not applicable for the US Edition)
string ID of the tax to be associated to the item.
is_taxable
(US Edition only)
boolean Boolean to track the taxability of the item.
tax_exemption_id
(US Edition only)
string ID of the tax exemption. Mandatory, if is_taxable is false.

Sample Request

{
      "name": "Hard Drive",
      "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
      "rate": 120.00,
      "account_id": "460000000000388",
      "tax_id": "460000000027005"
}

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
      "code": 0,
      "message": "Item details have been saved.",
      "item": {
        "item_id": "460000000027009",
        "name": "Hard Drive",
        "status": "active",
        "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
        "rate": 120.00,
        "unit": "Nos",
        "account_id": "460000000000388",
        "account_name": "Sales",
        "tax_id": "460000000027005",
        "tax_name": "VAT",
        "tax_percentage": 12.5,
        "tax_type": "tax"
      }
    }

Delete an item

DELETE  /items/:item_id

Delete the item created.items that are part of transaction cannot be deleted.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The item has been deleted."
}

Mark item as active.

POST  /items/:item_id/active

Mark an inactive item as active.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The item has been marked as active."
}

Mark item as inactive

POST  /items/:item_id/inactive

Mark an active item as inactive.

Sample Response

Status: 200 OK
Content Type: application/json;charset=UTF-8
{
  "code": 0,
  "message": "The item has been marked as inactive."
}