Composite Items

A form or version of an composite item that differs in some respect from other forms of the same or from a standard. You can create your composite items by associating multiple items and their respective quantities.

Attribute

  • composite_item_idlong

    Unique ID generated for the composite item by the server. This is used as identifier

  • namestring

    Name of the composite item

  • unitstring

    Unit of Item

  • tax_idlong

    Unique ID generated by the server for the tax .

  • descriptionstring

    Sample Description.

  • tax_namestring

    Name of the tax applied on selling this item

  • tax_percentagedouble

    Percentage at which the item is taxed

  • tax_typestring

    Type of tax. It can either Tax or Group Tax

  • purchase_account_idlong

    Unique ID generated by the server for the type of purchase

  • purchase_account_namestring

    Type of purchase under which the composite item was bought

  • account_idlong

    Unique ID generated by the server for the type of sale of this item

  • account_namestring

    Type of sale under which the composite item is sold

  • inventory_account_idlong

    Unique ID generated by the server for the type of inventory for this item

  • inventory_account_namestring

    Name of inventory type

  • statusstring

    Status of the Item

  • sourcestring

    source

  • is_combo_productboolean

    Defines whether the item is composite or not true for composite items

  • item_typestring

    Type of item Always inventory

  • ratedouble

    Selling price of the item

  • pricebook_ratedouble

    Price list applied on the item's selling price.

  • purchase_ratedouble

    Buying price of the item

  • reorder_leveldouble

    Reorder point of the item

  • initial_stockdouble

    Initial stock of item

  • initial_stock_ratedouble

    Average purchase price of initial stock. This is required for FIFO cost lot tracking and inventory valuation

  • vendor_idlong

    Unique ID generated by the server for preferred vendor to buy this composite item

  • vendor_namestring

    Name of the preferred vendor

  • stock_on_handdouble

    Stock based on Invoices and Bills

  • asset_valuedouble

    value of the composite items based on purchase rate

  • available_stockdouble

    Stock based on Shipments and Receives

  • actual_available_stockdouble

    Stock based on Shipments and Receives minus ordered stock

  • skustring

    Stock Keeping Unit value of the item. It should be unique throughout the product

  • upclong

    Unique Product Code, 12 digit unique code of the item

  • eanlong

    European Article Number, 13 digit barcode number of the item

  • isbnlong

    International Standard Book Number, 13 digit unique commercial book identifier barcode of the item

  • part_numberstring

    MPN - Manufacturing Part Number, unambiguously identifies a part design

  • image_idlong

    Unique identifier generated by the server for item image

  • image_namestring

    Name of the image

  • purchase_descriptionstring

    Purchase description of the item

  • custom_fieldsarray

    Custom fields are used to add more information about the item

    Show Sub-Attributes

    • custom_field_idlong

      Unique ID generated by the server for the custom field.

    • valuestring

      Value of the custom field.

    • indexinteger

      Index of the custom field. It can hold any value from 1 to 10.

    • labelstring

      Label of the custom field.

  • mapped_itemsarray

    Items that are associated with the composite item

    Show Sub-Attributes

    • line_item_idlong

      Unique ID generated by the server for mapping the associated item with composite item

    • item_idlong

      Unique ID generated by the server for the Item. This is used as an identifier.

    • namestring

      Name of the composite item

    • ratedouble

      Selling price of the item

    • purchase_ratedouble

      Buying price of the item

    • skustring

      Stock Keeping Unit value of the item. It should be unique throughout the product

    • image_idlong

      Unique identifier generated by the server for item image

    • image_namestring

      Name of the image

    • purchase_descriptionstring

      Purchase description of the item

    • image_typestring

      Type of the image Only images with gif,png,jpeg,jpg,bmp extensions are allowed

    • unitstring

      Unit of Item

    • is_combo_productboolean

      Defines whether the item is composite or not true for composite items

    • descriptionstring

      Sample Description.

    • quantitydouble

      Quantity of item associated with the composite item

    • stock_on_handdouble

      Stock based on Invoices and Bills

    • available_stockdouble

      Stock based on Shipments and Receives

    • actual_available_stockdouble

      Stock based on Shipments and Receives minus ordered stock

  • item_tax_preferencesarray

    Show Sub-Attributes

    • tax_idlong

      Unique ID generated by the server for the tax.

    • tax_specificationstring

      Type of tax. It can be intra or inter

  • hsn_or_sacstring

    HSN Code of the item

ExampleCopy
{
    "composite_item_id": 504366000000053250,
    "name": "Combo of Apple IPhone and Smartwatch",
    "unit": "units",
    "tax_id": 504366000000053100,
    "description": "Just a sample description",
    "tax_name": "VAT",
    "tax_percentage": 13,
    "tax_type": "tax",
    "purchase_account_id": 504366000000034000,
    "purchase_account_name": "Cost of Goods Sold",
    "account_id": 504366000000000400,
    "account_name": "sales",
    "inventory_account_id": 504366000000034000,
    "inventory_account_name": "Inventory Asset",
    "status": "active",
    "source": "user",
    "is_combo_product": true,
    "item_type": "inventory",
    "rate": 85000,
    "pricebook_rate": 85000,
    "purchase_rate": 30000,
    "reorder_level": 1,
    "initial_stock": 2,
    "initial_stock_rate": 30000,
    "vendor_id": 504366000000053250,
    "vendor_name": "Mr. vendor combo",
    "stock_on_hand": 2,
    "asset_value": 0.1,
    "available_stock": 2,
    "actual_available_stock": 2,
    "sku": "SKUIS",
    "upc": 746325287436,
    "ean": 5789414385764,
    "isbn": 368302334,
    "part_number": "JHFKE7GK7",
    "image_id": 8408722000000019000,
    "image_name": "img1.jpg",
    "purchase_description": "Composite item purchase description",
    "custom_fields": [
        {
            "custom_field_id": 504366000000053400,
            "value": "GBGD078",
            "index": 1,
            "label": "VAT ID"
        }
    ],
    "mapped_items": [
        {
            "line_item_id": 504366000000053250,
            "item_id": 4815000000044208,
            "name": "Combo of Apple IPhone and Smartwatch",
            "rate": 85000,
            "purchase_rate": 30000,
            "sku": "SKUIS",
            "image_id": 8408722000000019000,
            "image_name": "img1.jpg",
            "purchase_description": "Composite item purchase description",
            "image_type": "jpg",
            "unit": "units",
            "is_combo_product": true,
            "description": "Just a sample description",
            "quantity": 1,
            "stock_on_hand": 2,
            "available_stock": 2,
            "actual_available_stock": 2
        }
    ],
    "item_tax_preferences": [
        {
            "tax_id": 504366000000053100,
            "tax_specification": "intra"
        }
    ],
    "hsn_or_sac": 85423100
}

Creating a Composite Item

A new composite item can be created after creating items that we want to associcate with composite item. User can attach image for composite item by calling Different API

'https://api.zakya.com/inventory/inventory/v1/compositeitems/{composite_item_id}/image', passing form-data parameter image i.e. -F image=bag_s.jpg

OAuth Scope : ZakyaAPI.compositeitems.CREATE

Arguments

  • namestring (Required)

    Name of the composite item

  • mapped_itemsarray (Required)

    Items that are associated with the composite item

    Show Sub-Attributes

    • quantitydouble

      Quantity of item associated with the composite item

    • item_idlong (Required)

      Unique ID generated by the server for the Item. This is used as an identifier.

    • line_item_idlong

      Unique ID generated by the server for mapping the associated item with composite item

  • descriptionstring

    Sample Description.

  • is_combo_productboolean

    Defines whether the item is composite or not true for composite items

  • vendor_idlong

    Unique ID generated by the server for preferred vendor to buy this composite item

  • purchase_ratedouble

    Buying price of the item

  • purchase_descriptionstring

    Purchase description of the item

  • initial_stockdouble

    Initial stock of item

  • initial_stock_ratedouble

    Average purchase price of initial stock. This is required for FIFO cost lot tracking and inventory valuation

  • tax_idlong

    Unique ID generated by the server for the tax .

  • skustring (Required)

    Stock Keeping Unit value of the item. It should be unique throughout the product

  • isbnlong

    International Standard Book Number, 13 digit unique commercial book identifier barcode of the item

  • eanlong

    European Article Number, 13 digit barcode number of the item

  • part_numberstring

    MPN - Manufacturing Part Number, unambiguously identifies a part design

  • reorder_leveldouble

    Reorder point of the item

  • unitstring

    Unit of Item

  • upclong

    Unique Product Code, 12 digit unique code of the item

  • item_typestring (Required)

    Type of item Always inventory

  • ratedouble (Required)

    Selling price of the item

  • custom_fieldsarray

    Custom fields are used to add more information about the item

    Show Sub-Attributes

    • custom_field_idlong

      Unique ID generated by the server for the custom field.

    • valuestring

      Value of the custom field.

  • account_idlong

    Unique ID generated by the server for the type of sale of this item

  • purchase_account_idlong

    Unique ID generated by the server for the type of purchase

  • inventory_account_idlong

    Unique ID generated by the server for the type of inventory for this item

  • item_tax_preferencesarray

    Show Sub-Attributes

    • tax_idlong

      Unique ID generated by the server for the tax .

    • tax_specificationstring

      Type of tax. It can be intra or inter

  • hsn_or_sacstring

    HSN Code of the item

  • product_typestring (Required)

    Type of the product.

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695")
  .post(body)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};

fetch('https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("POST", "/inventory/v1/compositeitems?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "name": "Combo of Apple IPhone and Smartwatch",
    "mapped_items": [
        {
            "quantity": 1,
            "item_id": 4815000000044208,
            "line_item_id": 504366000000053250
        }
    ],
    "description": "Just a sample description",
    "is_combo_product": true,
    "vendor_id": 504366000000053250,
    "purchase_rate": 30000,
    "purchase_description": "Composite item purchase description",
    "initial_stock": 2,
    "initial_stock_rate": 30000,
    "tax_id": 504366000000053100,
    "sku": "SKUIS",
    "isbn": 368302334,
    "ean": 5789414385764,
    "part_number": "JHFKE7GK7",
    "reorder_level": 1,
    "unit": "units",
    "upc": 746325287436,
    "item_type": "inventory",
    "rate": 85000,
    "custom_fields": [
        {
            "custom_field_id": 504366000000053400,
            "value": "GBGD078"
        }
    ],
    "account_id": 504366000000000400,
    "purchase_account_id": 504366000000034000,
    "inventory_account_id": 504366000000034000,
    "item_tax_preferences": [
        {
            "tax_id": 504366000000053100,
            "tax_specification": "intra"
        }
    ],
    "hsn_or_sac": 85423100,
    "product_type": "goods"
}
Response ExampleCopy
{
    "code": 0,
    "message": "The item has been added.",
    "composite_item": {
        "composite_item_id": 504366000000053250,
        "name": "Combo of Apple IPhone and Smartwatch",
        "unit": "units",
        "tax_id": 504366000000053100,
        "description": "Just a sample description",
        "tax_name": "VAT",
        "tax_percentage": 13,
        "tax_type": "tax",
        "purchase_account_id": 504366000000034000,
        "purchase_account_name": "Cost of Goods Sold",
        "account_id": 504366000000000400,
        "account_name": "sales",
        "inventory_account_id": 504366000000034000,
        "inventory_account_name": "Inventory Asset",
        "status": "active",
        "source": "user",
        "is_combo_product": true,
        "item_type": "inventory",
        "rate": 85000,
        "pricebook_rate": 85000,
        "purchase_rate": 30000,
        "reorder_level": 1,
        "initial_stock": 2,
        "initial_stock_rate": 30000,
        "vendor_id": 504366000000053250,
        "vendor_name": "Mr. vendor combo",
        "stock_on_hand": 2,
        "asset_value": 0.1,
        "available_stock": 2,
        "actual_available_stock": 2,
        "sku": "SKUIS",
        "upc": 746325287436,
        "ean": 5789414385764,
        "isbn": 368302334,
        "part_number": "JHFKE7GK7",
        "image_id": 8408722000000019000,
        "image_name": "img1.jpg",
        "purchase_description": "Composite item purchase description",
        "custom_fields": [
            {
                "custom_field_id": 504366000000053400,
                "value": "GBGD078",
                "index": 1,
                "label": "VAT ID"
            }
        ],
        "mapped_items": [
            {
                "line_item_id": 504366000000053250,
                "item_id": 4815000000044208,
                "name": "Combo of Apple IPhone and Smartwatch",
                "rate": 85000,
                "purchase_rate": 30000,
                "sku": "SKUIS",
                "image_id": 8408722000000019000,
                "image_name": "img1.jpg",
                "purchase_description": "Composite item purchase description",
                "image_type": "jpg",
                "unit": "units",
                "is_combo_product": true,
                "description": "Just a sample description",
                "quantity": 1,
                "stock_on_hand": 2,
                "available_stock": 2,
                "actual_available_stock": 2
            }
        ],
        "item_tax_preferences": [
            {
                "tax_id": 504366000000053100,
                "tax_specification": "intra"
            }
        ],
        "hsn_or_sac": 85423100
    }
}

List All Composite Items

List of all composite items.

OAuth Scope : ZakyaAPI.compositeitems.READ

Query Parameters

  • page 

    Page Number

  • per_page 

    Items to be displayed per page

  • sort_column 

    column to be used for sorting. Allowed values: name, sku, rate, tax_name, purchase_rate, created_time, last_modified_time, reorder_level

  • sort_order 

    order used for sorting

  • filter_by 

    Filter items by status. Allowed values: Status.All, Status.Active, Inactive, Lowstock

  • usestate 

    Whether current filter needs to be saved

  • response_option 

    response format number

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695"
type: GET
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695")
  .get()
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/compositeitems?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("GET", "/inventory/v1/compositeitems?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "composite_items": [
        {
            "composite_item_id": 504366000000053250,
            "name": "Combo of Apple IPhone and Smartwatch",
            "status": "active",
            "source": "user",
            "description": "Just a sample description",
            "rate": 85000,
            "tax_id": 504366000000053100,
            "tax_name": "VAT",
            "tax_percentage": 13,
            "purchase_description": "Composite item purchase description",
            "purchase_rate": 30000,
            "is_combo_product": true,
            "item_type": "inventory",
            "is_taxable": true,
            "stock_on_hand": 2,
            "available_stock": 2,
            "actual_available_stock": 2,
            "sku": "SKUIS",
            "upc": 746325287436,
            "ean": 5789414385764,
            "isbn": 368302334,
            "part_number": "JHFKE7GK7",
            "reorder_level": 1,
            "image_id": 8408722000000019000,
            "image_name": "img1.jpg",
            "created_time": "2013-08-05",
            "last_modified_time": "string"
        },
        {...},
        {...}
    ]
}

Updating a composite item

Updating details of an existing composite item.

OAuth Scope : ZakyaAPI.compositeitems.UPDATE

Arguments

  • composite_item_idlong

    Unique ID generated for the composite item by the server. This is used as identifier

  • namestring (Required)

    Name of the composite item

  • unitstring

    Unit of Item

  • tax_idlong

    Unique ID generated by the server for the tax .

  • descriptionstring

    Sample Description.

  • tax_namestring

    Name of the tax applied on selling this item

  • tax_percentagedouble

    Percentage at which the item is taxed

  • tax_typestring

    Type of tax. It can either Tax or Group Tax

  • purchase_account_idlong

    Unique ID generated by the server for the type of purchase

  • purchase_account_namestring

    Type of purchase under which the composite item was bought

  • account_idlong

    Unique ID generated by the server for the type of sale of this item

  • account_namestring

    Type of sale under which the composite item is sold

  • inventory_account_idlong

    Unique ID generated by the server for the type of inventory for this item

  • inventory_account_namestring

    Name of inventory type

  • statusstring

    Status of the Item

  • sourcestring

    source

  • is_combo_productboolean

    Defines whether the item is composite or not true for composite items

  • item_typestring (Required)

    Type of item Always inventory

  • ratedouble (Required)

    Selling price of the item

  • pricebook_ratedouble

    Price list applied on the item's selling price.

  • purchase_ratedouble

    Buying price of the item

  • reorder_leveldouble

    Reorder point of the item

  • initial_stockdouble

    Initial stock of item

  • initial_stock_ratedouble

    Average purchase price of initial stock. This is required for FIFO cost lot tracking and inventory valuation

  • vendor_idlong

    Unique ID generated by the server for preferred vendor to buy this composite item

  • vendor_namestring

    Name of the preferred vendor

  • stock_on_handdouble

    Stock based on Invoices and Bills

  • asset_valuedouble

    value of the composite items based on purchase rate

  • available_stockdouble

    Stock based on Shipments and Receives

  • actual_available_stockdouble

    Stock based on Shipments and Receives minus ordered stock

  • skustring (Required)

    Stock Keeping Unit value of the item. It should be unique throughout the product

  • upclong

    Unique Product Code, 12 digit unique code of the item

  • eanlong

    European Article Number, 13 digit barcode number of the item

  • isbnlong

    International Standard Book Number, 13 digit unique commercial book identifier barcode of the item

  • part_numberstring

    MPN - Manufacturing Part Number, unambiguously identifies a part design

  • image_idlong

    Unique identifier generated by the server for item image

  • image_namestring

    Name of the image

  • purchase_descriptionstring

    Purchase description of the item

  • custom_fieldsarray

    Custom fields are used to add more information about the item

    Show Sub-Attributes

    • custom_field_idlong

      Unique ID generated by the server for the custom field.

    • valuestring

      Value of the custom field.

    • indexinteger

      Index of the custom field. It can hold any value from 1 to 10.

    • labelstring

      Label of the custom field.

  • mapped_itemsarray (Required)

    Items that are associated with the composite item

    Show Sub-Attributes

    • line_item_idlong

      Unique ID generated by the server for mapping the associated item with composite item

    • item_idlong

      Unique ID generated by the server for the Item. This is used as an identifier.

    • namestring

      (Required)

    • Name of the composite itemrate

      double

    • (Required)Selling price of the item

      purchase_rate

    • doubleBuying price of the item

      sku

    • string(Required)

      Stock Keeping Unit value of the item. It should be unique throughout the product

    • image_idlong

      Unique identifier generated by the server for item image

    • image_namestring

      Name of the image

    • purchase_descriptionstring

      Purchase description of the item

    • image_typestring

      Type of the image Only images with gif,png,jpeg,jpg,bmp extensions are allowed

    • unitstring

      Unit of Item

    • is_combo_productboolean

      Defines whether the item is composite or not true for composite items

    • descriptionstring

      Sample Description.

    • quantitydouble

      Quantity of item associated with the composite item

    • stock_on_handdouble

      Stock based on Invoices and Bills

    • available_stockdouble

      Stock based on Shipments and Receives

    • actual_available_stockdouble

      Stock based on Shipments and Receives minus ordered stock

  • item_tax_preferencesarray

    Show Sub-Attributes

    • tax_idlong

      Unique ID generated by the server for the tax .

    • tax_specificationstring

      Type of tax. It can be intra or inter

  • hsn_or_sacstring

    HSN Code of the item

  • product_typestring (Required)

    Type of the product.

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695")
  .put(body)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
  method: 'PUT',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};

fetch('https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("PUT", "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "composite_item_id": 504366000000053250,
    "name": "Combo of Apple IPhone and Smartwatch",
    "unit": "units",
    "tax_id": 504366000000053100,
    "description": "Just a sample description",
    "tax_name": "VAT",
    "tax_percentage": 13,
    "tax_type": "tax",
    "purchase_account_id": 504366000000034000,
    "purchase_account_name": "Cost of Goods Sold",
    "account_id": 504366000000000400,
    "account_name": "sales",
    "inventory_account_id": 504366000000034000,
    "inventory_account_name": "Inventory Asset",
    "status": "active",
    "source": "user",
    "is_combo_product": true,
    "item_type": "inventory",
    "rate": 85000,
    "pricebook_rate": 85000,
    "purchase_rate": 30000,
    "reorder_level": 1,
    "initial_stock": 2,
    "initial_stock_rate": 30000,
    "vendor_id": 504366000000053250,
    "vendor_name": "Mr. vendor combo",
    "stock_on_hand": 2,
    "asset_value": 0.1,
    "available_stock": 2,
    "actual_available_stock": 2,
    "sku": "SKUIS",
    "upc": 746325287436,
    "ean": 5789414385764,
    "isbn": 368302334,
    "part_number": "JHFKE7GK7",
    "image_id": 8408722000000019000,
    "image_name": "img1.jpg",
    "purchase_description": "Composite item purchase description",
    "custom_fields": [
        {
            "custom_field_id": 504366000000053400,
            "value": "GBGD078",
            "index": 1,
            "label": "VAT ID"
        }
    ],
    "mapped_items": [
        {
            "line_item_id": 504366000000053250,
            "item_id": 4815000000044208,
            "name": "Combo of Apple IPhone and Smartwatch",
            "rate": 85000,
            "purchase_rate": 30000,
            "sku": "SKUIS",
            "image_id": 8408722000000019000,
            "image_name": "img1.jpg",
            "purchase_description": "Composite item purchase description",
            "image_type": "jpg",
            "unit": "units",
            "is_combo_product": true,
            "description": "Just a sample description",
            "quantity": 1,
            "stock_on_hand": 2,
            "available_stock": 2,
            "actual_available_stock": 2
        }
    ],
    "item_tax_preferences": [
        {
            "tax_id": 504366000000053100,
            "tax_specification": "intra"
        }
    ],
    "hsn_or_sac": 85423100,
    "product_type": "goods"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Item details have been saved.",
    "composite_item": {
        "composite_item_id": 504366000000053250,
        "name": "Combo of Apple IPhone and Smartwatch",
        "unit": "units",
        "tax_id": 504366000000053100,
        "description": "Just a sample description",
        "tax_name": "VAT",
        "tax_percentage": 13,
        "tax_type": "tax",
        "purchase_account_id": 504366000000034000,
        "purchase_account_name": "Cost of Goods Sold",
        "account_id": 504366000000000400,
        "account_name": "sales",
        "inventory_account_id": 504366000000034000,
        "inventory_account_name": "Inventory Asset",
        "status": "active",
        "source": "user",
        "is_combo_product": true,
        "item_type": "inventory",
        "rate": 85000,
        "pricebook_rate": 85000,
        "purchase_rate": 30000,
        "reorder_level": 1,
        "initial_stock": 2,
        "initial_stock_rate": 30000,
        "vendor_id": 504366000000053250,
        "vendor_name": "Mr. vendor combo",
        "stock_on_hand": 2,
        "asset_value": 0.1,
        "available_stock": 2,
        "actual_available_stock": 2,
        "sku": "SKUIS",
        "upc": 746325287436,
        "ean": 5789414385764,
        "isbn": 368302334,
        "part_number": "JHFKE7GK7",
        "image_id": 8408722000000019000,
        "image_name": "img1.jpg",
        "purchase_description": "Composite item purchase description",
        "custom_fields": [
            {
                "custom_field_id": 504366000000053400,
                "value": "GBGD078",
                "index": 1,
                "label": "VAT ID"
            }
        ],
        "mapped_items": [
            {
                "line_item_id": 504366000000053250,
                "item_id": 4815000000044208,
                "name": "Combo of Apple IPhone and Smartwatch",
                "rate": 85000,
                "purchase_rate": 30000,
                "sku": "SKUIS",
                "image_id": 8408722000000019000,
                "image_name": "img1.jpg",
                "purchase_description": "Composite item purchase description",
                "image_type": "jpg",
                "unit": "units",
                "is_combo_product": true,
                "description": "Just a sample description",
                "quantity": 1,
                "stock_on_hand": 2,
                "available_stock": 2,
                "actual_available_stock": 2
            }
        ],
        "item_tax_preferences": [
            {
                "tax_id": 504366000000053100,
                "tax_specification": "intra"
            }
        ],
        "hsn_or_sac": 85423100
    }
}

Retrieving a Composite Item

Retrieving details of an existing compostie item.

OAuth Scope : ZakyaAPI.compositeitems.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695"
type: GET
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695")
  .get()
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("GET", "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "composite_item_id": 504366000000053250,
    "name": "Combo of Apple IPhone and Smartwatch",
    "status": "active",
    "source": "user",
    "unit": "units",
    "tax_id": 504366000000053100,
    "description": "Just a sample description",
    "tax_name": "VAT",
    "tax_percentage": 13,
    "tax_type": "tax",
    "purchase_account_id": 504366000000034000,
    "purchase_account_name": "Cost of Goods Sold",
    "account_id": 504366000000000400,
    "account_name": "sales",
    "inventory_account_id": 504366000000034000,
    "inventory_account_name": "Inventory Asset",
    "is_combo_product": true,
    "item_type": "inventory",
    "rate": 85000,
    "pricebook_rate": 85000,
    "purchase_rate": 30000,
    "reorder_level": 1,
    "initial_stock": 2,
    "initial_stock_rate": 30000,
    "vendor_id": 504366000000053250,
    "vendor_name": "Mr. vendor combo",
    "stock_on_hand": 2,
    "asset_value": 0.1,
    "available_stock": 2,
    "actual_available_stock": 2,
    "sku": "SKUIS",
    "upc": 746325287436,
    "ean": 5789414385764,
    "isbn": 368302334,
    "part_number": "JHFKE7GK7",
    "image_id": 8408722000000019000,
    "image_name": "img1.jpg",
    "purchase_description": "Composite item purchase description",
    "custom_fields": [
        {
            "custom_field_id": 504366000000053400,
            "value": "GBGD078",
            "index": 1,
            "label": "VAT ID"
        }
    ],
    "mapped_items": [
        {
            "line_item_id": 504366000000053250,
            "item_id": 4815000000044208,
            "name": "Combo of Apple IPhone and Smartwatch",
            "rate": 85000,
            "purchase_rate": 30000,
            "sku": "SKUIS",
            "image_id": 8408722000000019000,
            "image_name": "img1.jpg",
            "purchase_description": "Composite item purchase description",
            "image_type": "jpg",
            "unit": "units",
            "is_combo_product": true,
            "description": "Just a sample description",
            "quantity": 1,
            "stock_on_hand": 2,
            "available_stock": 2,
            "actual_available_stock": 2
        }
    ],
    "item_tax_preferences": [
        {
            "tax_id": 504366000000053100,
            "tax_specification": "intra"
        }
    ],
    "hsn_or_sac": 85423100
}

Deleting a Composite Item

Deleting an existing Composite Item.

OAuth Scope : ZakyaAPI.compositeitems.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695"
type: DELETE
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695")
  .delete(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "DELETE",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'DELETE',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/compositeitems/504366000000053250?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("DELETE", "/inventory/v1/compositeitems/504366000000053250?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The item has been deleted."
}

Mark as Active

Changing status of an existing composite item to active.

OAuth Scope : ZakyaAPI.compositeitems.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695"
type: POST
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695")
  .post(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("POST", "/inventory/v1/compositeitems/504366000000053250/active?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Re-activation complete! The item is back in business!"
}

Mark as Inactive

Changing status of an existing composite item to inactive.

OAuth Scope : ZakyaAPI.compositeitems.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695' \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695"
type: POST
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695")
  .post(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("POST", "/inventory/v1/compositeitems/504366000000053250/inactive?organization_id=10234695", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The item has been marked as inactive."
}

Create Bundle

Bundling is the technique of putting together different components in desired quantities to produce a single commodity. These components could be goods, services and other non-inventory items of your choice.

Arguments

  • reference_numberstring (Required)

    Reference number for the Bundle.

  • datedate (Required)

    The date on which bundling is done

  • descriptionstring

    Sample Description.

  • composite_item_idlong (Required)

    Unique ID generated for the composite item by the server. This is used as identifier

  • composite_item_namestring (Required)

    Name of the composite item

  • composite_item_skustring

    Stock Keeping Unit value of the composite item. It should be unique throughout the product

  • quantity_to_bundledouble (Required)

    Quantity of bundles to be bundled.

  • line_itemsarray (Required)

    A bundle can contain multiple line items. Each line item contains item_id,name,description,quantity_consumed,unit,account_id,warehouse_id.

    Show Sub-Attributes

    • item_idlong (Required)

      Unique ID generated by the server for the Item. This is used as an identifier.

    • namestring (Required)

      Name of the composite item

    • descriptionstring

      Sample Description.

    • quantity_consumeddouble (Required)

      Quantity of item to be bundled.

    • unitstring

      Unit of Item

    • account_idlong (Required)

      Unique ID generated by the server for the type of sale of this item

    • account_namestring

      Type of sale under which the composite item is sold

    • warehouse_idlong (Required)

      Unique ID generated by the server for the Warehouse.

    • warehouse_namestring

      Name of the Warehouse.

    • ratedouble

      Selling price of the item

  • is_completedboolean (Required)

    Denotes the status of the bundle. Currently, this has to be true since we didnt support any other status as of now.

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/bundles?organization_id=10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/bundles?organization_id=10234695"
type: POST
content-type: application/json
parameters: parameters_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/bundles?organization_id=10234695")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/bundles?organization_id=10234695",
  "headers": {
    "content-type": "application/json"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"field1":"value1","field2":"value2"}'
};

fetch('https://api.zakya.com/inventory/v1/bundles?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/inventory/v1/bundles?organization_id=10234695", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Body ParametersCopy
{
    "reference_number": "REF-B-00005",
    "date": "2017-01-05",
    "description": "Just a sample description",
    "composite_item_id": 504366000000053250,
    "composite_item_name": "Combo of Apple IPhone and Smartwatch",
    "composite_item_sku": "SKUIS",
    "quantity_to_bundle": 1,
    "line_items": [
        {
            "item_id": 4815000000044208,
            "name": "Combo of Apple IPhone and Smartwatch",
            "description": "Just a sample description",
            "quantity_consumed": 1,
            "unit": "units",
            "account_id": 504366000000000400,
            "account_name": "sales",
            "warehouse_id": 4815000000000390,
            "warehouse_name": "MyWarehouse",
            "rate": 85000
        }
    ],
    "is_completed": true
}
Response ExampleCopy
{
    "code": 0,
    "message": "Bundle has been created.",
    "bundle_id": 504366000000053250,
    "reference_number": "REF-B-00005",
    "date": "2017-01-05",
    "description": "Just a sample description",
    "composite_item_id": 504366000000053250,
    "composite_item_name": "Combo of Apple IPhone and Smartwatch",
    "composite_item_sku": "SKUIS",
    "quantity_to_bundle": 1,
    "line_items": [
        {
            "item_id": 4815000000044208,
            "line_item_id": 504366000000053250,
            "name": "Combo of Apple IPhone and Smartwatch",
            "description": "Just a sample description",
            "quantity_consumed": 1,
            "unit": "units",
            "account_id": 504366000000000400,
            "account_name": "sales",
            "warehouse_id": 4815000000000390,
            "warehouse_name": "MyWarehouse",
            "rate": 85000
        }
    ]
}

Bundling History

List of all bundles of a given composite item.

Query Parameters

  • composite_item_id (Required) 

    Unique ID generated for the composite item by the server. This is used as identifier

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250'
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250"
type: GET
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250")
  .get()
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250",
  "headers": {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {method: 'GET'};

fetch('https://api.zakya.com/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

conn.request("GET", "/inventory/v1/bundles?organization_id=10234695&composite_item_id=504366000000053250")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "bundles": [
        {
            "bundle_id": 504366000000053250,
            "reference_number": "REF-B-00005",
            "date": "2017-01-05",
            "description": "Just a sample description",
            "composite_item_id": 504366000000053250,
            "composite_item_name": "Combo of Apple IPhone and Smartwatch",
            "composite_item_sku": "SKUIS",
            "quantity_to_bundle": 1,
            "line_items": [
                {
                    "item_id": 4815000000044208,
                    "line_item_id": 504366000000053250,
                    "name": "Combo of Apple IPhone and Smartwatch",
                    "description": "Just a sample description",
                    "quantity_consumed": 1,
                    "unit": "units",
                    "account_id": 504366000000000400,
                    "account_name": "sales",
                    "warehouse_id": 4815000000000390,
                    "warehouse_name": "MyWarehouse",
                    "rate": 85000
                }
            ]
        },
        {...},
        {...}
    ]
}

Retrieve Bundle 

Fetches the details for an existing bundle.

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695'
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695"
type: GET
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695")
  .get()
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/bundles/504366000000053250?organization_id=10234695",
  "headers": {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {method: 'GET'};

fetch('https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

conn.request("GET", "/inventory/v1/bundles/504366000000053250?organization_id=10234695")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "bundle": {
        "bundle_id": 504366000000053250,
        "reference_number": "REF-B-00005",
        "date": "2017-01-05",
        "description": "Just a sample description",
        "composite_item_id": 504366000000053250,
        "composite_item_name": "Combo of Apple IPhone and Smartwatch",
        "composite_item_sku": "SKUIS",
        "quantity_to_bundle": 1,
        "line_items": [
            {
                "item_id": 4815000000044208,
                "line_item_id": 504366000000053250,
                "name": "Combo of Apple IPhone and Smartwatch",
                "description": "Just a sample description",
                "quantity_consumed": 1,
                "unit": "units",
                "account_id": 504366000000000400,
                "account_name": "sales",
                "warehouse_id": 4815000000000390,
                "warehouse_name": "MyWarehouse",
                "rate": 85000
            }
        ],
        "is_completed": true
    }
}

Delete Bundle 

Deletes an existing bundle from Zakya.

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695'
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695"
type: DELETE
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "DELETE",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/bundles/504366000000053250?organization_id=10234695",
  "headers": {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {method: 'DELETE'};

fetch('https://api.zakya.com/inventory/v1/bundles/504366000000053250?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

conn.request("DELETE", "/inventory/v1/bundles/504366000000053250?organization_id=10234695")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The bundle has been deleted."
}