- Introduction
- OAuth
- HTTP Methods
- Response
- Errors
- Pagination
- Organizations
- Contacts
- Contact Persons
- Item Groups
- Items
- Composite Items
- Item Adjustments
- Transfer Orders
- Sales Orders
- Packages
- Shipment Orders
- Invoices
- Overview
- Create an invoice
- List invoices
- Update an invoice
- Get an invoice
- Delete an invoice
- Mark an invoice as sent
- Void an invoice
- Mark as draft
- Email an invoice
- Get invoice email content
- Email invoices
- Get payment reminder mail content
- Bulk export Invoices
- Bulk print invoices
- Disable payment reminder
- Enable payment reminder
- Write off invoice
- Cancel write off
- Update billing address
- Update shipping address
- List invoice templates
- Update invoice template
- List invoice payments
- List credits applied
- Apply credits
- Delete a payment
- Delete applied credit
- Add attachment to an invoice
- Update attachment preference
- Get an invoice attachment
- Delete an attachment
- Add comment
- List invoice comments & history
- Update comment
- Delete a comment
- Retainer Invoices
- Overview
- Create a retainer invoice
- List a retainer invoices
- update a retainer invoice
- Get a retainer invoice
- Delete a retainer invoice
- Mark a retainer invoice as sent
- Update retainer invoice template
- Void a retainer invoice
- Mark as draft
- Submit a retainer invoice for approval
- Approve a retainer invoice.
- Email a retainer invoice
- Get retainer invoice email content
- Update billing address
- List retainer invoice templates
- Add attachment to a retainer invoice
- Get a retainer invoice attachment
- Delete an attachment
- Add comment
- List retainer invoice comments & history
- Update comment
- Delete a comment
- Customer Payments
- Sales Returns
- Credit Notes
- Overview
- Create a credit note
- List all Credit Notes
- Update a credit note
- Get a credit note
- Delete a credit note
- Email a credit note
- Get email content
- Void a Credit Note
- Convert Credit Note to Draft
- Convert credit note to Open
- Submit a credit note for approval
- Approve a credit note
- Email history
- Update billing address
- Update Shipping address
- List the credit note templates
- Update a credit note template
- Apply credits to invoices
- List invoices credited
- Delete credits applied to an invoice
- Add a comment
- List credit note comments & history
- Delete a Comment
- List credit note refunds
- Refund credit note
- List refunds of a credit note
- Update credit note refund
- Get credit note refund
- Delete credit note refund
- Purchase Orders
- Purchase Receives
- Bills
- Vendor Credits
- Overview
- Create a vendor credit
- List vendor credits
- Update vendor credit
- Get vendor credit
- Delete vendor credit
- Convert to open
- Void vendor credit
- Submit a Vendor credit for approval
- Approve a Vendor credit
- Apply credits to a bill
- List bills credited
- Delete bills credited
- Refund a vendor credit
- List refunds of a vendor credit
- Update vendor credit refund
- Get vendor credit refund
- Delete vendor credit refund
- List vendor credit refunds
- Add a comment
- List vendor credit comments & history
- Delete a comment
- Warehouse Settings
- Price Lists
- Taxes
Sales Orders
A sales order is a financial document that confirms an impending sale. It details the exact quantity, price and delivery details of the products or services being sold. Perform the simple operations mentioned below to create and manage your Sales Orders.
Attribute
- salesorder_idlong
Unique ID generated by the server for the Sales Order. This is used as identifier.
- salesorder_numberstring
The Sales Order number. This is unique for each sales order.
- datestring
The date for the Sales Order.
- statusstring
The current status of the Sales Order.
- shipment_datestring
Shipment date of the Sales Order.
- reference_numberstring
Reference number of the Sales Order
- customer_idlong
Unique ID generated for the customer. This is used as an identifier.
- customer_namestring
Name of the customer.
- contact_personsarray
List of contact persons details.
Show Sub-Attributes
- contact_person_idlong
Unique ID generated by the server for the contact person
- currency_idlong
Unique ID generated by the server for the currency. This is used as an identifier.
- currency_codestring
Currency code.
- currency_symbolstring
The symbol for the selected currency.
- exchange_ratedouble
Exchange rate of the currency, with respect to the base currency.
- discount_amountdouble
Discount to be applied on the Sales Order.
- discountdouble
The percentage of Discount applied.
- is_discount_before_taxboolean
Used to check whether the discount is applied before tax or after tax.
- discount_typestring
Type of discount. Allowed values are entity_level,item_level. For entity_level type, discount is applied at entity level and the node discount resides outside the line_items node.For item_level type, discount is applied at item level and the node discount resides inside each line_item under the line_items node
- estimate_idlong
Unique ID generated by the server from the Estimate created in Zoho Books. This is used as an identifier.
- delivery_methodstring
Delivery method of the shipment.
- delivery_method_idlong
Unique ID generated by the server for the delivery method. This is used as an identifier.
- line_itemsarray
A sales order can contain multiple line items. Each line item contains item_id,name,description,rate,quantity,unit,tax_id,tax_name,tax_type,tax_percentage,item_total.
Show Sub-Attributes
- item_idlong
Unique ID generated by the server for the item. This is used as an identifier.
- line_item_idlong
Unique ID generated by the server for each line item. This is used as an identifier.
- namestring
Name of the line item.
- descriptionstring
Description of the line item.
- item_orderinteger
The order of the line items, starts from 0 by default.
- bcy_ratedouble
Item rate in the organization's base currency.
- ratedouble
Rate / Selling Price of the line item.
- quantitydouble
Quantity of the line item.
- quantity_invoiceddouble
Quantity invoiced of the line item.
- quantity_packeddouble
Quantity packed of the line item.
- quantity_shippeddouble
Quantity shipped of the line item.
- unitstring
Unit of line item.
- tax_idlong
Unique ID generated by the server for the tax. This is used as an identifier.
- tax_namestring
Name of the tax applied on the line item.
- tax_typestring
Denotes the type of the tax. This can either be a single tax or a tax group.
- tax_percentagedouble
Percentage of the tax.
- item_totaldouble
Total of line item.
- is_invoicedboolean
Checks whether the Sales Order has been invoiced or not.
- image_iddouble
Unique ID generated by the server for the item image. This is used an identifier.
- image_namestring
Name of the image of the line item.
- image_typestring
The type (file format) of the image.
- warehouse_idlong
Unique ID generated by the server for the ware houses
- hsn_or_sacstring
Add HSN/SAC code for your goods/services
- shipping_chargedouble
Shipping charges that can be applied to the Sales Order.
- adjustmentdouble
Adjustment on the Sales Order's total.
- adjustment_descriptionstring
Description for the adjustment.
- sub_totaldouble
Sub total of the Sales Order.
- tax_totaldouble
Tax total of the Sales Order.
- totaldouble
Total amount of the Sales Order.
- taxesarray
Number of taxes applied on sales order. Each tax contains: tax_name and tax_amount.
Show Sub-Attributes
- tax_namestring
Name of the tax applied on the line item.
- tax_amountdouble
Amount of the tax.
- price_precisioninteger
The precision level for the price's decimal point in a Sales Order.
- pricebook_idstring
Unique ID generated by the server for the Pricebook. This is used as an identifier.
- shipping_addressarray
Customer's shipping address. It contains - address, city, state, zip, country and fax.
Show Sub-Attributes
- addressstring
Name of the street of the customer’s shipping address.
- citystring
Name of the city of the customer’s shipping address.
- statestring
Name of the state of the customer's shipping address.
- zipstring
Zip code of the customer’s shipping address.
- countrystring
Name of the country of the customer’s shipping address.
- faxstring
Fax number of the customer’s shipping address.
- billing_addressarray
Customer's billing address. It contains - address, city, state, zip, country and fax.
Show Sub-Attributes
- addressstring
Name of the street of the customer’s shipping address.
- citystring
Name of the city of the customer’s shipping address.
- statestring
Name of the state of the customer's shipping address.
- zipstring
Zip code of the customer’s shipping address.
- countrystring
Name of the country of the customer’s shipping address.
- faxstring
Fax number of the customer’s shipping address.
- notesstring
Notes for the Sales Order.
- termsstring
Terms for the Sales Order.
- template_idlong
Unique ID generated by the server for the Template. This is used as an identifier.
- template_namestring
Name of the template used for the Sales Order.
- template_typestring
Type of the template.
- created_timestring
Time at which the Sales Order was created.
- last_modified_timestring
Time at which the sales order details were last modified.
- salesperson_idstring
Unique ID generated by the server for the sales person. This is used as an identifier.
- salesperson_namestring
Name of the Sales Person.
- documentsarray
Sales order can have files attached to them. Each attachment has the following attributes can_send_in_mail, file_name, file_type, file_size_formatted, attachment_order, document_id, file_size.
Show Sub-Attributes
- can_send_in_mailboolean
Checks whether the sales order can be sent as a mail or not.
- file_namestring
This indicates the name of the file.
- file_typestring
This indicates the type of the file.
- file_size_formattedstring
This indicates the size of the formatted file.
- attachment_orderinteger
This indicates the chronological number of the attachment.
- document_idlong
Unique ID generated by the server for the document. This is used as an identifier.
- file_sizelong
this indicates the size of the attached file.
- is_pre_gstboolean
Applicable for transactions that fall before july 1, 2017
- gst_nostring
15 digit GST identification number of the customer.
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
- place_of_supplystring
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
- POST /inventory/v1/salesorders
- GET /inventory/v1/salesorders
- PUT /inventory/v1/salesorders/{salesorder_id}
- GET /inventory/v1/salesorders/{salesorder_id}
- DELETE /inventory/v1/salesorders/{salesorder_id}
- POST /inventory/v1/salesorders/{salesorder_id}/status/confirmed
- POST /inventory/v1/salesorders/{salesorder_id}/status/void
{
"salesorder_id": 4815000000044895,
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"status": "fulfilled",
"shipment_date": "2015-06-02",
"reference_number": "REF-S-00003",
"customer_id": 4815000000044080,
"customer_name": "Molly",
"contact_persons": [
{
"contact_person_id": 4815000000044080
}
],
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"discount_amount": 0,
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"estimate_id": 4815000000045091,
"delivery_method": "FedEx",
"delivery_method_id": 4815000000044822,
"line_items": [
{
"item_id": 4815000000044100,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"item_order": 0,
"bcy_rate": 122,
"rate": 122,
"quantity": 2,
"quantity_invoiced": 2,
"quantity_packed": 2,
"quantity_shipped": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"is_invoiced": true,
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"shipping_charge": 7,
"adjustment": 0,
"adjustment_description": "Just an example description.",
"sub_total": 244,
"tax_total": 29,
"total": 350,
"taxes": [
{
"tax_name": "Sales Tax",
"tax_amount": 29.28
}
],
"price_precision": 2,
"pricebook_id": 4815000000044054,
"shipping_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"billing_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"notes": "Sample Note",
"terms": "Terms and Conditions",
"template_id": 4815000000017003,
"template_name": "Standard",
"template_type": "standard",
"created_time": "2015-05-28T00:00:00.000Z",
"last_modified_time": "2015-05-28T00:00:00.000Z",
"salesperson_id": 4815000000044762,
"salesperson_name": "Lara",
"documents": [
{
"can_send_in_mail": true,
"file_name": "sample.pdf",
"file_type": "pdf",
"file_size_formatted": "116.8 KB",
"attachment_order": 1,
"document_id": 16115000000096068,
"file_size": 11957
}
],
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"place_of_supply": "TN"
}
Create a Sales Order
Creates a new Sales Order in Zakya. Description about extra parameter ignore_auto_number_generation - Ignore auto sales order number generation for this sales order. This mandates the Sales Order number to be entered. Allowed Values true and false.
OAuth Scope : ZakyaAPI.salesorders.CREATE
Arguments
- customer_idlong (Required)
Unique ID generated for the customer. This is used as an identifier.
- salesorder_numberstring (Required)
The Sales Order number. This is unique for each sales order.
- datestring
The date for the Sales Order.
- shipment_datestring
Shipment date of the Sales Order.
- custom_fieldsarray
Show Sub-Attributes
- custom_field_idlong
- indexinteger
Index of the custom field
- labelstring
Label of the Custom Field
- valuestring
Value of the Custom Field
- reference_numberstring
Reference number of the Sales Order
- line_itemsarray (Required)
A sales order can contain multiple line items. Each line item contains item_id,name,description,rate,quantity,unit,tax_id,tax_name,tax_type,tax_percentage,item_total.
Show Sub-Attributes
- item_idlong
Unique ID generated by the server for the item. This is used as an identifier.
- namestring
Name of the line item.
- descriptionstring
Description of the line item.
- ratedouble
Rate / Selling Price of the line item.
- quantitydouble
Quantity of the line item.
- unitstring
Unit of line item.
- tax_idlong
Unique ID generated by the server for the tax. This is used as an identifier.
- tax_namestring
Name of the tax applied on the line item.
- tax_typestring
Denotes the type of the tax. This can either be a single tax or a tax group.
- tax_percentagedouble
Percentage of the tax.
- item_totaldouble
Total of line item.
- warehouse_idlong
Unique ID generated by the server for the ware houses
- hsn_or_sacstring
Add HSN/SAC code for your goods/services
- notesstring
Notes for the Sales Order.
- termsstring
Terms for the Sales Order.
- discountdouble
The percentage of Discount applied.
- is_discount_before_taxboolean
Used to check whether the discount is applied before tax or after tax.
- discount_typestring
Type of discount. Allowed values are entity_level,item_level. For entity_level type, discount is applied at entity level and the node discount resides outside the line_items node.For item_level type, discount is applied at item level and the node discount resides inside each line_item under the line_items node
- shipping_chargedouble
Shipping charges that can be applied to the Sales Order.
- delivery_methodstring
Delivery method of the shipment.
- adjustmentdouble
Adjustment on the Sales Order's total.
- pricebook_idstring
Unique ID generated by the server for the Pricebook. This is used as an identifier.
- salesperson_idstring
Unique ID generated by the server for the sales person. This is used as an identifier.
- adjustment_descriptionstring
Description for the adjustment.
- is_inclusive_taxboolean
Used to specify whether the line item rates are inclusive or exclusive of tax.
- exchange_ratedouble
Exchange rate of the currency, with respect to the base currency.
- template_idlong
Unique ID generated by the server for the Template. This is used as an identifier.
- documentsarray
Sales order can have files attached to them. Each attachment has the following attributes can_send_in_mail, file_name, file_type, file_size_formatted, attachment_order, document_id, file_size.
Show Sub-Attributes
- can_send_in_mailboolean
Checks whether the sales order can be sent as a mail or not.
- file_namestring
This indicates the name of the file.
- file_typestring
This indicates the type of the file.
- file_size_formattedstring
This indicates the size of the formatted file.
- attachment_orderinteger
This indicates the chronological number of the attachment.
- document_idlong
Unique ID generated by the server for the document. This is used as an identifier.
- file_sizelong
this indicates the size of the attached file.
- billing_address_idlong
Unique Id generated by the server for address in contacts page. To add a billing address to sales order, send the address_id using this node. Else, the default billing address for that contact is used
- shipping_address_idlong
Unique Id generated by the server for address in contacts page. To add a shipping address to sales order, send the address_id using this node. Else, the default shipping address for that contact is used
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
- gst_nostring
15 digit GST identification number of the customer.
Query Parameters
- ignore_auto_number_generation
Ignore auto sales order number generation for this sales order. This mandates the sales order number. Allowed values are
, .
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/salesorders?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"customer_id": 4815000000044080,
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"shipment_date": "2015-06-02",
"custom_fields": [
{
"custom_field_id": 0,
"index": 0,
"label": "string",
"value": "string"
}
],
"reference_number": "REF-S-00003",
"line_items": [
{
"item_id": 4815000000044100,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"rate": 122,
"quantity": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"notes": "Sample Note",
"terms": "Terms and Conditions",
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"shipping_charge": 7,
"delivery_method": "FedEx",
"adjustment": 0,
"pricebook_id": 4815000000044054,
"salesperson_id": 4815000000044762,
"adjustment_description": "Just an example description.",
"is_inclusive_tax": false,
"exchange_rate": 1,
"template_id": 4815000000017003,
"documents": [
{
"can_send_in_mail": true,
"file_name": "sample.pdf",
"file_type": "pdf",
"file_size_formatted": "116.8 KB",
"attachment_order": 1,
"document_id": 16115000000096068,
"file_size": 11957
}
],
"billing_address_id": 4815000000017005,
"shipping_address_id": 4815000000017005,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5"
}
{
"code": 0,
"message": "success",
"sales_order": {
"salesorder_id": 4815000000044895,
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"status": "fulfilled",
"shipment_date": "2015-06-02",
"reference_number": "REF-S-00003",
"customer_id": 4815000000044080,
"customer_name": "Molly",
"contact_persons": [
{
"contact_person_id": 4815000000044080
}
],
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"discount_amount": 0,
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"estimate_id": 4815000000045091,
"delivery_method": "FedEx",
"delivery_method_id": 4815000000044822,
"line_items": [
{
"item_id": 4815000000044100,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"item_order": 0,
"bcy_rate": 122,
"rate": 122,
"quantity": 2,
"quantity_invoiced": 2,
"quantity_packed": 2,
"quantity_shipped": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"is_invoiced": true,
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"shipping_charge": 7,
"adjustment": 0,
"adjustment_description": "Just an example description.",
"sub_total": 244,
"tax_total": 29,
"total": 350,
"taxes": [
{
"tax_name": "Sales Tax",
"tax_amount": 29.28
}
],
"price_precision": 2,
"pricebook_id": 4815000000044054,
"shipping_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"billing_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"notes": "Sample Note",
"terms": "Terms and Conditions",
"template_id": 4815000000017003,
"template_name": "Standard",
"template_type": "standard",
"created_time": "2015-05-28T00:00:00.000Z",
"last_modified_time": "2015-05-28T00:00:00.000Z",
"salesperson_id": 4815000000044762,
"salesperson_name": "Lara",
"documents": [
{
"can_send_in_mail": true,
"file_name": "sample.pdf",
"file_type": "pdf",
"file_size_formatted": "116.8 KB",
"attachment_order": 1,
"document_id": 16115000000096068,
"file_size": 11957
}
],
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"place_of_supply": "TN"
}
}
List all Sales Orders
Lists all the available Sales Orders in Zakya.
OAuth Scope : ZakyaAPI.salesorders.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/salesorders?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/salesorders?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"salesorders": [
{
"salesorder_id": 4815000000044895,
"customer_name": "Molly",
"customer_id": 4815000000044080,
"status": "fulfilled",
"salesorder_number": "SO-00003",
"reference_number": "REF-S-00003",
"date": "2015-05-28",
"shipment_date": "2015-06-02",
"shipment_days": 2,
"quantity": 2,
"quantity_invoiced": 2,
"quantity_packed": 2,
"quantity_shipped": 2,
"currency_code": "USD",
"total": 350,
"bcy_total": 33,
"created_time": "2015-05-28T00:00:00.000Z",
"last_modified_time": "2015-05-28T00:00:00.000Z",
"is_emailed": true,
"is_drop_shipment": false,
"is_backorder": false,
"sales_channel": "direct_sales",
"custom_fields": [
{
"custom_field_id": 0,
"index": 0,
"label": "string",
"value": "string"
}
]
},
{...},
{...}
]
}
Update a Sales Order
Updates a new Sales Order in Zakya. Description about extra parameter ignore_auto_number_generation - Ignore auto sales order number generation for this sales order. This mandates the Sales Order number to be entered. Allowed Values true and false.
OAuth Scope : ZakyaAPI.salesorders.UPDATE
Arguments
- salesorder_numberstring (Required)
The Sales Order number. This is unique for each sales order.
- datestring
The date for the Sales Order.
- shipment_datestring
Shipment date of the Sales Order.
- custom_fieldsarray
Show Sub-Attributes
- custom_field_idlong
- indexinteger
Index of the custom field
- labelstring
Label of the Custom Field
- valuestring
Value of the Custom Field
- reference_numberstring
Reference number of the Sales Order
- customer_idlong (Required)
Unique ID generated for the customer. This is used as an identifier.
- contact_personsarray
List of contact persons details.
Show Sub-Attributes
- contact_person_idlong
Unique ID generated by the server for the contact person
- discountdouble
The percentage of Discount applied.
- is_discount_before_taxboolean
Used to check whether the discount is applied before tax or after tax.
- discount_typestring
Type of discount. Allowed values are entity_level,item_level. For entity_level type, discount is applied at entity level and the node discount resides outside the line_items node.For item_level type, discount is applied at item level and the node discount resides inside each line_item under the line_items node
- delivery_methodstring
Delivery method of the shipment.
- shipping_chargedouble
Shipping charges that can be applied to the Sales Order.
- adjustmentdouble
Adjustment on the Sales Order's total.
- adjustment_descriptionstring
Description for the adjustment.
- pricebook_idstring
Unique ID generated by the server for the Pricebook. This is used as an identifier.
- notesstring
Notes for the Sales Order.
- salesperson_namestring
Name of the Sales Person.
- termsstring
Terms for the Sales Order.
- exchange_ratedouble
Exchange rate of the currency, with respect to the base currency.
- line_itemsarray (Required)
A sales order can contain multiple line items. Each line item contains item_id,name,description,rate,quantity,unit,tax_id,tax_name,tax_type,tax_percentage,item_total.
Show Sub-Attributes
- line_item_idlong
Unique ID generated by the server for each line item. This is used as an identifier.
- item_idlong
Unique ID generated by the server for the item. This is used as an identifier.
- namestring
Name of the line item.
- descriptionstring
Description of the line item.
- ratedouble
Rate / Selling Price of the line item.
- quantitydouble
Quantity of the line item.
- unitstring
Unit of line item.
- tax_idlong
Unique ID generated by the server for the tax. This is used as an identifier.
- tax_namestring
Name of the tax applied on the line item.
- tax_typestring
Denotes the type of the tax. This can either be a single tax or a tax group.
- tax_percentagedouble
Percentage of the tax.
- item_totaldouble
Total of line item.
- warehouse_idlong
Unique ID generated by the server for the ware houses
- hsn_or_sacstring
Add HSN/SAC code for your goods/services
- billing_address_idlong
Unique Id generated by the server for address in contacts page. To add a billing address to sales order, send the address_id using this node. Else, the default billing address for that contact is used
- shipping_address_idlong
Unique Id generated by the server for address in contacts page. To add a shipping address to sales order, send the address_id using this node. Else, the default shipping address for that contact is used
- gst_treatmentstring
Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .
- gst_nostring
15 digit GST identification number of the customer.
Query Parameters
- ignore_auto_number_generation
Ignore auto sales order number generation for this sales order. This mandates the sales order number. Allowed values are true, false.
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders/4815000000044895?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/salesorders/4815000000044895?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"shipment_date": "2015-06-02",
"custom_fields": [
{
"custom_field_id": 0,
"index": 0,
"label": "string",
"value": "string"
}
],
"reference_number": "REF-S-00003",
"customer_id": 4815000000044080,
"contact_persons": [
{
"contact_person_id": 4815000000044080
}
],
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"delivery_method": "FedEx",
"shipping_charge": 7,
"adjustment": 0,
"adjustment_description": "Just an example description.",
"pricebook_id": 4815000000044054,
"notes": "Sample Note",
"salesperson_name": "Lara",
"terms": "Terms and Conditions",
"exchange_rate": 1,
"line_items": [
{
"line_item_id": 4815000000044897,
"item_id": 4815000000044100,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"rate": 122,
"quantity": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"billing_address_id": 4815000000017005,
"shipping_address_id": 4815000000017005,
"gst_treatment": "business_gst",
"gst_no": "22AAAAA0000A1Z5"
}
{
"code": 0,
"message": "Sales Order has been updated.",
"sales_order": {
"salesorder_id": 4815000000044895,
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"status": "fulfilled",
"shipment_date": "2015-06-02",
"reference_number": "REF-S-00003",
"customer_id": 4815000000044080,
"customer_name": "Molly",
"contact_persons": [
{
"contact_person_id": 4815000000044080
}
],
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"discount_amount": 0,
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"estimate_id": 4815000000045091,
"delivery_method": "FedEx",
"delivery_method_id": 4815000000044822,
"line_items": [
{
"item_id": 4815000000044100,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"item_order": 0,
"bcy_rate": 122,
"rate": 122,
"quantity": 2,
"quantity_invoiced": 2,
"quantity_packed": 2,
"quantity_shipped": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"is_invoiced": true,
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"shipping_charge": 7,
"adjustment": 0,
"adjustment_description": "Just an example description.",
"sub_total": 244,
"tax_total": 29,
"total": 350,
"taxes": [
{
"tax_name": "Sales Tax",
"tax_amount": 29.28
}
],
"price_precision": 2,
"pricebook_id": 4815000000044054,
"packages": [
{
"package_id": 4815000000044905,
"package_number": "PK-00004",
"status": "fulfilled",
"detailed_status": "Delivered",
"status_message": "Delivered",
"shipment_id": 4815000000044917,
"shipment_number": "SH-00004",
"shipment_status": 3,
"carrier": "FedEx",
"service": "SMART_POST",
"tracking_number": "TRK214124124",
"shipment_date": "2015-06-02",
"delivery_days": 12,
"delivery_guarantee": true
}
],
"invoices": [
{
"invoice_id": 4815000000045091,
"invoice_number": "INV-001",
"status": "fulfilled",
"date": "2015-05-28",
"due_date": "2015-06-13",
"total": 350,
"balance": 0
}
],
"shipping_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"billing_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"notes": "Sample Note",
"terms": "Terms and Conditions",
"template_id": 4815000000017003,
"template_name": "Standard",
"template_type": "standard",
"created_time": "2015-05-28T00:00:00.000Z",
"last_modified_time": "2015-05-28T00:00:00.000Z",
"attachment_name": "sample.pdf",
"can_send_in_mail": true,
"salesperson_id": 4815000000044762,
"salesperson_name": "Lara",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"place_of_supply": "TN"
}
}
Retrieve a Sales Order
Retrieves the details for an existing Sales Order.
OAuth Scope : ZakyaAPI.salesorders.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders/4815000000044895?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/salesorders/4815000000044895?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"sales_order": {
"salesorder_id": 4815000000044895,
"documents": [
{
"can_send_in_mail": true,
"file_name": "sample.pdf",
"file_type": "pdf",
"file_size_formatted": "116.8 KB",
"attachment_order": 1,
"document_id": 16115000000096068,
"file_size": 11957
}
],
"salesorder_number": "SO-00003",
"date": "2015-05-28",
"status": "fulfilled",
"shipment_date": "2015-06-02",
"reference_number": "REF-S-00003",
"customer_id": 4815000000044080,
"customer_name": "Molly",
"contact_persons": [
{
"contact_person_id": 4815000000044080
}
],
"currency_id": 4815000000000097,
"currency_code": "USD",
"currency_symbol": "$",
"exchange_rate": 1,
"discount_amount": 0,
"discount": "20.00%",
"is_discount_before_tax": true,
"discount_type": "entity_level",
"estimate_id": 4815000000045091,
"delivery_method": "FedEx",
"delivery_method_id": 4815000000044822,
"is_inclusive_tax": false,
"sales_channel": "direct_sales",
"is_dropshipped": false,
"is_backordered": false,
"is_backorder_allowed": false,
"line_items": [
{
"item_id": 4815000000044100,
"line_item_id": 4815000000044897,
"name": "Laptop-white/15inch/dell",
"description": "Just a sample description.",
"item_order": 0,
"bcy_rate": 122,
"rate": 122,
"quantity": 2,
"quantity_invoiced": 2,
"quantity_packed": 2,
"quantity_shipped": 2,
"unit": "qty",
"tax_id": 4815000000044043,
"tax_name": "Sales Tax",
"tax_type": "tax",
"tax_percentage": 12,
"item_total": 244,
"is_invoiced": true,
"image_id": 2077500000000002000,
"image_name": "dell.jpg",
"image_type": "jpg",
"warehouse_id": 130426000000664020,
"hsn_or_sac": 80540
}
],
"shipping_charge": 7,
"adjustment": 0,
"pricebook_id": 4815000000044054,
"adjustment_description": "Just an example description.",
"sub_total": 244,
"tax_total": 29,
"total": 350,
"taxes": [
{
"tax_name": "Sales Tax",
"tax_amount": 29.28
}
],
"price_precision": 2,
"is_emailed": true,
"has_unconfirmed_line_item": true,
"packages": [
{
"package_id": 4815000000044905,
"package_number": "PK-00004",
"status": "fulfilled",
"detailed_status": "Delivered",
"status_message": "Delivered",
"shipment_id": 4815000000044917,
"shipment_number": "SH-00004",
"shipment_status": 3,
"carrier": "FedEx",
"service": "SMART_POST",
"tracking_number": "TRK214124124",
"shipment_date": "2015-06-02",
"delivery_days": 12,
"delivery_guarantee": true
}
],
"invoices": [
{
"invoice_id": 4815000000045091,
"invoice_number": "INV-001",
"status": "fulfilled",
"date": "2015-05-28",
"due_date": "2015-06-13",
"total": 350,
"balance": 0
}
],
"purchaseorders": [
"string"
],
"billing_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"shipping_address": [
{
"address": "No:432,Bayside,Queens",
"city": "New York City",
"state": "New York",
"zip": 11364,
"country": "U.S.A",
"fax": "424-524242"
}
],
"notes": "Sample Note",
"terms": "Terms and Conditions",
"custom_fields": [
{
"custom_field_id": 0,
"index": 0,
"label": "string",
"value": "string"
}
],
"template_id": 4815000000017003,
"template_name": "Standard",
"template_type": "standard",
"created_time": "2015-05-28T00:00:00.000Z",
"last_modified_time": "2015-05-28T00:00:00.000Z",
"attachment_name": "sample.pdf",
"can_send_in_mail": true,
"salesperson_id": 4815000000044762,
"salesperson_name": "Lara",
"is_pre_gst": false,
"gst_no": "22AAAAA0000A1Z5",
"gst_treatment": "business_gst",
"place_of_supply": "TN"
}
}
Delete a Sales Order
Deletes an existing Sales Order from Zakya.
OAuth Scope : ZakyaAPI.salesorders.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695"
type: DELETE
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders/4815000000044895?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/salesorders/4815000000044895?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/salesorders/4815000000044895?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The Sales Order has been deleted."
}
Mark as Confirmed
Changes the status of a Sales Order to Confirmed.
OAuth Scope : ZakyaAPI.salesorders.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/salesorders/4815000000044895/status/confirmed?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Sales order status has been changed to 'Confirmed'."
}
Mark as Void
Changes the status of a Sales Order to Void.
OAuth Scope : ZakyaAPI.salesorders.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/void?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/void?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/salesorders/4815000000044895/status/void?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/salesorders/4815000000044895/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();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/salesorders/4815000000044895/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("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/salesorders/4815000000044895/status/void?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))