Purchase Returns

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

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.

Download Purchase Returns OpenAPI Document

Attribute

purchasereturn_id
string
Unique ID generated by the server for the purchase return.
purchasereturn_number
string
Unique number assigned to the purchase return.
reference_number
string
Reference number for the purchase return. Max-length [100].
date
string
Date of the purchase return. Format [yyyy-mm-dd].
reason
string
Reason for returning the items to the vendor. Max-length [1000].
total_quantity
double
Total quantity of all items in the purchase return.
sub_total
double
Sub-total of the purchase return (before taxes and adjustments).
total
double
Total amount of the purchase return.
purchasereturn_status
string
Status of the purchase return. Possible values: draft, confirmed, void, closed.
shipped_status
string
Shipment status of the purchase return. Possible values: shipped, not_shipped, partially_shipped.
dn_status
string
Vendor credit (debit note) status of the purchase return. Possible values: refunded, not_refunded, partially_refunded.
vendor_id
string
Unique ID of the vendor associated with the purchase return.
contact
object
Contact details of the vendor.
Show Sub-Attributes arrow
contact_id
string
Unique ID of the contact.
name
string
Name of the contact.
currency_id
string
Unique ID of the currency used in the purchase return.
currency_code
string
Currency code (e.g. USD, INR).
currency_symbol
string
Currency symbol (e.g. $, ₹).
exchange_rate
double
Exchange rate for the currency used.
line_items
array
Line items in the purchase return.
Show Sub-Attributes arrow
line_item_id
string
Unique ID of the line item.
item_id
string
Unique ID of the item.
po_item_id
string
Unique ID of the corresponding purchase order line item.
item_order
integer
Display order of the line item.
name
string
Name of the item.
description
string
Description of the line item.
quantity
double
Quantity being returned.
quantity_remaining
double
Remaining quantity to be processed.
quantity_packed
double
Quantity that has been packed.
quantity_shipped
double
Quantity that has been shipped.
quantity_returned
double
Total quantity returned.
quantity_cancelled
double
Quantity that has been cancelled.
unit
string
Unit of measurement for the item.
rate
double
Rate (price) per unit of the item.
item_total
double
Total amount for this line item.
tax_id
string
Unique ID of the tax applied to this line item.
tax_name
string
Name of the tax applied.
tax_type
string
Type of tax applied.
tax_percentage
double
Tax percentage applied to this line item.
location_id
string
Unique ID of the location for this line item.
location_name
string
Name of the location.
item_type
string
Type of item. Possible values: inventory, sales, purchases, sales_and_purchases, service.
discount
string
Discount applied on the line item.
line_item_taxes
array
Taxes applied on the line item.
Show Sub-Attributes arrow
tax_id
string
Unique ID of the tax.
tax_name
string
Name of the tax.
tax_amount
double
Amount of tax applied.
purchaseorders
array
Purchase orders associated with this purchase return.
Show Sub-Attributes arrow
purchaseorder_id
string
Unique ID of the purchase order.
purchaseorder_number
string
Purchase order number.
purchaseorder_date
string
Date of the purchase order.
vendorcredits
array
Vendor credits associated with this purchase return.
Show Sub-Attributes arrow
vendor_credit_id
string
Unique ID of the vendor credit.
vendor_credit_number
string
Vendor credit number.
date
string
Date of the vendor credit.
total
double
Total amount of the vendor credit.
status
string
Status of the vendor credit.
billing_address
object
Address details.
Show Sub-Attributes arrow
address
string
Street address.
street2
string
Additional street address.
city
string
City.
state
string
State or province.
zip
string
ZIP or postal code.
country
string
Country.
fax
string
Fax number.
phone
string
Phone number.
attention
string
Name of the attention person.
shipping_address
object
Address details.
Show Sub-Attributes arrow
address
string
Street address.
street2
string
Additional street address.
city
string
City.
state
string
State or province.
zip
string
ZIP or postal code.
country
string
Country.
fax
string
Fax number.
phone
string
Phone number.
attention
string
Name of the attention person.
terms
string
Terms and conditions for the purchase return. Max-length [10000].
template_name
string
Name of the PDF template associated with the purchase return.
template_id
string
Unique ID of the PDF template associated with the purchase return.
location_id
string
Unique ID of the location.
location_name
string
Name of the location.
documents
array
Documents attached to the purchase return.
Show Sub-Attributes arrow
document_id
string
Unique ID of the document.
file_name
string
Name of the file.
file_type
string
Type of the file.
file_size
integer
Size of the file in bytes.
custom_fields
array
Custom fields associated with the purchase return.
Show Sub-Attributes arrow
customfield_id
string
Unique ID of the custom field.
value
string
Value of the custom field.
gst_treatment
string
GST treatment for the vendor.
tax_treatment
string
Tax treatment for the vendor.
vat_treatment
string
VAT treatment for the vendor.
gst_no
string
GST identification number. Max-length [15].
tax_reg_no
string
Tax registration number of the vendor.
source_of_supply
string
Source state code for GST.
destination_of_supply
string
Destination state code for GST.
place_of_supply
string
Place of supply state code.
tax_total
double
Total tax amount on the purchase return.
is_inclusive_tax
boolean
Whether the line item rates are inclusive of tax.
discount
string
Discount applied on the purchase return. Can be a percentage (e.g. 10%) or a flat amount.
is_discount_before_tax
boolean
Whether the discount is applied before tax calculation.
discount_type
string
Type of discount applied. Possible values: entity_level, item_level.
discount_total
double
Total discount amount on the purchase return.
discount_percent
double
Discount percentage applied on the purchase return.
can_create_vendorcredit
boolean
Whether a vendor credit can be created from this purchase return.
is_adv_tracking_in_package
boolean
Whether advanced tracking (serial/batch) is enabled for packaging in this purchase return.

Example

{ "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

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

purchasereturn_number
string
Unique number for the purchase return. Required when ignore_auto_number_generation is true. Max-length [50].
reference_number
string
Reference number for the purchase return. Max-length [100].
date
string
(Required)
Date of the purchase return. Format [yyyy-mm-dd].
reason
string
Reason for creating the purchase return. Max-length [1000].
vendor_id
string
(Required)
Unique ID of the vendor.
is_inclusive_tax
boolean
Whether the line item rates are inclusive of tax.
line_items
array
(Required)
Line items in the purchase return.
Show Sub-Attributes arrow
item_id
string
Unique ID of the item.
po_item_id
string
Unique ID of the corresponding purchase order line item.
name
string
Name of the item. Max-length [200].
description
string
Description of the line item. Max-length [1000].
quantity
double
(Required)
Quantity being returned.
unit
string
Unit of measurement. Max-length [120].
rate
double
Rate (price) per unit of the item.
item_order
integer
Display order of the line item.
tax_id
string
Unique ID of the tax to apply to this line item.
tax_exemption_id
string
Unique ID of the tax exemption.
hsn_or_sac
string
HSN or SAC code for the item.
location_id
string
Unique ID of the location.
discount
string
Discount applied on the line item.
terms
string
Terms and conditions. Max-length [10000].
gst_treatment
string
GST treatment for the vendor.
tax_treatment
string
Tax treatment for the vendor.
vat_treatment
string
VAT treatment for the vendor.
source_of_supply
string
Source state code for GST. Max-length [5].
destination_of_supply
string
Destination state code for GST. Max-length [5].
place_of_supply
string
Place of supply state code. Max-length [5].
discount
string
Discount applied on the purchase return.
is_discount_before_tax
boolean
Whether the discount is applied before tax calculation.
discount_type
string
Type of discount. Possible values: entity_level, item_level.
shipping_charge
double
Shipping charges for the purchase return.
adjustment
double
Adjustment amount (positive or negative).
adjustment_description
string
Description for the adjustment. Max-length [100].
exchange_rate
double
Exchange rate for the currency used.
currency_id
string
Unique ID of the currency.
billing_address_id
string
Unique ID of the billing address.
shipping_address_id
string
Unique ID of the shipping address.
location_id
string
Unique ID of the location.
custom_fields
array
Custom fields associated with the purchase return.
Show Sub-Attributes arrow
customfield_id
string
Unique ID of the custom field.
value
string
Value of the custom field.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
ignore_auto_number_generation
boolean
Ignore auto purchase return number generation for this purchase return. This mandates the purchase return number. Allowed values are true and false.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" } ] }

Response Example

{ "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

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

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
filter_by
string
Filter purchase returns by status. Allowed values: Status.All, Status.Draft, Status.Confirmed, Status.Void, Status.Closed.
status
string
Filter by purchase return status. Allowed values: draft, confirmed, void, closed, shipped, refunded, not_shipped, not_refunded, partially_shipped, partially_refunded, packed, not_packed, partially_packed, picked, not_picked, partially_picked.
search_text
string
Search purchase returns by purchase return number, vendor name, or other searchable fields.
sort_column
string
Column by which the list should be sorted. Allowed values: purchasereturn_number, vendor_name, purchaseorder_number, date, created_time, last_modified_time.
page
integer
Page number to be fetched. Default value is 1.
per_page
integer
Number of records to be fetched per page. Default value is 200.

Request Example

Click to copy
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'

Response Example

{ "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

Update an existing purchase return in Zoho Inventory.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE

Arguments

purchasereturn_number
string
Unique number for the purchase return. Max-length [50].
reference_number
string
Reference number for the purchase return. Max-length [100].
date
string
Date of the purchase return. Format [yyyy-mm-dd].
reason
string
Reason for the purchase return. Max-length [1000].
vendor_id
string
Unique ID of the vendor.
is_inclusive_tax
boolean
Whether the line item rates are inclusive of tax.
line_items
array
Line items in the purchase return.
Show Sub-Attributes arrow
item_id
string
Unique ID of the item.
po_item_id
string
Unique ID of the corresponding purchase order line item.
name
string
Name of the item. Max-length [200].
description
string
Description of the line item. Max-length [1000].
quantity
double
(Required)
Quantity being returned.
unit
string
Unit of measurement. Max-length [120].
rate
double
Rate (price) per unit of the item.
item_order
integer
Display order of the line item.
tax_id
string
Unique ID of the tax to apply to this line item.
tax_exemption_id
string
Unique ID of the tax exemption.
hsn_or_sac
string
HSN or SAC code for the item.
location_id
string
Unique ID of the location.
discount
string
Discount applied on the line item.
terms
string
Terms and conditions. Max-length [10000].
gst_treatment
string
GST treatment for the vendor.
tax_treatment
string
Tax treatment for the vendor.
vat_treatment
string
VAT treatment for the vendor.
source_of_supply
string
Source state code for GST. Max-length [5].
destination_of_supply
string
Destination state code for GST. Max-length [5].
place_of_supply
string
Place of supply state code. Max-length [5].
discount
string
Discount applied on the purchase return.
is_discount_before_tax
boolean
Whether the discount is applied before tax calculation.
discount_type
string
Type of discount. Possible values: entity_level, item_level.
shipping_charge
double
Shipping charges for the purchase return.
adjustment
double
Adjustment amount (positive or negative).
adjustment_description
string
Description for the adjustment. Max-length [100].
exchange_rate
double
Exchange rate for the currency used.
currency_id
string
Unique ID of the currency.
billing_address_id
string
Unique ID of the billing address.
shipping_address_id
string
Unique ID of the shipping address.
location_id
string
Unique ID of the location.
custom_fields
array
Custom fields associated with the purchase return.
Show Sub-Attributes arrow
customfield_id
string
Unique ID of the custom field.
value
string
Value of the custom field.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" } ] }

Response Example

{ "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

Retrieve the details of an existing purchase return.
OAuth Scope : ZohoInventory.purchasereturns.READ

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
print
boolean
Set to true to get the print-friendly version of the purchase return.

Request Example

Click to copy
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'

Response Example

{ "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

Delete an existing purchase return from Zoho Inventory.
OAuth Scope : ZohoInventory.purchasereturns.DELETE

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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'

Response Example

{ "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

Change the status of a draft purchase return to confirmed.
OAuth Scope : ZohoInventory.purchasereturns.CREATE

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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'

Response Example

{ "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

Mark an existing purchase return as void.
OAuth Scope : ZohoInventory.purchasereturns.CREATE

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
reason
string
Reason for voiding the purchase return. Max-length [500].

Request Example

Click to copy
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'

Response Example

{ "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

Mark the items in a purchase return as fulfilled (shipped back to the vendor).
OAuth Scope : ZohoInventory.purchasereturns.CREATE

Arguments

line_items
array
Line items to fulfill.
Show Sub-Attributes arrow
purchasereturn_item_id
string
Unique ID of the purchase return line item.
quantity
integer
Quantity to fulfill.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "line_items": [ { "purchasereturn_item_id": "4815000000044897", "quantity": 5 } ] }

Response Example

{ "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

Reverse the fulfillment of items in a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.CREATE

Arguments

line_items
array
Line items to unfulfill.
Show Sub-Attributes arrow
purchasereturn_item_id
string
Unique ID of the purchase return line item.
quantity
integer
Quantity to unfulfill.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "line_items": [ { "purchasereturn_item_id": "4815000000044897", "quantity": 5 } ] }

Response Example

{ "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

Send a purchase return via email to the vendor or specified recipients.
OAuth Scope : ZohoInventory.purchasereturns.CREATE

Arguments

to_mail_ids
array
Array of recipient email addresses.
cc_mail_ids
array
Array of CC email addresses.
bcc_mail_ids
array
Array of BCC email addresses.
subject
string
Subject of the email. Max-length [1000].
body
string
Body of the email. Max-length [100000].

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
send_attachment
boolean
Send the purchase return attachment with the email.
attach_pdf
boolean
Whether to attach the PDF of the purchase return.
file_name
string
Custom file name for the PDF attachment. Max-length [100].

Request Example

Click to copy
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"}'

Body Parameters

Click to copy

Response Example

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

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

attachment
binary
File to attach to the purchase return.
can_send_in_mail
boolean
Set to true to allow the attachment to be sent via email.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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

Body Parameters

Click to copy
{ "attachment": "string", "can_send_in_mail": true }

Response Example

{ "code": 0, "message": "Attachment has been added." }

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

Mark one or more purchase returns as closed. Closing a purchase return cancels the remaining unfulfilled quantities.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE

Arguments

line_items
array
Line items with quantities to cancel.
Show Sub-Attributes arrow
line_item_id
string
Unique ID of the line item.
qty_cancelled
double
Quantity to cancel.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
purchasereturn_ids
string
(Required)
Comma-separated list of purchase return IDs to close. Maximum 200 IDs.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "line_items": [ { "line_item_id": "4815000000044897", "qty_cancelled": 2 } ] }

Response Example

{ "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

Reopen one or more closed purchase returns.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.
purchasereturn_ids
string
(Required)
Comma-separated list of purchase return IDs to reopen. Maximum 200 IDs.

Request Example

Click to copy
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'

Response Example

{ "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

Update the shipping address of a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE

Arguments

address
string
Street address.
street2
string
Additional street address.
city
string
City.
state
string
State or province.
zip
string
ZIP or postal code.
country
string
Country.
fax
string
Fax number.
phone
string
Phone number.
attention
string
Attention person.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" }

Response Example

{ "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

Update the billing address of a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.UPDATE

Arguments

address
string
Street address.
street2
string
Additional street address.
city
string
City.
state
string
State or province.
zip
string
ZIP or postal code.
country
string
Country.
fax
string
Fax number.
phone
string
Phone number.
attention
string
Attention person.

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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"}'

Body Parameters

Click to copy
{ "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" }

Response Example

{ "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

Delete a file attached to a purchase return.
OAuth Scope : ZohoInventory.purchasereturns.DELETE

Path Parameters

purchase_return_id
string
(Required)
Unique identifier of the purchase return.
document_id
string
(Required)
Unique identifier of the document (attachment) to delete.

Query Parameters

organization_id
string
(Required)
ID of the organization. Note: This value is a set of numeric characters.

Request Example

Click to copy
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'

Response Example

{ "code": 0, "message": "Attachment has been deleted." }