Vendor Credits

Vendor credits are credits that you receive from your vendor, and is treated as an equivalent of physical cash that the vendor owes you. This helps you track the money you’re owed until it is either paid by said vendor at a later date i.e refunded, or subtracted from any future bill amount due to that vendor.

  • vendor_credit_idstring

    ID of the Vendor Credit

  • vendor_credit_numberstring

    Number of the Vendor Credit

  • datestring

    The date the vendor credit is created. [yyyy-mm-dd]

  • source_of_supplystring

    Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)

  • destination_of_supplystring

    Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)

  • gst_nostring

    15 digit GST identification number of the vendor.

  • gst_treatmentstring

    Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .

  • pricebook_idstring

    ID of the pricebook

  • is_reverse_charge_appliedboolean

    Applicable for transactions where you pay reverse charge

  • statusstring
  • reference_numberstring

    Reference number for the refund recorded.

  • vendor_idstring

    ID of the vendor the vendor credit associated with the Vendor Credit

  • vendor_namestring

    Name of the Vendor Associated with the Vendor Credit

  • currency_idstring

    ID of the Currency Involved in the Vendor Credit

  • currency_codestring

    Code of the Currency Involved in the Vendor Credit

  • exchange_ratedouble

    Exchange rate of the currency.

  • price_precisioninteger
  • is_inclusive_taxboolean Not applicable in US

    Used to specify whether the line item rates are inclusive or exclusive of tax.

  • line_itemsobject

    Line items of a vendor credit.

    Show Sub-Attributes

    • item_idstring

      ID of the item.

    • line_item_idstring

      ID of the Line Item

    • skustring

      SKU of the Item

    • account_idstring

      ID of the account, the line item is associated with

    • reverse_charge_tax_idstring

      ID of the reverse charge tax

    • reverse_charge_tax_namestring

      Enter the tax name of the reverse charge

    • reverse_charge_tax_percentagedouble

      Tax percentage of the reverse charge

    • reverse_charge_tax_amountdouble

      Tax amount of the reverse charge

    • account_namestring

      Name of the account the line item is associated with

    • namestring

      Name of the line item.

    • descriptionstring

      Description of the line item.

    • item_orderinteger

      Order of the line item

    • quantitydouble

      Quantity of the line item.

    • unitstring

      Unit of the line item e.g. kgs, Nos.

    • bcy_ratedouble

      Rate of the Item in Base Currency

    • ratedouble

      Rate of the line item.

    • tax_idstring

      ID of the Tax associated with the Vendor Credit

    • tax_exemption_idstring

      ID of the Tax Exemption associated

    • tax_exemption_codestring

      Code of the Tax Exemption associated

    • tax_namestring

      Name of the Tax

    • tax_typestring

      Type of the Tax

    • tax_percentagedouble

      Percentage of Tax

    • item_totaldouble

      Total price of the Item

    • item_total_inclusive_of_taxdouble

      Total price of the Item inclusive of Tax

    • hsn_or_sacstring

      HSN Code

    • stock_on_handstring

      Stock on Hand for that Item

    • tagsarray

      Show Sub-Attributes

      • tag_idlong

        ID of the tag

      • tag_option_idlong

        ID of the tag option

    • item_custom_fieldsarray

      Show Sub-Attributes

      • custom_field_idlong

        ID of the Custom Field

      • labelstring

        Label of the Custom Field

      • valuestring

        Value of the Custom Field

      • indexinteger

        Index of the Custom Field

  • documentsarray

    Show Sub-Attributes

    • document_idlong

      ID of the Document

    • file_namestring

      Name of the file

  • custom_fieldsarray

    Show Sub-Attributes

    • custom_field_idlong

      ID of the Custom Field

    • labelstring

      Label of the Custom Field

    • valuestring

      Value of the Custom Field

    • indexinteger

      Index of the Custom Field

  • sub_totaldouble
  • totaldouble
  • total_credits_useddouble
  • total_refunded_amountdouble
  • balancedouble

    Balance in the Vendor Credit

  • notesstring

    Notes for the Vendor Credit

  • commentsarray

    Show Sub-Attributes

    • comment_idstring

      ID of the Comment

    • vendor_credit_idstring

      ID of the Vendor Credit

    • descriptionstring

      Description of the line item.

    • commented_by_idstring

      ID of the User who caused the comment

    • commented_bystring

      Name of the User who caused the comment

    • comment_typestring

      Type of the comment

    • datestring

      The date the vendor credit is created. [yyyy-mm-dd]

    • date_descriptionstring

      Description of the Date of the Comment

    • timestring

      Time of the Comment

    • operation_typestring

      Type of operation that caused the Comment

    • transaction_idstring

      Transaction ID that caused the Comment

    • transaction_typestring

      Transaction Type that caused the Comment

  • vendor_credit_refundsarray

    Show Sub-Attributes

    • vendor_credit_refund_idstring

      ID of the Vendor Credit Refund

    • vendor_credit_idstring

      ID of the Vendor Credit

    • datestring

      The date the vendor credit is created. [yyyy-mm-dd]

    • refund_modestring

      Mode of Refund

    • reference_numberstring

      Reference number for the refund recorded.

    • descriptionstring

      Description of the line item.

    • amount_bcydouble

      Refund Amount in Base Currency

    • amount_fcydouble

      Refund Amount in Foreign Currency

  • bills_creditedarray

    Show Sub-Attributes

    • bill_idstring

      ID of the Bill Credited

    • vendor_credit_bill_idstring

      ID of the Vendor Credited Bill ID

    • datestring

      Date of the Bill Credit

    • bill_numberstring

      Number of the Bill Credited

    • amountdouble

      Amount that is credited in the bill

  • created_timestring

    Time of Vendor Credit Creation

  • last_modified_timestring

    Last Modified Time of Vendor Credit

ExampleCopy
{
    "vendor_credit_id": "3000000002075",
    "vendor_credit_number": "DN-00002",
    "date": "2014-08-28",
    "source_of_supply": "TN",
    "destination_of_supply": "TN",
    "gst_no": "22AAAAA0000A1Z5",
    "gst_treatment": "business_gst",
    "pricebook_id": "string",
    "is_reverse_charge_applied": true,
    "status": "open",
    "reference_number": "string",
    "vendor_id": "460000000020029",
    "vendor_name": "Bowman and Co",
    "currency_id": "3000000000083",
    "currency_code": "USD",
    "exchange_rate": 1,
    "price_precision": 2,
    "is_inclusive_tax": false,
    "line_items": {
        "item_id": "460000000020071",
        "line_item_id": "460000000020077",
        "sku": "string",
        "account_id": "460000000020097",
        "reverse_charge_tax_id": 460000000057089,
        "reverse_charge_tax_name": "intra",
        "reverse_charge_tax_percentage": 10,
        "reverse_charge_tax_amount": 100,
        "account_name": "IT and Internet Expenses",
        "name": "Premium Plan - Web hosting",
        "description": "string",
        "item_order": 0,
        "quantity": 1,
        "unit": "Nos",
        "bcy_rate": 30,
        "rate": 30,
        "tax_id": "string",
        "tax_exemption_id": "string",
        "tax_exemption_code": "string",
        "tax_name": "string",
        "tax_type": "string",
        "tax_percentage": 0.1,
        "item_total": 30,
        "item_total_inclusive_of_tax": 30,
        "hsn_or_sac": "string",
        "stock_on_hand": "string",
        "tags": [
            {
                "tag_id": 0,
                "tag_option_id": 0
            }
        ],
        "item_custom_fields": [
            {
                "custom_field_id": 0,
                "label": "string",
                "value": "string",
                "index": 0
            }
        ]
    },
    "documents": [
        {
            "document_id": 0,
            "file_name": "string"
        }
    ],
    "custom_fields": [
        {
            "custom_field_id": 0,
            "label": "string",
            "value": "string",
            "index": 0
        }
    ],
    "sub_total": 30,
    "total": 30,
    "total_credits_used": 0,
    "total_refunded_amount": 0,
    "balance": 30,
    "notes": "string",
    "comments": [
        {
            "comment_id": "3000000002089",
            "vendor_credit_id": "3000000002075",
            "description": "string",
            "commented_by_id": "3000000000741",
            "commented_by": "rajdeep.a",
            "comment_type": "system",
            "date": "2014-08-28",
            "date_description": "32 minutes ago",
            "time": "10:52 PM",
            "operation_type": "Added",
            "transaction_id": "460000000069087",
            "transaction_type": "vendor_credit"
        }
    ],
    "vendor_credit_refunds": [
        {
            "vendor_credit_refund_id": "3000000003151",
            "vendor_credit_id": "3000000002075",
            "date": "2014-08-28",
            "refund_mode": "cash",
            "reference_number": "string",
            "description": "string",
            "amount_bcy": 13,
            "amount_fcy": 13
        }
    ],
    "bills_credited": [
        {
            "bill_id": "460000000057075",
            "vendor_credit_bill_id": "string",
            "date": "2014-08-30",
            "bill_number": "string",
            "amount": 13
        }
    ],
    "created_time": "2014-08-28T22:53:31-0700",
    "last_modified_time": "2014-08-28T22:53:31-0700"
}

Create a vendor credit

Create a vendor credit for a vendor.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

Arguments

  • vendor_idstring (Required)

    ID of the vendor the vendor credit associated with the Vendor Credit

  • vendor_credit_numberstring

    Mandatory if auto number generation is disabled.

  • gst_treatmentstring

    Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .

  • gst_nostring

    15 digit GST identification number of the vendor.

  • source_of_supplystring

    Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)

  • destination_of_supplystring

    Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)

  • pricebook_idstring

    ID of the pricebook

  • reference_numberstring

    Reference number for the refund recorded.

  • is_update_customerboolean

    Check if customer should be updated

  • datestring

    The date the vendor credit is created. [yyyy-mm-dd]

  • exchange_ratedouble

    Exchange rate of the currency.

  • is_inclusive_taxboolean Not applicable in US

    Used to specify whether the line item rates are inclusive or exclusive of tax.

  • line_itemsarray

    Line items of a vendor credit.

    Show Sub-Attributes

    • item_idstring

      ID of the item.

    • line_item_idstring

      ID of the Line Item

    • account_idstring

      ID of the account, the line item is associated with

    • namestring

      Name of the line item.

    • hsn_or_sacstring

      HSN Code

    • reverse_charge_tax_idstring

      ID of the reverse charge tax

    • warehouse_idstring

      ID of the warehouse

    • descriptionstring

      Description of the line item.

    • item_orderinteger

      Order of the line item

    • quantitydouble

      Quantity of the line item.

    • unitstring

      Unit of the line item e.g. kgs, Nos.

    • ratedouble

      Rate of the line item.

    • tax_idstring

      ID of the Tax associated with the Vendor Credit

    • tagsarray

      Show Sub-Attributes

      • tag_idlong

        ID of the tag

      • tag_option_idlong

        ID of the tag option

    • item_custom_fieldsarray

      Show Sub-Attributes

      • custom_field_idlong

        ID of the Custom Field

      • labelstring

        Label of the Custom Field

      • valuestring

        Value of the Custom Field

      • indexinteger

        Index of the Custom Field

    • serial_numbersarray

       

    • project_idstring

      ID of the project

    • project_namestring

      Name of the project.

  • notesstring

    Notes for the Vendor Credit

  • documentsarray

    Show Sub-Attributes

    • document_idlong

      ID of the Document

    • file_namestring

      Name of the file

  • custom_fieldsarray

    Show Sub-Attributes

    • custom_field_idlong

      ID of the Custom Field

    • labelstring

      Label of the Custom Field

    • valuestring

      Value of the Custom Field

    • indexinteger

      Index of the Custom Field

Query Parameters

  • ignore_auto_number_generation 

    Ignore auto number generation for this vendor credit only. On enabling this option vendor credit number is mandatory.

  • bill_id 

    Bill Associated with the Vendor Credit

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "vendor_id": "460000000020029",
    "vendor_credit_number": "DN-00002",
    "gst_treatment": "business_gst",
    "gst_no": "22AAAAA0000A1Z5",
    "source_of_supply": "TN",
    "destination_of_supply": "TN",
    "pricebook_id": "string",
    "reference_number": "string",
    "is_update_customer": false,
    "date": "2014-08-28",
    "exchange_rate": 1,
    "is_inclusive_tax": false,
    "line_items": [
        {
            "item_id": "460000000020071",
            "line_item_id": "460000000020077",
            "account_id": "460000000020097",
            "name": "Premium Plan - Web hosting",
            "hsn_or_sac": "string",
            "reverse_charge_tax_id": 460000000057089,
            "warehouse_id": "string",
            "description": "string",
            "item_order": 0,
            "quantity": 1,
            "unit": "Nos",
            "rate": 30,
            "tax_id": "string",
            "tags": [
                {
                    "tag_id": 0,
                    "tag_option_id": 0
                }
            ],
            "item_custom_fields": [
                {
                    "custom_field_id": 0,
                    "label": "string",
                    "value": "string",
                    "index": 0
                }
            ],
            "serial_numbers": [
                "string"
            ],
            "project_id": 90300000087378,
            "project_name": "Sample Project"
        }
    ],
    "notes": "string",
    "documents": [
        {
            "document_id": 0,
            "file_name": "string"
        }
    ],
    "custom_fields": [
        {
            "custom_field_id": 0,
            "label": "string",
            "value": "string",
            "index": 0
        }
    ]
}
Response ExampleCopy
{
    "code": 0,
    "message": "Vendor credit has been created.",
    "vendor_credit": {
        "vendor_credit_id": "3000000002075",
        "vendor_credit_number": "DN-00002",
        "date": "2014-08-28",
        "source_of_supply": "TN",
        "destination_of_supply": "TN",
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst",
        "pricebook_id": "string",
        "is_reverse_charge_applied": true,
        "status": "open",
        "reference_number": "string",
        "vendor_id": "460000000020029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1,
        "price_precision": 2,
        "is_inclusive_tax": false,
        "line_items": {
            "item_id": "460000000020071",
            "line_item_id": "460000000020077",
            "sku": "string",
            "account_id": "460000000020097",
            "reverse_charge_tax_id": 460000000057089,
            "reverse_charge_tax_name": "intra",
            "reverse_charge_tax_percentage": 10,
            "reverse_charge_tax_amount": 100,
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "string",
            "item_order": 0,
            "quantity": 1,
            "unit": "Nos",
            "bcy_rate": 30,
            "rate": 30,
            "tax_id": "string",
            "tax_exemption_id": "string",
            "tax_exemption_code": "string",
            "tax_name": "string",
            "tax_type": "string",
            "tax_percentage": 0.1,
            "item_total": 30,
            "item_total_inclusive_of_tax": 30,
            "hsn_or_sac": "string",
            "stock_on_hand": "string",
            "tags": [
                {
                    "tag_id": 0,
                    "tag_option_id": 0
                }
            ],
            "item_custom_fields": [
                {
                    "custom_field_id": 0,
                    "label": "string",
                    "value": "string",
                    "index": 0
                }
            ]
        },
        "documents": [
            {
                "document_id": 0,
                "file_name": "string"
            }
        ],
        "custom_fields": [
            {
                "custom_field_id": 0,
                "label": "string",
                "value": "string",
                "index": 0
            }
        ],
        "sub_total": 30,
        "total": 30,
        "total_credits_used": 0,
        "total_refunded_amount": 0,
        "balance": 30,
        "notes": "string",
        "comments": [
            {
                "comment_id": "3000000002089",
                "vendor_credit_id": "3000000002075",
                "description": "string",
                "commented_by_id": "3000000000741",
                "commented_by": "rajdeep.a",
                "comment_type": "system",
                "date": "2014-08-28",
                "date_description": "32 minutes ago",
                "time": "10:52 PM",
                "operation_type": "Added",
                "transaction_id": "460000000069087",
                "transaction_type": "vendor_credit"
            }
        ],
        "vendor_credit_refunds": [
            {
                "vendor_credit_refund_id": "3000000003151",
                "vendor_credit_id": "3000000002075",
                "date": "2014-08-28",
                "refund_mode": "cash",
                "reference_number": "string",
                "description": "string",
                "amount_bcy": 13,
                "amount_fcy": 13
            }
        ],
        "bills_credited": [
            {
                "bill_id": "460000000057075",
                "vendor_credit_bill_id": "string",
                "date": "2014-08-30",
                "bill_number": "string",
                "amount": 13
            }
        ],
        "created_time": "2014-08-28T22:53:31-0700",
        "last_modified_time": "2014-08-28T22:53:31-0700"
    }
}

List vendor credits

List vendor credits with pagination.

OAuth Scope : ZakyaAPI.debitnotes.READ

Query Parameters

  • vendor_credit_number 

    Search vendor credits by vendor credit number. Variants: vendor_credit_number.startswith and vendor_credit_number.contains

  • date 

    General Format: yyyy-mm-dd. Search vendor credits by date. Variants: date.start, date.end, date.before and date.after

  • status 

    Search vendor credits by vendor credit status. Allowed statuses are open, closed and void. Allowed Values: open, closed and void

  • total 

    Search vendor credits by total amount. Variants: total.start, total.end, total.less_than, total.less_equals, total.greater_than and total.greater_equals

  • reference_number 

    Search vendor credits by vendor credit reference number. Variants: reference_number.startswith and reference_number.contains

  • customer_name 

    Search vendor credits by vendor name. Variants: customer_name.startswith and customer_name.contains

  • item_name 

    Search vendor credits by item name. Variants: item_name.startswith and item_name.contains

  • item_description 

    Search vendor credits by vendor credit item description. Variants: item_description.startswith and item_description.contains

  • notes 

    Search vendor credits by vendor credit notes. Variants: notes.startswith and notes.contains

  • custom_field 

    Search vendor credits by custom field. Variants : custom_field_startswith and custom_field_contains

  • last_modified_time 

    Search vendor credits by vendor credit last modfified time

  • customer_id 

    Search vendor credits by vendor credit customer ID

  • line_item_id 

    Search vendor credits by vendor credit line item ID

  • item_id 

    Search vendor credits by vendor credit item ID

  • tax_id 

    Search vendor credits by vendor credit tax ID

  • filter_by 

    Filter vendor credits by statuses. Allowed Values: Status.All, Status.Open, Status.Draft, Status.Closed and Status.Void.

  • search_text 

    Search vendor credits by vendor credit number or vendor name or vendor credit reference number.

  • sort_column 

    Sort vendor credits by following columns vendor_name, vendorcredit_number, balance, total, date and created_time. Allowed Values: vendor_name, vendor_credit_number, balance, total, date, created_time, last_modified_time and reference_number.

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "vendorcredits": [
        {
            "vendor_credit_id": "3000000002075",
            "vendor_credit_number": "DN-00002",
            "status": "open",
            "reference_number": "string",
            "date": "2014-08-28",
            "total": 30,
            "balance": 30,
            "vendor_id": "460000000020029",
            "vendor_name": "Bowman and Co",
            "currency_id": "3000000000083",
            "currency_code": "USD",
            "created_time": "2014-08-28T22:53:31-0700",
            "last_modified_time": "2014-08-28T22:53:31-0700",
            "has_attachment": false,
            "exchange_rate": 1
        },
        {...},
        {...}
    ]
}

Update vendor credit

Update an existing vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.UPDATE

Arguments

  • vendor_idstring (Required)

    ID of the vendor the vendor credit associated with the Vendor Credit

  • vendor_credit_numberstring

    Mandatory if auto number generation is disabled.

  • gst_treatmentstring

    Choose whether the contact is GST registered/unregistered/consumer/overseas. Allowed values are business_gst , business_none , overseas , consumer .

  • gst_nostring

    15 digit GST identification number of the vendor.

  • source_of_supplystring

    Place from where the goods/services are supplied. (If not given, place of contact given for the contact will be taken)

  • destination_of_supplystring

    Place where the goods/services are supplied to. (If not given, organisation's home state will be taken)

  • pricebook_idstring

    ID of the pricebook

  • reference_numberstring

    Reference number for the refund recorded.

  • is_update_customerboolean

    Check if customer should be updated

  • datestring

    The date the vendor credit is created. [yyyy-mm-dd]

  • exchange_ratedouble

    Exchange rate of the currency.

  • is_inclusive_taxboolean Not applicable in United States

    Used to specify whether the line item rates are inclusive or exclusive of tax.

  • line_itemsarray

    Line items of a vendor credit.

    Show Sub-Attributes

    • item_idstring

      ID of the item.

    • line_item_idstring

      ID of the Line Item

    • account_idstring

      ID of the account, the line item is associated with

    • namestring

      Name of the line item.

    • hsn_or_sacstring

      HSN Code

    • reverse_charge_tax_idstring

      ID of the reverse charge tax

    • warehouse_idstring

      ID of the warehouse

    • descriptionstring

      Description of the line item.

    • item_orderinteger

      Order of the line item

    • quantitydouble

      Quantity of the line item.

    • unitstring

      Unit of the line item e.g. kgs, Nos.

    • ratedouble

      Rate of the line item.

    • tax_idstring

      ID of the Tax associated with the Vendor Credit

    • tagsarray

      Show Sub-Attributes

      • tag_idlong

        ID of the tag

      • tag_option_idlong

        ID of the tag option

    • item_custom_fieldsarray

      Show Sub-Attributes

      • custom_field_idlong

        ID of the Custom Field

      • labelstring

        Label of the Custom Field

      • valuestring

        Value of the Custom Field

      • indexinteger

        Index of the Custom Field

    • serial_numbersarray
    • project_idstring

      ID of the project

    • project_namestring

      Name of the project.

  • notesstring

    Notes for the Vendor Credit

  • documentsarray

    Show Sub-Attributes

    • document_idlong

      ID of the Document

    • file_namestring

      Name of the file

  • custom_fieldsarray

    Show Sub-Attributes

    • custom_field_idlong

      ID of the Custom Field

    • labelstring

      Label of the Custom Field

    • valuestring

      Value of the Custom Field

    • indexinteger

      Index of the Custom Field

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "vendor_id": "460000000020029",
    "vendor_credit_number": "DN-00002",
    "gst_treatment": "business_gst",
    "gst_no": "22AAAAA0000A1Z5",
    "source_of_supply": "TN",
    "destination_of_supply": "TN",
    "pricebook_id": "string",
    "reference_number": "string",
    "is_update_customer": false,
    "date": "2014-08-28",
    "exchange_rate": 1,
    "is_inclusive_tax": false,
    "line_items": [
        {
            "item_id": "460000000020071",
            "line_item_id": "460000000020077",
            "account_id": "460000000020097",
            "name": "Premium Plan - Web hosting",
            "hsn_or_sac": "string",
            "reverse_charge_tax_id": 460000000057089,
            "warehouse_id": "string",
            "description": "string",
            "item_order": 0,
            "quantity": 1,
            "unit": "Nos",
            "rate": 30,
            "tax_id": "string",
            "tags": [
                {
                    "tag_id": 0,
                    "tag_option_id": 0
                }
            ],
            "item_custom_fields": [
                {
                    "custom_field_id": 0,
                    "label": "string",
                    "value": "string",
                    "index": 0
                }
            ],
            "serial_numbers": [
                "string"
            ],
            "project_id": 90300000087378,
            "project_name": "Sample Project"
        }
    ],
    "notes": "string",
    "documents": [
        {
            "document_id": 0,
            "file_name": "string"
        }
    ],
    "custom_fields": [
        {
            "custom_field_id": 0,
            "label": "string",
            "value": "string",
            "index": 0
        }
    ]
}
Response ExampleCopy
{
    "code": 0,
    "message": "Vendor credit information has been updated.",
    "vendor_credit": {
        "vendor_credit_id": "3000000002075",
        "vendor_credit_number": "DN-00002",
        "date": "2014-08-28",
        "source_of_supply": "TN",
        "destination_of_supply": "TN",
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst",
        "pricebook_id": "string",
        "is_reverse_charge_applied": true,
        "status": "open",
        "reference_number": "string",
        "vendor_id": "460000000020029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1,
        "price_precision": 2,
        "taxes": [
            {
                "tax_name": "string",
                "tax_amount": 0.1
            }
        ],
        "is_inclusive_tax": false,
        "line_items": {
            "item_id": "460000000020071",
            "line_item_id": "460000000020077",
            "sku": "string",
            "account_id": "460000000020097",
            "reverse_charge_tax_id": 460000000057089,
            "reverse_charge_tax_name": "intra",
            "reverse_charge_tax_percentage": 10,
            "reverse_charge_tax_amount": 100,
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "string",
            "item_order": 0,
            "quantity": 1,
            "unit": "Nos",
            "bcy_rate": 30,
            "rate": 30,
            "tax_id": "string",
            "tax_exemption_id": "string",
            "tax_exemption_code": "string",
            "tax_name": "string",
            "tax_type": "string",
            "tax_percentage": 0.1,
            "item_total": 30,
            "item_total_inclusive_of_tax": 30,
            "hsn_or_sac": "string",
            "stock_on_hand": "string",
            "tags": [
                {
                    "tag_id": 0,
                    "tag_option_id": 0
                }
            ],
            "item_custom_fields": [
                {
                    "custom_field_id": 0,
                    "label": "string",
                    "value": "string",
                    "index": 0
                }
            ]
        },
        "documents": [
            {
                "document_id": 0,
                "file_name": "string"
            }
        ],
        "custom_fields": [
            {
                "custom_field_id": 0,
                "label": "string",
                "value": "string",
                "index": 0
            }
        ],
        "sub_total": 30,
        "total": 30,
        "total_credits_used": 0,
        "total_refunded_amount": 0,
        "balance": 30,
        "notes": "string",
        "comments": [
            {
                "comment_id": "3000000002089",
                "vendor_credit_id": "3000000002075",
                "description": "string",
                "commented_by_id": "3000000000741",
                "commented_by": "rajdeep.a",
                "comment_type": "system",
                "date": "2014-08-28",
                "date_description": "32 minutes ago",
                "time": "10:52 PM",
                "operation_type": "Added",
                "transaction_id": "460000000069087",
                "transaction_type": "vendor_credit"
            }
        ],
        "vendor_credit_refunds": [
            {
                "vendor_credit_refund_id": "3000000003151",
                "vendor_credit_id": "3000000002075",
                "date": "string",
                "refund_mode": "cash",
                "reference_number": "string",
                "description": "string",
                "amount_bcy": 13,
                "amount_fcy": 13
            }
        ],
        "bills_credited": [
            {
                "bill_id": "460000000057075",
                "vendor_credit_bill_id": "string",
                "date": "2014-08-30",
                "bill_number": "string",
                "amount": 13
            }
        ],
        "created_time": "2014-08-28T22:53:31-0700",
        "last_modified_time": "2014-08-28T22:53:31-0700"
    }
}

Get vendor credit

Get details of a vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.READ

Query Parameters

  • print 

    Export vendor credit pdf with default print option. Allowed Values: true, false, on and off.

  • accept 

    You can get vendor credit details as json/pdf/html. Default format is html. Allowed Values: json, xml, csv, xls, pdf, html and jhtml.

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "vendor_credit": {
        "vendor_credit_id": "3000000002075",
        "vendor_credit_number": "DN-00002",
        "date": "2014-08-28",
        "status": "open",
        "reference_number": "string",
        "source_of_supply": "TN",
        "destination_of_supply": "TN",
        "gst_no": "22AAAAA0000A1Z5",
        "gst_treatment": "business_gst",
        "pricebook_id": "string",
        "is_reverse_charge_applied": true,
        "vendor_id": "460000000020029",
        "vendor_name": "Bowman and Co",
        "currency_id": "3000000000083",
        "currency_code": "USD",
        "exchange_rate": 1,
        "price_precision": 2,
        "is_inclusive_tax": false,
        "line_items": {
            "item_id": "460000000020071",
            "line_item_id": "460000000020077",
            "sku": "string",
            "account_id": "460000000020097",
            "reverse_charge_tax_id": 460000000057089,
            "reverse_charge_tax_name": "intra",
            "reverse_charge_tax_percentage": 10,
            "reverse_charge_tax_amount": 100,
            "account_name": "IT and Internet Expenses",
            "name": "Premium Plan - Web hosting",
            "description": "string",
            "item_order": 0,
            "quantity": 1,
            "unit": "Nos",
            "bcy_rate": 30,
            "rate": 30,
            "tax_id": "string",
            "tax_exemption_id": "string",
            "tax_exemption_code": "string",
            "tax_name": "string",
            "tax_type": "string",
            "tax_percentage": 0.1,
            "item_total": 30,
            "item_total_inclusive_of_tax": 30,
            "hsn_or_sac": "string",
            "stock_on_hand": "string",
            "tags": [
                {
                    "tag_id": 0,
                    "tag_option_id": 0
                }
            ],
            "item_custom_fields": [
                {
                    "custom_field_id": 0,
                    "label": "string",
                    "value": "string",
                    "index": 0
                }
            ],
            "project_id": 90300000087378,
            "project_name": "Sample Project"
        },
        "documents": [
            {
                "document_id": 0,
                "file_name": "string"
            }
        ],
        "custom_fields": [
            {
                "custom_field_id": 0,
                "label": "string",
                "value": "string",
                "index": 0
            }
        ],
        "sub_total": 30,
        "total": 30,
        "total_credits_used": 0,
        "total_refunded_amount": 0,
        "balance": 30,
        "notes": "string",
        "comments": [
            {
                "comment_id": "3000000002089",
                "vendor_credit_id": "3000000002075",
                "description": "string",
                "commented_by_id": "3000000000741",
                "commented_by": "rajdeep.a",
                "comment_type": "system",
                "date": "2014-08-28",
                "date_description": "32 minutes ago",
                "time": "10:52 PM",
                "operation_type": "Added",
                "transaction_id": "460000000069087",
                "transaction_type": "vendor_credit"
            }
        ],
        "vendor_credit_refunds": [
            {
                "vendor_credit_refund_id": "3000000003151",
                "vendor_credit_id": "3000000002075",
                "date": "2014-08-28",
                "refund_mode": "cash",
                "reference_number": "string",
                "description": "string",
                "amount_bcy": 13,
                "amount_fcy": 13
            }
        ],
        "bills_credited": [
            {
                "bill_id": "460000000057075",
                "vendor_credit_bill_id": "string",
                "date": "2014-08-30",
                "bill_number": "string",
                "amount": 13
            }
        ],
        "created_time": "2014-08-28T22:53:31-0700",
        "last_modified_time": "2014-08-28T22:53:31-0700"
    }
}

Delete vendor credit

Delete a vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.DELETE

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

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

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

Convert to open

Change an existing vendor credit status to open.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

Request ExampleCopy
curl --request POST \
  --url 'https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/status/open?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/vendorcredits/3000000002075/status/open?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/vendorcredits/3000000002075/status/open?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/vendorcredits/3000000002075/status/open?organization_id=10234695",
  "headers": {
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const options = {
  method: 'POST',
  headers: {
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};

fetch('https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/status/open?organization_id=10234695', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
import http.client

conn = http.client.HTTPSConnection("api.zakya.com")

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

conn.request("POST", "/inventory/v1/vendorcredits/3000000002075/status/open?organization_id=10234695", headers=headers)

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The status of the vendor credit has been changed to open."
}

Void vendor credit

Mark an existing vendor credit as void.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

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

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

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

Submit a Vendor credit for approval

Submit a Vendor credit for approval.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "The vendor credit has been submitted for approval successfully."
}

Approve a Vendor credit

Approve a Vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "You have approved the vendor credit."
}

Apply credits to a bill

Apply vendor credit to existing bills.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

Arguments

  • bills (Required)Amount applied from vendor credits to specified bills.

    bill_id

  • string (Required)Bill Associated with the Vendor Credit

    amount_applied

  • double (Required)Amount applied to the bill.

    undefined

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "bills": null,
    "bill_id": "460000000057075",
    "amount_applied": 10
}
Response ExampleCopy
{
    "code": 0,
    "message": "Credits have been applied to the bill(s).",
    "bills": null
}

List bills credited

List bills to which the vendor credit is applied.

OAuth Scope : ZakyaAPI.debitnotes.READ

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "bills_credited": [
        {
            "vendor_credit_id": "3000000002075",
            "bill_id": "460000000057075",
            "vendor_credit_bill_id": "string",
            "date": "2014-08-28",
            "bill_number": "string"
        },
        {...},
        {...}
    ]
}

Delete bills credited

Delete the credits applied to a bill.

OAuth Scope : ZakyaAPI.debitnotes.DELETE

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

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

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

Refund a vendor credit

Refund vendor credit amount.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

Arguments

  • datestring (Required)

    Date of Vendor Credit Refund

  • refund_modestring

    Mode of Refund

  • reference_numberstring

    Reference number for the refund recorded.

  • amountdouble (Required)
  • exchange_ratedouble

    Exchange rate of the currency.

  • account_idstring (Required)

    ID of the account, the line item is associated with

  • descriptionstring

    Description of the line item.

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "date": "2014-08-30",
    "refund_mode": "cash",
    "reference_number": "string",
    "amount": 13,
    "exchange_rate": 1,
    "account_id": "460000000020097",
    "description": "string"
}
Response ExampleCopy
{
    "code": 0,
    "message": "The refund information for this vendor credit has been saved.",
    "vendor_credit_refund": {
        "vendor_credit_refund_id": "3000000003151",
        "vendor_credit_id": "3000000002075",
        "date": "2014-08-28",
        "refund_mode": "cash",
        "reference_number": "string",
        "amount": 13,
        "exchange_rate": 1,
        "account_id": "460000000020097",
        "account_name": "IT and Internet Expenses",
        "description": "string",
        "imported_transactions": [
            {
                "imported_transaction_id": "460000000013297",
                "date": "2014-08-28",
                "amount": 13,
                "payee": "John Roberts",
                "description": "string",
                "reference_number": "string",
                "status": "open",
                "account_id": "460000000020097"
            }
        ]
    }
}

List refunds of a vendor credit

List all refunds of an existing vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.READ

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

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

print(data.decode("utf-8"))

Update vendor credit refund

Update the refunded transaction.

OAuth Scope : ZakyaAPI.debitnotes.UPDATE

  • datestring (Required)

    The date the vendor credit is created. [yyyy-mm-dd]

  • refund_modestring

    Mode of Refund

  • reference_numberstring

    Reference number for the refund recorded.

  • amountdouble (Required)
  • exchange_ratedouble

    Exchange rate of the currency.

  • account_idstring (Required)

    ID of the account, the line item is associated with

  • descriptionstring

    Description of the line item.

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

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "date": "2014-08-28",
    "refund_mode": "cash",
    "reference_number": "string",
    "amount": 13,
    "exchange_rate": 1,
    "account_id": "460000000020097",
    "description": "string"
}
Response ExampleCopy
{
    "code": 0,
    "message": "The refund information has been saved.",
    "vendor_credit_refund": {
        "vendor_credit_refund_id": "3000000003151",
        "vendor_credit_id": "3000000002075",
        "date": "2014-08-28",
        "refund_mode": "cash",
        "reference_number": "string",
        "amount": 13,
        "exchange_rate": 1,
        "account_id": "460000000020097",
        "account_name": "IT and Internet Expenses",
        "description": "string",
        "imported_transactions": [
            {
                "imported_transaction_id": "460000000013297",
                "date": "2014-08-28",
                "amount": 13,
                "payee": "John Roberts",
                "description": "string",
                "reference_number": "string",
                "status": "open",
                "account_id": "460000000020097"
            }
        ]
    }
}

Get vendor credit refund

Get refund of a particular vendor credit.

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695'
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695"
type: GET
connection: 
]
info response;
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695")
  .get()
  .build();

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

const options = {
  "method": "GET",
  "hostname": "api.zakya.com",
  "port": null,
  "path": "/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695",
  "headers": {}
};

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'};

fetch('https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?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")

conn.request("GET", "/inventory/v1/vendorcredits/3000000002075/refunds/3000000003151?organization_id=10234695")

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "vendor_credit_refund": {
        "vendor_credit_refund_id": "3000000003151",
        "vendor_credit_id": "3000000002075",
        "date": "2014-08-28",
        "refund_mode": "cash",
        "reference_number": "string",
        "amount": 13,
        "exchange_rate": 1,
        "account_id": "460000000020097",
        "account_name": "IT and Internet Expenses",
        "description": "string",
        "imported_transactions": [
            {
                "imported_transaction_id": "460000000013297",
                "date": "2014-08-28",
                "amount": 13,
                "payee": "John Roberts",
                "description": "string",
                "reference_number": "string",
                "status": "open",
                "account_id": "460000000020097"
            }
        ]
    }
}

Delete vendor credit refund

Delete a vendor credit refund.

OAuth Scope : ZakyaAPI.debitnotes.DELETE

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

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

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

List vendor credit refunds

List all refunds with pagination.

OAuth Scope : ZakyaAPI.debitnotes.READ

Query Parameters

  • customer_id 

    Search vendor credits by vendor credit customer ID

  • last_modified_time 

    Search vendor credits by vendor credit last modfified time

  • sort_column 

    Sort vendor credits by following columns vendor_name, vendorcredit_number, balance, total, date and created_time. Allowed Values: vendor_name, vendor_credit_number, balance, total, date, created_time, last_modified_time and reference_number.

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

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

print(data.decode("utf-8"))
Response ExampleCopy
{
    "code": 0,
    "message": "success",
    "vendor_credit_refunds": [
        {
            "vendor_credit_refund_id": "3000000003151",
            "vendor_credit_id": "3000000002075",
            "date": "2017-01-22",
            "refund_mode": "cash",
            "reference_number": "string",
            "amount": 13,
            "vendor_credit_number": "DN-00002",
            "customer_name": "Bowman and Co",
            "description": "Cheque deposit",
            "amount_bcy": 13,
            "amount_fcy": 13
        },
        {...},
        {...}
    ]
}

Add a comment

Add a comment to an existing vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.CREATE

Arguments

  • descriptionstring (Required)

    Description of the Comment

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

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

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

conn.request("POST", "/inventory/v1/vendorcredits/3000000002075/comments?organization_id=10234695", payload, headers)

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

print(data.decode("utf-8"))
Body ParametersCopy
{
    "description": "Credits applied to Bill 1"
}
Response ExampleCopy
{
    "code": 0,
    "message": "Comments added.",
    "comment": {
        "comment_id": "3000000002089",
        "vendor_credit_id": "3000000002075",
        "description": "Credits applied to Bill 1",
        "commented_by_id": "3000000000741",
        "commented_by": "rajdeep.a",
        "date": "2017-01-18"
    }
}

List vendor credit comments & history

Get history and comments of a vendor credit.

OAuth Scope : ZakyaAPI.debitnotes.READ

Request ExampleCopy
curl --request GET \
  --url 'https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/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/vendorcredits/3000000002075/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/vendorcredits/3000000002075/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/vendorcredits/3000000002075/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/vendorcredits/3000000002075/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/vendorcredits/3000000002075/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": "3000000002089",
            "vendor_credit_id": "3000000002075",
            "description": "Credits applied to Bill 1",
            "commented_by_id": "3000000000741",
            "commented_by": "rajdeep.a",
            "comment_type": "system",
            "date": "2017-01-18",
            "date_description": "32 minutes ago",
            "time": "10:52 PM",
            "operation_type": "Added",
            "transaction_id": "460000000069087",
            "transaction_type": "vendor_credit"
        },
        {...},
        {...}
    ]
}

Delete a comment

Delete a vendor credit comment.

OAuth Scope : ZakyaAPI.debitnotes.DELETE

Request ExampleCopy
curl --request DELETE \
  --url 'https://api.zakya.com/inventory/v1/vendorcredits/3000000002075/comments/3000000002089?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/vendorcredits/3000000002075/comments/3000000002089?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/vendorcredits/3000000002075/comments/3000000002089?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/vendorcredits/3000000002075/comments/3000000002089?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/vendorcredits/3000000002075/comments/3000000002089?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/vendorcredits/3000000002075/comments/3000000002089?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."
}