Packages

Zakya brings to you, the feature ‘Packages’ with which you can create and assign package slip numbers to the line items in your sales orders and keep track of your packages when they are shipped.

Attribute

  • billing_addressobject

    Customer billing address

    Show Sub-Attributes

    • addressstring

      Name of the street of the customer address

    • citystring

      Name of the city of the customer address

    • statestring

      Name of the state of the customer address

    • zipstring

      Zipcode of the customer address

    • phonestring

      Phone number of the customer

    • faxstring

      Fax number of the customer address

  • contact_personsarray

    Array of contact persons for the customers

    Show Sub-Attributes

    • contact_person_idlong

      Unique ID generated by the server for contact person

  • created_timedate

    Time at which the package was created

  • customer_idlong

    Unique ID generated by the for the customer

  • customer_namestring

    Name of the customer

  • datestring

    Date on which package is prepared

  • emailstring

    Email of contact person

  • is_emailedboolean

    Package is emailed to the customer or not

  • last_modified_timedate

    Time at which the package details were last modified.

  • line_itemsarray

    Details of the items in this package

    Show Sub-Attributes

    • descriptionstring

      Description of the item in package

    • is_invoicedboolean

      Sales order item is invoiced to the customer or not

    • item_custom_fieldsarray

      Custom field of the item in package

      Show Sub-Attributes

      • customfield_idlong

        Unique ID generated by the server for the custom field

      • data_typestring

        Data type of the custom field

      • indexinteger

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

      • is_activelabel

        string

      • Label of the custom fieldplaceholder

        string

      • Placeholder for the custom fieldshow_in_all_pdf

        show_on_pdf

      • valuestring

        Value of the custom field

    • item_idlong

      Unique ID generated by the server of the item in package

    • item_order
    • line_item_idlong

      Unique value generated by the server for an item of sales order in package

    • namestring

      Name of the packaged item

    • quantityfloat

      Number of quantity of line items in sales order

    • so_line_item_idlong

      Unique ID generated by the server for items in sales order

    • skustring

      Stock keeping unit of the item in package

    • unitstring

      Unit of the item in package

  • mobilestring

    Mobile number of the customer

  • notesstring

    Notes for package

  • package_idlong

    Unique ID generated by the server for the package

  • package_numberstring

    Name of the package

  • phonestring

    Phone number of the customer

  • salesorder_idlong

    Unique ID generated by the server for sales order

  • salesorder_numberstring

    Name of the sales order for which package is created

  • shipping_addressobject

    Customer shipping address

    Show Sub-Attributes

    • addressstring

      Name of the street of the customer address

    • citystring

      Name of the city of the customer address

    • statestring

      Name of the state of the customer address

    • zipstring

      Zipcode of the customer address

    • phonestring

      Phone number of the customer

    • faxstring

      Fax number of the customer address

  • template_idlong

    Unique ID generated by the server for the template used for package

  • template_namestring

    Name of the template

  • template_typestring

    Type of template

  • total_quantitystring

    Total quantity in the package

ExampleCopy
[
    {
        "billing_address": {
            "address": "432, Bayside, Queens",
            "city": "New York City",
            "state": "New York",
            "zip": 11364,
            "phone": "+1 (999)999-9999",
            "fax": "416-765-9871"
        },
        "contact_persons": [
            {
                "contact_person_id": 504366000000062000
            }
        ],
        "created_time": "2017-01-11T00:00:00.000Z",
        "customer_id": 504366000000062000,
        "customer_name": "Peter James",
        "date": "2017-01-11",
        "email": "jamespeter@pete.com",
        "is_emailed": false,
        "last_modified_time": "2017-01-11T00:00:00.000Z",
        "line_items": [
            {
                "description": "Mobile Sales description",
                "is_invoiced": false,
                "item_custom_fields": [
                    {
                        "customfield_id": 504366000000053100,
                        "data_type": "check_box",
                        "index": 1,
                        "is_active": null,
                        "label": "VAT ID",
                        "placeholder": "cf-504366000000053126",
                        "show_in_all_pdf": null,
                        "show_on_pdf": null,
                        "value": "GBGD078"
                    }
                ],
                "item_id": 504366000000053200,
                "item_order": null,
                "line_item_id": 504366000000062100,
                "name": "Apple Iphone",
                "quantity": 2,
                "so_line_item_id": 504366000000062000,
                "sku": "SKUM",
                "unit": "units"
            }
        ],
        "mobile": "+1 (999)999-9999",
        "notes": "notes",
        "package_id": 504366000000062100,
        "package_number": "PA-00001",
        "phone": "+1 (999)999-9999",
        "salesorder_id": 504366000000062000,
        "salesorder_number": "SO-00001",
        "shipping_address": {
            "address": "432, Bayside, Queens",
            "city": "New York City",
            "state": "New York",
            "zip": 11364,
            "phone": "+1 (999)999-9999",
            "fax": "416-765-9871"
        },
        "template_id": 14954000000072020,
        "template_name": "Standard Template",
        "template_type": "standard",
        "total_quantity": 1
    }
]

Creating a package

A new package can be created. To create package, URL parameter salesorder_id also needed.

OAuth Scope : ZakyaAPI.packages.CREATE

Arguments

  • package_numberstring

    Name of the package

  • datestring (Required)

    Date on which package is prepared

  • line_itemsarray (Required)

    Details of the items in this package

    Show Sub-Attributes

    • so_line_item_idlong

      Unique ID generated by the server for items in sales order

    • quantityfloat

      Number of quantity of line items in sales order

  • notesstring

    Notes for package

Query Parameters

  • salesorder_id(Required)

    Unique ID generated by the server for sales order

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/packages?organization_id=10234695&salesorder_id=504366000000062000' \
  --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/packages?organization_id=10234695&salesorder_id=504366000000062000"
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/packages?organization_id=10234695&salesorder_id=504366000000062000")
  .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/packages?organization_id=10234695&salesorder_id=504366000000062000",
  "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/packages?organization_id=10234695&salesorder_id=504366000000062000', 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/packages?organization_id=10234695&salesorder_id=504366000000062000", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "package_number": "PA-00001",
    "date": "2017-01-11",
    "line_items": [
        {
            "so_line_item_id": 504366000000062000,
            "quantity": 2
        }
    ],
    "notes": "notes"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Package created successfully. It's now time to ship!",
    "package": [
        {
            "billing_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "contact_persons": [
                {
                    "contact_person_id": 504366000000062000
                }
            ],
            "created_time": "2017-01-11T00:00:00.000Z",
            "customer_id": 504366000000062000,
            "customer_name": "Peter James",
            "date": "2017-01-11",
            "email": "jamespeter@pete.com",
            "is_emailed": false,
            "last_modified_time": "2017-01-11T00:00:00.000Z",
            "line_items": [
                {
                    "description": "Mobile Sales description",
                    "is_invoiced": false,
                    "item_custom_fields": [
                        {
                            "customfield_id": 504366000000053100,
                            "data_type": "check_box",
                            "index": 1,
                            "is_active": null,
                            "label": "VAT ID",
                            "placeholder": "cf-504366000000053126",
                            "show_in_all_pdf": null,
                            "show_on_pdf": null,
                            "value": "GBGD078"
                        }
                    ],
                    "item_id": 504366000000053200,
                    "item_order": null,
                    "line_item_id": 504366000000062100,
                    "name": "Apple Iphone",
                    "quantity": 2,
                    "so_line_item_id": 504366000000062000,
                    "sku": "SKUM",
                    "unit": "units"
                }
            ],
            "mobile": "+1 (999)999-9999",
            "notes": "notes",
            "package_id": 504366000000062100,
            "package_number": "PA-00001",
            "phone": "+1 (999)999-9999",
            "salesorder_id": 504366000000062000,
            "salesorder_number": "SO-00001",
            "shipping_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "template_id": 14954000000072020,
            "template_name": "Standard Template",
            "template_type": "standard",
            "total_quantity": 1
        },
        {...},
        {...}
    ]
}

List all packages

List all existing packages.

OAuth Scope : ZakyaAPI.packages.READ

Query Parameters

  • sort_column 

    sorting column. it can have values as tracking_number|salesorder_number|package_number|date|created_time|last_modified_time|customer_name|customer_id|shipment_date|quantity|delivery_method

  • search_text 

    search the packages by text

  • filter_by 

    filter the packages by status. Status can be All|NotShipped|Shipped|Delivered For example: Status.All

  • packing_number_startswith 

    Used for searching package_id which starts with given number in advanced search option

  • packing_number_contains 

    Used for searching package_id which contains given number in advanced search option

  • salesorder_number_startswith 

    Used for searching salesorder_id which starts with given number in advanced search option

  • salesorder_number_contains 

    Used for searching salesorder_id which contains given number in advanced search option

  • date_start 

    Used for searching packages from specified date Use the node as date_after if specified date is not to be considered

  • date_end 

    Used for searching packages till specified date Use the node as date_before if specified date is not to be considered

  • shipment_date_start 

    Used for searching shipments from specified date Use the node as shipment_date_after if specified date is not to be considered

  • shipment_date_end 

    Used for searching shipments till specified date Use the node as shipment_date_before if specified date is not to be considered

  • customer_name_startswith 

    Used for searching salesorder_id which starts with given number in advanced search option

  • customer_name_contains 

    Used for searching salesorder_id which contains given number in advanced search option

  • delivery_method_startswith 

    Used for searching delivery_method which starts with given string in advanced search option

  • delivery_method_contains 

    Used for searching delivery_method which contains given string in advanced search option

  • status 

    status of the shipment order

  • customer_id 

    Unique ID generated by the for the customer

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/packages?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/packages?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/packages?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/packages?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/packages?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/packages?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "packagea": [
        {
            "created_time": "2017-01-11T00:00:00.000Z",
            "customer_id": 504366000000062000,
            "customer_name": "Peter James",
            "date": "2017-01-11",
            "email": "jamespeter@pete.com",
            "is_emailed": false,
            "last_modified_time": "2017-01-11T00:00:00.000Z",
            "mobile": "+1 (999)999-9999",
            "notes": "notes",
            "package_id": 504366000000062100,
            "package_number": "PA-00001",
            "phone": "+1 (999)999-9999",
            "salesorder_id": 504366000000062000,
            "salesorder_number": "SO-00001",
            "template_id": 14954000000072020,
            "template_name": "Standard Template",
            "template_type": "standard",
            "total_quantity": 1
        },
        {...},
        {...}
    ]
}

Updating a package

Updating details of existing package.

OAuth Scope : ZakyaAPI.packages.UPDATE

Arguments

  • package_numberstring

    Name of the package

  • datestring (Required)

    Date on which package is prepared

  • line_itemsarray (Required)

    Details of the items in this package

    Show Sub-Attributes

    • line_item_idlong

      Unique value generated by the server for an item of sales order in package

    • so_line_item_idlong

      Unique ID generated by the server for items in sales order

    • quantityfloat

      Number of quantity of line items in sales order

  • notesstring

    Notes for package

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?organization_id=10234695", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "package_number": "PA-00001",
    "date": "2017-01-11",
    "line_items": [
        {
            "line_item_id": 504366000000062100,
            "so_line_item_id": 504366000000062000,
            "quantity": 2
        }
    ],
    "notes": "notes"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Package Updated Successfully.",
    "package": [
        {
            "billing_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "contact_persons": [
                {
                    "contact_person_id": 504366000000062000
                }
            ],
            "created_time": "2017-01-11T00:00:00.000Z",
            "customer_id": 504366000000062000,
            "customer_name": "Peter James",
            "date": "2017-01-11",
            "email": "jamespeter@pete.com",
            "is_emailed": false,
            "last_modified_time": "2017-01-11T00:00:00.000Z",
            "line_items": [
                {
                    "description": "Mobile Sales description",
                    "is_invoiced": false,
                    "item_custom_fields": [
                        {
                            "customfield_id": 504366000000053100,
                            "data_type": "check_box",
                            "index": 1,
                            "is_active": null,
                            "label": "VAT ID",
                            "placeholder": "cf-504366000000053126",
                            "show_in_all_pdf": null,
                            "show_on_pdf": null,
                            "value": "GBGD078"
                        }
                    ],
                    "item_id": 504366000000053200,
                    "item_order": null,
                    "line_item_id": 504366000000062100,
                    "name": "Apple Iphone",
                    "quantity": 2,
                    "so_line_item_id": 504366000000062000,
                    "sku": "SKUM",
                    "unit": "units"
                }
            ],
            "mobile": "+1 (999)999-9999",
            "notes": "notes",
            "package_id": 504366000000062100,
            "package_number": "PA-00001",
            "phone": "+1 (999)999-9999",
            "salesorder_id": 504366000000062000,
            "salesorder_number": "SO-00001",
            "shipping_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "template_id": 14954000000072020,
            "template_name": "Standard Template",
            "template_type": "standard",
            "total_quantity": 1
        },
        {...},
        {...}
    ]
}

Retrieving a package

Retrieving details of existing package.

OAuth Scope : ZakyaAPI.packages.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "package": [
        {
            "billing_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "contact_persons": [
                {
                    "contact_person_id": 504366000000062000
                }
            ],
            "created_time": "2017-01-11T00:00:00.000Z",
            "customer_id": 504366000000062000,
            "customer_name": "Peter James",
            "date": "2017-01-11",
            "email": "jamespeter@pete.com",
            "is_emailed": false,
            "last_modified_time": "2017-01-11T00:00:00.000Z",
            "line_items": [
                {
                    "description": "Mobile Sales description",
                    "is_invoiced": false,
                    "item_custom_fields": [
                        {
                            "customfield_id": 504366000000053100,
                            "data_type": "check_box",
                            "index": 1,
                            "is_active": null,
                            "label": "VAT ID",
                            "placeholder": "cf-504366000000053126",
                            "show_in_all_pdf": null,
                            "show_on_pdf": null,
                            "value": "GBGD078"
                        }
                    ],
                    "item_id": 504366000000053200,
                    "item_order": null,
                    "line_item_id": 504366000000062100,
                    "name": "Apple Iphone",
                    "quantity": 2,
                    "so_line_item_id": 504366000000062000,
                    "sku": "SKUM",
                    "unit": "units"
                }
            ],
            "mobile": "+1 (999)999-9999",
            "notes": "notes",
            "package_id": 504366000000062100,
            "package_number": "PA-00001",
            "phone": "+1 (999)999-9999",
            "salesorder_id": 504366000000062000,
            "salesorder_number": "SO-00001",
            "shipment_order": {
                "carrier": "FedEx",
                "delivery_days": 2,
                "delivery_guarantee": true,
                "delivery_method": "LocalCourier",
                "delivery_method_id": 14954000000086028,
                "detailed_status": "Reached a courier facility near Toronto",
                "notes": "notes",
                "service": "FEDEX_2_DAY",
                "shipment_id": 14954000000086344,
                "shipment_number": "SN-00001",
                "shipment_rate": 52,
                "shipping_date": "2017-01-13",
                "status": "shipped",
                "tracking_number": "794656855217"
            },
            "shipping_address": {
                "address": "432, Bayside, Queens",
                "city": "New York City",
                "state": "New York",
                "zip": 11364,
                "phone": "+1 (999)999-9999",
                "fax": "416-765-9871"
            },
            "template_id": 14954000000072020,
            "template_name": "Standard Template",
            "template_type": "standard",
            "total_quantity": 1
        },
        {...},
        {...}
    ]
}

Deleting a package

Deleting an existing package.

OAuth Scope : ZakyaAPI.packages.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?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/packages/504366000000062100?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Whooooosh! Package Deleted Successfully."
}

Bulk print packages

Print package slips.

OAuth Scope : ZakyaAPI.packages.READ

Query Parameters

  • package_ids(Required)

    Export packages as pdf and print them. List of package ids separated by comma

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35' \
  --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/packages/print?organization_id=10234695&package_ids=5.0436600000006205e+35"
type: GET
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35")
  .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/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35",
  "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/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35', 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/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success"
}