Create record

Create record in Zoho Invoice


This task is used to create a record in Zoho Invoice.


<variable> = zoho.invoice.create(<module_name>, <org_ID>, <data_map>, <connection>);


ParameterData typeDescription



specifies the variable which will hold the response returned by Zoho Invoice.



specifies the Zoho Invoice's module in which the record will be created.

Following are the applicable modules.

ContactsInvoicesCustomer PaymentsItems


(applicable to all Zoho services except Zoho Creator)



specifies the organization ID of the account in which the record will be created.



Input map with key as Invoice field's name and the required value.

To learn about the mandatory fields, click here and go to <ModuleName> -> Create <ModuleName>




specifies the name of the Zoho Invoice connection.

*Note: This param is not supported when used in Zoho Creator.


The following script creates a new record in the Zoho Invoice module - customerpayments.

 response=zoho.invoice.create("Customerpayments", "5368XXXX",CusPayMap);


is the KEY-VALUE variable that holds the values of the record that needs to be created
are the TEXT that represents the label names of fields specified in Zoho Invoice's API
is the TEXT that represents the module in which the record needs to be created
is the TEXT that represents the organization ID of the Zoho Invoice account in which the record needs to be created

Sample Response

Success Format

  • The following is a sample success response:






          "template_name":"Elite Template",
          "customer_name":"Bowman and Cos",
       "message":"The payment from the customer has been recorded"

To get the ID of the newly created record, execute the following script:

<variable> = <response_variable>.get("<module_name>").get("<module_name>_id"> ;
// example for <module_name> is contact and example for <module_name>_id is contact_id

Failure Response

  • The failure response returned due to incorrect organization ID is of the following format:

                 "message":"This user is not associated with the CompanyID/CompanyName:537XX."

Related Links

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: