API Client
Examples

This section contains various examples of 1CRM API usage. All examples assume that an instance of Client class was created, with correct authentication.

The examples do not show usage of all models available in 1CRM, but you can use them as patterns to write code that works with any available model.

Error handling

Create an account

Retrieve existing contact

Retrieve leads list

Retrieve leads in specific order

Filter contacts list

Get list of project tasks in a project

Add Contact to Account

Add Product to Assembly

Delete a Note

Remove Product from Assembly

Reconstructing Quote structure

Create a Quote (with Product Line, Comment, Discount and Tax)

Create an Invoice with Payment

Create a Sales Order (with Product Line, Comment, Tax and Taxed Shipping)

Print an Invoice PDF

Print a Contact Personal Data PDF

Get Accounts Audit Logs

Get Accounts Reports and Archived Runs