Customers
JSON Format
Customers are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating customers |
type | integer | yes | no | The type of the customer
1: Company 2: Individual |
status | integer | no | no | 1: Customer (default)
2: Lead |
full_name | string | no | yes | The full name of this customer (automatically generated). |
address | Address | no | no | The main address of the customer |
shipping_address | Address | no | no | The shipping address of the customer |
phone_number | string | no | no | The phone number of this customer. 64 characters max. |
string | no | no | The Email address of this customer. 255 characters max. | |
website | string | no | no | The URL of the customer's website. 255 characters max. |
contacts | array[Contact] | no | no | An array containing the contacts of the customer |
payment_terms | Payment Terms | no | no | The Payment terms object
by default, Due on receipt will be selected. |
currency_iso_code | string | no | no | The ISO Code of one of your Currencies
by default, the domain currency will be selected. 4 characters max. |
sales_tax | Tax | no | no | A Tax object |
user_code | string | no | no | The number assigned to this customer (i.e. CUS-002). If you don't specify a customer number, it will be automatically generated. 64 characters max. |
opt_in_email | boolean | no | no | Opt-in to Emails. Default: false |
notes | string | no | no | A note about this customer |
assigned_to | Object | no | no | The employee object. The authenticated user by default |
employee_count | integer | no | no | The company's employee count |
price_family | Object | no | no | The price family applied to this customer |
taxpayer_id | string | no | no | The customer's taxpayer id |
industry | string | no | no | The customer's industry |
incorporation_status | string | no | no | The customer's incorporation status |
rating | string | no | no | The lead's rating |
Company only
If your customer is a company, the JSON object will have the following keys:Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
company_name | string | yes | no | The name of the company. 255 characters max. |
Individual only
If your customer is an individual, the JSON object will have the following keys:Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
first_name | string | no | no | The First Name of the customer. 255 characters max. |
last_name | string | yes | no | The Last Name of the customer. 255 characters max. |
middle_name | string | no | no | The Middle Name of the customer. 255 characters max. |
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
assigned_to | Filter by employee id that is assigned to the customer (e.g. ?assigned_to=3). |
created_at | Filter by the creation date. |
status |
Filter by status among : - lead - customer (e.g. ?status=lead). |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
user_code | Sorts by user code field. |
full_name | Sorts by full name field. |
created_at | Sorts by the creation date field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Vendors
JSON Format
Vendors are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating customers |
type | integer | yes | no | The type of the vendor
1: Company 2: Individual |
full_name | string | no | yes | The full name of this customer (automatically generated) |
address | Address | no | no | The main address of the vendor |
phone_number | string | no | no | The phone number of this vendor. 64 characters max. |
string | no | no | The Email address of this vendor. 255 characters max. | |
website | string | no | no | The URL of the vendor's website. 255 characters max. |
contacts | array[Contact] | no | no | An array containing the contacts of the vendor |
payment_terms_id | integer | no | no | The ID of the Payment terms
by default, Due on receipt will be selected. |
currency_iso_code | string | no | no | The ISO Code of one of your Currencies
by default, the domain currency will be selected. 4 characters max. |
user_code | string | no | no | The number assigned to this vendor (i.e. SUP-002). If you don't specify a vendor number, it will be automatically generated. 64 characters max. |
note | no | no | A note about this vendor | |
taxpayer_id_number | string | no | no | The Taxpayer ID Number |
Company only
If your vendor is a company, the JSON object will have the following keys:Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
company_name | string | yes | no | The name of the company. 255 characters max. |
Individual only
If your vendor is an individual, the JSON object will have the following keys:Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
first_name | string | no | no | The First Name of the vendor. 255 characters max. |
last_name | string | yes | no | The Last Name of the vendor. 255 characters max. |
middle_name | string | no | no | The Middle Name of the vendor. 255 characters max. |
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
created_at | Filter by the creation date. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
user_code | Sorts by user code field. |
created_at | Sorts by the creation date field. |
full_name | Sorts by full name field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Products and Services
JSON Format
Products and Services are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating Transactions |
type | integer | yes | no | The type
1: Service 2: Product |
name | string | yes | no | The name. 255 characters max. |
unit_id | integer | no | no | The ID of the Unit
Default: Service: Day Product: Piece |
sales_price | double | no | no | The Sales Price, 0.0 by default |
item_number | string | no | no | A unique user-facing id (i.e. ITM-012) If you don't specify a product number, it will be automatically generated. 64 characters max. |
description | string | no | no | A description of the product or the service |
family_id | integer | no | no | IDs from Item's Families
Miscellaneous, by default |
private_note | string | no | no | A private note about the product or the service |
Products only
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
purchase_price | double | no | no | The Purchase Price of the product. 0.0 by default |
net_weight | double | no | no | The Net Weight of the product. 0.0 by default |
width | double | no | no | The Width of the product. 0.0 by default |
length | double | no | no | The Length of the product. 0.0 by default |
height | double | no | no | The Height of the product. 0.0 by default |
dimension_unit_id | integer | no | no | The id of the Dimension Unit of the product. Meter by default |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Products and Services Families
JSON Format
Products and Services Families are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating Families |
name | string | yes | no | The Family Name. 64 characters max. |
code | yes | no | The Short Code of the Family. Automatically generated. 64 characters max. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Projects
JSON Format
Projects are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating projects |
name | string | yes | no | The Project Name. 128 characters max. |
description | string | no | no | The Project Description |
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
created_at | Filter by the creation date. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
name | Sorts by name field. |
created_at | Sorts by the creation date field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Project Tasks
JSON Format
Project Tasks are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned when creating a task |
name | string | The task name. |
notes | string | The task notes. |
status | string | "done" if the task is completed, "todo" otherwise. |
due_date | date | Date on which this task is due, or null if the task has no due date. |
done_date | date | Date on which this task was completed, or null if the task has no done date. |
time_spent | double | The time spent to complete this task, or null if the task is not done yet. |
assigned_to | object | Employee to which this task is assigned, or null if the task is unassigned. |
customer | object | Compact representation of the customer linked to this task, or null if no customer linked. |
contact | object | Compact representation of the contact linked to this task, or null if no contact linked. |
project | object | Compact representation of the project linked to this task, or null if no project linked. |
service_to_bill | object | Compact representation of the service to bill linked to this task, or null if no service linked. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Opportunity Tasks
JSON Format
Opportunity Tasks are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned when creating a task |
name | string | The task name. |
notes | string | The task notes. |
status | string | "done" if the task is completed, "todo" otherwise. |
due_date | date | Date on which this task is due, or null if the task has no due date. |
done_date | date | Date on which this task was completed, or null if the task has no done date. |
time_spent | double | The time spent to complete this task, or null if the task is not done yet. |
assigned_to | object | Employee to which this task is assigned, or null if the task is unassigned. |
customer | object | Compact representation of the customer linked to this task, or null if no customer linked. |
contact | object | Compact representation of the contact linked to this task, or null if no contact linked. |
opportunity | object | Compact representation of the opportunity linked to this task, or null if no opportunity linked. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Sales Orders
JSON Format
Sales orders are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
customer_id DEPRECATED | integer | yes | no | Id of the Customer. |
customer | Snippet | yes | no |
The Snippet of the sales order Customer. Where : - id = customer.id - name = customer.full_name - user_code = customer.user_code |
billing_contact_id | integer | no | no | Id of the Contact to bill. Should belong to that order's Customer. |
billing_address | Address | no | yes | The billing address. The Contact address if any, the Customer one otherwise. |
user_code | string | no | no | The number assigned to this sales order (i.e. SO-002). If you don't specify an order number, it will be automatically generated. 64 characters max. |
po_number | string | no | no | The Customer own Order Reference. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
tax_id | integer | no | no | US only. Id of the Tax to apply on that order. |
currency_iso_code | string | no | no | The ISO code of the currency (ISO 4217). 4 characters max. That currency should have been previously added into your company settings. Default: your company's currency. |
reduce_rate | double | no | no | The reduce rate (%) to apply. From 0 to 100. Default: 0.00 |
order_lines | array[Order Line] | no | no | An array containing the order lines of the order. |
public_note | string | no | no | Comment that will be printed on the final document. |
shipping_date | date | no | no | The date before which the goods should be delivered, if any. Format: yyyy-MM-dd (e.g. 2013-06-26) |
shipping_contact_id | integer | no | no | Id of the Contact the goods should be shipped to, if different than the Customer. Could be any Contact from any Customer. |
shipping_address | Address | no | yes | The shipping address. The shpping Contact address if any, the Customer one otherwise. |
payment_terms_id | integer | no | no | Id of the Payment Term to apply once that order will be billed. |
project_id | integer | no | no | Id of the Project related to that order, if any. |
employee_id | integer | no | no | Id of the Employee assigned to that order. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Inludes all taxes, discounts and reduce. |
total | double | no | yes | The final total the customer needs to pay. All include (taxes, discounts, reduce). |
delivery_status | integer | no | yes | The delivery status, among : 1: Not Delivered (default) 2: Partially Delivered 3: Delivered |
invoice_status | integer | no | yes | The invoice status, among : 1: Not invoiced (default) 2: Invoiced 3: Cancelled |
JSON Example
That example describe a US sales order.
Available Filter Fields
Field Name | Description |
---|---|
customer_id | Filter by customer id. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
date | Sorts by date field. |
created_at | Sorts by the creation date field. |
user_code | Sorts by the user_code field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Create a delivery note from a sales order
On success, the sales order gets delivered and the resulting Delivery Note is returned.
Create an invoice from a sales order
On success, the sales order gets closed and the resulting Invoice is returned.
Purchase Orders
JSON Format
Purchase orders are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
vendor | Snippet | yes | no |
The Snippet of the purchase order's Vendor. Where : - id = vendor.id - name = vendor.full_name - user_code = vendor.user_code |
user_code | string | no | no | The number assigned to this purchase order (i.e. SORD-002). If you don't specify an order number, it will be automatically generated. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
currency_iso_code | string | no | no | The ISO code of the currency (ISO 4217). 4 characters max. That currency should have been previously added into your company settings. Default: your company's currency. |
employee_id | integer | no | no | Id of the Employee assigned to that order. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Inludes all taxes, discounts and reduce. |
total | double | no | yes | The final total that gets billed by the vendor. All include (taxes, discounts, reduce). |
JSON Example
That example describe an UK Purchase order.
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
GET | Retrieve the list of resources |
Create a bill from a purchase order
On success, the purchase order gets billed and the resulting Bill is returned.
Quotes
JSON Format
Quotes are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned. |
status | string | The status, among : "open" (default), "won", "lost" |
delivery_status | integer | The delivery status, among : 1: Not Delivered (default) 2: Partially Delivered 3: Delivered |
invoice_status | integer | The invoice status, among : 1: Not invoiced (default) 2: Invoiced 3: Cancelled |
expiration_date | date | For open quotes, the day the quote will expire. Format: yyyy-MM-dd (e.g. 2013-06-26) |
closing_date | date | For won quotes, the date the quote has been accepted. Format: yyyy-MM-dd (e.g. 2013-06-26) |
losing_date | date | For lost quotes, the date the quote has been rejected. Format: yyyy-MM-dd (e.g. 2013-06-26) |
customer_id DEPRECATED | integer | Id of the Customer. |
customer | Snippet |
The Snippet of the quote Customer. Where : - id = customer.id - name = customer.full_name - user_code = customer.user_code |
billing_contact_id | integer | Id of the Contact to bill. Should belong to that quote's Customer. |
billing_address | Address | The billing address. The Contact address if any, the Customer one otherwise. |
po_number | string | The Customer own Order Reference. 64 characters max. |
tax_id | integer | US only. Id of the Tax to apply on that quote. |
reduce_rate | double | The reduce rate (%) to apply. From 0 to 100. Default: 0.00 |
order_lines | array[Order Line] | An array containing the order lines of the quote. |
public_note | string | Comment that will be printed on the final document. |
shipping_contact_id | integer | Id of the Contact the goods should be shipped to, if different than the Customer. Could be any Contact from any Customer. |
shipping_address | Address | The shipping address. The shipping Contact address if any, the Customer one otherwise. |
payment_terms_id | integer | Id of the Payment Term to apply on that quote. Will be used as a template to generate Settlements. |
project_id | integer | Id of the Project related to that quote, if any. |
user_code | string | The number assigned to that quote (i.e. QOT-001). |
date | date | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) |
currency_iso_code | string | The ISO code of the currency
(ISO 4217).
4 characters max. That currency should have been previously added into your company settings. Default: your company's currency. |
employee_id | integer | Id of the Employee assigned to that order. |
private_note | string | A private note that won't be printed. |
subtotal | double | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | Overall tax amount. Includes all taxes, discounts and reduce. |
total | double | The final total the customer will have to pay. All include (taxes, discounts, reduce). |
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
customer_id | Filter by customer id. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
date | Sorts by date field. |
created_at | Sorts by the creation date field. |
user_code | Sorts by the user_code field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Print a Quote as PDF
Response types
This endpoint supports two types of response JSON and PDF.Response type can be changed by adding .pdf or .json to the URL.
Type | Content-Type | Response type |
---|---|---|
JSON
(Default) |
application/json |
URL to the PDF reprensentation of the document. The URL is valid for 5 minutes. Example: |
application/pdf | The PDF reprensentation of the document. |
Create a invoice from a quote
On success, the quote gets invoiced and the resulting Invoice is returned.
Create a sales order from a quote
On success, the quote gets ordered and the resulting Sales Order is returned.
Invoices
JSON Format
Invoices are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
locked | boolean | no | no | Indicates that the document can no longer be edited nor deleted. |
sent | boolean | no | no | Has the document been finalized or sent to the Customer. |
sent_at | date | no | no | The date the document has been finalized or sent to the Customer.
Format: yyyy-MM-dd (e.g. 2013-06-26) |
customer_id DEPRECATED | integer | yes | no | Id of the Customer. |
customer | Snippet | yes | no |
The Snippet of the invoice Customer. Where : - id = customer.id - name = customer.full_name - user_code = customer.user_code |
billing_contact_id | integer | no | no | Id of the Contact to bill. Should belong to that invoice's Customer. |
billing_address | Address | no | yes | The billing address. The Contact address if any, the Customer one otherwise. |
user_code | string | no | no | The number assigned to that invoice (i.e. INV-002). If you don't specify an order number, it will be automatically generated. 64 characters max. |
po_number | string | no | no | The Customer own Order Reference. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
tax_id | integer | no | no | US only. Id of the Tax to apply on that invoice. |
currency_iso_code | string | no | no | The ISO code of the currency (ISO 4217). 4 characters max. That currency should have been previously added into your company settings. Default: your company's currency. |
reduce_rate | double | no | no | The reduce rate (%) to apply. From 0 to 100. Default: 0.00 |
order_lines | array[Order Line] | no | no | An array containing the order lines of the invoice. |
public_note | string | no | no | Comment that will be printed on the final document. |
shipping_contact_id | integer | no | no | Id of the Contact the goods should be shipped to, if different than the Customer. Could be any Contact from any Customer. |
shipping_address | Address | no | yes | The shipping address. The shipping Contact address if any, the Customer one otherwise. |
payment_terms_id | integer | no | no | Id of the Payment Term to apply on that invoice. Will be used as a template to generate Settlements. |
project_id | integer | no | no | Id of the Project related to that invoice, if any. |
employee_id | integer | no | no | Id of the Employee assigned to that order. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Includes all taxes, discounts and reduce. |
total | double | no | yes | The final total the customer needs to pay. All include (taxes, discounts, reduce). |
paid | double | no | yes | Total of the payments made on that invoice. |
unpaid | double | no | yes | Remaining amount to be paid. |
delivery_status | integer | no | yes | The delivery status, among : 1: Not Delivered (default) 2: Partially Delivered 3: Delivered |
invoice_status | integer | no | yes | The invoice status, among : 2: Invoiced (default) 3: Cancelled |
payments_id | array[integer] | no | yes | Array of Ids of Payments made on that invoice. |
JSON Example
That example describe a US invoice.
Available Filter Fields
Field Name | Description |
---|---|
customer_id | Filter by customer id. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
date | Sorts by date field. |
created_at | Sorts by the creation date field. |
user_code | Sorts by the user_code field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Print an Invoice as PDF
Response types
This endpoint supports two types of response JSON and PDF.Response type can be changed by adding .pdf or .json to the URL.
Type | Content-Type | Response type |
---|---|---|
JSON
(Default) |
application/json |
URL to the PDF reprensentation of the document. The URL is valid for 5 minutes. Example: |
application/pdf | The PDF reprensentation of the document. |
Create a credit memo from an invoice
On success, the invoice gets cancelled and the resulting Credit memo is returned.
Vendor bills
JSON Format
Vendor bills are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating customers |
locked | boolean | no | no | Indicates that the document can no longer be edited nor deleted. |
sent | boolean | no | no | Has the document been finalized or sent to the Customer. |
sent_at | date | no | no | The date the document has been finalized or sent to the Customer.
Format: yyyy-MM-dd (e.g. 2013-06-26) |
paid | double | no | yes | Total of the payments made on that bill. |
unpaid | double | no | yes | Remaining amount to be paid. |
user_code | string | no | no | The number assigned to this bill (i.e. VINV-002). If you don't specify a bill number, it will be automatically generated. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
currency_iso_code | string | no | no | The ISO Code of one of your Currencies
by default, the domain currency will be selected. 4 characters max. |
employee_id | integer | no | no | Id of the Employee assigned to that bill. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Includes all taxes, discounts and reduce. |
total | double | no | yes | The final total the customer needs to pay. All include (taxes, discounts, reduce). |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Create a vendor credit memo from a bill
On success, the bill gets cancelled and the resulting Vendor credit memo is returned.
Installments
JSON Format
Installments are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned. |
invoice_id | integer | Id of the related Invoice. |
due_date | date | The expected payment date. Format: yyyy-MM-dd (e.g. 2013-06-26) |
amount | double | The installment initial amount. |
outstanding_amount | double |
Amount left to settle. An outstanding amount of 0.00 means that the Installment has been fully paid. |
currency_iso_code | string | The ISO code of the currency (ISO 4217). |
payment_request_id | integer | Id of the related PaymentRequest used with integrated payment solutions. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Payments
Payment creation is restraint to Invoice's payments into the API. You have to provide an invoice_id while performing a POST request.
That new payment will be applied on the first open settlement of that invoice. If all settlements are paid, an error message will be returned and the payment won't be created.
Also, that new payment currency will be determined by the invoice's one.
Unlike creation, GET requests are not restraint to invoice's payments only and returns any kind of payments.
JSON Format
Payments are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating Payment |
user_code | string | no | yes | The number that was automatically assigned to this payment (i.e. IPAY-002). |
invoice_id | integer | yes | yes | Id of the Invoice that payment is about, if any. |
date | date | no | yes | The date the payment has occured. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
amount | double | yes | yes | Amount of the payment. Should not be 0.00 |
currency_iso_code | string | no | yes | The ISO code of that payment currency (ISO 4217). |
payment_method_id | integer | no | yes | Id of the Payment method. Default: the one of the settlement that payment has been applied. |
bank_reference | string | no | yes | A bank reference label that can freely be assigned. Could be a bank statement reference, a PayPal ID, etc... |
bank_id | integer | no | yes | Id of the bank account that payment was made on. That bank account currency should match the payment one. Default: no Bank. Use the application to perform the bank deposit later on. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource Restraint to invoice's payments only |
GET | Retrieve the list of resources |
Credit memos
JSON Format
Credit memos are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
locked | boolean | no | no | Indicates that the document can no longer be edited nor deleted. |
sent | boolean | no | no | Has the document been finalized or sent to the Customer. |
sent_at | date | no | no | The date the document has been finalized or sent to the Customer.
Format: yyyy-MM-dd (e.g. 2013-06-26) |
paid | double | no | yes | Total of the payments made on that credit memo. |
unpaid | double | no | yes | Remaining amount to be paid. |
customer_id DEPRECATED | integer | yes | no | Id of the Customer. |
customer | Snippet | yes | no |
The Snippet of the credit memo Customer. Where : - id = customer.id - name = customer.full_name - user_code = customer.user_code |
billing_contact_id | integer | no | no | Id of the Contact to bill. Should belong to that credit memo's Customer. |
billing_address | Address | no | yes | The billing address. The Contact address if any, the Customer one otherwise. |
tax_id | integer | no | no | US only. Id of the Tax to apply on that credit memo. |
reduce_rate | double | no | no | The reduce rate (%) to apply. From 0 to 100. Default: 0.00 |
order_lines | array[Order Line] | no | no | An array containing the order lines of the credit memo. |
public_note | string | no | no | Comment that will be printed on the final document. |
shipping_contact_id | integer | no | no | Id of the Contact the goods should be shipped to, if different than the Customer. Could be any Contact from any Customer. |
shipping_address | Address | no | yes | The shipping address. The shipping Contact address if any, the Customer one otherwise. |
payment_terms_id | integer | no | no | Id of the Payment Term to apply on that credit memo. Will be used as a template to generate Settlements. |
project_id | integer | no | no | Id of the Project related to that credit memo, if any. |
user_code | string | no | no | The number assigned to that credit memo (i.e. CCN-001). If you don't specify an order number, it will be automatically generated. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
currency_iso_code | string | no | no | The ISO code of the currency (ISO 4217). 4 characters max. That currency should have been previously added into your company settings. Default: your company's currency. |
employee_id | integer | no | no | Id of the Employee assigned to that order. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Inludes all taxes, discounts and reduce. |
total | double | no | yes | The final total the customer needs to pay. All include (taxes, discounts, reduce). |
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
customer_id | Filter by customer id. |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
date | Sorts by date field. |
created_at | Sorts by the creation date field. |
user_code | Sorts by the user_code field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Print a Credit memo as PDF
Response types
This endpoint supports two types of response JSON and PDF.Response type can be changed by adding .pdf or .json to the URL.
Type | Content-Type | Response type |
---|---|---|
JSON
(Default) |
application/json |
URL to the PDF reprensentation of the document. The URL is valid for 5 minutes. Example: |
application/pdf | The PDF reprensentation of the document. |
Vendor credit memos
JSON Format
Vendor credit memos are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
locked | boolean | no | no | Indicates that the document can no longer be edited nor deleted. |
sent | boolean | no | no | Has the document been finalized or sent to the Vendor. |
sent_at | date | no | no | The date the document has been finalized or sent to the Vendor.
Format: yyyy-MM-dd (e.g. 2013-06-26) |
paid | double | no | yes | Total of the payments made on that credit memo. |
unpaid | double | no | yes | Remaining amount to be paid. |
user_code | string | no | no | The number assigned to this bill (i.e. SCN-001). If you don't specify a a credit memo number, it will be automatically generated. 64 characters max. |
date | date | no | no | The date that will be printed. Format: yyyy-MM-dd (e.g. 2013-06-26) Default: date of the day. |
currency_iso_code | string | no | no | The ISO Code of one of your Currencies
by default, the domain currency will be selected. 4 characters max. |
employee_id | integer | no | no | Id of the Employee assigned to that bill. Default: the authenticated user. |
private_note | string | no | no | A private note that won't be printed. |
subtotal | double | no | yes | Total before taxes and reduce. Based on the content of the order lines. |
reduce_amount | double | no | yes | Amount of the reduce, based on the subtotal and reduce rate. |
tax_amount | double | no | yes | Overall tax amount. Includes all taxes, discounts and reduce. |
total | double | no | yes | The final total due by the vendor. All include (taxes, discounts, reduce). |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Accounting Transactions
Accounting Transactions that have been generated by the system are only editable to some extends.
Only few fields, like external_id or lettering remain editable. Also, you cannot add or remove entries, edit amounts or change the date or piece_number. In order to do that, you have to edit the document that have generated the transaction.
Still, you can lock any entries to ensure that it won't be modified at all, but be carefull: once locked, an entry cannot be unlocked.
JSON Format
Accounting Transactions are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating Transactions. |
external_id | string | no | no | Use primilary for Sync. |
transaction_code | integer | no | no | Automatically generated |
status UPDATED: 2018-03-14 | string | no | yes | The status of the transaction, among "realized", "forecast", "closed" and "draft".
It's a read only field, transaction created through the API are "realized" only. |
date | date | no | no | Today by default.
Format: yyyy-MM-dd (e.g. 2013-06-26) Not editable on transactions that have been generated by the system. |
journal_id DEPRECATED | integer | no | no | Deprecated. See journal. |
journal | Journal | no | no | The recording journal
5: Miscellaneous Operations is selected by default. Not editable on transactions that have been generated by the system. |
piece_number | string | yes | no | A unique user-facing id of the document linked to this transaction. 64 characters max.
Not editable on transactions that have been generated by the system. |
currency_iso_code | string | no | yes | The ISO code of the currency (ISO 4217). 4 characters max.
Default: your company's currency. Not editable on transactions that have been generated by the system. When creating new transactions, only default currency is allowed. |
entries | array[Entry] | yes | no | The list of the transaction's entries. The entries must be balanced.
You cannot add or remove entries on transactions that have been generated by the system. |
Transaction Entry Format
JSON Example
Available Filter Fields
Field Name | Description |
---|---|
date | Filter by date. |
journal_id | Filter by journal_id. |
status |
Filter by status among : - forecast - realized - closed - draft (e.g. ?status=realized). |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
transaction_code | Sorts by transaction code field. |
date | Sorts by date field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Accounting journals
JSON Format
Journals are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned when creating journals |
name | string | yes | no | The journal name. 64 characters max. |
code | string | yes | no | The journal name's abbreviation. 64 characters max. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Accounts
JSON Format
Accounts are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned |
number | string | yes | no | The Number of this account. 64 characters max. |
name | string | yes | no | The Name of this account. 128 characters max. |
is_family | boolean | yes | yes | Is this account a family account. |
family_id | integer | yes | no | Code of this account's family |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Bank
JSON Format
Bank accounts are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
account_number | string | no | no | The account number of the bank account. |
name | string | yes | no | The way that bank account will appear in OneUp. |
currency | string | no | no | The ISO Code of one of your Currencies
by default, the domain currency will be selected. 4 characters max. |
linked_to_provider | boolean | no | no | Does this account come from an external provider. |
bank_balance | double | no | no | The current balance of your bank account. |
accounting_bank_balance | double | no | no | The current balance of your bank account, according to the OneUp accounting. |
bank_balance_date | date | no | no | The date the bank balance has been recorded. Format: yyyy-MM-dd (e.g. 2013-06-26) |
JSON Example
Available Sorting Options
Option Name | Description |
---|---|
name | Sorts by account name field. |
created_at | Sorts by the creation date field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
PUT | Update a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Bank Entries
JSON Format
Bank entries are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned. |
external_id | string | no | yes | Used primilary for sync purposes. |
bank_account | object | yes | yes | Code of the Bank Account that entry belongs to. |
posted_date | date | yes | yes | The date that entry was posted. Format: yyyy-MM-dd (e.g. 2013-06-26) |
transaction_date | date | yes | yes | The date the bank transaction was actually performed. Format: yyyy-MM-dd (e.g. 2013-06-26) |
amount | double | yes | yes | Amount of the bank transaction. Use negative amount for debit. Should not be 0.00 |
currency_iso_code | string | no | yes | The ISO Code of the bank account. |
description | string | yes | yes | Short description. |
payment_method | object | no | yes | Code of the payment method. Default: 1 (check) |
provider_name | string | no | no | The source of the bank entry. Values are: NONE, YODLEE or LINXO |
provider_category_id | integer | no | no | The category id from the source provider (YODLEE, LINXO). |
status | string | no | yes | The status of the bank entry. |
reconciled_documents | array[object] | no | yes | The list of documents reconciled to this entry. |
JSON Example
Available Filter Field
Field Name | Description |
---|---|
id | Filter by one or multiple ids (e.g. ?id=1,2,3). |
external_id | Filter by one or multiple external ids (e.g. ?external_id=1,2,3). |
bank_account | Filter by one or multiple bank_account ids (e.g. ?bank_account=1,2,3). |
posted_date | Filter by posted_date. |
transaction_date | Filter by transaction_date. |
status |
Filter by one or multiple status among : - unprocessed - unreconciled - partially_reconciled - to_review - reconciled - closed (e.g. ?status=partially_reconciled,reconciled). |
Available Sorting Options
Option Name | Description |
---|---|
id | Sorts by id field. |
date | Sorts by posted date field. |
name | Sorts by label field. |
absolute_amount | Sorts by the absolute value of the amount field. |
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
DELETE | Delete a resource, you have to specify an id |
POST | Create a resource |
GET | Retrieve the list of resources |
Payment Terms
JSON Format
Payment Terms are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned |
name | string | The Payment Term Name. 64 characters max. |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Taxes
JSON Format
Taxes are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned |
name | string | The Tax Name. 128 characters max. |
rate | double | The Tax Rate |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Currencies
JSON Format
Currencies are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned |
iso_code | string | The ISO code of the currency (ISO 4217). 4 characters max. |
name | string | The Currency Name. 64 characters max. |
is_main_currency | boolean | Is this currency the main accounting for this domain |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Units
JSON Format
Units are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | Automatically assigned |
name | string | The Unit Name. 64 characters max. |
type | integer | Describe the kind of unit
1: Piece 2: Weight 3: Dimension 4: Surface 5: Volume 6: Time |
JSON Example
Available Methods
HTTP Verb | Action |
---|---|
GET | Retrieve a resource, you have to specify an id |
GET | Retrieve the list of resources |
Address
In OneUp, addresses are used at several places. Accounts, Suppliers, Contacts... So, in the API, addresses are embeded into their own JSON format, and follow the same rules everywhere.
JSON Format
Addresses are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
street_line1 | string | no | no | First line of the address. 255 characters max. |
street_line2 | string | no | no | Second line of the address. 255 characters max. |
street_line3 | string | no | no | Third line of the address. 255 characters max. |
postal_code | string | no | no | The zip code of the address. 128 characters max. |
city | string | no | no | The city of the address. 128 characters max. |
country | string | no | no | The country of the address. 128 characters max. |
locality | string | no | no | The localisaton of the address (limited to the one from the country selected). 255 characters max. |
short_locality | string | no | yes | The short code for the Country. 10 characters max. |
full_address | string | no | yes | The full formated adress as it should appears on documents |
JSON Example
Contact
JSON Format
Contacts are represented as JSON objects which have the following keys:
JSON Example
Order Line
Order lines are product or service lines that are embeded within sales or purchases documents. They contain infos like price, quantity, description, etc...
While adding, removing or updating an order line, related values (such as total, tax amount...) on the contextual document will be updated accordingly.
JSON Format
Order lines are represented as JSON objects which have the following keys:
Field Name | Type | Mandatory | Read-only | Description |
---|---|---|---|---|
id | integer | no | yes | Automatically assigned |
item_id | integer | yes | yes | Id of the ordered Product or Service. |
description | string | no | no | A description of the ordered Product or Service. Default: The Product or Service default description |
quantity | double | no | no | The ordered quantity. Default: 1.00 |
unit_price_wt | double | no | no | Unit Price before Taxes Default: The Product or Service default sales price |
discount_rate | double | no | no | Discount rate for this line. Default: 0.00 |
tax_id | integer | no | no | Not available for US. Id of the Tax to apply. |
is_taxable | boolean | no | no | US only. Shall the tax be applied ? |
total | double | no | yes | Total before taxes and discount. |
JSON Example
Snippet
A Snippet is a generic type that encapsulates an object and aggregates common information.
JSON Format
Snippets are represented as JSON objects which have the following keys:
Field Name | Type | Description |
---|---|---|
id | integer | The id of the encapsulated object |
name | string | The name of the encapsulated object |
user_code | string | The user_code of the encapsulated object |
JSON Example
Domain
This endpoint will delete your account and cancel your subscription.
Options as body json
The following options are available for that endpoint:
Option Name | Type | Description |
---|---|---|
provider | string | The provider associated with the account to delete (mandatory). |
account_id | integer | Id of the account that will be deleted (mandatory). |
reason | string | The reason why the domain is deleted (mandatory). |
additionalInfo | string | More information about the reason of the deletion. |
JSON Example
This enpoint will return the domain unique id after a successful deletion:
Available Methods
HTTP Verb | Action |
---|---|
DELETE | Delete a resource |