Packages
Zoho Inventory 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_address": {
"address": "432, Bayside, Queens",
"city": "New York City",
"state": "New York",
"country": "U.S.A",
"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",
"country": "U.S.A",
"zip": 11364,
"phone": "+1 (999)999-9999",
"fax": "416-765-9871"
},
"template_id": 14954000000072020,
"template_name": "Standard Template",
"template_type": "standard",
"total_quantity": 1,
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
]
}
]
Creating a package
A new package can be created. To create package, URL parameter salesorder_id also needed.
OAuth Scope : ZohoInventory.packages.CREATE
Arguments
Query Parameters
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages?organization_id=10234695&salesorder_id=504366000000062000"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
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://www.zohoapis.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 options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "www.zohoapis.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();
curl --request POST \
--url 'https://www.zohoapis.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"}'
{
"package_number": "PA-00001",
"date": "2017-01-11",
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
],
"line_items": [
{
"so_line_item_id": 504366000000062000,
"quantity": 2
}
],
"notes": "notes"
}
{
"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",
"country": "U.S.A",
"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",
"country": "U.S.A",
"zip": 11364,
"phone": "+1 (999)999-9999",
"fax": "416-765-9871"
},
"template_id": 14954000000072020,
"template_name": "Standard Template",
"template_type": "standard",
"total_quantity": 1,
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
]
},
{...},
{...}
]
}
List all packages
List all existing packages.
OAuth Scope : ZohoInventory.packages.READ
Query Parameters
tracking_number|salesorder_number|package_number|date|created_time|last_modified_time|customer_name|customer_id|shipment_date|quantity|delivery_method
All|NotShipped|Shipped|Delivered
For example: Status.AllUse the node as date_after if specified date is not to be considered
Use the node as date_before if specified date is not to be considered
Use the node as shipment_date_after if specified date is not to be considered
Use the node as shipment_date_before if specified date is not to be considered
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/packages?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.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();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/packages?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"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,
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
]
},
{...},
{...}
]
}
Updating a package
Updating details of existing package.
OAuth Scope : ZohoInventory.packages.UPDATE
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
]
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://www.zohoapis.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 options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "PUT",
"hostname": "www.zohoapis.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();
curl --request PUT \
--url 'https://www.zohoapis.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"}'
{
"package_number": "PA-00001",
"date": "2017-01-11",
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
],
"line_items": [
{
"line_item_id": 504366000000062100,
"so_line_item_id": 504366000000062000,
"quantity": 2
}
],
"notes": "notes"
}
{
"code": 0,
"message": "Package Updated Successfully.",
"package": [
{
"billing_address": {
"address": "432, Bayside, Queens",
"city": "New York City",
"state": "New York",
"country": "U.S.A",
"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",
"country": "U.S.A",
"zip": 11364,
"phone": "+1 (999)999-9999",
"fax": "416-765-9871"
},
"template_id": 14954000000072020,
"template_name": "Standard Template",
"template_type": "standard",
"total_quantity": 1,
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
]
},
{...},
{...}
]
}
Retrieving a package
Retrieving details of existing package.
OAuth Scope : ZohoInventory.packages.READ
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.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();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"package": [
{
"billing_address": {
"address": "432, Bayside, Queens",
"city": "New York City",
"state": "New York",
"country": "U.S.A",
"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",
"country": "U.S.A",
"zip": 11364,
"phone": "+1 (999)999-9999",
"fax": "416-765-9871"
},
"template_id": 14954000000072020,
"template_name": "Standard Template",
"template_type": "standard",
"total_quantity": 1,
"custom_fields": [
{
"customfield_id": 504366000000053100,
"value": "GBGD078"
}
]
},
{...},
{...}
]
}
Deleting a package
Deleting an existing package.
OAuth Scope : ZohoInventory.packages.DELETE
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695"
type: DELETE
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.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 options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "www.zohoapis.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();
curl --request DELETE \
--url 'https://www.zohoapis.com/inventory/v1/packages/504366000000062100?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Whooooosh! Package Deleted Successfully."
}
Bulk print packages
Print package slips.
OAuth Scope : ZohoInventory.packages.READ
Query Parameters
List of package ids separated by comma
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/packages/print?organization_id=10234695&package_ids=5.0436600000006205e+35"
type: GET
headers: headers_data
connection: <connection_name>
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.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 options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.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("www.zohoapis.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"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "www.zohoapis.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();
curl --request GET \
--url 'https://www.zohoapis.com/inventory/v1/packages/print?organization_id=10234695&package_ids=5.0436600000006205e%2B35' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success"
}