Retainer Invoices
A retainer invoice is an advanced payment from a customer before we record any transaction with him.
Possible error codes: 
| Error Code | Message | 
|---|---|
| 9520 | Retainer Invoices for which payments have been recorded cannot be deleted | 
| 9533 | Cannot modify Retainer Invoice amount, once the payment is recorded | 
Attribute
sent, draft, overdue, paid, void, unpaid, partially_paid and viewedplace of contact given for the contact will be taken)Maximum length [100]Maximum length [100]Maximum length [2000]paypal, authorize_net, payflow_pro, stripe, 2checkout and braintree{
    "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",
        "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": [
            {
                "gateway_name": "paypal"
            }
        ]
    },
    "is_emailed": false,
    "documents": [],
    "billing_address": {
        "address": "Suite 125, McMillan Avenue",
        "street2": "McMillan Avenue",
        "city": "San Francisco",
        "state": "CA",
        "zip": 94134,
        "country": "U.S.A",
        "fax": "+86-10-82637827"
    },
    "shipping_address": {
        "address": "Suite 125, McMillan Avenue",
        "street2": "McMillan Avenue",
        "city": "San Francisco",
        "state": "CA",
        "zip": 94134,
        "country": "U.S.A",
        "fax": "+86-10-82637827"
    },
    "notes": "Looking forward for your business.",
    "terms": "Terms & Conditions apply",
    "custom_fields": [
        {
            "customfield_id": 439910000000236000,
            "data_type": "number",
            "index": 1,
            "label": "Record Number",
            "show_on_pdf": true,
            "show_in_all_pdf": true,
            "value": 23
        }
    ],
    "template_id": 982000000000143,
    "template_name": "Service - Classic",
    "page_width": "8.27in",
    "page_height": "11.69in",
    "orientation": "portrait",
    "template_type": "classic",
    "created_time": "2013-11-17T02:31:51-0800",
    "last_modified_time": "2013-12-18T02:31:51-0800",
    "created_by_id": 14909000000072000,
    "attachment_name": "new file",
    "can_send_in_mail": true,
    "invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
}
          Create a retainer invoice
            Create a retainer invoice for your customer.
              
              OAuth Scope : ZohoInvoice.invoices.CREATE
          
Arguments
Maximum length [100]Maximum length [2000]paypal, authorize_net, payflow_pro, stripe, 2checkout and braintreeplace of contact given for the contact will be taken)Query Parameters
true and falseHeaders
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices")
  .post(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/invoice/v3/retainerinvoices", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "customer_id": 982000000567001,
    "reference_number": " ",
    "date": "2013-11-17",
    "contact_persons": [
        "982000000567003",
        "982000000567003"
    ],
    "custom_fields": [
        {
            "label": "Record Number",
            "value": 23
        }
    ],
    "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": [
            {
                "gateway_name": "paypal"
            }
        ]
    },
    "template_id": 982000000000143,
    "place_of_supply": "TN"
}
            {
    "code": 0,
    "message": "The retainer invoice has been created.",
    "retainerinvoices": {
        "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",
            "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": [
                {
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "documents": [],
        "billing_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "shipping_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "customfield_id": 439910000000236000,
                "data_type": "number",
                "index": 1,
                "label": "Record Number",
                "show_on_pdf": true,
                "show_in_all_pdf": true,
                "value": 23
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "page_width": "8.27in",
        "page_height": "11.69in",
        "orientation": "portrait",
        "template_type": "classic",
        "created_time": "2013-11-17T02:31:51-0800",
        "last_modified_time": "2013-12-18T02:31:51-0800",
        "created_by_id": 14909000000072000,
        "attachment_name": "new file",
        "can_send_in_mail": true,
        "invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
    }
}
                List Retainer invoices
            List all retainer invoices with pagination.
              
              OAuth Scope : ZohoInvoice.invoices.READ
          
Query Parameters
customer_name, retainer invoice_number, date,  due_date, total, balance and  created_time Status.All, Status.Sent,  Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed and Date.PaymentExpectedDateHeaders
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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-17T02:31:51-0800",
            "last_modified_time": "2013-12-18T02:31:51-0800",
            "is_emailed": false,
            "last_payment_date": " ",
            "has_attachment": true
        },
        {...},
        {...}
    ]
}
                Update a retainer invoice
            Update an existing invoice.
              
              OAuth Scope : ZohoInvoice.invoices.UPDATE
          
Arguments
Maximum length [100]Maximum length [2000]paypal, authorize_net, payflow_pro, stripe, 2checkout and braintreeplace of contact given for the contact will be taken)Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114")
  .put(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'PUT',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("PUT", "/invoice/v3/retainerinvoices/982000000567114", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "PUT",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request PUT \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "customer_id": 982000000567001,
    "reference_number": " ",
    "date": "2013-11-17",
    "contact_persons": [
        "982000000567003",
        "982000000567003"
    ],
    "custom_fields": [
        {
            "label": "Record Number",
            "value": 23
        }
    ],
    "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": [
            {
                "gateway_name": "paypal"
            }
        ]
    },
    "template_id": 982000000000143,
    "place_of_supply": "TN",
    "project_id": 982000000567154
}
            {
    "code": 0,
    "message": "Retainer Invoice information has been updated.",
    "retainerinvoices": {
        "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",
            "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": [
                {
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "documents": [],
        "billing_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "shipping_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "customfield_id": 439910000000236000,
                "data_type": "number",
                "index": 1,
                "label": "Record Number",
                "show_on_pdf": true,
                "show_in_all_pdf": true,
                "value": 23
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "page_width": "8.27in",
        "page_height": "11.69in",
        "orientation": "portrait",
        "template_type": "classic",
        "created_time": "2013-11-17T02:31:51-0800",
        "last_modified_time": "2013-12-18T02:31:51-0800",
        "created_by_id": 14909000000072000,
        "attachment_name": "new file",
        "can_send_in_mail": true,
        "invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
    }
}
                Get a retainer invoice
            Get the details of a retainer invoice.
              
              OAuth Scope : ZohoInvoice.invoices.READ
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices/982000000567114", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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",
            "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": [
                {
                    "gateway_name": "paypal"
                }
            ]
        },
        "is_emailed": false,
        "documents": [],
        "billing_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "shipping_address": {
            "address": "Suite 125, McMillan Avenue",
            "street2": "McMillan Avenue",
            "city": "San Francisco",
            "state": "CA",
            "zip": 94134,
            "country": "U.S.A",
            "fax": "+86-10-82637827"
        },
        "notes": "Looking forward for your business.",
        "terms": "Terms & Conditions apply",
        "custom_fields": [
            {
                "customfield_id": 439910000000236000,
                "data_type": "number",
                "index": 1,
                "label": "Record Number",
                "show_on_pdf": true,
                "show_in_all_pdf": true,
                "value": 23
            }
        ],
        "template_id": 982000000000143,
        "template_name": "Service - Classic",
        "page_width": "8.27in",
        "page_height": "11.69in",
        "orientation": "portrait",
        "template_type": "classic",
        "created_time": "2013-11-17T02:31:51-0800",
        "last_modified_time": "2013-12-18T02:31:51-0800",
        "created_by_id": 14909000000072000,
        "attachment_name": "new file",
        "can_send_in_mail": true,
        "invoice_url": "https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=23d84d0cf64f9a72ea0c66fded25a08c8bafd0ab508aff05323a9f80e2cd03fdc5dd568d3d6407bbda969d3e870d740b6fce549a9438c4ea"
    }
}
                Delete a retainer invoice
            Delete an existing retainer invoice. Invoices which have payment or credits note applied cannot be deleted.
              
              OAuth Scope : ZohoInvoice.invoices.DELETE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114")
  .delete(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'DELETE',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("DELETE", "/invoice/v3/retainerinvoices/982000000567114", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "DELETE",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request DELETE \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "code": 0,
    "message": "The retainer invoice has been deleted."
}
                Mark a retainer invoice as sent
            Mark a draft retainer invoice as sent.
              
              OAuth Scope : ZohoInvoice.invoices.CREATE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/sent"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/sent")
  .post(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/sent', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/status/sent", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/status/sent",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/sent \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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 : ZohoInvoice.invoices.UPDATE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143"
type: PUT
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143")
  .put(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'PUT',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("PUT", "/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "PUT",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request PUT \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/templates/982000000000143 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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 : ZohoInvoice.invoices.CREATE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/void"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/void")
  .post(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/void', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/status/void", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/status/void",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/void \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "code": 0,
    "message": "Retainer Invoice status has been changed to 'Void'."
}
                Mark as draft
            Mark a voided retainer invoice as draft.
              
              OAuth Scope : ZohoInvoice.invoices.CREATE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/draft"
type: POST
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/draft")
  .post(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/draft', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/status/draft", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/status/draft",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/status/draft \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "code": 0,
    "message": "Status of retainer invoice changed from void to draft."
}
                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 : ZohoInvoice.invoices.CREATE
          
Arguments
Path Parameters
Query Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email")
  .post(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/email", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/email",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "send_from_org_email_id": false,
    "to_mail_ids": [
        "test@zylker.org"
    ],
    "cc_mail_ids": [
        "test@zylker.org"
    ],
    "subject": "Retainer Invoice from Zillium Inc (Retainer Invoice#: RET-00001)",
    "body": "Dear Customer,         <br><br><br><br>Thanks for your business.         <br><br><br><br>The retainer invoice RET-00001 is attached with this email. You can choose the easy way out and <a href= https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=b9800228e011ae86abe71227bdacb3c68e1af685f647dcaed747812e0b9314635e55ac6223925675b371fcbd2d5ae3dc  >pay online for this invoice.</a>         <br><br>Here's an overview of the invoice for your reference.         <br><br><br><br>Invoice Overview:         <br><br>Invoice  : INV-00001         <br><br>Date : 05 Aug 2013         <br><br>Amount : $541.82         <br><br><br><br>It was great working with you. Looking forward to working with you again.<br><br><br>\\nRegards<br>\\nZillium Inc<br>\\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 : ZohoInvoice.invoices.READ
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices/982000000567114/email", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/email",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/email \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "code": 0,
    "message": "success",
    "gateways_configured": true,
    "deprecated_placeholders_used": [],
    "body": "Dear Customer,         <br><br><br><br>Thanks for your business.         <br><br><br><br>The retainer invoice RET-00001 is attached with this email. You can choose the easy way out and <a href= https://invoice.zoho.com/portal/zylkar/secure?CInvoiceID=b9800228e011ae86abe71227bdacb3c68e1af685f647dcaed747812e0b9314635e55ac6223925675b371fcbd2d5ae3dc  >pay online for this invoice.</a>         <br><br>Here's an overview of the invoice for your reference.         <br><br><br><br>Invoice Overview:         <br><br>Invoice  : INV-00001         <br><br>Date : 05 Aug 2013         <br><br>Amount : $541.82         <br><br><br><br>It was great working with you. Looking forward to working with you again.<br><br><br>\\nRegards<br>\\nZillium Inc<br>\\n\",",
    "error_list": [],
    "subject": "Retainer Invoice from Zillium Inc (Retainer Invoice#: RET-00001)",
    "to_contacts": [
        {
            "first_name": "Will",
            "selected": false,
            "phone": "1234",
            "email": "test@zylker.org",
            "last_name": "Smith",
            "salutation": "Mr",
            "contact_person_id": 982000000567003,
            "mobile": "1234"
        }
    ],
    "attachment_name": "new file",
    "email_template_id": "string",
    "file_name": "RET-00001.pdf",
    "from_emails": [
        {
            "user_name": "John Smith",
            "selected": false,
            "email": "test@zylker.org"
        }
    ],
    "customer_id": 982000000567001
}
                Update billing address
            Updates the billing address for this retainer invoice alone.
              
              OAuth Scope : ZohoInvoice.invoices.UPDATE
          
Arguments
Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/address/billing"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/address/billing")
  .put(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'PUT',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/address/billing', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("PUT", "/invoice/v3/retainerinvoices/982000000567114/address/billing", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "PUT",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/address/billing",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request PUT \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/address/billing \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "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 : ZohoInvoice.invoices.READ
          
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/templates"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/templates")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/templates', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices/templates", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/templates",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/templates \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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 : ZohoInvoice.invoices.CREATE
          
Arguments
Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment")
  .post(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/attachment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/attachment",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "can_send_in_mail": true,
    "attachment": "string"
}
            Get a retainer invoice attachment
            Returns the file attached to the retainer invoice.
              
              OAuth Scope : ZohoInvoice.invoices.READ
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices/982000000567114/attachment", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/attachment",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/attachment \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              Delete an attachment
            Delete the file attached to the retainer invoice.
              
              OAuth Scope : ZohoInvoice.invoices.DELETE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115")
  .delete(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'DELETE',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("DELETE", "/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "DELETE",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request DELETE \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/documents/982000000567115 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              Add comment
            Add a comment for a retainer invoice.
              
              OAuth Scope : ZohoInvoice.invoices.CREATE
          
Arguments
Maximum length [2000]Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments")
  .post(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'POST',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("POST", "/invoice/v3/retainerinvoices/982000000567114/comments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "POST",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/comments",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request POST \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "description": "comment added",
    "payment_expected_date": " ",
    "show_comment_to_clients": true
}
            List retainer invoice comments & history
            Get the complete history and comments of a retainer invoice.
              
              OAuth Scope : ZohoInvoice.invoices.READ
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments")
  .get()
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'GET',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("GET", "/invoice/v3/retainerinvoices/982000000567114/comments", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "GET",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/comments",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request GET \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "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 : ZohoInvoice.invoices.UPDATE
          
Arguments
Maximum length [2000]Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019"
type: PUT
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019")
  .put(body)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .addHeader("content-type", "application/json")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'PUT',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
    'content-type': 'application/json'
  },
  body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    'content-type': "application/json"
    }
conn.request("PUT", "/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "PUT",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
    "content-type": "application/json"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
              curl --request PUT \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695' \
  --header 'content-type: application/json' \
  --data '{"field1":"value1","field2":"value2"}'
              {
    "description": "comment updated",
    "show_comment_to_clients": true
}
            {
    "code": 0,
    "message": "The comment has been deleted.",
    "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 : ZohoInvoice.invoices.DELETE
          
Path Parameters
Headers
headers_data = Map();
headers_data.put("X-com-zoho-invoice-organizationid", "10234695");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
              OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
  .url("https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019")
  .delete(null)
  .addHeader("X-com-zoho-invoice-organizationid", "10234695")
  .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
  .build();
Response response = client.newCall(request).execute();
              const options = {
  method: 'DELETE',
  headers: {
    'X-com-zoho-invoice-organizationid': '10234695',
    Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
  }
};
fetch('https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
              import http.client
conn = http.client.HTTPSConnection("www.zohoapis.com")
headers = {
    'X-com-zoho-invoice-organizationid': "10234695",
    'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
    }
conn.request("DELETE", "/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
              const http = require("https");
const options = {
  "method": "DELETE",
  "hostname": "www.zohoapis.com",
  "port": null,
  "path": "/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019",
  "headers": {
    "X-com-zoho-invoice-organizationid": "10234695",
    "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
  }
};
const req = http.request(options, function (res) {
  const chunks = [];
  res.on("data", function (chunk) {
    chunks.push(chunk);
  });
  res.on("end", function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});
req.end();
              curl --request DELETE \
  --url https://www.zohoapis.com/invoice/v3/retainerinvoices/982000000567114/comments/982000000567019 \
  --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
  --header 'X-com-zoho-invoice-organizationid: 10234695'
              {
    "code": 0,
    "message": "The comment has been deleted."
}
                
{ "code": 0, "message": "Comments added." }