Browse Documentation
POST Create item

Create a new Item

POST /items/

Parameters

 Parameter
 Type
 Description
 item_title | required
String
 The title of the item
 item_description
String
 Description of the item
 sales_price
Numeric
 Default sales price of an item
purchase_price
Numeric
Default purchase price of an item
 gl_account_sales_id
String
Default Account to display when creating a new sales invoice or credit note. This is a required field for a tracked  Item.
gl_account_purchases_id
String
Default Account to display when creating a new purchase document or credit note. 
 show_invoices
Bool
Display the item in the autocomplete when creating a new sales invoice or credit note.
show_purchases
Bool
Display the item in the autocomplete when creating a new sales invoice or credit note.This field must be set to true when tracked is set to true
 sale_tax_id
String
The default sales tax rate (GST/VAT) for the item
purchase_tax_idStringThe default purchase tax rate (GST/VAT) for the item
item_category_idStringThis is the item category the item belong to
trackedBoolThis determines if you want this item to be tracked
gl_account_inventory_asset_idStringIf tracked is set to true the id of the Inventory Assset account must be provided and it must be of type INVENTORY
gl_account_cost_of_goods_sold_idStringIf tracked is set to true the id of the Cost of Goods Sold  account must be provided and it must be of type COGS.
reorder_pointNumericThis is  the minimum amount of inventory a business wants to have on hand.

A POST request is expected to be sent to the above endpoint where the content body must be JSON string containing all parameters that are needed to create a new item. The below example demonstrates how to create a new Item.

Request

     
curl - s - H "Content-Type: application/json" - H "Authorization: Bearer token"\ -
XPOST\ -
d '{
    "item": {
        "title": "item name",
        "description": "item description",
        "sales_price": "120.00",
        "purchase_price": "100.00",
        "show_invoices": true,
        "show_purchases": true,
        "sale_tax_id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "purchase_tax_id": "81807769a53a85cbf3b4a8d2bcbd2b73ec23f9bf",
        "gl_account_sales_id": "c31dc0341fb9b1038b3a28f5db013415085f0258",
        "gl_account_purchases_id": "aefb526889e1059a61ecce700a3363c388a93335",
        "item_category_id":"44d6fd2d06bb9f921d4abd8956779d62a31a6233",
        "tracked":"true",
        "gl_account_inventory_asset_id": "27f1826332f9ac48a21f362bc7cf16b874f1dd34",
        "gl_account_cost_of_goods_sold_id": "56f182h569ac48a21f362bc7cf16b8745duy",
        "reorder_point": 10

        
    }
}
' \
https://app.accounteer.com/api/v0.1/items/
      

Response

{
    "id": "7015c601466c79e3f45ee4cfb236e161e5a846e4",
    "organization_id": "daa71f0644647c0d82dd2d03d0b29779644b1a48",
    "title": "item name",
    "description": "item description",
    "sales_price": "120.00",
    "purchase_price": "100.00",
    "show_invoices": true,
    "show_purchases": true,
    "tracked":true,
    "reorder_point: 10"
    "sales_tax": {
        "id": "fd62ee6c1d65e4729da41f85cdd328dfc816d161",
        "name": "VAT 21%",
        "percentage": "21.00"
    },
    "purchase_tax": {
        "id": "81807769a53a85cbf3b4a8d2bcbd2b73ec23f9bf",
        "name": "VAT 6%",
        "percentage": "6.00"
    },
    "gl_account_sales": {
        "id": "c31dc0341fb9b1038b3a28f5db013415085f0258",
        "code": "700000",
        "title": "Sales",
        "description": null
    },
    "gl_account_purchases": {
        "id": "aefb526889e1059a61ecce700a3363c388a93335",
        "code": "611000",
        "title": "General and adminsitrative expenses",
        "description": null
    },    
    "gl_account_inventory_asset": {
        "id": "27f1826332f9ac48a21f362bc7cf16b874f1dd34",
        "code": "56000",
        "title": "Inventory Asset",
        "description": null
    },
    "gl_account_cost_of_goods_sold": {
        "id": "56f182h569ac48a21f362bc7cf16b8745duy",
        "code": "60000",
        "title": "Cost of Goods Sold",
        "description": null
    },
    "item_category": {
         "id": "44d6fd2d06bb9f921d4abd8956779d62a31a6233",
         "title": "item name 2"
    },
    "images":[  
         {  
            "id":"f53fa136c53657367d73add5788faf818483fc28",
            "file_url":"https://f.accounteer.com/f53fa136c53657367d73add5788faf818483fc28/63563de3116                        06b6528fdf949b7c9128afba414d3/test.png",
            "file_name":"test.png",
            "date_created":"2018-02-22"
         },
         {  
            "id":"16df7928c8c04f1e0442dc2c7931d9fed7e17bf7",
            "file_url":"https://f.accounteer.com/16df7928c8c04f1e0442dc2c7931d9fed7e17bf7/63563de3116                        06b6528fdf949b7c9128afba414d3/test.png",
            "file_name":"test.png",
            "date_created":"2018-02-22"
         }
    "date_created": "2017-07-23",
    "date_updated": "2017-07-23"
}