Purchase Returns
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
A purchase return is a document used to return goods to vendors. It can be created standalone or from a purchase order. It tracks refund and shipment statuses, and can generate vendor credits, packages, and shipments.
Attribute
draft, confirmed, void, closed.shipped, not_shipped, partially_shipped.refunded, not_refunded, partially_refunded.inventory, sales, purchases, sales_and_purchases, service.10%) or a flat amount.entity_level, item_level.{
"purchasereturn_id": "4815000000044972",
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"total_quantity": 10,
"sub_total": 5000,
"total": 5600,
"purchasereturn_status": "confirmed",
"shipped_status": "not_shipped",
"dn_status": "not_refunded",
"vendor_id": "4815000000044080",
"contact": {
"contact_id": "4815000000044080",
"name": "Bowman & Co"
},
"currency_id": "4815000000000097",
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"line_items": [
{
"line_item_id": "4815000000044897",
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"item_order": 1,
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"quantity_remaining": 3,
"quantity_packed": 2,
"quantity_shipped": 2,
"quantity_returned": 5,
"quantity_cancelled": 0,
"unit": "pcs",
"rate": 1000,
"item_total": 5000,
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_type": "tax",
"tax_percentage": 12,
"location_id": "4815000000044020",
"location_name": "Head Office",
"item_type": "inventory",
"discount": "0.0",
"line_item_taxes": [
{
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_amount": 600
}
]
}
],
"purchaseorders": [
{
"purchaseorder_id": "4815000000044936",
"purchaseorder_number": "PO-00032",
"purchaseorder_date": "2024-01-10"
}
],
"vendorcredits": [
{
"vendor_credit_id": "4815000000045001",
"vendor_credit_number": "DN-00001",
"date": "2024-01-20",
"total": 5600,
"status": "open"
}
],
"billing_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"shipping_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"terms": "Items must be returned in original packaging.",
"template_name": "Standard Template",
"template_id": "4815000000000143",
"location_id": "4815000000044020",
"location_name": "Head Office",
"documents": [
{
"document_id": "4815000000045020",
"file_name": "receipt.pdf",
"file_type": "pdf",
"file_size": 12345
}
],
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"tax_reg_no": "100234567890003",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"tax_total": 600,
"is_inclusive_tax": false,
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"discount_total": 0,
"discount_percent": 0,
"can_create_vendorcredit": true,
"is_adv_tracking_in_package": false
}
Create a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Create a new purchase return in Zoho Inventory. A purchase return can be created standalone or from a purchase order.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Arguments
ignore_auto_number_generation is true. Max-length [50].entity_level, item_level.Query Parameters
Note: This value is a set of numeric characters.true and false.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/purchasereturns?organization_id=10234695"
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/purchasereturns?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 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/purchasereturns?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("POST", "/inventory/v1/purchasereturns?organization_id=10234695", 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/purchasereturns?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"vendor_id": "4815000000044080",
"is_inclusive_tax": false,
"line_items": [
{
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"unit": "pcs",
"rate": 1000,
"item_order": 1,
"tax_id": "4815000000044043",
"tax_exemption_id": "4815000000044055",
"hsn_or_sac": "84713010",
"location_id": "4815000000044020",
"discount": "0.0"
}
],
"terms": "Items must be returned in original packaging.",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": "Rounding adjustment",
"exchange_rate": 1,
"currency_id": "4815000000000097",
"billing_address_id": "4815000000044030",
"shipping_address_id": "4815000000044031",
"location_id": "4815000000044020",
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
]
}
{
"code": 0,
"message": "Purchase return created successfully.",
"purchasereturn": {
"purchasereturn_id": "4815000000044972",
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"total_quantity": 10,
"sub_total": 5000,
"total": 5600,
"purchasereturn_status": "confirmed",
"shipped_status": "not_shipped",
"dn_status": "not_refunded",
"vendor_id": "4815000000044080",
"contact": {
"contact_id": "4815000000044080",
"name": "Bowman & Co"
},
"currency_id": "4815000000000097",
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"line_items": [
{
"line_item_id": "4815000000044897",
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"item_order": 1,
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"quantity_remaining": 3,
"quantity_packed": 2,
"quantity_shipped": 2,
"quantity_returned": 5,
"quantity_cancelled": 0,
"unit": "pcs",
"rate": 1000,
"item_total": 5000,
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_type": "tax",
"tax_percentage": 12,
"location_id": "4815000000044020",
"location_name": "Head Office",
"item_type": "inventory",
"discount": "0.0",
"line_item_taxes": [
{
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_amount": 600
}
]
}
],
"purchaseorders": [
{
"purchaseorder_id": "4815000000044936",
"purchaseorder_number": "PO-00032",
"purchaseorder_date": "2024-01-10"
}
],
"vendorcredits": [
{
"vendor_credit_id": "4815000000045001",
"vendor_credit_number": "DN-00001",
"date": "2024-01-20",
"total": 5600,
"status": "open"
}
],
"billing_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"shipping_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"terms": "Items must be returned in original packaging.",
"template_name": "Standard Template",
"template_id": "4815000000000143",
"location_id": "4815000000044020",
"location_name": "Head Office",
"documents": [
{
"document_id": "4815000000045020",
"file_name": "receipt.pdf",
"file_type": "pdf",
"file_size": 12345
}
],
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"tax_reg_no": "100234567890003",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"tax_total": 600,
"is_inclusive_tax": false,
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"discount_total": 0,
"discount_percent": 0,
"can_create_vendorcredit": true,
"is_adv_tracking_in_package": false
}
}
List all Purchase Returns
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
List all purchase returns in Zoho Inventory. Use query parameters to filter by status, vendor, date range, and other criteria.
OAuth Scope : ZohoInventory.purchasereturns.READ
Query Parameters
Note: This value is a set of numeric characters.Status.All, Status.Draft, Status.Confirmed, Status.Void, Status.Closed.draft, confirmed, void, closed, shipped, refunded, not_shipped, not_refunded, partially_shipped, partially_refunded, packed, not_packed, partially_packed, picked, not_picked, partially_picked.purchasereturn_number, vendor_name, purchaseorder_number, date, created_time, last_modified_time.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns?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/purchasereturns?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/purchasereturns?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/purchasereturns?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/purchasereturns?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/purchasereturns?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"purchasereturns": [
{
"purchasereturn_id": "4815000000044972",
"purchasereturn_number": "PR-00001",
"purchaseorder_number": "PO-00032",
"date": "2024-01-15",
"reason": "Defective items received",
"vendor_id": "4815000000044080",
"vendor_name": "Bowman & Co",
"quantity": 10,
"amount": 5600,
"purchasereturn_status": "confirmed",
"shipment_status": "not_shipped",
"package_status": "not_packed",
"picked_status": "not_picked",
"refund_status": "not_refunded",
"created_time": "2024-01-15T10:30:00+0530",
"last_modified_time": "2024-01-15T10:30:00+0530"
},
{...},
{...}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Purchase Returns",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
}
Update a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update an existing purchase return in Zoho Inventory.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE
Arguments
entity_level, item_level.Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"vendor_id": "4815000000044080",
"is_inclusive_tax": false,
"line_items": [
{
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"unit": "pcs",
"rate": 1000,
"item_order": 1,
"tax_id": "4815000000044043",
"tax_exemption_id": "4815000000044055",
"hsn_or_sac": "84713010",
"location_id": "4815000000044020",
"discount": "0.0"
}
],
"terms": "Items must be returned in original packaging.",
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"shipping_charge": 0,
"adjustment": 0,
"adjustment_description": "Rounding adjustment",
"exchange_rate": 1,
"currency_id": "4815000000000097",
"billing_address_id": "4815000000044030",
"shipping_address_id": "4815000000044031",
"location_id": "4815000000044020",
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
]
}
{
"code": 0,
"message": "Purchase return updated successfully.",
"purchasereturn": {
"purchasereturn_id": "4815000000044972",
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"total_quantity": 10,
"sub_total": 5000,
"total": 5600,
"purchasereturn_status": "confirmed",
"shipped_status": "not_shipped",
"dn_status": "not_refunded",
"vendor_id": "4815000000044080",
"contact": {
"contact_id": "4815000000044080",
"name": "Bowman & Co"
},
"currency_id": "4815000000000097",
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"line_items": [
{
"line_item_id": "4815000000044897",
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"item_order": 1,
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"quantity_remaining": 3,
"quantity_packed": 2,
"quantity_shipped": 2,
"quantity_returned": 5,
"quantity_cancelled": 0,
"unit": "pcs",
"rate": 1000,
"item_total": 5000,
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_type": "tax",
"tax_percentage": 12,
"location_id": "4815000000044020",
"location_name": "Head Office",
"item_type": "inventory",
"discount": "0.0",
"line_item_taxes": [
{
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_amount": 600
}
]
}
],
"purchaseorders": [
{
"purchaseorder_id": "4815000000044936",
"purchaseorder_number": "PO-00032",
"purchaseorder_date": "2024-01-10"
}
],
"vendorcredits": [
{
"vendor_credit_id": "4815000000045001",
"vendor_credit_number": "DN-00001",
"date": "2024-01-20",
"total": 5600,
"status": "open"
}
],
"billing_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"shipping_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"terms": "Items must be returned in original packaging.",
"template_name": "Standard Template",
"template_id": "4815000000000143",
"location_id": "4815000000044020",
"location_name": "Head Office",
"documents": [
{
"document_id": "4815000000045020",
"file_name": "receipt.pdf",
"file_type": "pdf",
"file_size": 12345
}
],
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"tax_reg_no": "100234567890003",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"tax_total": 600,
"is_inclusive_tax": false,
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"discount_total": 0,
"discount_percent": 0,
"can_create_vendorcredit": true,
"is_adv_tracking_in_package": false
}
}
Retrieve a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Retrieve the details of an existing purchase return.
OAuth Scope : ZohoInventory.purchasereturns.READ
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.true to get the print-friendly version of the purchase return.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "success",
"purchasereturn": {
"purchasereturn_id": "4815000000044972",
"purchasereturn_number": "PR-00001",
"reference_number": "REF-001",
"date": "2024-01-15",
"reason": "Defective items received",
"total_quantity": 10,
"sub_total": 5000,
"total": 5600,
"purchasereturn_status": "confirmed",
"shipped_status": "not_shipped",
"dn_status": "not_refunded",
"vendor_id": "4815000000044080",
"contact": {
"contact_id": "4815000000044080",
"name": "Bowman & Co"
},
"currency_id": "4815000000000097",
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"line_items": [
{
"line_item_id": "4815000000044897",
"item_id": "4815000000044100",
"po_item_id": "4815000000044892",
"item_order": 1,
"name": "Hard Drive",
"description": "500GB External Hard Drive",
"quantity": 5,
"quantity_remaining": 3,
"quantity_packed": 2,
"quantity_shipped": 2,
"quantity_returned": 5,
"quantity_cancelled": 0,
"unit": "pcs",
"rate": 1000,
"item_total": 5000,
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_type": "tax",
"tax_percentage": 12,
"location_id": "4815000000044020",
"location_name": "Head Office",
"item_type": "inventory",
"discount": "0.0",
"line_item_taxes": [
{
"tax_id": "4815000000044043",
"tax_name": "GST",
"tax_amount": 600
}
]
}
],
"purchaseorders": [
{
"purchaseorder_id": "4815000000044936",
"purchaseorder_number": "PO-00032",
"purchaseorder_date": "2024-01-10"
}
],
"vendorcredits": [
{
"vendor_credit_id": "4815000000045001",
"vendor_credit_number": "DN-00001",
"date": "2024-01-20",
"total": 5600,
"status": "open"
}
],
"billing_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"shipping_address": {
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
},
"terms": "Items must be returned in original packaging.",
"template_name": "Standard Template",
"template_id": "4815000000000143",
"location_id": "4815000000044020",
"location_name": "Head Office",
"documents": [
{
"document_id": "4815000000045020",
"file_name": "receipt.pdf",
"file_type": "pdf",
"file_size": 12345
}
],
"custom_fields": [
{
"customfield_id": "4815000000044050",
"value": "Priority Return"
}
],
"gst_treatment": "business_gst",
"tax_treatment": "vat_registered",
"vat_treatment": "uk_vat_registered",
"gst_no": "22AAAAA0000A1Z5",
"tax_reg_no": "100234567890003",
"source_of_supply": "33",
"destination_of_supply": "27",
"place_of_supply": "33",
"tax_total": 600,
"is_inclusive_tax": false,
"discount": "0.0",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"discount_total": 0,
"discount_percent": 0,
"can_create_vendorcredit": true,
"is_adv_tracking_in_package": false
}
}
Delete a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Delete an existing purchase return from Zoho Inventory.
OAuth Scope : ZohoInventory.purchasereturns.DELETE
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?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/purchasereturns/4815000000044972?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Purchase return deleted successfully."
}
Confirm a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Change the status of a draft purchase return to confirmed.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/open?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/open?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/open?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("POST", "/inventory/v1/purchasereturns/4815000000044972/status/open?organization_id=10234695", headers=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/purchasereturns/4815000000044972/status/open?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/open?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Purchase return has been confirmed."
}
Void a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Mark an existing purchase return as void.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/void?organization_id=10234695"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/void?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/void?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("POST", "/inventory/v1/purchasereturns/4815000000044972/status/void?organization_id=10234695", headers=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/purchasereturns/4815000000044972/status/void?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/void?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Purchase return has been voided."
}
Fulfill a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Mark the items in a purchase return as fulfilled (shipped back to the vendor).
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Arguments
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972/status/fulfilled?organization_id=10234695"
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/purchasereturns/4815000000044972/status/fulfilled?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 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/purchasereturns/4815000000044972/status/fulfilled?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("POST", "/inventory/v1/purchasereturns/4815000000044972/status/fulfilled?organization_id=10234695", 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/purchasereturns/4815000000044972/status/fulfilled?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/fulfilled?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"line_items": [
{
"purchasereturn_item_id": "4815000000044897",
"quantity": 5
}
]
}
{
"code": 0,
"message": "Purchase return has been fulfilled."
}
Unfulfill a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Reverse the fulfillment of items in a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Arguments
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972/status/unfulfilled?organization_id=10234695"
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/purchasereturns/4815000000044972/status/unfulfilled?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 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/purchasereturns/4815000000044972/status/unfulfilled?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("POST", "/inventory/v1/purchasereturns/4815000000044972/status/unfulfilled?organization_id=10234695", 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/purchasereturns/4815000000044972/status/unfulfilled?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/status/unfulfilled?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"line_items": [
{
"purchasereturn_item_id": "4815000000044897",
"quantity": 5
}
]
}
{
"code": 0,
"message": "Purchase return has been unfulfilled."
}
Email a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Send a purchase return via email to the vendor or specified recipients.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Arguments
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972/email?organization_id=10234695"
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/purchasereturns/4815000000044972/email?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 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/purchasereturns/4815000000044972/email?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("POST", "/inventory/v1/purchasereturns/4815000000044972/email?organization_id=10234695", 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/purchasereturns/4815000000044972/email?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 POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"to_mail_ids": [
"vendor@example.com"
],
"cc_mail_ids": [
"manager@example.com"
],
"bcc_mail_ids": [
"string"
],
"subject": "Purchase Return PR-00001",
"body": "Please find the attached purchase return."
}
{
"code": 0,
"message": "Email has been sent."
}
Add Attachment to a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Attach a file to a purchase return. The file must be multipart/form-data. Allowed extensions: gif, png, jpeg, jpg, bmp, pdf, xls, xlsx, doc, docx, xml, csv, txt, tif, tiff, msg, eml, dwg. Maximum file size is 10 MB.
OAuth Scope : ZohoInventory.purchasereturns.CREATE
Arguments
true to allow the attachment to be sent via email.Path Parameters
Query Parameters
Note: This value is a set of numeric characters.parameters_data = Map();
parameters_data.put("field1", "value1")
parameters_data.put("field2", "value2")
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/attachment?organization_id=10234695"
type: POST
headers: headers_data
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n");
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/attachment?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
.build();
Response response = client.newCall(request).execute();
const form = new FormData();
form.append("field1", "value1");
form.append("field2", "value2");
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
}
};
options.body = form;
fetch('https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/attachment?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 = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "multipart/form-data; boundary=---011000010111000001101001"
}
conn.request("POST", "/inventory/v1/purchasereturns/4815000000044972/attachment?organization_id=10234695", 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/purchasereturns/4815000000044972/attachment?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "multipart/form-data; boundary=---011000010111000001101001"
}
};
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("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n");
req.end();
curl --request POST \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/attachment?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: multipart/form-data' \
--form field1=value1 \
--form field2=value2
Close a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Mark one or more purchase returns as closed. Closing a purchase return cancels the remaining unfulfilled quantities.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE
Arguments
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972,4815000000044980"
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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980")
.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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980', 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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980", 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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980",
"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/purchasereturns/status/closed?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"line_items": [
{
"line_item_id": "4815000000044897",
"qty_cancelled": 2
}
]
}
{
"code": 0,
"message": "Purchase return has been closed."
}
Reopen a Purchase Return
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Reopen one or more closed purchase returns.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE
Query Parameters
Note: This value is a set of numeric characters.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972,4815000000044980"
type: PUT
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.zohoapis.com/inventory/v1/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980")
.put(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://www.zohoapis.com/inventory/v1/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980', 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("PUT", "/inventory/v1/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980", headers=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/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980",
"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 PUT \
--url 'https://www.zohoapis.com/inventory/v1/purchasereturns/status/reopen?organization_id=10234695&purchasereturn_ids=4815000000044972%2C4815000000044980' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"code": 0,
"message": "Purchase return has been reopened."
}
Update Shipping Address
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update the shipping address of a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE
Arguments
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972/address/shipping?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/purchasereturns/4815000000044972/address/shipping?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/purchasereturns/4815000000044972/address/shipping?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/purchasereturns/4815000000044972/address/shipping?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/purchasereturns/4815000000044972/address/shipping?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/purchasereturns/4815000000044972/address/shipping?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
}
{
"code": 0,
"message": "Shipping address updated successfully."
}
Update Billing Address
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Update the billing address of a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE
Arguments
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.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/purchasereturns/4815000000044972/address/billing?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/purchasereturns/4815000000044972/address/billing?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/purchasereturns/4815000000044972/address/billing?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/purchasereturns/4815000000044972/address/billing?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/purchasereturns/4815000000044972/address/billing?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/purchasereturns/4815000000044972/address/billing?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"address": "123 Main St",
"street2": "Suite 100",
"city": "New York",
"state": "New York",
"zip": "10001",
"country": "US",
"fax": "",
"phone": "+1-212-555-0100",
"attention": "John Smith"
}
{
"code": 0,
"message": "Billing address updated successfully."
}
Delete an Attachment
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Delete a file attached to a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.DELETE
Path Parameters
Query Parameters
Note: This value is a set of numeric characters.headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/inventory/v1/purchasereturns/4815000000044972/documents/4815000000045020?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/purchasereturns/4815000000044972/documents/4815000000045020?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/purchasereturns/4815000000044972/documents/4815000000045020?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/purchasereturns/4815000000044972/documents/4815000000045020?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/purchasereturns/4815000000044972/documents/4815000000045020?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/purchasereturns/4815000000044972/documents/4815000000045020?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'