Invoices

An invoice is a statement of items sold by a seller. It includes all the details of sale including units of goods, price of goods sold, shipping details, etc.

Attribute

  • invoice_idstring

    The ID of the invoice

  • ach_payment_initiatedboolean

    To check initiation of ACH Payment

  • invoice_numberstring

    An unique number given to the invoice. Maximum length [100]

  • datestring

    invoice date. Default date format is yyyy-mm-dd.

  • statusstring

    Search invoices by invoice status.Allowed Values: sent, draft, overdue, paid, void, unpaid, partially_paid and viewed

  • payment_termsinteger

    Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. Maximum length [100]

  • payment_terms_labelstring

    Used to override the default payment terms label. Default value for 15 days is "Net 15 Days". Maximum length [100]

  • due_datestring

    due date of the invoices. Default date format is yyyy-mm-dd.

  • payment_expected_datestring

    The expected date of payment

  • last_payment_datestring

    The last payment date of the invoice

  • reference_numberstring

    The reference number of the invoice

  • customer_idstring

    ID of the customer the invoice has to be created.

  • customer_namestring

    The name of the customer. Maximum length [100]

  • contact_personsarray

    Show Sub-Attributes

    • contact_person_idstring

      Unique ID of the contact person

    • salutationstring

      Salutation to the contact

    • first_namestring

      First name of the contact

    • last_namestring

      Last name of the contact

    • email 

      contact's email id. Maximum length [100]

    • phonestring

      Phone number of the contact

    • mobilestring

      Mobile number of the contact person

    • is_primary_contact 

      To mark contact person as primary for contact

  • currency_idstring

    The currenct id of the currency

  • currency_codestring

    The currency code in which the invoice is created.

  • exchange_ratefloat

    Exchange rate of the currency.

  • discountfloat

    Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

  • is_discount_before_taxboolean

    Check if discount is exclusive of 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.

  • is_inclusive_taxboolean

    To check if discount is inclusive of tax

  • recurring_invoice_idstring

    ID of the recurring invoice from which the invoice is created.

  • is_viewed_by_clientboolean

    Check if invoice is viewed by client

  • has_attachmentboolean

    To check if invoice has an attachment

  • client_viewed_timestring

    Time when client viewed the statement

  • line_itemsarray

    Items listed in invoice

    Show Sub-Attributes

    • line_item_idstring

      The line item ID

    • item_idstring

      Unique item id.

    • project_idstring

      Unique ID of the projet associated to an invoice

    • time_entry_idsstring

      Unique ID's of all the time entries associated to the linked project

    • expense_idstring

      Unique ID of the expenses associated

    • expense_receipt_namestring

      Name of the expense receipt associated

    • namestring

      The name of the line item. Maximum length [100]

    • descriptionstring

      The description of the line items. Maximum length [2000]

    • item_orderinteger

      The order of the line item_order

    • bcy_ratefloat

      base currency rate

    • ratedouble

      Rate of the line item.

    • quantityfloat

      The quantity of line item

    • unitstring

      Unit of the line item e.g. kgs, Nos. Maximum length [100]

    • discount_amountfloat

      The discount amount on the line item

    • discountfloat

      Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

    • tax_idstring

      ID of the tax or tax group applied to the estimate

    • tax_namestring

      The name of the tax

    • tax_typestring

      The type of the tax

    • tax_percentagefloat

      The percentage of tax levied

    • item_totalfloat

      The total amount of the line items

    • warehouse_idlong

      Unique ID generated by the server for the ware houses

    • hsn_or_sacstring

      Add HSN/SAC code for your goods/services

  • shipping_chargestring

    Shipping charges applied to the invoice. Maximum length [100]

  • adjustmentdouble

    Adjustments made to the invoice.

  • adjustment_descriptionstring

    Customize the adjustment description. E.g. Rounding off.

  • sub_totalfloat

    The sub total of the all items

  • tax_totaldouble

    The total amount of the tax levied

  • totalstring

    The total amount to be paid

  • taxesarray

    List of the taxes levied

    Show Sub-Attributes

    • tax_namestring

      The name of the tax

    • tax_amountfloat

      The amount of the tax levied

  • payment_reminder_enabledboolean

    Boolean to check if reminders have been enabled

  • payment_madefloat

    The amount paid

  • credits_appliedfloat

    The credits applied

  • tax_amount_withheldfloat

    The tax amount which has been withheld

  • balancestring

    The unpaid amount

  • write_off_amountfloat

    The write off amount. i.e. the amount which is not expected to be returned. Like a bad debt

  • allow_partial_paymentsboolean

    Boolean to check if partial payments are allowed for the contact

  • price_precisioninteger

    The precision value on the price

  • payment_optionsobject

    Payment options available for payment

    Show Sub-Attributes

    • payment_gatewaysarray

      Payment gateways integrated and supported

      Show Sub-Attributes

      • configuredboolean

        Boolean check to see if a payment gateway has been configured

      • additional_field1string

        Paypal payment method. Allowed Values: standard and adaptive

      • gateway_namestring

        Name of the payment gateway associated with the invoice. E.g. paypal, stripe.Allowed Values: paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree

  • is_emailedboolean

    Boolean check to see if the mail has been sent

  • reminders_sentinteger

    The number of reminders sent

  • last_reminder_sent_datestring

    The date the last email was sent

  • billing_addressobject

    Billing address of the contact

    Show Sub-Attributes

    • addressstring

      Billing address for the invoice

    • citystring

      City of the customer’s billing address.

    • statestring

      State of the customer’s billing address.

    • zipstring

      Zip code of the customer’s billing address.

    • faxstring

      Customer's fax number.

  • shipping_addressobject

    Shipping address of the contact

    Show Sub-Attributes

    • addressstring

      Billing address for the invoice

    • citystring

      City of the customer’s billing address.

    • statestring

      State of the customer’s billing address.

    • zipstring

      Zip code of the customer’s billing address.

    • faxstring

      Customer's fax number.

  • notesstring

    The notes added below expressing gratitude or for conveying some information.

  • termsstring

    The terms added below expressing gratitude or for conveying some information.

  • custom_fieldsarray

    Additional fields added to the invoice

    Show Sub-Attributes

    • indexinteger

      The index of the custom field

    • show_on_pdfboolean

      Boolean value to check if the custom field is to be dispplayed on the pdf.

    • valuestring

      Value of the custom field like VAT Id etc.

    • labelstring

      The label of the custom field.

  • template_idstring

    ID of the pdf template associated with the invoice.

  • template_namestring

    Name of the invoice template used

  • created_timestring

    The time of creation of the invoices

  • last_modified_timestring

    Date of last modification of the invoice

  • attachment_namestring

    Name of the file attached

  • can_send_in_mailboolean

    To check if attachment can be sent in email

  • salesperson_idstring

    ID of the salesperson linked to invoice

  • salesperson_namestring

    Name of the salesperson. Maximum length [200]

  • invoice_urlstring

    Url of invoice as a link

  • 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 .

End Points
ExampleCopy
{
    "invoice_id": 982000000567114,
    "ach_payment_initiated": false,
    "invoice_number": "INV-00003",
    "date": "2013-11-17",
    "status": "draft",
    "payment_terms": 15,
    "payment_terms_label": "Net 15",
    "due_date": "2013-12-03",
    "payment_expected_date": " ",
    "last_payment_date": " ",
    "reference_number": " ",
    "customer_id": 982000000567001,
    "customer_name": "Bowman & Co",
    "contact_persons": [
        {
            "contact_person_id": 982000000567003,
            "salutation": "Mr",
            "first_name": "David",
            "last_name": "Sujin",
            "email": null,
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": null
        }
    ],
    "currency_id": 982000000000190,
    "currency_code": "USD",
    "exchange_rate": 1,
    "discount": 0,
    "is_discount_before_tax": true,
    "discount_type": "item_level",
    "is_inclusive_tax": false,
    "recurring_invoice_id": " ",
    "is_viewed_by_client": false,
    "has_attachment": false,
    "client_viewed_time": "",
    "line_items": [
        {
            "line_item_id": 982000000567021,
            "item_id": 982000000030049,
            "project_id": " ",
            "time_entry_ids": " ",
            "expense_id": " ",
            "expense_receipt_name": "string",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 1,
            "bcy_rate": 120,
            "rate": 120,
            "quantity": 1,
            "unit": " ",
            "discount_amount": 0,
            "discount": 0,
            "tax_id": 982000000557028,
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 12.5,
            "item_total": 120,
            "warehouse_id": 130426000000664020,
            "hsn_or_sac": 80540
        }
    ],
    "shipping_charge": 0,
    "adjustment": 0,
    "adjustment_description": " ",
    "sub_total": 153,
    "tax_total": 22.6,
    "total": 40.6,
    "taxes": [
        {
            "tax_name": "VAT",
            "tax_amount": 19.13
        }
    ],
    "payment_reminder_enabled": true,
    "payment_made": 26.91,
    "credits_applied": 22.43,
    "tax_amount_withheld": 0,
    "balance": 40.6,
    "write_off_amount": 0,
    "allow_partial_payments": true,
    "price_precision": 2,
    "payment_options": {
        "payment_gateways": [
            {
                "configured": true,
                "additional_field1": "standard",
                "gateway_name": "paypal"
            }
        ]
    },
    "is_emailed": false,
    "reminders_sent": 1,
    "last_reminder_sent_date": " ",
    "billing_address": {
        "address": "4900 Hopyard Rd, Suite 310",
        "city": "Pleasanton",
        "state": "CA",
        "zip": 94588,
        "fax": "+1-925-924-9600"
    },
    "shipping_address": {
        "address": "4900 Hopyard Rd, Suite 310",
        "city": "Pleasanton",
        "state": "CA",
        "zip": 94588,
        "fax": "+1-925-924-9600"
    },
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "custom_fields": [
        {
            "index": 1,
            "show_on_pdf": false,
            "value": "The value of the custom field",
            "label": "Delivery Date"
        }
    ],
    "template_id": 982000000000143,
    "template_name": "Service - Classic",
    "created_time": "2013-11-18",
    "last_modified_time": "2013-11-18",
    "attachment_name": " ",
    "can_send_in_mail": true,
    "salesperson_id": " ",
    "salesperson_name": " ",
    "invoice_url": "https://invoice.zoho.com/SecurePayment?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea",
    "is_pre_gst": false,
    "gst_no": "22AAAAA0000A1Z5",
    "gst_treatment": "business_gst"
}

Create an invoice

Create an invoice for your customer.

OAuth Scope : ZakyaAPI.invoices.CREATE

Query Parameters

  • customer_idstring (Required)

    ID of the customer the invoice has to be created.

  • contact_personsarray

    Show Sub-Attributes

    • contact_person_idstring

      Unique ID of the contact person

    • salutationstring

      Salutation to the contact

    • first_namestring

      First name of the contact

    • last_namestring

      Last name of the contact

    • emailcontact's email id. Maximum length [100]

      phone

    • stringPhone number of the contact

      mobile

    • stringMobile number of the contact person

      undefined

  • invoice_numberstring

    An unique number given to the invoice. Maximum length [100]

  • reference_numberstring

    The reference number of the invoice

  • template_idstring

    ID of the pdf template associated with the invoice.

  • datestring

    invoice date. Default date format is yyyy-mm-dd.

  • payment_termsinteger

    Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. Maximum length [100]

  • payment_terms_labelstring

    Used to override the default payment terms label. Default value for 15 days is "Net 15 Days". Maximum length [100]

  • due_datestring

    due date of the invoices. Default date format is yyyy-mm-dd.

  • discountfloat

    Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

  • is_discount_before_taxboolean

    Check if discount is exclusive of 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.

  • is_inclusive_taxboolean

    To check if discount is inclusive of tax

  • exchange_ratefloat

    Exchange rate of the currency.

  • recurring_invoice_idstring

    ID of the recurring invoice from which the invoice is created.

  • invoiced_estimate_idstring

    ID of the invoice from which the invoice is created.

  • salesperson_namestring

    Name of the salesperson. Maximum length [200]

  • custom_fieldsarray

    Additional fields added to the invoice

    Show Sub-Attributes

    • indexinteger

      The index of the custom field

    • show_on_pdfboolean

      Boolean value to check if the custom field is to be dispplayed on the pdf.

    • valuestring

      Value of the custom field like VAT Id etc.

    • labelstring

      The label of the custom field.

  • project_idstring

    Unique ID of the projet associated to an invoice

  • line_itemsarray (Required)

    Line items of an invoice.

    Show Sub-Attributes

    • line_item_idstring

      The line item ID

    • item_idstring

      Unique item id.

    • project_idstring

      Unique ID of the projet associated to an invoice

    • time_entry_idsstring

      Unique ID's of all the time entries associated to the linked project

    • expense_idstring

      Unique ID of the expenses associated

    • expense_receipt_namestring

      Name of the expense receipt associated

    • namestring

      The name of the line item. Maximum length [100]

    • descriptionstring

      The description of the line items. Maximum length [2000]

    • item_orderinteger

      The order of the line item_order

    • bcy_ratefloat

      base currency rate

    • ratedouble

      Rate of the line item.

    • quantityfloat

      The quantity of line item

    • unitstring

      Unit of the line item e.g. kgs, Nos. Maximum length [100]

    • discount_amountfloat

      The discount amount on the line item

    • discountfloat

      Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

    • tax_idstring

      ID of the tax or tax group applied to the estimate

    • tax_namestring

      The name of the tax

    • tax_typestring

      The type of the tax

    • tax_percentagefloat

      The percentage of tax levied

    • item_totalfloat

      The total amount of the line items

    • salesorder_item_idlong

      Pass the unique ID(line_item_id) generated by the server for the line item in sales order for this node to associate this invoice with the sales order

    • warehouse_idlong

      Unique ID generated by the server for the ware houses

    • hsn_or_sacstring

      Add HSN/SAC code for your goods/services

  • payment_optionsobject

    Payment options available for payment

    Show Sub-Attributes

    • payment_gatewaysarray

      Payment gateways integrated and supported

      Show Sub-Attributes

      • configuredboolean

        Boolean check to see if a payment gateway has been configured

      • additional_field1string

        Paypal payment method. Allowed Values: standard and adaptive

      • gateway_namestring

        Name of the payment gateway associated with the invoice. E.g. paypal, stripe.Allowed Values: paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree

  • allow_partial_paymentsboolean

    Boolean to check if partial payments are allowed for the contact

  • custom_bodystring

    Customized email content

  • custom_subjectstring

    Customized Subject line

  • notesstring

    The notes added below expressing gratitude or for conveying some information.

  • termsstring

    The terms added below expressing gratitude or for conveying some information.

  • shipping_chargestring

    Shipping charges applied to the invoice. Maximum length [100]

  • adjustmentdouble

    Adjustments made to the invoice.

  • adjustment_descriptionstring

    Customize the adjustment description. E.g. Rounding off.

  • reasonstring

    Description of the attachment

  • tax_exemption_idstring

    ID of the tax exemption.

  • billing_address_idlong

    Unique Id generated by the server for address in contacts page. To add a billing address to invoice, 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 invoice, send the address_id using this node. Else, the default shipping address for that contact is used

  • 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.

Query Parameters

  • send 

    Send the invoice to the contact person(s) associated with the invoice. Allowed values true and false.

  • ignore_auto_number_generation 

    Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values true and false

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "customer_id": 982000000567001,
    "contact_persons": [
        {
            "contact_person_id": 982000000567003,
            "salutation": "Mr",
            "first_name": "David",
            "last_name": "Sujin",
            "email": null,
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": null
        }
    ],
    "invoice_number": "INV-00003",
    "reference_number": " ",
    "template_id": 982000000000143,
    "date": "2013-11-17",
    "payment_terms": 15,
    "payment_terms_label": "Net 15",
    "due_date": "2013-12-03",
    "discount": 0,
    "is_discount_before_tax": true,
    "discount_type": "item_level",
    "is_inclusive_tax": false,
    "exchange_rate": 1,
    "recurring_invoice_id": " ",
    "invoiced_estimate_id": " ",
    "salesperson_name": " ",
    "custom_fields": [
        {
            "index": 1,
            "show_on_pdf": false,
            "value": "The value of the custom field",
            "label": "Delivery Date"
        }
    ],
    "project_id": " ",
    "line_items": [
        {
            "line_item_id": 982000000567021,
            "item_id": 982000000030049,
            "project_id": " ",
            "time_entry_ids": " ",
            "expense_id": " ",
            "expense_receipt_name": "string",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 1,
            "bcy_rate": 120,
            "rate": 120,
            "quantity": 1,
            "unit": " ",
            "discount_amount": 0,
            "discount": 0,
            "tax_id": 982000000557028,
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 12.5,
            "item_total": 120,
            "salesorder_item_id": 4815000000017009,
            "warehouse_id": 130426000000664020,
            "hsn_or_sac": 80540
        }
    ],
    "payment_options": {
        "payment_gateways": [
            {
                "configured": true,
                "additional_field1": "standard",
                "gateway_name": "paypal"
            }
        ]
    },
    "allow_partial_payments": true,
    "custom_body": " ",
    "custom_subject": " ",
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "shipping_charge": 0,
    "adjustment": 0,
    "adjustment_description": " ",
    "reason": " ",
    "tax_exemption_id": 11149000000061054,
    "billing_address_id": 4815000000017005,
    "shipping_address_id": 4815000000017005,
    "gst_no": "22AAAAA0000A1Z5",
    "gst_treatment": "business_gst"
}
Response ExampleCopy
{
    "code": 0,
    "message": "The invoice has been created.",
    "invoice": {
        "invoice_id": 982000000567114,
        "ach_payment_initiated": false,
        "invoice_number": "INV-00003",
        "date": "2013-11-17",
        "status": "draft",
        "payment_terms": 15,
        "payment_terms_label": "Net 15",
        "due_date": "2013-12-03",
        "payment_expected_date": " ",
        "last_payment_date": " ",
        "reference_number": " ",
        "customer_id": 982000000567001,
        "customer_name": "Bowman & Co",
        "contact_persons": [
            {
                "contact_person_id": 982000000567003,
                "salutation": "Mr",
                "first_name": "David",
                "last_name": "Sujin",
                "email": null,
                "phone": "+1-925-921-9201",
                "mobile": "+1-4054439562",
                "is_primary_contact": null
            }
        ],
        "currency_id": 982000000000190,
        "currency_code": "USD",
        "exchange_rate": 1,
        "discount": 0,
        "is_discount_before_tax": true,
        "discount_type": "item_level",
        "is_inclusive_tax": false,
        "recurring_invoice_id": " ",
        "is_viewed_by_client": false,
        "has_attachment": false,
        "client_viewed_time": "",
        "line_items": [
            {
                "line_item_id": 982000000567021,
                "item_id": 982000000030049,
                "project_id": " ",
                "time_entry_ids": " ",
                "expense_id": " ",
                "expense_receipt_name": "string",
                "name": "Hard Drive",
                "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
                "item_order": 1,
                "bcy_rate": 120,
                "rate": 120,
                "quantity": 1,
                "unit": " ",
                "discount_amount": 0,
                "discount": 0,
                "tax_id": 982000000557028,
                "tax_name": "VAT",
                "tax_type": "tax",
                "tax_percentage": 12.5,
                "item_total": 120,
                "warehouse_id": 130426000000664020,
                "hsn_or_sac": 80540
            }
        ],
        "shipping_charge": 0,
        "adjustment": 0,
        "adjustment_description": " ",
        "sub_total": 153,
        "tax_total": 22.6,
        "total": 40.6,
        "taxes": [
            {
                "tax_name": "VAT",
                "tax_amount": 19.13
            }
        ],
        "payment_reminder_enabled": true,
        "payment_made": 26.91,
        "credits_applied": 22.43,
        "tax_amount_withheld": 0,
        "balance": 40.6,
        "write_off_amount": 0,
        "allow_partial_payments": true,
        "price_precision": 2,
        "payment_options": {
            "payment_gateways": [
                {
                    "configured": true,
                    "additional_field1": "standard",
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "reminders_sent": 1,
        "last_reminder_sent_date": " ",
        "billing_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "shipping_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "index": 1,
                "show_on_pdf": false,
                "value": "The value of the custom field",
                "label": "Delivery Date"
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "created_time": "2013-11-18",
        "last_modified_time": "2013-11-18",
        "attachment_name": " ",
        "can_send_in_mail": true,
        "salesperson_id": " ",
        "salesperson_name": " ",
        "invoice_url": "https://invoice.zoho.com/SecurePayment?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea",
        "is_pre_gst": false,
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst"
    }
}

List invoices

List all invoices with pagination.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • nvoice_number 

    An unique number given to the invoice. Maximum length [100]

  • item_name 

    item name.Variants: item_name_startswith and item_name_contains. Maximum length [100]

  • item_id 

    Unique item id.

  • item_description 

    Search invoices by item description.Variants: item_description_startswith and item_description_contains. Maximum length [100]

  • reference_number 

    The reference number of the invoice

  • customer_name 

    The name of the customer. Maximum length [100]

  • recurring_invoice_id 

    ID of the recurring invoice from which the invoice is created.

  • email 

    contact's email id. Maximum length [100]

  • total 

    The total amount to be paid

  • balance 

    The unpaid amount

  • custom_field 

    custom fields for invoice. Variants: custom_field_startswith and custom_field_contains

  • date 

    invoice date. Default date format is yyyy-mm-dd. Variants: due_date_start, due_date_end, due_date_before and due_date_after.

  • due_date 

    due date of the invoices. Default date format is yyyy-mm-dd. Variants: due_date_start, due_date_end, due_date_before and due_date_after

  • status 

    Search invoices by invoice status.Allowed Values: sent, draft, overdue, paid, void, unpaid, partially_paid and viewed

  • customer_id 

    ID of the customer the invoice has to be created.

  • filter_by 

    Filter invoices by any status or payment expected date.Allowed Values: Status.All, Status.Sent, Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed and Date.PaymentExpectedDate

  • search_text 

    Search invoices by invoice number or purchase order or customer name. Maximum length [100]

  • sort_column 

    Sort invoices.Allowed Values: customer_name, invoice_number, date, due_date, total, balance and created_time

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "invoices": [
        {
            "invoice_id": 982000000567114,
            "ach_payment_initiated": false,
            "customer_name": "Bowman & Co",
            "customer_id": 982000000567001,
            "status": "draft",
            "invoice_number": "INV-00003",
            "reference_number": " ",
            "date": "2013-11-17",
            "due_date": "2013-12-03",
            "due_days": "Due in 14 day(s)",
            "currency_id": 982000000000190,
            "schedule_time": "",
            "currency_code": "USD",
            "is_viewed_by_client": false,
            "has_attachment": false,
            "client_viewed_time": "",
            "total": 40.6,
            "balance": 40.6,
            "created_time": "2013-11-18",
            "last_modified_time": "2013-11-18",
            "is_emailed": false,
            "reminders_sent": 1,
            "last_reminder_sent_date": " ",
            "payment_expected_date": " ",
            "last_payment_date": " ",
            "custom_fields": [
                {
                    "index": 1,
                    "show_on_pdf": false,
                    "value": "The value of the custom field",
                    "label": "Delivery Date"
                }
            ],
            "documents": "",
            "salesperson_id": " ",
            "salesperson_name": " ",
            "shipping_charge": 0,
            "adjustment": 0,
            "write_off_amount": 0,
            "exchange_rate": 1
        },
        {...},
        {...}
    ]
}

Update an invoice

Update an existing invoice. To delete a line item just remove it from the line_items list.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Arguments

  • customer_idstring (Required)

    ID of the customer the invoice has to be created.

  • contact_personsarray

    Show Sub-Attributes

    • contact_person_idstring

      Unique ID of the contact person

    • salutationstring

      Salutation to the contact

    • first_namestring

      First name of the contact

    • last_namestring

      Last name of the contact

    • email 

      contact's email id. Maximum length [100]

    • phonestring

      Phone number of the contact

    • mobilestring

      Mobile number of the contact person

    • is_primary_contactTo mark contact person as primary for contact

      undefined

  • invoice_numberstring

    An unique number given to the invoice. Maximum length [100]

  • reference_numberstring

    The reference number of the invoice

  • template_idstring

    ID of the pdf template associated with the invoice.

  • datestring

    invoice date. Default date format is yyyy-mm-dd.

  • payment_termsinteger

    Payment terms in days e.g. 15, 30, 60. Invoice due date will be calculated based on this. Maximum length [100]

  • payment_terms_labelstring

    Used to override the default payment terms label. Default value for 15 days is "Net 15 Days". Maximum length [100]

  • due_datestring

    due date of the invoices. Default date format is yyyy-mm-dd.

  • discountfloat

    Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

  • is_discount_before_taxboolean

    Check if discount is exclusive of 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.

  • is_inclusive_taxboolean

    To check if discount is inclusive of tax

  • exchange_ratefloat

    Exchange rate of the currency.

  • recurring_invoice_idstring

    ID of the recurring invoice from which the invoice is created.

  • invoiced_estimate_idstring

    ID of the invoice from which the invoice is created.

  • salesperson_namestring

    Name of the salesperson. Maximum length [200]

  • custom_fieldsarray

    Additional fields added to the invoice

    Show Sub-Attributes

    • indexinteger

      The index of the custom field

    • show_on_pdfboolean

      Boolean value to check if the custom field is to be dispplayed on the pdf.

    • valuestring

      Value of the custom field like VAT Id etc.

    • labelstring

      The label of the custom field.

  • project_idstring

    Unique ID of the projet associated to an invoice

  • line_itemsarray (Required)

    Line items of an invoice.

    Show Sub-Attributes

    • line_item_idstring

      The line item ID

    • item_idstring

      Unique item id.

    • project_idstring

      Unique ID of the projet associated to an invoice

    • time_entry_idsstring

      Unique ID's of all the time entries associated to the linked project

    • expense_idstring

      Unique ID of the expenses associated

    • expense_receipt_namestring

      Name of the expense receipt associated

    • namestring

      The name of the line item. Maximum length [100]

    • descriptionstring

      The description of the line items. Maximum length [2000]

    • item_orderinteger

      The order of the line item_order

    • bcy_ratefloat

      base currency rate

    • ratedouble

      Rate of the line item.

    • quantityfloat

      The quantity of line item

    • unitstring

      Unit of the line item e.g. kgs, Nos. Maximum length [100]

    • discount_amountfloat

      The discount amount on the line item

    • discountfloat

      Discount applied to the invoice. It can be either in % or in amount. e.g. 12.5% or 190. Maximum length [100]

    • tax_idstring

      ID of the tax or tax group applied to the estimate

    • tax_namestring

      The name of the tax

    • tax_typestring

      The type of the tax

    • tax_percentagefloat

      The percentage of tax levied

    • item_totalfloat

      The total amount of the line items

    • warehouse_idlong

      Unique ID generated by the server for the ware houses

    • hsn_or_sacstring

      Add HSN/SAC code for your goods/services

  • payment_optionsobject

    Payment options available for payment

    Show Sub-Attributes

    • payment_gatewaysarray

      Payment gateways integrated and supported

      Show Sub-Attributes

      • configuredboolean

        Boolean check to see if a payment gateway has been configured

      • additional_field1string

        Paypal payment method. Allowed Values: standard and adaptive

      • gateway_namestring

        Name of the payment gateway associated with the invoice. E.g. paypal, stripe.Allowed Values: paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree

  • allow_partial_paymentsboolean

    Boolean to check if partial payments are allowed for the contact

  • custom_bodystring

    Customized email content

  • custom_subjectstring

    Customized Subject line

  • notesstring

    The notes added below expressing gratitude or for conveying some information.

  • termsstring

    The terms added below expressing gratitude or for conveying some information.

  • shipping_chargestring

    Shipping charges applied to the invoice. Maximum length [100]

  • adjustmentdouble

    Adjustments made to the invoice.

  • adjustment_descriptionstring

    Customize the adjustment description. E.g. Rounding off.

  • reasonstring

    Description of the attachment

  • tax_exemption_idstring

    ID of the tax exemption.

  • billing_address_idlong

    Unique Id generated by the server for address in contacts page. To add a billing address to invoice, 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 invoice, send the address_id using this node. Else, the default shipping address for that contact is used

  • 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 .

Query Parameters

  • ignore_auto_number_generation 

    Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values true and false

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "customer_id": 982000000567001,
    "contact_persons": [
        {
            "contact_person_id": 982000000567003,
            "salutation": "Mr",
            "first_name": "David",
            "last_name": "Sujin",
            "email": null,
            "phone": "+1-925-921-9201",
            "mobile": "+1-4054439562",
            "is_primary_contact": null
        }
    ],
    "invoice_number": "INV-00003",
    "reference_number": " ",
    "template_id": 982000000000143,
    "date": "2013-11-17",
    "payment_terms": 15,
    "payment_terms_label": "Net 15",
    "due_date": "2013-12-03",
    "discount": 0,
    "is_discount_before_tax": true,
    "discount_type": "item_level",
    "is_inclusive_tax": false,
    "exchange_rate": 1,
    "recurring_invoice_id": " ",
    "invoiced_estimate_id": " ",
    "salesperson_name": " ",
    "custom_fields": [
        {
            "index": 1,
            "show_on_pdf": false,
            "value": "The value of the custom field",
            "label": "Delivery Date"
        }
    ],
    "project_id": " ",
    "line_items": [
        {
            "line_item_id": 982000000567021,
            "item_id": 982000000030049,
            "project_id": " ",
            "time_entry_ids": " ",
            "expense_id": " ",
            "expense_receipt_name": "string",
            "name": "Hard Drive",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "item_order": 1,
            "bcy_rate": 120,
            "rate": 120,
            "quantity": 1,
            "unit": " ",
            "discount_amount": 0,
            "discount": 0,
            "tax_id": 982000000557028,
            "tax_name": "VAT",
            "tax_type": "tax",
            "tax_percentage": 12.5,
            "item_total": 120,
            "warehouse_id": 130426000000664020,
            "hsn_or_sac": 80540
        }
    ],
    "payment_options": {
        "payment_gateways": [
            {
                "configured": true,
                "additional_field1": "standard",
                "gateway_name": "paypal"
            }
        ]
    },
    "allow_partial_payments": true,
    "custom_body": " ",
    "custom_subject": " ",
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "shipping_charge": 0,
    "adjustment": 0,
    "adjustment_description": " ",
    "reason": " ",
    "tax_exemption_id": 11149000000061054,
    "billing_address_id": 4815000000017005,
    "shipping_address_id": 4815000000017005,
    "gst_no": "22AAAAA0000A1Z5",
    "gst_treatment": "business_gst"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice information has been updated.",
    "invoice": {
        "invoice_id": 982000000567114,
        "ach_payment_initiated": false,
        "invoice_number": "INV-00003",
        "date": "2013-11-17",
        "status": "draft",
        "payment_terms": 15,
        "payment_terms_label": "Net 15",
        "due_date": "2013-12-03",
        "payment_expected_date": " ",
        "last_payment_date": " ",
        "reference_number": " ",
        "customer_id": 982000000567001,
        "customer_name": "Bowman & Co",
        "contact_persons": [
            {
                "contact_person_id": 982000000567003,
                "salutation": "Mr",
                "first_name": "David",
                "last_name": "Sujin",
                "email": null,
                "phone": "+1-925-921-9201",
                "mobile": "+1-4054439562",
                "is_primary_contact": null
            }
        ],
        "currency_id": 982000000000190,
        "currency_code": "USD",
        "exchange_rate": 1,
        "discount": 0,
        "is_discount_before_tax": true,
        "discount_type": "item_level",
        "is_inclusive_tax": false,
        "recurring_invoice_id": " ",
        "is_viewed_by_client": false,
        "has_attachment": false,
        "client_viewed_time": "",
        "line_items": [
            {
                "line_item_id": 982000000567021,
                "item_id": 982000000030049,
                "project_id": " ",
                "time_entry_ids": " ",
                "expense_id": " ",
                "expense_receipt_name": "string",
                "name": "Hard Drive",
                "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
                "item_order": 1,
                "bcy_rate": 120,
                "rate": 120,
                "quantity": 1,
                "unit": " ",
                "discount_amount": 0,
                "discount": 0,
                "tax_id": 982000000557028,
                "tax_name": "VAT",
                "tax_type": "tax",
                "tax_percentage": 12.5,
                "item_total": 120,
                "warehouse_id": 130426000000664020,
                "hsn_or_sac": 80540
            }
        ],
        "shipping_charge": 0,
        "adjustment": 0,
        "adjustment_description": " ",
        "sub_total": 153,
        "tax_total": 22.6,
        "total": 40.6,
        "taxes": [
            {
                "tax_name": "VAT",
                "tax_amount": 19.13
            }
        ],
        "payment_reminder_enabled": true,
        "payment_made": 26.91,
        "credits_applied": 22.43,
        "tax_amount_withheld": 0,
        "balance": 40.6,
        "write_off_amount": 0,
        "allow_partial_payments": true,
        "price_precision": 2,
        "payment_options": {
            "payment_gateways": [
                {
                    "configured": true,
                    "additional_field1": "standard",
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "reminders_sent": 1,
        "last_reminder_sent_date": " ",
        "billing_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "shipping_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "index": 1,
                "show_on_pdf": false,
                "value": "The value of the custom field",
                "label": "Delivery Date"
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "created_time": "2013-11-18",
        "last_modified_time": "2013-11-18",
        "attachment_name": " ",
        "can_send_in_mail": true,
        "salesperson_id": " ",
        "salesperson_name": " ",
        "invoice_url": "https://invoice.zoho.com/SecurePayment?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea",
        "is_pre_gst": false,
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst",
        "place_of_supply": "TN"
    }
}

Get an invoice

Get the details of an invoice.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • print 

    Print the exported pdf.

  • accept 

    Get the details of a particular invoice in formats such as json/ pdf/ html. Default format is json. Allowed values json pdf and html

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

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

print(data.decode("utf-8"))
Response ExampleCopy
 {
    "code": 0,
    "message": "success",
    "invoice": {
        "invoice_id": 982000000567114,
        "ach_payment_initiated": false,
        "invoice_number": "INV-00003",
        "date": "2013-11-17",
        "status": "draft",
        "payment_terms": 15,
        "payment_terms_label": "Net 15",
        "due_date": "2013-12-03",
        "payment_expected_date": " ",
        "last_payment_date": " ",
        "reference_number": " ",
        "customer_id": 982000000567001,
        "customer_name": "Bowman & Co",
        "contact_persons": [
            {
                "contact_person_id": 982000000567003,
                "salutation": "Mr",
                "first_name": "David",
                "last_name": "Sujin",
                "email": null,
                "phone": "+1-925-921-9201",
                "mobile": "+1-4054439562",
                "is_primary_contact": null
            }
        ],
        "currency_id": 982000000000190,
        "currency_code": "USD",
        "exchange_rate": 1,
        "discount": 0,
        "is_discount_before_tax": true,
        "discount_type": "item_level",
        "is_inclusive_tax": false,
        "recurring_invoice_id": " ",
        "is_viewed_by_client": false,
        "has_attachment": false,
        "client_viewed_time": "",
        "line_items": [
            {
                "line_item_id": 982000000567021,
                "item_id": 982000000030049,
                "project_id": " ",
                "time_entry_ids": " ",
                "expense_id": " ",
                "expense_receipt_name": "string",
                "name": "Hard Drive",
                "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
                "item_order": 1,
                "bcy_rate": 120,
                "rate": 120,
                "quantity": 1,
                "unit": " ",
                "discount_amount": 0,
                "discount": 0,
                "tax_id": 982000000557028,
                "tax_name": "VAT",
                "tax_type": "tax",
                "tax_percentage": 12.5,
                "item_total": 120,
                "warehouse_id": 130426000000664020,
                "hsn_or_sac": 80540
            }
        ],
        "shipping_charge": 0,
        "adjustment": 0,
        "adjustment_description": " ",
        "sub_total": 153,
        "tax_total": 22.6,
        "total": 40.6,
        "taxes": [
            {
                "tax_name": "VAT",
                "tax_amount": 19.13
            }
        ],
        "payment_reminder_enabled": true,
        "payment_made": 26.91,
        "credits_applied": 22.43,
        "tax_amount_withheld": 0,
        "balance": 40.6,
        "write_off_amount": 0,
        "allow_partial_payments": true,
        "price_precision": 2,
        "payment_options": {
            "payment_gateways": [
                {
                    "configured": true,
                    "additional_field1": "standard",
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "reminders_sent": 1,
        "last_reminder_sent_date": " ",
        "billing_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "shipping_address": {
            "address": "4900 Hopyard Rd, Suite 310",
            "city": "Pleasanton",
            "state": "CA",
            "zip": 94588,
            "fax": "+1-925-924-9600"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "index": 1,
                "show_on_pdf": false,
                "value": "The value of the custom field",
                "label": "Delivery Date"
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "created_time": "2013-11-18",
        "last_modified_time": "2013-11-18",
        "attachment_name": " ",
        "can_send_in_mail": true,
        "salesperson_id": " ",
        "salesperson_name": " ",
        "invoice_url": "https://invoice.zoho.com/SecurePayment?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea",
        "is_pre_gst": false,
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst",
        "place_of_supply": "TN"
    }
}

Delete an invoice

Delete an existing invoice. Invoices which have payment or credits note applied cannot be deleted.

OAuth Scope : ZakyaAPI.invoices.DELETE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The invoice has been deleted."
}

Mark an invoice as sent

Mark a draft invoice as sent.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice status has been changed to Sent."
}

Void an invoice

Mark an invoice status as void. Upon voiding, the payments and credits associated with the invoices will be unassociated and will be under customer credits.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice status has been changed to Void."
}

Mark as draft

Mark a voided invoice as draft.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Status of invoice changed from void to draft"
}

Email an invoice

Email an invoice to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.

OAuth Scope : ZakyaAPI.invoices.CREATE

Arguments

  • send_from_org_email_idboolean

    Boolean to trigger the email from the organization's email address

  • to_mail_idsarray (Required)

    Array of email addresses of the recipients.

  • cc_mail_idsarray

    Array of email addresses of the recipients to be CC'd.

  • subjectstring

    The subject of the mail

  • bodystring

    The body/content of the mail

Query Parameters

  • send_customer_statement 

    Send customer statement pdf a with email.

  • send_attachment 

    Send the invoice attachment a with the email.

  • attachments 

    Files to be attached to the email

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/email?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/invoices/982000000567114/email?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/invoices/982000000567114/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 http = require("https");

const options = {
  "method": "POST",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/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();
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/invoices/982000000567114/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("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("POST", "/inventory/v1/invoices/982000000567114/email?organization_id=10234695", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "send_from_org_email_id": false,
    "to_mail_ids": [
        "willsmith@bowmanfurniture.com"
    ],
    "cc_mail_ids": [
        "peterparker@bowmanfurniture.com"
    ],
    "subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
    "body": "Dear Customer,         Thanks for your business.         The invoice INV-00001 is attached with this email. You can choose the easy way out and pay online for this invoice.Here's an overview of the invoice for your reference.         Invoice Overview:         Invoice  : INV-00001         Date : 05 Aug 2013         Amount : 541.82         It was great working with you. Looking forward to working with you again.\\nRegards\\nZillium Inc\\n\","
}
Response ExampleCopy
{
    "code": 0,
    "message": "Your invoice has been sent."
}

Get invoice email content

Get the email content of an invoice.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • email_template_id 

    Get the email content based on a specific email template. If this param is not inputted, then the content will be based on the email template associated with the customer. If no template is associated with the customer, then default template will be used.

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/email?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/invoices/982000000567114/email?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/invoices/982000000567114/email?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/invoices/982000000567114/email?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/invoices/982000000567114/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("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("GET", "/inventory/v1/invoices/982000000567114/email?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "data": {
        "bcc_mails": "",
        "gateways_configured": true,
        "gateways_associated": true,
        "bcc_mails_str": "",
        "body": "Dear Customer,         Thanks for your business.         The invoice INV-00001 is attached with this email. You can choose the easy way out and pay online for this invoice.Here's an overview of the invoice for your reference.         Invoice Overview:         Invoice  : INV-00001         Date : 05 Aug 2013         Amount : $541.82         It was great working with you. Looking forward to working with you again.\\nRegards\\nZillium Inc\\n\",",
        "documents": "",
        "customer_name": "Bowman & Co",
        "attach_pdf": true,
        "entity_id": "2000000007037",
        "cc_mails_list": [
            {
                "user_name": "David Sujin",
                "email": null
            }
        ],
        "file_name_without_extension": "INV-000004",
        "to_mails_str": "",
        "cc_mails_str": "",
        "from_email": "",
        "from_address": "",
        "deprecated_placeholders_used": [],
        "error_list": [],
        "subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
        "emailtemplates": [
            {
                "selected": true,
                "name": "Default",
                "email_template_id": "982000000000067"
            }
        ],
        "emailtemplate_documents": [
            "string"
        ],
        "to_contacts": [
            {
                "first_name": "David",
                "selected": true,
                "phone": "+1-925-921-9201",
                "email": null,
                "last_name": "Sujin",
                "salutation": "Mr",
                "contact_person_id": 982000000567003,
                "mobile": "+1-4054439562"
            }
        ],
        "attachment_name": " ",
        "file_name": "INV-00001.pdf",
        "from_emails": [
            {
                "user_name": "David Sujin",
                "selected": true,
                "email": null,
                "organization_contact_id": "2000000002266",
                "is_org_email_id": true
            }
        ],
        "customer_id": 982000000567001
    }
}

Email invoices

Send invoices to your customers by email. Maximum of 10 invoices can be sent at once.

OAuth Scope : ZakyaAPI.invoices.CREATE

Query Parameters

  • invoice_ids (Required) 

    Comma separated invoice ids which are to be emailed.

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/invoices/email?organization_id=10234695&invoice_ids=' \
  --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/invoices/email?organization_id=10234695&invoice_ids="
type: POST
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/email?organization_id=10234695&invoice_ids=")
  .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/invoices/email?organization_id=10234695&invoice_ids=",
  "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/invoices/email?organization_id=10234695&invoice_ids=', 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/invoices/email?organization_id=10234695&invoice_ids=", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Mission accomplished! We've sent all the invoices."
}

Get payment reminder mail content

Get the mail content of the payment reminder.

OAuth Scope : ZakyaAPI.invoices.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "data": {
        "bcc_mails": "",
        "gateways_configured": true,
        "gateways_associated": true,
        "bcc_mails_str": "",
        "body": "Dear Mr. Sujin, You might have missed the payment date and the invoice is now overdue by 1 days.----------------------------------------------------------------------------------------Invoice# : INV-000004 Dated : 23 Dec 2016---------------------------------------------------------------------------------------- Due Date         :   23 Dec 2016 Amount           :   $139.65----------------------------------------------------------------------------------------Not to worry at all ! View your invoice and take the easy way out by making an online payment.If you have already paid, please accept our apologies and kindly ignore this payment reminder.Regards,David SujinZillium Inc",
        "documents": "",
        "customer_name": "Bowman & Co",
        "attach_pdf": true,
        "entity_id": "2000000007037",
        "cc_mails_list": [
            {
                "user_name": "David Sujin",
                "email": null
            }
        ],
        "file_name_without_extension": "INV-000004",
        "to_mails_str": "",
        "cc_mails_str": "",
        "from_email": "",
        "from_address": "",
        "deprecated_placeholders_used": [],
        "error_list": [],
        "subject": "Invoice from Zillium Inc (Invoice#: INV-00001)",
        "emailtemplates": [
            {
                "selected": true,
                "name": "Default",
                "email_template_id": "982000000000067"
            }
        ],
        "emailtemplate_documents": [
            "string"
        ],
        "to_contacts": [
            {
                "first_name": "David",
                "selected": true,
                "phone": "+1-925-921-9201",
                "email": null,
                "last_name": "Sujin",
                "salutation": "Mr",
                "contact_person_id": 982000000567003,
                "mobile": "+1-4054439562"
            }
        ],
        "attachment_name": " ",
        "file_name": "INV-00001.pdf",
        "from_emails": [
            {
                "user_name": "David Sujin",
                "selected": true,
                "email": null,
                "organization_contact_id": "2000000002266",
                "is_org_email_id": true
            }
        ],
        "customer_id": 982000000567001
    }
}

Bulk export Invoices

Maximum of 25 invoices can be exported in a single pdf.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • invoice_ids(Required) 

    Comma separated invoice ids which are to be export as pdf.

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/invoices/pdf?organization_id=10234695&invoice_ids=' \
  --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/invoices/pdf?organization_id=10234695&invoice_ids="
type: GET
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/pdf?organization_id=10234695&invoice_ids=")
  .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/invoices/pdf?organization_id=10234695&invoice_ids=",
  "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/invoices/pdf?organization_id=10234695&invoice_ids=', 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/invoices/pdf?organization_id=10234695&invoice_ids=", headers=headers)

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

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

Bulk print invoices

Export invoices as pdf and print them. Maximum of 25 invoices can be printed.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • invoice_ids (Required) 

    Export invoices as pdf and print them. Maximum of 25 invoices can be printed.

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

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/print?organization_id=10234695&invoice_ids=")
  .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/invoices/print?organization_id=10234695&invoice_ids=",
  "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/invoices/print?organization_id=10234695&invoice_ids=', 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/invoices/print?organization_id=10234695&invoice_ids=", headers=headers)

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

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

Disable payment reminder

Disable automated payment reminders for an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

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

Enable payment reminder

Enable automated payment reminders for an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

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

Write off invoice

Write off the invoice balance amount of an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice has been written off"
}

Cancel write off

Cancel the write off amount of an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The write off done for this invoice has been cancelled."
}

Update billing address

Updates the billing address for this invoice alone.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Arguments

  • addressstring

    Billing address of the customer

  • citystring

    City of the customer's billing address

  • statestring

    State of the customer's billing address

  • zipstring

    ZIP code of the contact's billing address

  • countrystring

    Country of the contact's billing address

  • faxstring

    FAX number of the customer

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/address/billing?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/invoices/982000000567114/address/billing?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/invoices/982000000567114/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 http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/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();
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/invoices/982000000567114/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("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("PUT", "/inventory/v1/invoices/982000000567114/address/billing?organization_id=10234695", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District",
    "city": "Beijing",
    "state": "Beijing",
    "zip": 1000881,
    "country": "string",
    "fax": "+86-10-82637827"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Billing address updated"
}

Update shipping address

Updates the shipping address for this invoice alone.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Arguments

  • addressstring

    Shipping address of the customer

  • citystring

    City of the contact's shipping address

  • statestring

    State of the Contact's shipping address

  • zipstring

    ZIP code of the contact's shipping address

  • countrystring

    Contact's country for the given shipping address

  • faxstring

    FAX number of the contact

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/address/shipping?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/invoices/982000000567114/address/shipping?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/invoices/982000000567114/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 http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/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();
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/invoices/982000000567114/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("api.zakya.com")

payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"

headers = {
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }

conn.request("PUT", "/inventory/v1/invoices/982000000567114/address/shipping?organization_id=10234695", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "address": "4900 Hopyard Rd, Suit 310",
    "city": "Pleasanton",
    "state": "CA",
    "zip": 945881,
    "country": "USA",
    "fax": "+1-925-924-9600"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Shipping address updated"
}

List invoice templates

Get all invoice pdf templates.

OAuth Scope : ZakyaAPI.invoices.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "templates": [
        {
            "template_name": "Service - Classic",
            "template_id": 982000000000143,
            "template_type": "classic"
        },
        {...},
        {...}
    ]
}

Update invoice template

Update the pdf template associated with the invoice.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/templates/982000000000143?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/invoices/982000000567114/templates/982000000000143?organization_id=10234695"
type: PUT
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/982000000567114/templates/982000000000143?organization_id=10234695")
  .put(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/templates/982000000000143?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: 'PUT',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/invoices/982000000567114/templates/982000000000143?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("PUT", "/inventory/v1/invoices/982000000567114/templates/982000000000143?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice information has been updated."
}

List invoice payments

Get the list of payments made for an invoice.

OAuth Scope : ZakyaAPI.invoices.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "payments": [
        {
            "payment_id": "982000000567190",
            "payment_number": 7,
            "invoice_id": 982000000567036,
            "invoice_payment_id": 982000000567192,
            "payment_mode": "cash",
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "date": "2013-11-18",
            "reference_number": 99782374,
            "exchange_rate": 1,
            "amount": 10.57,
            "tax_amount_withheld": 0,
            "online_transaction_id": "",
            "is_single_invoice_payment": true
        },
        {...},
        {...}
    ]
}

List credits applied

Get the list of credits applied for an invoice.

OAuth Scope : ZakyaAPI.invoices.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "credits": [
        {
            "creditnote_id": 982000000567134,
            "creditnotes_invoice_id": "982000000567172",
            "creditnotes_number": "CN-00001",
            "credited_date": "2013-11-18",
            "amount_applied": 12.2
        },
        {...},
        {...}
    ]
}

Apply credits

Apply the customer credits either from credit notes or excess customer payments to an invoice. Multiple credits can be applied at once.

OAuth Scope : ZakyaAPI.invoices.CREATE

Arguments

  • invoice_paymentsarray

    Invoice payment list

    Show Sub-Attributes

    • payment_idstring

      ID of the payment from which credit has to be applied.

    • amount_appliedfloat

      Amount applied to the invoice.

  • apply_creditnotesarray

    Apply existing credit note of a customer against the invoice

    Show Sub-Attributes

    • creditnote_idstring

      ID of the credit note from which credit has to be applied.

    • amount_appliedfloat

      Amount applied to the invoice.

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "invoice_payments": [
        {
            "payment_id": 460000000031003,
            "amount_applied": 15
        }
    ],
    "apply_creditnotes": [
        {
            "creditnote_id": 460000000029003,
            "amount_applied": 22.5
        }
    ]
}
Response ExampleCopy
{
    "code": 0,
    "message": "Credits have been applied to the invoice(s)."
}

Delete a payment

Delete a payment made to an invoice.

OAuth Scope : ZakyaAPI.invoices.DELETE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The payment has been deleted."
}

Delete applied credit

Delete a particular credit applied to an invoice.

OAuth Scope : ZakyaAPI.invoices.DELETE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Credits applied to an invoice have been deleted."
}

Add attachment to an invoice

Attach a file to an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

Query Parameters

  • can_send_in_mail 

    True to send the attachment with the invoice when emailed.

  • attachment 

    The file to be attached.Allowed Extensions: gif, png, jpeg, jpg, bmp and pdf

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/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("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("POST", "/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Your file has been successfully attached to the invoice."
}

Update attachment preference

Set whether you want to send the attached file while emailing the invoice.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Query Parameters

  • can_send_in_mail (Required) 

    Boolean to send the attachment with the invoice when emailed.

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true' \
  --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/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true"
type: PUT
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true")
  .put(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true",
  "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: 'PUT',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true', 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("PUT", "/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695&can_send_in_mail=true", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Invoice information has been updated."
}

Get an invoice attachment

Returns the file attached to the invoice.

OAuth Scope : ZakyaAPI.invoices.READ

Query Parameters

  • preview 

    Get the thumbnail of the attachment.

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/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("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("GET", "/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695", headers=headers)

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

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

Delete an attachment

Delete the file attached to the invoice.

OAuth Scope : ZakyaAPI.invoices.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/attachment?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/invoices/982000000567114/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("api.zakya.com")

headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }

conn.request("DELETE", "/inventory/v1/invoices/982000000567114/attachment?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "Your file is no longer attached to the invoice."
}

Add comment

Add a comment for an invoice.

OAuth Scope : ZakyaAPI.invoices.CREATE

Query Parameters

  • description 

    A short note added

  • payment_expected_date 

    Expected date pf payment

  • show_comment_to_clients 

    Boolean to check if the comment to be shown to the clients

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

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

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

List invoice comments & history

Get the complete history and comments of an invoice.

OAuth Scope : ZakyaAPI.invoices.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "comments": [
        {
            "comment_id": 982000000567019,
            "invoice_id": 982000000567114,
            "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
            "commented_by_id": 982000000554041,
            "commented_by": "John David",
            "comment_type": "system",
            "operation_type": "Added",
            "date": "2013-11-18",
            "date_description": "yesterday",
            "time": "2:38 AM",
            "transaction_id": "982000000567204",
            "transaction_type": "invoice"
        },
        {...},
        {...}
    ]
}

Update comment

Update an existing comment of an invoice.

OAuth Scope : ZakyaAPI.invoices.UPDATE

Query Parameters

  • description 

    The comment on a invoice

  • show_comment_to_clients 

    Boolean to check if the comment to be shown to the clients

Request ExampleCopy
curl --request PUT \
  --url 'https://api.zakya.com/inventory/v1/invoices/982000000567114/comments/982000000567019?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/invoices/982000000567114/comments/982000000567019?organization_id=10234695"
type: PUT
headers: headers_data
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/invoices/982000000567114/comments/982000000567019?organization_id=10234695")
  .put(null)
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();

Response response = client.newCall(request).execute();
const http = require("https");

const options = {
  "method": "PUT",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/invoices/982000000567114/comments/982000000567019?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: 'PUT',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/invoices/982000000567114/comments/982000000567019?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("PUT", "/inventory/v1/invoices/982000000567114/comments/982000000567019?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "comment_id": 982000000567019,
    "invoice_id": 982000000567114,
    "description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
    "commented_by_id": 982000000554041,
    "commented_by": "John David",
    "date": "2013-11-17",
    "date_description": "yesterday",
    "time": "2:02 AM",
    "comment_type": "system"
}

Delete a comment

Delete an invoice comment.

OAuth Scope : ZakyaAPI.invoices.DELETE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The comment has been deleted."
}