- Introduction
- OAuth
- HTTP Methods
- Response
- Errors
- Pagination
- Organizations
- Contacts
- Contact Persons
- Item Groups
- Items
- Composite Items
- Item Adjustments
- Transfer Orders
- Sales Orders
- Packages
- Shipment Orders
- Invoices
- Overview
- Create an invoice
- List invoices
- Update an invoice
- Get an invoice
- Delete an invoice
- Mark an invoice as sent
- Void an invoice
- Mark as draft
- Email an invoice
- Get invoice email content
- Email invoices
- Get payment reminder mail content
- Bulk export Invoices
- Bulk print invoices
- Disable payment reminder
- Enable payment reminder
- Write off invoice
- Cancel write off
- Update billing address
- Update shipping address
- List invoice templates
- Update invoice template
- List invoice payments
- List credits applied
- Apply credits
- Delete a payment
- Delete applied credit
- Add attachment to an invoice
- Update attachment preference
- Get an invoice attachment
- Delete an attachment
- Add comment
- List invoice comments & history
- Update comment
- Delete a comment
- Retainer Invoices
- Overview
- Create a retainer invoice
- List a retainer invoices
- update a retainer invoice
- Get a retainer invoice
- Delete a retainer invoice
- Mark a retainer invoice as sent
- Update retainer invoice template
- Void a retainer invoice
- Mark as draft
- Submit a retainer invoice for approval
- Approve a retainer invoice.
- Email a retainer invoice
- Get retainer invoice email content
- Update billing address
- List retainer invoice templates
- Add attachment to a retainer invoice
- Get a retainer invoice attachment
- Delete an attachment
- Add comment
- List retainer invoice comments & history
- Update comment
- Delete a comment
- Customer Payments
- Sales Returns
- Credit Notes
- Overview
- Create a credit note
- List all Credit Notes
- Update a credit note
- Get a credit note
- Delete a credit note
- Email a credit note
- Get email content
- Void a Credit Note
- Convert Credit Note to Draft
- Convert credit note to Open
- Submit a credit note for approval
- Approve a credit note
- Email history
- Update billing address
- Update Shipping address
- List the credit note templates
- Update a credit note template
- Apply credits to invoices
- List invoices credited
- Delete credits applied to an invoice
- Add a comment
- List credit note comments & history
- Delete a Comment
- List credit note refunds
- Refund credit note
- List refunds of a credit note
- Update credit note refund
- Get credit note refund
- Delete credit note refund
- Purchase Orders
- Purchase Receives
- Bills
- Vendor Credits
- Overview
- Create a vendor credit
- List vendor credits
- Update vendor credit
- Get vendor credit
- Delete vendor credit
- Convert to open
- Void vendor credit
- Submit a Vendor credit for approval
- Approve a Vendor credit
- Apply credits to a bill
- List bills credited
- Delete bills credited
- Refund a vendor credit
- List refunds of a vendor credit
- Update vendor credit refund
- Get vendor credit refund
- Delete vendor credit refund
- List vendor credit refunds
- Add a comment
- List vendor credit comments & history
- Delete a comment
- Warehouse Settings
- Price Lists
- Taxes
Retainer Invoices
A lot of businesses collect an advance payment (or retainer) for products sold or services rendered by them. This amount collected will not be an income but a liability to the company. The revenue is earned only when the product is delivered or the service is completed, if not delivered or completed the advance payment made will be returned to the customer.
Attribute
- retainerinvoice_idstring
ID of the retainer invoice
- retainerinvoice_numberstring
number of the retainer invoice.Variants: retainerinvoice_number_startswith and retainerinvoice_number_contains. Max-length [100]
- datestring
The date of creation of the retainer invoice.
- statusstring
retainer invoice status.Allowed Values: sent, draft, overdue, paid, void, unpaid, partially_paid and viewed
- is_pre_gststring
Applicable for transactions that fall before july 1, 2017
- place_of_supplystring
Place where the goods/services are supplied to. (If not given, place of contact given for the contact will be taken)
- project_idstring
ID of the project
- project_namestring
Name of the project
- last_payment_datestring
The last payment date of the retainer invoice
- reference_numberstring
The reference number of the retainer invoice. Max-length [100]
- customer_idstring
ID of the customer the retainer invoice has to be created.
- customer_namestring
The name of the customer. Max-length [100]
- contact_personsarray
- currency_idstring
The currenct id of the currency
- currency_codestring
The currency code in which the retainer invoice is created.
- currency_symbolstring
The currency symbol in which the retainer invoice is created.
- exchange_ratefloat
Exchange rate of the currency.
- is_viewed_by_clientboolean
Boolean is retainer invoice viewed by client in client portal.
- client_viewed_timeboolean
client viewed time for retainer invoice in client portal.
- is_inclusive_taxboolean
- line_itemsarray
Line items of a retainer invoice.
Show Sub-Attributes
- line_item_idstring
The line item id
- descriptionstring
The description of the line items. Max-length [2000]
- item_orderinteger
The order of the line item_order
- ratedouble
Rate of the line item.
- bcy_ratefloat
base currency rate
- tax_idstring
ID of the tax or tax group applied to the estimate
- tax_namestring
The name of the tax
- tax_typestring
The type of the tax
- tax_percentagefloat
The percentage of tax levied
- item_totalfloat
The total amount of the line items
- sub_totalfloat
The sub total of the all items
- totalstring
The total amount to be paid
- taxesarray
List of the taxes levied
Show Sub-Attributes
- tax_namestring
The name of the tax
- tax_amountfloat
The amount of the tax levied
- payment_madefloat
The amount paid
- payment_drawnfloat
The amount drawn
- balancestring
The unpaid amount
- allow_partial_paymentsboolean
Boolean to check if partial payments are allowed for the contact
- price_precisioninteger
The precision value on the price
- payment_optionsobject
Payment options for the retainer invoice, online payment gateways and bank accounts. Will be displayed in the pdf.
Show Sub-Attributes
- payment_gatewaysarray
Online payment gateways through which payment can be made.
Show Sub-Attributes
- configuredboolean
Boolean check to see if a payment gateway ahs been configured
- additional_field1string
Paypal payment method. Allowed Values: standard and adaptive
- gateway_namestring
Name of the payment gateway associated with the retainer invoice. E.g. paypal, stripe.Allowed Values: paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree
- is_emailedstring
Boolean check to if the email was sent
- documentsarray
documents attached to the retainer invoice
- billing_addressobject
Show Sub-Attributes
- addressstring
- street2string
- citystring
- statestring
- zipstring
- faxstring
- shipping_addressobject
Show Sub-Attributes
- addressstring
- citystring
- statestring
- zipstring
- faxstring
- notesstring
The notes added below expressing gratitude or for conveying some information.
- termsstring
The terms added below expressing gratitude or for conveying some information.
- custom_fieldsarray
Custom fields for a reatiner invoice.
Show Sub-Attributes
- indexinteger
The index of the custom field
- show_on_pdfboolean
Boolean value to check if the custom field is to be dispplayed on the pdf.
- valuestring
- labelstring
The label of the custom field.
- template_idstring
ID of the pdf template associated with the retainer invoice.
- template_namestring
- page_widthstring
- page_heightstring
- orientationstring
- template_typestring
The type of template type
- created_timestring
The time of creation of the retainer invoice
- last_modified_timestring
The time of last modification of the retainer invoice
- created_by_idstring
- attachment_namestring
- can_send_in_mailboolean
- POST /inventory/v1/retainerinvoices
- GET /inventory/v1/retainerinvoices
- PUT /inventory/v1/retainerinvoices/{retainerinvoice_id}
- GET /inventory/v1/retainerinvoices/{retainerinvoice_id}
- DELETE /inventory/v1/retainerinvoices/{retainerinvoice_id}
- POST /inventory/v1/retainerinvoices/{retainerinvoice_id}/status/sent
- PUT /inventory/v1/retainerinvoices/{retainerinvoice_id}/templates/{template_id}
- POST /inventory/v1/retainerinvoices/{retainerinvoice_id}/status/void
- POST /inventory/v1/retainerinvoices/{reatinerinvoice_id}/status/draft
- POST /inventory/v1/retainerinvoices/{reatinerinvoice_id}/submit
- POST /inventory/v1/retainerinvoices/{reatinerinvoice_id}/approve
- POST /inventory/v1/retainerinvoices/{retainerinvoice_id}/email
- GET /inventory/v1/retainerinvoices/{retainerinvoice_id}/email
- PUT /inventory/v1/retainerinvoices/{retainerinvoice_id}/address/billing
- GET /inventory/v1/retainerinvoices/templates
- POST /inventory/v1/retainerinvoices/{retainerinvoice_id}/attachment
- GET /inventory/v1/retainerinvoices/{retainerinvoice_id}/attachment
- DELETE /inventory/v1/retainerinvoices/{retainerinvoice_id}/documents/{document_id}
- POST /inventory/v1/retainerinvoices/{retainerinvoice_id}/comments
- GET /inventory/v1/retainerinvoices/{retainerinvoice_id}/comments
- PUT /inventory/v1/retainerinvoices/{retainerinvoice_id}/comments/{comment_id}
- DELETE /inventory/v1/retainerinvoices/{retainerinvoice_id}/comments/{comment_id}
{
"retainerinvoice_id": 982000000567114,
"retainerinvoice_number": "RET-00003",
"date": "2013-11-17",
"status": "draft",
"is_pre_gst": false,
"place_of_supply": "TN",
"project_id": 982000000567154,
"project_name": "string",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000567003"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"currency_symbol": "USD",
"exchange_rate": 1,
"is_viewed_by_client": true,
"client_viewed_time": true,
"is_inclusive_tax": false,
"line_items": [
{
"line_item_id": 982000000567021,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"bcy_rate": 120,
"tax_id": 982000000557028,
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"sub_total": 153,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_made": 26.91,
"payment_drawn": 26.91,
"balance": 40.6,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"documents": [],
"billing_address": {
"address": "Suite 125, McMillan Avenue",
"street2": "McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"shipping_address": {
"address": "Suite 125, McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"template_type": "classic",
"created_time": "2013-11-18T02:31:51-0800",
"last_modified_time": "2013-11-18T02:31:51-0800",
"created_by_id": 14909000000072000,
"attachment_name": "new file",
"can_send_in_mail": true
}
Create a retainer invoice
Create a retainer invoice for your customer.
OAuth Scope : ZakyaAPI.invoices.CREATE
Arguments
- customer_idstring (Required)
ID of the customer the retainer invoice has to be created.
- reference_numberstring
The reference number of the retainer invoice. Max-length [100]
- datestring
The date of creation of the retainer invoice.
- contact_personsarray
- custom_fieldsarray
Custom fields for a reatiner invoice.
Show Sub-Attributes
- indexinteger
The index of the custom field
- show_on_pdfboolean
Boolean value to check if the custom field is to be dispplayed on the pdf.
- valuestring
label
- stringThe label of the custom field.
undefined
- notesstring
The notes added below expressing gratitude or for conveying some information.
- termsstring
The terms added below expressing gratitude or for conveying some information.
- line_itemsarray (Required)
Line items of a retainer invoice.
Show Sub-Attributes
- descriptionstring
The description of the line items. Max-length [2000]
- item_orderinteger
The order of the line item_order
- ratedouble
Rate of the line item.
- payment_optionsobject
Payment options for the retainer invoice, online payment gateways and bank accounts. Will be displayed in the pdf.
Show Sub-Attributes
- payment_gatewaysarray
Online payment gateways through which payment can be made.
Show Sub-Attributes
- configuredboolean
Boolean check to see if a payment gateway ahs been configured
- additional_field1string
Paypal payment method. Allowed Values: standard and adaptive
- gateway_namestring
Name of the payment gateway associated with the retainer invoice. E.g. paypal, stripe.Allowed Values: paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree
- template_idstring
ID of the pdf template associated with the retainer invoice.
Query Parameters
- ignore_auto_number_generation
Ignore auto invoice number generation for this invoice. This mandates the invoice number. Allowed values true and false
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"customer_id": 982000000567001,
"reference_number": " ",
"date": "2013-11-17",
"contact_persons": [
"982000000567003"
],
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"line_items": [
{
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"template_id": 982000000000143
}
{
"code": 0,
"message": "The retainer invoice has been created.",
"retainerinvoice": {
"retainerinvoice_id": 982000000567114,
"retainerinvoice_number": "RET-00003",
"date": "2013-11-17",
"status": "draft",
"is_pre_gst": false,
"place_of_supply": "TN",
"project_id": 982000000567154,
"project_name": "string",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000567003"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"currency_symbol": "USD",
"exchange_rate": 1,
"is_viewed_by_client": true,
"client_viewed_time": true,
"is_inclusive_tax": false,
"line_items": [
{
"line_item_id": 982000000567021,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"bcy_rate": 120,
"tax_id": 982000000557028,
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"sub_total": 153,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_made": 26.91,
"payment_drawn": 26.91,
"balance": 40.6,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"documents": [],
"billing_address": {
"address": "Suite 125, McMillan Avenue",
"street2": "McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"shipping_address": {
"address": "Suite 125, McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"template_type": "classic",
"created_time": "2013-11-18T02:31:51-0800",
"last_modified_time": "2013-11-18T02:31:51-0800",
"created_by_id": 14909000000072000,
"attachment_name": "new file",
"can_send_in_mail": true
}
}
List a retainer invoices
List all retainer invoices with pagination.
OAuth Scope : ZakyaAPI.invoices.READ
Query Parameters
- print
Print the exported pdf.
- sort_column
Sort retainer invoices.Allowed Values: customer_name, retainer invoice_number, date, due_date, total, balance and created_time
- filter_by
Filter invoices by any status or payment expected date.Allowed Values: Status.All, Status.Sent, Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed and Date.PaymentExpectedDate
- sort_order
The order for sorting
- page
Number of pages
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?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/retainerinvoices?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"retainerinvoices": [
{
"retainerinvoice_id": 982000000567114,
"customer_name": "Bowman & Co",
"retainerinvoice_number": "RET-00003",
"customer_id": 982000000567001,
"status": "draft",
"reference_number": " ",
"project_or_estimate_name": "new project",
"date": "2013-11-17",
"currency_id": 982000000000190,
"currency_code": "USD",
"is_viewed_by_client": true,
"client_viewed_time": true,
"total": 40.6,
"balance": 40.6,
"created_time": "2013-11-18T02:31:51-0800",
"last_modified_time": "2013-11-18T02:31:51-0800",
"is_emailed": false,
"last_payment_date": " ",
"has_attachment": true
},
{...},
{...}
],
"page_context": {
"page": 1,
"per_page": 200,
"has_more_page": false,
"report_name": "Retainer Invoices",
"applied_filter": "Status.All",
"sort_column": "created_time",
"sort_order": "D"
}
}
Update a retainer invoice
Update an existing invoice.
OAuth Scope : ZakyaAPI.invoices.UPDATE
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"customer_id": 982000000567001,
"reference_number": " ",
"date": "2013-11-17",
"contact_persons": [
"982000000567003"
],
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"line_items": [
{
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120
}
],
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"template_id": 982000000000143,
"project_id": 982000000567154
}
{
"code": 0,
"message": "Retainer Invoice information has been updated.",
"retainerinvoice": {
"retainerinvoice_id": 982000000567114,
"retainerinvoice_number": "RET-00003",
"date": "2013-11-17",
"status": "draft",
"is_pre_gst": false,
"place_of_supply": "TN",
"project_id": 982000000567154,
"project_name": "string",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000567003"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"currency_symbol": "USD",
"exchange_rate": 1,
"is_viewed_by_client": true,
"client_viewed_time": true,
"is_inclusive_tax": false,
"line_items": [
{
"line_item_id": 982000000567021,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"bcy_rate": 120,
"tax_id": 982000000557028,
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"sub_total": 153,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_made": 26.91,
"payment_drawn": 26.91,
"balance": 40.6,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"documents": [],
"billing_address": {
"address": "Suite 125, McMillan Avenue",
"street2": "McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"shipping_address": {
"address": "Suite 125, McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"template_type": "classic",
"created_time": "2013-11-18T02:31:51-0800",
"last_modified_time": "2013-11-18T02:31:51-0800",
"created_by_id": 14909000000072000,
"attachment_name": "new file",
"can_send_in_mail": true
}
}
Get a retainer invoice
Get the details of a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"retainerinvoice": {
"retainerinvoice_id": 982000000567114,
"retainerinvoice_number": "RET-00003",
"date": "2013-11-17",
"status": "draft",
"is_pre_gst": false,
"place_of_supply": "TN",
"project_id": 982000000567154,
"project_name": "string",
"last_payment_date": " ",
"reference_number": " ",
"customer_id": 982000000567001,
"customer_name": "Bowman & Co",
"contact_persons": [
"982000000567003"
],
"currency_id": 982000000000190,
"currency_code": "USD",
"currency_symbol": "USD",
"exchange_rate": 1,
"is_viewed_by_client": true,
"client_viewed_time": true,
"is_inclusive_tax": false,
"line_items": [
{
"line_item_id": 982000000567021,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"item_order": 1,
"rate": 120,
"bcy_rate": 120,
"tax_id": 982000000557028,
"tax_name": "VAT",
"tax_type": "tax",
"tax_percentage": 12.5,
"item_total": 120
}
],
"sub_total": 153,
"total": 40.6,
"taxes": [
{
"tax_name": "VAT",
"tax_amount": 19.13
}
],
"payment_made": 26.91,
"payment_drawn": 26.91,
"balance": 40.6,
"allow_partial_payments": true,
"price_precision": 2,
"payment_options": {
"payment_gateways": [
{
"configured": true,
"additional_field1": "standard",
"gateway_name": "paypal"
}
]
},
"is_emailed": false,
"documents": [],
"billing_address": {
"address": "Suite 125, McMillan Avenue",
"street2": "McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"shipping_address": {
"address": "Suite 125, McMillan Avenue",
"city": "San Francisco",
"state": "CA",
"zip": 94134,
"fax": "+86-10-82637827"
},
"notes": "Looking forward for your business.",
"terms": "Terms & Conditions apply",
"custom_fields": [
{
"index": 1,
"show_on_pdf": false,
"value": "The value of the custom field",
"label": "Delivery Date"
}
],
"template_id": 982000000000143,
"template_name": "Service - Classic",
"page_width": "8.27in",
"page_height": "11.69in",
"orientation": "portrait",
"template_type": "classic",
"created_time": "2013-11-18T02:31:51-0800",
"last_modified_time": "2013-11-18T02:31:51-0800",
"created_by_id": 14909000000072000,
"attachment_name": "new file",
"can_send_in_mail": true
}
}
Delete a retainer invoice
Delete an existing retainer invoice. Invoices which have payment or credits note applied cannot be deleted.
OAuth Scope : ZakyaAPI.invoices.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695"
type: DELETE
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/retainerinvoices/982000000567114?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The retainer invoice has been deleted."
}
Mark a retainer invoice as sent
Mark a draft retainer invoice as sent.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/retainerinvoices/982000000567114/status/sent?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Retainer Invoice status has been changed to Sent."
}
Update retainer invoice template
Update the pdf template associated with the retainer invoice.
OAuth Scope : ZakyaAPI.invoices.UPDATE
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695"
type: PUT
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695")
.put(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("PUT", "/inventory/v1/retainerinvoices/982000000567114/templates/982000000000143?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Retainer Invoice information has been updated."
}
Void a retainer invoice
Mark an invoice status as void. Upon voiding, the payments and credits associated with the retainer invoices will be unassociated and will be under customer credits.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/retainerinvoices/982000000567114/status/void?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Retainer Invoice status has been changed to 'Void'."
}
Mark as draft
Mark a voided retainer invoice as draft.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices//status/draft?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices//status/draft?organization_id=10234695"
type: POST
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices//status/draft?organization_id=10234695")
.post(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices//status/draft?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices//status/draft?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("POST", "/inventory/v1/retainerinvoices//status/draft?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Status of retainer invoice changed from void to draft."
}
Submit a retainer invoice for approval
Submit a retainer invoice for approval.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//submit?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "The Retainer Invoice has been successfully submitted for approval."
}
Approve a retainer invoice
Approve a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//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/retainerinvoices//approve?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "You have approved the Retainer Invoice."
}
Email a retainer invoice
Email a retainer invoice to the customer. Input json string is not mandatory. If input json string is empty, mail will be send with default mail content.
OAuth Scope : ZakyaAPI.invoices.CREATE
Arguments
- send_from_org_email_idboolean
Boolean to trigger the email from the organization's email address
- to_mail_idsarray (Required)
Array of email address of the recipients.
- cc_mail_idsarray
Array of email address of the recipients to be cced.
- subjectstring
The subject of the mail
- bodystring
The body of the mail
Query Parameters
- send_customer_statement
Send customer statement pdf a with email.
- send_attachment
Send the retainer invoice attachment a with the email.
- attachments
Files to be attached to the email
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695")
.post(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'POST',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"send_from_org_email_id": false,
"to_mail_ids": [
"willsmith@bowmanfurniture.com"
],
"cc_mail_ids": [
"peterparker@bowmanfurniture.com"
],
"subject": "Retainer Invoice from Zillium Inc (Retainer Invoice#: RET-00001)",
"body": "Dear Customer, Thanks for your business. The retainer invoice RET-00001 is attached with this email.Here's an overview of the invoice for your reference. Invoice Overview: Invoice : INV-00001 Date : 05 Aug 2013 Amount : 541.82 It was great working with you. Looking forward to working with you again.\\nRegards\\nZillium Inc\\n\","
}
{
"code": 0,
"message": "Your retainer invoice has been sent."
}
Get retainer invoice email content
Get the email content of a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/retainerinvoices/982000000567114/email?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"gateways_configured": true,
"deprecated_placeholders_used": [],
"body": "Dear Customer, Thanks for your business. The retainer invoice RET-00001 is attached with this email.Here's an overview of the invoice for your reference. Invoice Overview: Invoice : INV-00001 Date : 05 Aug 2013 Amount : $541.82 It was great working with you. Looking forward to working with you again.\\nRegards\\nZillium Inc\\n\",",
"error_list": [],
"subject": "Retainer Invoice from Zillium Inc (Retainer Invoice#: RET-00001)",
"to_contacts": [
{
"first_name": "Will",
"selected": false,
"phone": "+1-925-921-9201",
"email": "willsmith@bowmanfurniture.com",
"last_name": "Smith",
"salutation": "Mr",
"contact_person_id": 982000000567003,
"mobile": "+1-4054439562"
}
],
"attachment_name": "new file",
"email_template_id": "string",
"file_name": "RET-00001.pdf",
"from_emails": [
{
"user_name": "John Smith",
"selected": false,
"email": "willsmith@bowmanfurniture.com"
}
],
"customer_id": 982000000567001
}
Update billing address
Updates the billing address for this retainer invoice alone.
OAuth Scope : ZakyaAPI.invoices.UPDATE
Arguments
- addressstring
address of the customer
- citystring
city of the customer
- statestring
state of the customer
- zipstring
zip of the customer
- countrystring
country of the customer
- faxstring
fax of the customer
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695")
.put(body)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "PUT",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
const options = {
method: 'PUT',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/retainerinvoices/982000000567114/address/billing?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"address": "B-1104, 11F, \nHorizon International Tower, \nNo. 6, ZhiChun Road, HaiDian District",
"city": "Beijing",
"state": "Beijing",
"zip": 1000881,
"country": "string",
"fax": "+86-10-82637827"
}
{
"code": 0,
"message": "Billing address updated"
}
List retainer invoice templates
Get all retainer invoice pdf templates.
OAuth Scope : ZakyaAPI.invoices.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/templates?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/templates?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/templates?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/templates?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/templates?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/retainerinvoices/templates?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"templates": [
{
"template_name": "Service - Classic",
"template_id": 982000000000143,
"template_type": "classic"
},
{...},
{...}
]
}
Add attachment to a retainer invoice
Attach a file to an invoice.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/attachment?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/retainerinvoices/982000000567114/attachment?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/retainerinvoices/982000000567114/attachment?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/retainerinvoices/982000000567114/attachment?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/retainerinvoices/982000000567114/attachment?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"can_send_in_mail": true,
"attachment": "string"
}
{
"code": 0,
"message": "Your file has been attached."
}
Get a retainer invoice attachment
Returns the file attached to the retainer invoice.
OAuth Scope : ZakyaAPI.invoices.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/retainerinvoices/982000000567114/attachment?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success"
}
Delete an attachment
Delete the file attached to the retainer invoice.
OAuth Scope : ZakyaAPI.invoices.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/documents/?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/retainerinvoices/982000000567114/documents/?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/retainerinvoices/982000000567114/documents/?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/retainerinvoices/982000000567114/documents/?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/retainerinvoices/982000000567114/documents/?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/retainerinvoices/982000000567114/documents/?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "Your file is no longer attached to the invoice."
}
Add comment
Add a comment for a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.CREATE
curl --request POST \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/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/retainerinvoices/982000000567114/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/retainerinvoices/982000000567114/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/retainerinvoices/982000000567114/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/retainerinvoices/982000000567114/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"description": "comment added",
"payment_expected_date": " ",
"show_comment_to_clients": true
}
{
"code": 0,
"message": "Comments added."
}
List retainer invoice comments & history
Get the complete history and comments of a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.READ
curl --request GET \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695"
type: GET
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695")
.get()
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'GET',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("GET", "/inventory/v1/retainerinvoices/982000000567114/comments?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"code": 0,
"message": "success",
"comments": [
{
"comment_id": 982000000567019,
"retainerinvoice_id": 982000000567114,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"commented_by_id": 982000000554041,
"commented_by": "John David",
"comment_type": "system",
"operation_type": "Added",
"date": "2013-11-17",
"date_description": "yesterday",
"time": "2:38 AM",
"transaction_id": "982000000567204",
"transaction_type": "retainer_payment"
},
{...},
{...}
]
}
Update comment
Update an existing comment of a retainer invoice.
OAuth Scope : ZakyaAPI.invoices.UPDATE
Arguments
- descriptionstring
The comment on a retainer invoice
- show_comment_to_clientsboolean
Boolean to check if the comment to be shown to the clients
curl --request PUT \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?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/retainerinvoices/982000000567114/comments/982000000567019?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/retainerinvoices/982000000567114/comments/982000000567019?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/retainerinvoices/982000000567114/comments/982000000567019?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/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PUT", "/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{
"description": "string",
"show_comment_to_clients": true
}
{
"code": 0,
"message": "The comment has been updated.",
"comment": {
"comment_id": 982000000567019,
"retainerinvoice_id": 982000000567114,
"description": "500GB, USB 2.0 interface 1400 rpm, protective hard case.",
"commented_by_id": 982000000554041,
"commented_by": "John David",
"date": "2013-11-17",
"date_description": "yesterday",
"time": "2:38 AM",
"comment_type": "system"
}
}
Delete a comment
Delete a retainer invoice comment.
OAuth Scope : ZakyaAPI.invoices.DELETE
curl --request DELETE \
--url 'https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
headers_data = Map();
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695"
type: DELETE
headers: headers_data
connection:
]
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695")
.delete(null)
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "api.zakya.com",
"port": null,
"path": "/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695",
"headers": {
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const options = {
method: 'DELETE',
headers: {
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://api.zakya.com/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.zakya.com")
headers = { 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" }
conn.request("DELETE", "/inventory/v1/retainerinvoices/982000000567114/comments/982000000567019?organization_id=10234695", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))