Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
-H "Authorization: Bearer YOUR_TOKEN"
Make sure to replace
YOUR_TOKEN
with your API key.
Kwixéo uses API keys to allow access to the API.
Kwixéo expects for the API key to be included in all API requests to the server in a header that looks like the following:
Authorization: Bearer YOUR_TOKEN
Test mode
To use the API with the test mode, you must pass the header parameter testMode
to true
curl "api_endpoint_here" \
-H "Authorization: Bearer YOUR_TOKEN"
-H "testMode: 1"
Common parameters
Retrieving a list of elements
The list endpoints returns JSON structured like this:
{
"datas": [
{...},
{...}
],
"links": {
"first": "https://api.kwixeo.fr/...",
"last": "https://api.kwixeo.fr/...",
"prev": "https://api.kwixeo.fr/...",
"next": "https://api.kwixeo.fr/..."
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 2,
"links": [
{
"url": "https://api.kwixeo.fr/...",
"label": "« Previous",
"active": false
},
{
"url": "https://api.kwixeo.fr/...",
"label": "1",
"active": true
},
{
"url": "https://api.kwixeo.fr/...",
"label": "2",
"active": true
},
{
"url": "https://api.kwixeo.fr/...",
"label": "3",
"active": true
},
{
"url": "https://api.kwixeo.fr/...",
"label": "Next »",
"active": false
}
],
"path": "https://api.kwixeo.fr/...",
"per_page": 10,
"to": 10,
"total": 30
}
}
When retrieving a list of elements, it is possible to pass the following parameters if they are specified on the endpoint.
Parameter | Default | Description |
---|---|---|
page | 1 | Page to show |
per_page | 50 | Number of elements par page. 500 is the maximum |
sort | name | Sort the data. Use xxx:desc for descending. Can be an array for concatenated sorting Examples :
|
search | Make a global search. Value can be a single element or an array of element. Add % before or/and after the search term(s) for use LIKE. Examples :
|
|
filter | Apply a search filter. This is an array of filter(s) to apply.
Examples :
|
|
include | Related data to add to the answer By default, not all linked data is added to the response. If data is missing in the response, ask for it to be loaded Examples :
|
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
The deleted element
A deleted element is structured like this :
{
"id": 6,
"deleted_at": "2022-07-05T21:59:52.000000Z"
}
When deleted items are included, only the id and deletion date are shown
Retrieving a single element
When retrieving a single element, it is possible to pass the following parameter if they are specified on the endpoint.
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer By default, not all linked data is added to the response. If data is missing in the response, ask for it to be loaded Examples :
|
Team & users
Team
The Team object
The Team object
{
"road1": "12 Rue du 12 Septembre 1944",
"road2": null,
"road3": null,
"postal_code": "57330",
"town": "Hettange-Grande",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"company_name": "Kwixéo",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-07-04T12:52:38.000000Z",
"configs": {...},
"letters_model": null
}
Attribute | Type | Description |
---|---|---|
road1 | string | Address : Road line 1 |
road2 | string | Address : Road line 2 |
road3 | string | Address : Road line 3 |
postal_code | string | Address : Postal code |
town | string | Address : City |
country_id | integer | Address : Country Id |
country | object | A Country object |
phone | string | Phone number |
mobile | string | Mobile number |
fax | string | Fax number |
string | Email address | |
website | string | Website url |
company_name | string | Name of the company |
company_type | string | Type of Company : EURL, SAS... |
company_siret | string | Company siret number |
company_rcs | string | Company RCS number |
company_vatrate | string | Company UE vatrate number |
company_naf | string | Company NAF code |
company_capital | string | Company capital |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
configs | object | The team config parameters |
letters_model | object | The word document used to generate letters. A File object |
The Team config parameters
Attribute | Type | Description |
---|---|---|
currency | object | Currency used by account. A Currency object For the modification, it is necessary to send the ID of the currency |
timezone | object | Timezone used by account A Timezone object For the modification, it is necessary to send the ID of the timezone |
currency_position | string | For numbers formatting display : Currency location Can be : after , before , none |
number_format_decimals | string | For numbers formatting display : Decimal separator. Can be : . , , |
number_format_number_thousands | string | For numbers formatting display : Thousands separator. Can be : space , none |
date_format | string | For date formatting display. Can be : DD-MM-YYYY , YYYY-MM-DD , DD/MM/YYYY , YYYY/MM/DD |
check_duplicates_for_person | boolean | Prevent the creation of duplicates for customers |
automatic_newsletter_subscription | boolean | If customers should be subscribed to the newsletter by default |
customer_reference_prefix | string | Prefix for customer reference |
customer_reference_number | integer | Next number for customer reference |
customer_reference_length | integer | Number length for customer reference |
prospect_reference_prefix | string | Prefix for prospect reference |
prospect_reference_number | integer | Next number for prospect reference |
prospect_reference_length | integer | Number length for prospect reference |
provider_reference_prefix | string | Prefix for provider reference |
provider_reference_number | integer | Next number for provider reference |
provider_reference_length | integer | Number length for provider reference |
subcontractor_reference_prefix | string | Prefix for subcontractor reference |
subcontractor_reference_number | integer | Next number for subcontractor reference |
subcontractor_reference_length | integer | Number length for subcontractor reference |
customer_account_custom | boolean | Numbering of customer accounting accounts : Use custom accounts |
customer_account_prefix | string | Numbering of customer accounting accounts : Prefix |
customer_account_length | integer | Numbering of customer accounting accounts : Number of letters to use |
provider_account_custom | boolean | Numbering of provider accounting accounts : Use custom accounts |
provider_account_prefix | string | Numbering of provider accounting accounts : Prefix |
provider_account_length | integer | Numbering of provider accounting accounts : Number of letters to use |
average_hourly_person_cost | number | Average hourly costs of a technician |
product_reference_manual | boolean | Product - Do not automatically generate reference |
product_reference_prefix | string | Product automatic reference : Prefix |
product_reference_number | integer | Product automatic reference : Next number |
product_reference_length | integer | Product automatic reference : Number length |
service_reference_manual | boolean | Service - Do not automatically generate reference |
service_reference_prefix | string | Service automatic reference : Prefix |
service_reference_number | integer | Service automatic reference : Next number |
service_reference_length | integer | Service automatic reference : Number length |
provider_command_reference_prefix | string | Provider command reference : Prefix |
provider_command_reference_number | integer | Provider command reference : Next number. When provider_command_reference_mode = 0 |
provider_command_reference_length | integer | Provider command reference : Number length |
provider_command_reference_mode | integer | Provider command reference : Mode. Can be :
|
manual_movement_reference_prefix | string | Manual stock movement reference : Prefix |
manual_movement_reference_number | integer | Manual stock movement reference : Next number. When manual_movement_reference_mode = 0 |
manual_movement_reference_length | integer | Manual stock movement reference : Number length |
manual_movement_reference_mode | integer | Manual stock movement reference : Mode. Can be :
|
provider_command_not_show_price | boolean | Provider command : Don't show price on PDF |
provider_command_contact | boolean | Provider command : Don't show contact on PDF |
provider_command_reference_column | boolean | Provider command : Don't show reference column on PDF |
provider_command_units | boolean | Provider command : Don't show units on PDF |
provider_command_delivery_address_road1 | string | Provider command - Default delivery address : Road 1 |
provider_command_delivery_address_road2 | string | Provider command - Default delivery address : Road 2 |
provider_command_delivery_address_road3 | string | Provider command - Default delivery address : Road 3 |
provider_command_delivery_address_town | string | Provider command - Default delivery address : Town |
provider_command_delivery_address_postal_code | string | Provider command - Default delivery address : Postal code |
provider_command_delivery_address_country | object | Provider command - Default delivery address : Country. A Country object For the modification, it is necessary to send the ID of the country |
provider_command_default_status | integer | Provider command - Default status. Can be :
|
stock_theorical_entry | integer | Stock When products are added to theoretical stock.
|
stock_real_entry | integer | Stock When products are added to real stock.
|
stock_theorical_out | integer | Stock When products are removed to theoretical stock. Can be:
|
stock_real_out | integer | Stock When products are removed to real stock. Can be:
|
stock_notifications_users | array | Stock - Recipient(s) of notifications. Array of TeamUser object. For the modification, it is necessary to send an array of TeamUser ID |
stock_notifications_theorical_alert | boolean | Theorical stock - Receive a notification when a product reaches the theoretical alert threshold |
stock_notifications_theorical_min | boolean | Theorical stock - Receive a notification when a product reaches the theoretical minimum threshold |
stock_notifications_theorical_max | boolean | Theorical stock - Receive a notification when a product no longer has theoretical stock |
stock_notifications_theorical_no | boolean | Theorical stock - Receive a notification when a product reaches the theoretical maximum threshold |
stock_notifications_real_alert | boolean | Real stock - Receive a notification when a product reaches the real alert threshold |
stock_notifications_real_min | boolean | Real stock - Receive a notification when a product reaches the real minimum threshold |
stock_notifications_real_max | boolean | Real stock - Receive a notification when a product no longer has real stock |
stock_notifications_real_no | boolean | Real stock - Receive a notification when a product reaches the real maximum threshold |
sales_update_date_for_draft | boolean | Updating the date of the document when validate it |
sales_quotation_default_validity | integer | Default quotation and command validity duration |
sales_subtotal_designation | string | Default designation for subtotal lines |
sales_payment_term | object | Default payment term to use. A Payment Term object For the modification, it is necessary to send the ID of the payment term |
sales_payment_methods | array | Default payment methods to use. An array of Payment Method object For the modification, it is necessary to send an array of payment method ID |
sales_sale_term | object | Default sale term to use. A Sale Term object For the modification, it is necessary to send the ID of the sale term |
sales_payment_advance_rate | number | Default advance rate for quotation and command |
sales_escompte_rate | number | Default escompte rate |
sales_penalty_rate | number | Default penalty rate |
sales_penalty_rate_law | boolean | Default visibility state for penalty rate law |
sales_collection_costs_law | boolean | Default visibility state for collection costs law |
sales_use_customer_commercial | boolean | Use the customer's sales representative instead of the user who created the document |
sales_allow_delivery_address | boolean | Enable delivery address entry in documents form |
sales_use_global_vatrate | boolean | Enable use of one vat rate for all the document content |
sales_amounts_type | string | Amount type for document entry. Can be : ht , ttc |
sales_allow_options | boolean | Enable the ability to offer options in documents form |
sales_ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
sales_weight | integer | Possibility to enter the weight in documents form. Can be :
|
sales_eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
sales_col_number | boolean | Show the number for lines in documents form |
sales_col_reference | boolean | Show the reference for lines in documents form |
sales_col_picture | boolean | Show the pictures for lines in documents form |
sales_col_unit | boolean | Show the unites for lines in documents form |
sales_stock_display | integer | Show the stock quantity in documents form. Can be :
|
sales_costs_entries | integer | Ability to enter costs in documents form. Can be :
|
sales_various_costs | boolean | Ability to enter various costs in documents form |
sales_workforce_entries | integer | Entry of workforce in documents form. Can be :
|
sales_gross_margin_amount | boolean | Show the gross margin amount in documents form |
sales_gross_margin_rate | boolean | Show the gross margin rate in documents form |
sales_markup_rate | boolean | Show the markup rate in documents form |
sales_secondary_quantity | string | Secondary quantity entry mode in documents form. Can be :
|
sales_secondary_quantity_unit | boolean | Active unit for the secondary quantity |
sales_pdf_amounts | integer | PDF document : Type of amount to display in the content. Can be :
|
sales_pdf_discounts | integer | PDF document : Discount display mode. Can be :
|
sales_pdf_comments | integer | PDF document : Comments display mode. Can be :
|
sales_pdf_units | integer | PDF document : Unit display mode. Can be :
|
sales_pdf_number_column | integer | PDF document : Line number display mode. Can be :
|
sales_pdf_reference_column | integer | PDF document : Reference display mode. Can be :
|
sales_pdf_ean_column | integer | PDF document : EAN code display mode. Can be :
|
sales_pdf_weight_column | integer | PDF document : Weight display mode. Can be :
|
sales_pdf_vatrate_column | boolean | PDF document : Force the display of the VAT rate column. |
sales_pdf_total_quantity | boolean | PDF document : Show total quantity column. (When using secondary quantity) |
sales_pdf_contact | integer | PDF document : Contact display. |
sales_pdf_country | integer | PDF document : Country display. |
sales_pdf_vatrate_number | integer | PDF document : Display of the customer's intra-community VAT number. |
sales_pdf_delivery_remaining_quantity | boolean | PDF document : Display of quantities remaining to be delivered on delivery document |
sales_pdf_delivery_prices | boolean | PDF document : Display of prices on delivery document |
sales_quotation_reference_prefix | string | Quotation reference : Prefix |
sales_quotation_reference_number | integer | Quotation reference : Next number. When sales_quotation_reference_mode = 0 |
sales_quotation_reference_length | integer | Quotation reference : Number length |
sales_quotation_reference_mode | integer | Quotation reference mode. Can be :
|
sales_command_reference_prefix | string | Command reference : Prefix |
sales_command_reference_number | integer | Command reference : Next number. When sales_command_reference_mode = 0 |
sales_command_reference_length | integer | Command reference : Number length |
sales_command_reference_mode | integer | Command reference mode. Can be :
|
sales_proforma_reference_prefix | string | Proforma reference : Prefix |
sales_proforma_reference_number | integer | Proforma reference : Next number. When sales_proforma_reference_mode = 0 |
sales_proforma_reference_length | integer | Proforma reference : Number length |
sales_proforma_reference_mode | integer | Proforma reference mode. Can be :
|
sales_delivery_reference_prefix | string | Delivery reference : Prefix |
sales_delivery_reference_number | integer | Delivery reference : Next number. When sales_delivery_reference_mode = 0 |
sales_delivery_reference_length | integer | Delivery reference : Number length |
sales_delivery_reference_mode | integer | Delivery reference mode. Can be :
|
sales_invoice_reference_prefix | string | Invoice reference : Prefix |
sales_invoice_reference_number | integer | Invoice reference : Next number. When sales_invoice_reference_mode = 0 |
sales_invoice_reference_length | integer | Invoice reference : Number length |
sales_invoice_reference_mode | integer | Invoice reference mode. Can be :
|
sales_credit_reference_prefix | string | Credit reference : Prefix |
sales_credit_reference_number | integer | Credit reference : Next number. When sales_credit_reference_mode = 0 |
sales_credit_reference_length | integer | Credit reference : Number length |
sales_credit_reference_mode | integer | Credit reference mode. Can be :
|
sales_affair_reference_prefix | string | Affair reference : Prefix |
sales_affair_reference_number | integer | Affair reference : Next number. When sales_affair_reference_mode = 0 |
sales_affair_reference_length | integer | Affair reference : Number length |
sales_affair_reference_mode | integer | Affair reference mode. Can be :
|
sales_guarantee_holdback_pourcent | integer | Guarantee holdback - Default pourcent |
sales_guarantee_holdback_duration | integer | Guarantee holdback - Default duration in month |
charges_default_status | integer | Charges - Default status. Can be :
|
charges_reference_prefix | string | Charges reference : Prefix |
charges_reference_number | integer | Charges reference : Next number. When charges_reference_mode = 0 |
charges_reference_length | integer | Charges reference : Number length |
charges_reference_mode | integer | Charges reference mode. Can be :
|
communication_model_prospect | object | Default template to load when sending an email from a prospect. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_customer | object | Default template to load when sending an email from a customer. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_provider | object | Default template to load when sending an email from a provider. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_subcontractor | object | Default template to load when sending an email from a subcontractor. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_quotation | object | Default template to load when sending an email from a quotation. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_command | object | Default template to load when sending an email from a command. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_proforma | object | Default template to load when sending an email from a proforma. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_delivery | object | Default template to load when sending an email from a delivery. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_invoice | object | Default template to load when sending an email from an invoice. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_credit | object | Default template to load when sending an email from a credit. A Communication Model object For the modification, it is necessary to send the ID of the model |
communication_model_provider_command | object | Default template to load when sending an email from a provider command. A Communication Model object For the modification, it is necessary to send the ID of the model |
Retrieve the team informations
curl "/team" \
-H ""
The above command returns JSON structured like this:
{
"company_name": "Kwixéo",
... // A full team Object
}
This endpoint retrieves the team informations.
HTTP Request
GET /team
Update the team informations
curl "/team" \
-X PUT \
-H "" \
-d "company_name=Kwixéo"
The above command returns JSON structured like this:
{
"road1": "12 Rue du 12 Septembre 1944",
"road2": null,
"road3": null,
"postal_code": "57330",
"town": "Hettange-Grande",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"company_name": "Kwixéo",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-07-04T12:52:38.000000Z",
"configs": {...},
"letters_model": null
}
This endpoint update the team informations.
HTTP Request
PUT /team
Datas Parameters
Attribute | Type | Description |
---|---|---|
road1 | string | Address : Road line 1 |
road2 | string | Address : Road line 2 |
road3 | string | Address : Road line 3 |
postal_code | string | Address : Postal code |
town | string | Address : City |
country | integer | Address : Country Id |
phone | string | Phone number |
mobile | string | Mobile number |
fax | string | Fax number |
string | Email address | |
website | string | Website url |
company_name | string | Name of the company |
company_type | string | Type of Company : EURL, SAS... |
company_siret | string | Company siret number |
company_rcs | string | Company RCS number |
company_vatrate | string | Company UE vatrate number |
company_naf | string | Company NAF code |
company_capital | string | Company capital |
configs | object | The team config parameters |
letters_model | file | A word document used to generate letters (.docx, .odt). |
Team users
The TeamUser object
The TeamUser object
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {
"datas-export": 1,
"manage-stock": 1,
"mail-access": 1,
"send-mail": 1,
"receive-mail": 1,
"calendar": 1,
"task-access": 2,
"task": 1,
"communication-reports": 1,
"communication-letters": 1,
"charges": 4,
"datas-import": 1,
"see-stock": 1,
"catalog-groups": 4,
"catalog-services": 4,
"catalog-products": 4,
"customer-limitation": 1,
"contact": 3,
"subcontractor": 4,
"provider": 4,
"prospect": 4,
"customer": 4,
"sales-quotation": 4,
"support": 4,
"app-configuration": 1,
"sales-command": 4,
"support-editmessage": 2,
"manage-list": 1,
"manage-users": 1,
"support-delete-message": 2,
"sales-delivery": 4,
"manage-subscription": 1,
"sales-proforma": 4,
"sales-invoice": 4,
"sales-credit": 4,
"sales-limitation": 1
},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {
"id": 3,
"name": null,
"filename": "1654161111182.jpeg",
"extension": "jpg",
"size": 4823,
"human_size": "4.71 KiB",
"element_id": null,
"element_type": "avatar",
"created_at": "2022-07-04T13:40:24.000000Z",
"updated_at": "2022-07-04T13:40:24.000000Z"
},
"initials": "FL"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the team user |
firstname | string | Firstname |
lastname | string | Lastname |
fullname | string | Fullname |
string | ||
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
last_connexion | string | The last connexion datetime |
status | object | The status of the team user |
configs | object | The team user config parameters |
permissions | object | The team user permissions |
roles | array | The roles of the team user. Can be: commercial , manager , technical |
team_users | string | Fax number |
user_id | string | Linked user id |
avatar | object | The avatar picture of the user. A File object |
initials | string | Intials of the user |
The Team User config parameters
Attribute | Type | Description |
---|---|---|
task_defaut_date | integer | Default date for new tasks : Number of days to add to today's date |
task_defaut_team_user | array | team users selected by default when creating a new task. An array of Team User object. For the modification, it is necessary to send an array of team user ID |
task_later_limit | integer | Maximum number of days until which the tasks must appear in the category: "Later". |
task_header_limit | integer | Maximum number of days until which tasks must appear in the upper part of the interface. |
task_mail_notifications | integer | Receive the tasks list by email. Can be :
|
task_mail_hour | integer | Time to receive the tasks list |
calendar_show_task | boolean | Possibility to show tasks in the calendar |
calendar_task_hidden | boolean | Visibility of tasks in the calendar |
calendar_task_color | string | Text color for displaying tasks in the calendar |
calendar_task_foreground_color | string | Background color for displaying tasks in the calendar |
calendar_header_limit | integer | Maximum number of days until which events must appear in the upper part of the interface. |
calendar_mail_notifications | boolean | Receive the events list by email. Can be :
|
calendar_mail_hour | integer | Time to receive the events list |
calendar_first_hour | integer | Agenda: first time to display |
calendar_min_hour | integer | Agenda: minimum displayable time |
calendar_max_hour | integer | Agenda: maximum displayable time |
calendar_default_view | string | Calendar: default view. Can be : day , week , month , list |
calendar_default_calendar | integer | Default calendar when creating a new event. A Calendar Object. For the modification, it is necessary to send the ID of the calendar |
Get all Team User Permissions
curl "/user/permission" \
-H ""
The above command returns JSON structured like this:
[
{
"key": "customers",
"name": "Gestion des tiers",
"sort": 1,
"permissions": [
{
"key": "customer-limitation",
"name": "Limitation de l'accès au tiers",
"description": null,
"levels": [
{
"label": "Accès aux clients et prospects dont il est le commercial ou le manager",
"value": 0
},
{
"label": "Accès à tous les clients et prospects",
"value": 1
}
],
"defaultLevel": {
"label": "Accès à tous les clients et prospects",
"value": 1
},
"sort": null,
"category": "customers"
},
{...},
{...}
]
}
]
This endpoint retrieves all the team user permissions.
HTTP Request
GET /user/permission
Get All team users
curl "/team/user" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {...},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {...},
"initials": "FL"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all team users.
HTTP Request
GET /team/user
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | lastname, firstname | Sort the data. Allowed values : lastname , firstname , fullname , email , last_connexion |
search | Make a global search. Search in : user.lastname , user.firstname , user.email |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : roles (string) , status (boolean) |
|
include | Related data to add to the answer Availables datas : permissions , configurations , roles , user , team_users |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a team user
curl "/team/user" \
-X POST \
-H "" \
-d "email=test@kwixeo.fr"
The above command returns JSON structured like this:
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {...},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {...},
"initials": "FL"
}
This endpoint create a team user.
HTTP Request
POST /team/user
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
required | string | Name of the calendar | |
configs | object | The team user config parameters | |
permissions | object | The team user permissions. Example : { "customer-limitation": 0, "contact": 3 } |
|
roles | array | The roles of the team user. Can be: commercial , manager , technical |
Resend an invitation for a new team user
curl "/team/user/3/resend_invitation" \
-X POST \
-H ""
The above command returns JSON structured like this:
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {...},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {...},
"initials": "FL"
}
This endpoint resend an invitation to a new team user.
HTTP Request
POST /team/user/<ID>/resend_invitation
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the team user |
Retrieve a team user
curl "/team/user/3" \
-H ""
The above command returns JSON structured like this:
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {...},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {...},
"initials": "FL"
}
This endpoint retrieves a specific team user.
HTTP Request
GET /team/user/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the team user to retrieve |
Update a team user
curl "/team/user/3" \
-X PUT \
-H "" \
-d "roles[]=commercial"
The above command returns JSON structured like this:
{
"id": 3,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"email": "test@kwixeo.fr",
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z",
"last_connexion": null,
"status": {
"active": true,
"name": "Actif"
},
"configs": {...},
"permissions": {...},
"roles": [
"commercial"
],
"team_users": [],
"user_id": 6,
"avatar": {...},
"initials": "FL"
}
This endpoint update a specific team user.
HTTP Request
PUT /team/user/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the team user to update |
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
configs | object | The team user config parameters | |
permissions | object | The team user permissions. Example : { "customer-limitation": 0, "contact": 3 } |
|
roles | array | The roles of the team user. Can be: commercial , manager , technical |
Delete a Team User
curl "/team/user/3" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific team user.
HTTP Request
DELETE /team/user/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the team user to delete |
User
The User object
The User object
{
"id": 52,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"initials": "FL",
"email": "test@kwixeo.fr",
"phone": null,
"mobile": null,
"fax": null,
"last_connexion": "2022-05-19T20:23:48.000000Z",
"created_at": "2022-05-19T20:23:48.000000Z",
"updated_at": "2022-07-04T13:14:06.000000Z",
"status": {
"active": true,
"name": "Actif"
},
"active_team_user": {...},
"teamUsers": [
{...},
{...}
],
"email_validation": null,
"newsletter_updates": false,
"newsletter_offers": false,
"avatar": {
"id": 4,
"name": null,
"filename": "IMG_4007.jpeg",
"extension": "jpg",
"size": 6537,
"human_size": "6.38 KiB",
"element_id": null,
"element_type": "avatar",
"created_at": "2022-07-04T13:48:38.000000Z",
"updated_at": "2022-07-04T13:48:38.000000Z"
}
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the user |
firstname | string | Firstname |
lastname | string | Lastname |
fullname | string | Fullname |
initials | string | Intials of the user |
string | ||
phone | string | Phone number |
mobile | string | Mobile number |
fax | string | Fax number |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
last_connexion | string | The last connexion datetime |
status | object | The status of the user |
active_team_user | object | The team user who is currently used on the app. A Team User object |
teamUsers | array | The list of all team users linked to the user. An array of Team User object |
email_validation | object | If the user has an email change in progress. An Email Validation object |
newsletter_updates | boolean | If the user receives emails regarding updates |
newsletter_offers | boolean | If the user receives emails concerning commercial offers |
avatar | object | The avatar picture of the user. A File object |
Retrieve the logged user
curl "/user" \
-H ""
The above command returns JSON structured like this:
{
"id": 52,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"initials": "FL",
"email": "test@kwixeo.fr",
"phone": null,
"mobile": null,
"fax": null,
"last_connexion": "2022-05-19T20:23:48.000000Z",
"created_at": "2022-05-19T20:23:48.000000Z",
"updated_at": "2022-07-04T13:14:06.000000Z",
"status": {
"active": true,
"name": "Actif"
},
"active_team_user": {...},
"teamUsers": [
{...},
{...}
],
"email_validation": null,
"newsletter_updates": false,
"newsletter_offers": false,
"avatar": {...}
}
This endpoint retrieves the logged user.
HTTP Request
GET /user
Update the logged user
curl "/user" \
-X PUT \
-H "" \
-d "firstname=Firstname&lastname=Lastname"
The above command returns JSON structured like this:
{
"id": 52,
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "Firstname Lastname",
"initials": "FL",
"email": "test@kwixeo.fr",
"phone": null,
"mobile": null,
"fax": null,
"last_connexion": "2022-05-19T20:23:48.000000Z",
"created_at": "2022-05-19T20:23:48.000000Z",
"updated_at": "2022-07-04T13:14:06.000000Z",
"status": {
"active": true,
"name": "Actif"
},
"active_team_user": {...},
"teamUsers": [
{...},
{...}
],
"email_validation": null,
"newsletter_updates": false,
"newsletter_offers": false,
"avatar": {...}
}
This endpoint update the logged user informations.
HTTP Request
PUT /user
Datas Parameters
Attribute | Type | Description |
---|---|---|
firstname | string | Firstname of the user |
lastname | string | Lastname of the user |
string | Email of the user. A link will be sent by email to confirm the change of email |
|
password | string | Password |
current_password | string | The current password. required for a password or an email change |
phone | string | Phone number |
mobile | string | Mobile number |
fax | string | Fax number |
newsletter_updates | boolean | If the user receives emails regarding updates |
newsletter_offers | boolean | If the user receives emails concerning commercial offers |
Resend an email validation
curl "/user/email-validation/resend" \
-X POST \
-H ""
The above command returns JSON structured like this:
{
"id": 52,
...
// A full User object
}
This endpoint resend an invitation for validate user email.
HTTP Request
POST /user/email-validation/resend
Cancal an email change
curl "/user/email-validation/cancel" \
-X POST \
-H ""
The above command returns JSON structured like this:
{
"id": 52,
...
// A full User object
}
This endpoint cancel a user email change
HTTP Request
POST /user/email-validation/cancel
Calendars
Calendars
The Calendar object
The Calendar object
{
"id": 23,
"label": "ut Lorem sint",
"color": "#ffffff",
"foregroundColor": "#f00020",
"hidden": false,
"shared": false,
"readonly": false,
"team_user": {...},
"team_users": [{...}],
"timezone": {
"id": 76,
"name": "France",
"diff": "+02:00",
"timezone": "Europe/Paris"
},
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the calendar |
label | string | Name of the calendar |
color | string | Text color for calendar events |
foregroundColor | string | Background color for calendar events |
hidden | boolean | If the calendar events are hidden on app |
shared | boolean | If the calendar is shared by another user |
readonly | boolean | If the calendar is read-only |
team_user | object | The calendar owner. A TeamUser object. Present only if requested |
team_users | array | Users with who the calendar is shared An array of TeamUser object. Present only if requested |
timezone | object | Timezone of the calendar A Timezone object. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All calendars
curl "/calendar" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"label": "ut Lorem sint",
"color": "#ffffff",
"foregroundColor": "#f00020",
"hidden": false,
"shared": false,
"readonly": false,
"team_user": {...},
"team_users": [{...}],
"timezone": {
"id": 76,
"name": "France",
"diff": "+02:00",
"timezone": "Europe/Paris"
},
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all calendars.
HTTP Request
GET /calendar
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : label (string) , hidden (boolean) , shared (boolean) , readonly (boolean) |
|
include | Related data to add to the answer Availables datas : timezone , team_user , team_users |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a calendar
curl "/calendar" \
-X POST \
-H "" \
-d "label=Calendar&color=#ffffff&foregroundColor=#f00020"
The above command returns JSON structured like this:
{
"id": 23,
"label": "ut Lorem sint",
"color": "#ffffff",
"foregroundColor": "#f00020",
"hidden": false,
"shared": false,
"readonly": false,
"team_user": {...},
"team_users": [{...}],
"timezone": {
"id": 76,
"name": "France",
"diff": "+02:00",
"timezone": "Europe/Paris"
},
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint create a calendar.
HTTP Request
POST /calendar
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the calendar |
color | required | string | Text color for calendar events |
foregroundColor | required | boolean | Background color for calendar events |
hidden | boolean | If the calendar events are hidden on app | |
timezone | integer | Timezone id to use | |
team_users | array | Users with who the calendar is shared | |
team_users.*.id | required | integer | TeamUser id |
team_users.*.readonly | boolean | If access is read-only |
Retrieve a calendar
curl "/calendar/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"label": "ut Lorem sint",
"color": "#ffffff",
"foregroundColor": "#f00020",
"hidden": false,
"shared": false,
"readonly": false,
"team_user": {...},
"team_users": [{...}],
"timezone": {
"id": 76,
"name": "France",
"diff": "+02:00",
"timezone": "Europe/Paris"
},
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific calendar.
HTTP Request
GET /calendar/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the calendar to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : timezone , team_user , team_users |
Update a calendar
curl "/calendar/1" \
-X PUT \
-H "" \
-d "label=Calendar"
The above command returns JSON structured like this:
{
"id": 23,
"label": "ut Lorem sint",
"color": "#ffffff",
"foregroundColor": "#f00020",
"hidden": false,
"shared": false,
"readonly": false,
"team_user": {...},
"team_users": [{...}],
"timezone": {
"id": 76,
"name": "France",
"diff": "+02:00",
"timezone": "Europe/Paris"
},
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint update a specific calendar.
HTTP Request
PUT /calendar/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the calendar to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the calendar |
color | string | Text color for calendar events |
foregroundColor | boolean | Background color for calendar events |
hidden | boolean | If the calendar events are hidden on app |
timezone | integer | Timezone id to use |
team_users | array | Users with who the calendar is shared |
team_users.*.id | integer | TeamUser id |
team_users.*.readonly | boolean | If access is read-only |
Delete a Calendar
curl "/calendar/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific calendar.
HTTP Request
DELETE /calendar/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the calendar to delete |
Events
The Event object
The Event object
{
"id": 6,
"title": null,
"color": null,
"foreground_color": null,
"location": null,
"comments": null,
"begin": "2022-07-05T06:30:00.000000Z",
"end": "2022-07-05T07:00:00.000000Z",
"all_day": false,
"calendar_id": 23,
"calendar": {...},
"elements": [
{
"type": "customer",
"id": 1,
"title": "Client 1",
"data": {...}
}
],
"customers": [
{...},
{...}
],
"contacts": [
{...},
{...}
],
"other_elements": [
{...},
{...}
],
"created_at": "2022-07-06T08:51:16.000000Z",
"updated_at": "2022-07-06T08:51:16.000000Z",
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the event |
title | string | Title of the event |
color | string | Text color for event. If null, the calendar text color is used |
foregroundColor | string | Background color for event. If null, the calendar background color is used |
location | string | The location of the event |
comments | string | The comments of the event |
begin | string | Datetime of the start of the event |
end | string | Datetime of the end of the event |
all_day | boolean | If the event is a full day event |
calendar_id | array | The calendar Id |
calendar | object | The calendar used A Calendar object. Present only if requested |
elements | array | Elements who are linked to the event Present only if requested |
customers | array | Customers who are linked to the event An array of Customer object. Present only if elements is requested |
contacts | array | Contacts who are linked to the event An array of Contact object. Present only if elements is requested |
other_elements | array | Others elements who are linked to the event An array of elements object. Present only if elements is requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Events
curl "/calendar/event" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 6,
"title": null,
"color": null,
"foreground_color": null,
"location": null,
"comments": null,
"begin": "2022-07-05T06:30:00.000000Z",
"end": "2022-07-05T07:00:00.000000Z",
"all_day": false,
"calendar_id": 23,
"calendar": {...},
"elements": [
{
"type": "customer",
"id": 1,
"title": "Client 1",
"data": {...}
}
],
"customers": [
{...},
{...}
],
"contacts": [
{...},
{...}
],
"other_elements": [
{...},
{...}
],
"created_at": "2022-07-06T08:51:16.000000Z",
"updated_at": "2022-07-06T08:51:16.000000Z",
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all events.
HTTP Request
GET /calendar/event
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : title , begin , end , created_at , updated_at |
search | Make a global search. Search in : title , location , comments |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : title (string) , location (string) , calendar (integer) , customer (integer) , begin (datetime) , end (datetime) , elements (array(type => string, id => integer)) |
|
include | Related data to add to the answer Availables datas : calendar , elements |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create an event
curl "/calendar/event" \
-X POST \
-H "" \
-d "begin=2022-07-05 06:30:00&end=2022-07-05 07:00:00&calendar=23"
The above command returns JSON structured like this:
{
"id": 6,
"title": null,
"color": null,
"foreground_color": null,
"location": null,
"comments": null,
"begin": "2022-07-05T06:30:00.000000Z",
"end": "2022-07-05T07:00:00.000000Z",
"all_day": false,
"calendar_id": 23,
"calendar": {...},
"elements": [
{
"type": "customer",
"id": 1,
"title": "Client 1",
"data": {...}
}
],
"customers": [
{...},
{...}
],
"contacts": [
{...},
{...}
],
"other_elements": [
{...},
{...}
],
"created_at": "2022-07-06T08:51:16.000000Z",
"updated_at": "2022-07-06T08:51:16.000000Z",
}
This endpoint create an event.
HTTP Request
POST /calendar/event
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
title | string | Title of the event | |
begin | required | string | Datetime of the start of the event |
end | required | string | Datetime of the end of the event |
all_day | boolean | If the event is a full day event | |
location | string | The location of the event | |
comments | string | The comments of the event | |
color | string | Text color for event. If null, the calendar text color is used | |
foregroundColor | string | Background color for event. If null, the calendar background color is used | |
calendar | required | integer | The calendar id |
elements | array | Elements who are linked to the event | |
elements.*.id | required | integer | Id of linked element |
elements.*.type | required | string | Type of linked element. Can be : customer , contact , providerCommand , quotation , command , delivery , proforma , invoice , credit , charge |
Retrieve an event
curl "/calendar/event/6" \
-H ""
The above command returns JSON structured like this:
{
"id": 6,
"title": null,
"color": null,
"foreground_color": null,
"location": null,
"comments": null,
"begin": "2022-07-05T06:30:00.000000Z",
"end": "2022-07-05T07:00:00.000000Z",
"all_day": false,
"calendar_id": 23,
"calendar": {...},
"elements": [
{
"type": "customer",
"id": 1,
"title": "Client 1",
"data": {...}
}
],
"customers": [
{...},
{...}
],
"contacts": [
{...},
{...}
],
"other_elements": [
{...},
{...}
],
"created_at": "2022-07-06T08:51:16.000000Z",
"updated_at": "2022-07-06T08:51:16.000000Z",
}
This endpoint retrieves a specific event.
HTTP Request
GET /calendar/event/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : calendar , elements |
Update an event
curl "/calendar/event/6" \
-X PUT \
-H "" \
-d "begin=2022-07-05 06:30:00&end=2022-07-05 07:00:00&calendar=23"
The above command returns JSON structured like this:
{
"id": 6,
"title": null,
"color": null,
"foreground_color": null,
"location": null,
"comments": null,
"begin": "2022-07-05T06:30:00.000000Z",
"end": "2022-07-05T07:00:00.000000Z",
"all_day": false,
"calendar_id": 23,
"calendar": {...},
"elements": [
{
"type": "customer",
"id": 1,
"title": "Client 1",
"data": {...}
}
],
"customers": [
{...},
{...}
],
"contacts": [
{...},
{...}
],
"other_elements": [
{...},
{...}
],
"created_at": "2022-07-06T08:51:16.000000Z",
"updated_at": "2022-07-06T08:51:16.000000Z",
}
This endpoint update a specific event.
HTTP Request
PUT /calendar/event/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event to update |
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
title | string | Title of the event | |
begin | string | Datetime of the start of the event | |
end | string | Datetime of the end of the event | |
all_day | boolean | If the event is a full day event | |
location | string | The location of the event | |
comments | string | The comments of the event | |
color | string | Text color for event. If null, the calendar text color is used | |
foregroundColor | string | Background color for event. If null, the calendar background color is used | |
calendar | integer | The calendar id | |
elements | array | Elements who are linked to the event | |
elements.*.id | required | integer | Id of linked element |
elements.*.type | required | string | Type of linked element. Can be : customer , contact , providerCommand , quotation , command , delivery , proforma , invoice , credit , charge |
Delete an event
curl "/calendar/event/6" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific event.
HTTP Request
DELETE /calendar/event/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the event to delete |
Catalog
Variations
The Variation object
The Variation object
{
"id": 4,
"label": "Size",
"values_count": 2,
"products_count": 6,
"values": ['Value 1', 'Value 2'],
"products_level1": [
{...},
{...}
],
"products_level2": [
{...},
{...}
],
"products_level3": [
{...},
{...}
],
"created_at": "2022-07-07T22:29:34.000000Z",
"updated_at": "2022-07-07T22:29:34.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the variation |
label | string | Name of the variation |
values_count | integer | Number of values the variation has. |
products_count | integer | Number of products who used this variation. |
values | array | Array of values. An array of string. Present only if requested |
products_level1 | array | An array of Product object. Present only if requested |
products_level2 | array | An array of Product object. Present only if requested |
products_level3 | array | An array of Product object. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All variations
curl "/catalog/variation" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 4,
"label": "Size",
"values_count": 2,
"products_count": 6,
"values": ['Value 1', 'Value 2'],
"products_level1": [
{...},
{...}
],
"products_level2": [
{...},
{...}
],
"products_level3": [
{...},
{...}
],
"created_at": "2022-07-07T22:29:34.000000Z",
"updated_at": "2022-07-07T22:29:34.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all catalog variations.
HTTP Request
GET /catalog/variation
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
include | Related data to add to the answer Availables datas : values , products |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a variation
curl "/catalog/variation" \
-X POST \
-H "" \
-d "label=Size&values[]=Value 1&values[]=Value 2"
The above command returns JSON structured like this:
{
"id": 4,
"label": "Size",
"values_count": 2,
"products_count": 6,
"values": ['Value 1', 'Value 2'],
"products_level1": [
{...},
{...}
],
"products_level2": [
{...},
{...}
],
"products_level3": [
{...},
{...}
],
"created_at": "2022-07-07T22:29:34.000000Z",
"updated_at": "2022-07-07T22:29:34.000000Z"
}
This endpoint create a variation.
HTTP Request
POST /catalog/variation
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
label | required | string | Variation name |
values | array | The variations values. An array of string |
|
add_values | array | Add variations values. An array of string |
|
remove_values | array | Remove variations values. An array of string |
Retrieve a variation
curl "/catalog/variation/4" \
-H ""
The above command returns JSON structured like this:
{
"id": 4,
"label": "Size",
"values_count": 2,
"products_count": 6,
"values": ['Value 1', 'Value 2'],
"products_level1": [
{...},
{...}
],
"products_level2": [
{...},
{...}
],
"products_level3": [
{...},
{...}
],
"created_at": "2022-07-07T22:29:34.000000Z",
"updated_at": "2022-07-07T22:29:34.000000Z"
}
This endpoint retrieves a specific variation.
HTTP Request
GET /catalog/variation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the product variation |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : values , products |
Update a Variation
curl "/catalog/variation/4" \
-X PUT \
-H "" \
-d "label=Size"
The above command returns JSON structured like this:
{
"id": 4,
"label": "Size",
"values_count": 2,
"products_count": 6,
"values": ['Value 1', 'Value 2'],
"products_level1": [
{...},
{...}
],
"products_level2": [
{...},
{...}
],
"products_level3": [
{...},
{...}
],
"created_at": "2022-07-07T22:29:34.000000Z",
"updated_at": "2022-07-07T22:29:34.000000Z"
}
This endpoint update a specific variation.
HTTP Request
PUT /catalog/variation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the variation to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
label | string | Variation name |
values | array | The variations values. An array of string |
add_values | array | Add variations values. An array of string |
remove_values | array | Remove variations values. An array of string |
Delete a Variation
curl "/catalog/variation/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific variation.
HTTP Request
DELETE /catalog/variation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the variation to delete |
Products
The Product object
The Product object
{
"id": 1,
"reference": "REF",
"name": "Product",
"designation": "My product",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"default_quantity": "2.00000",
"unit_id": 1,
"unit": {...},
"cant_change_price": false,
"total_ht": "200.00",
"total_tva": "40.00",
"total_ttc": "240.00",
"various_costs": "10.00000",
"total_costs": "60.00000",
"gross_margin_amount": "40.00",
"gross_margin_rate": "30.00",
"markup_rate": "40.00",
"sale_category_id": 1,
"sale_category": {...},
"vat_rate_id": 1,
"vat_rate": {...},
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-06-10T12:54:52.000000Z",
"updated_at": "2022-06-27T21:42:07.000000Z",
"custom_price_mode": "quantity",
"custom_price_quantity_mode": 1,
"custom_price_quantity_month_length": null,
"custom_quantity_prices": [
{...},
{...}
],
"custom_type_prices": [
{...},
{...}
],
"default_picture_id": 1,
"default_picture": {...},
"not_for_sale": false,
"charge_category_id": 1,
"charge_category": {...},
"ean_code": null,
"unit_weight": "0.00",
"size_length": null,
"size_width": null,
"size_height": null,
"eco_tax_ht": "0.00",
"eco_tax_tva": "0.00",
"eco_tax_ttc": "0.00",
"unit_buy_price_ht": "50.00000",
"with_stock": true,
"stock_quantity": "9.00",
"stock_theoretical_quantity": "9.00",
"stock_minimum": 5,
"stock_maximum": 50,
"stock_alert": 10,
"variations_length": 3,
"variation_level1_id": 1,
"variation_level1": {...},
"variation_level2_id": 2,
"variation_level2": {...},
"variation_level3_id": 3,
"variation_level3": {...},
"variations": [
{...},
{...}
],
"providers": [
{...},
{...}
],
"providers_references": [
{...},
{...}
]
}
Attribute | Type | Description | ||
---|---|---|---|---|
id | integer | Unique identifier for the product | ||
reference | string | Unique reference of the product | ||
name | string | Name of the product. | ||
designation | string | Designation of the product | ||
unit_price_ht | number | Unit Price HT | ||
unit_price_tva | number | Unit Price TVA | ||
unit_price_ttc | number | Unit Price TTC | ||
default_quantity | number | Default quantity for sales | ||
unit_id | integer | The unit ID | ||
unit | object | A Unit object. Present only if requested |
||
cant_change_price | boolean | Prevent the modification of the sale price in sales form | ||
total_ht | number | Total HT | ||
total_tva | number | Total TVA | ||
total_ttc | number | Total TTC | ||
various_costs | number | Various costs | ||
total_costs | number | Total costs | ||
gross_margin_amount | number | Gross margin amount | ||
gross_margin_rate | number | Gross margin rate | ||
markup_rate | number | Markup rate | ||
sale_category_id | integer | The sale category ID | ||
sale_category | object | A Sale Category object. Present only if requested |
||
vat_rate_id | integer | The default Vat Rate ID | ||
vat_rate | object | A Vat Rate object. Present only if requested |
||
status | object | The status of the product | ||
status.active | boolean | If the product is active | ||
status.name | string | Status label | ||
created_at | string | The creation datetime | ||
updated_at | string | The last update datetime | ||
custom_price_mode | string | The custom prices mode. Can be :
|
||
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
||
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
||
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
||
custom_quantity_prices.* | array | |||
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price | ||
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price | ||
custom_quantity_prices.*.price | number | Unit Price HT | ||
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. |
||
custom_type_prices.* | array | |||
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
||
custom_type_prices.*.element | object | If custom_type_prices..type = 'type', a Customer Type object. If custom_type_prices..type = 'customer', a Customer object |
||
custom_type_prices.*.price | number | Unit Price HT | ||
default_picture_id | integer | The default picture ID | ||
default_picture | object | A File object. Present only if requested |
||
not_for_sale | boolean | If the product is not intended for sale | ||
charge_category_id | integer | The charge category ID | ||
charge_category | object | A Charge Category object. Present only if requested |
||
ean_code | string | The EAN code of the product | ||
unit_weight | string | The weight of the product | ||
size_length | number | The length of the product | ||
size_width | number | The width of the product | ||
size_height | number | The height of the product | ||
eco_tax_ht | number | Amount excluding VAT of the eco-contribution | ||
eco_tax_tva | number | VAT amount of the eco-contribution | ||
eco_tax_ttc | number | Amount including tax of the eco-contribution | ||
unit_buy_price_ht | number | Unit purchase price excluding VAT | ||
with_stock | boolean | If stock management is active on the product | ||
stock_quantity | number | The real stock quantity | ||
stock_theoretical_quantity | number | The theorical stock quantity | ||
stock_minimum | number | The minimum stock quantity for receive an alert | ||
stock_maximum | number | The maximum stock quantity for receive an alert | ||
stock_alert | number | The alert stock quantity for receive an alert | ||
variations_length | integer | The number of levels of variation that the product has. Minimum : 0 Maximum : 3 |
||
variation_level1_id | integer | The variation ID for the level 1 | ||
variation_level1 | object | A Variation object. Present only if requested & variations_length >= 1 |
||
variation_level2_id | integer | The variation ID for the level 2 | ||
variation_level2 | object | A Variation object for the level 2. Present only if requested & variations_length >= 2 |
||
variation_level3_id | integer | The variation ID for the level 3 | ||
variation_level3 | object | A Variation object for the level 3. Present only if requested & variations_length = 3 |
||
variations | array | An array of Product Variation object. Present only if requested |
||
providers | array | An array of Customer object. Present only if requested & variations_length > 0 |
||
providers_references | array | An array of Product Provider Reference object. Present only if requested & variations_length = 0 |
The Product Provider Reference object
The Product Provider Reference object
{
"id": 2,
"reference": "REF",
"buy_price_ht": "10.00000",
"various_costs": "1.00000",
"total_costs": "11.00000",
"customer_id": 1,
"customer": {...}
}
Attribute | Type | Description | ||
---|---|---|---|---|
id | integer | Unique identifier for the provider reference | ||
reference | string | Unique reference of the provider reference | ||
buy_price_ht | string | Unit purchase price excluding VAT. | ||
various_costs | string | Various costs | ||
total_costs | number | Total costs | ||
customer_id | number | The customer ID | ||
customer | number | A Customer object |
The Product Variation object
The Product Variation object
{
"id": 1,
"reference": "REF",
"ean_code": null,
"provider_reference": null,
"buy_price_ht": "10.00000",
"unit_price_ht": "20.00000",
"unit_price_tva": "4.00000",
"unit_price_ttc": "24.00000",
"stock_quantity": "2.00",
"stock_theoretical_quantity": "1.00",
"level1_id": 2,
"level2_id": 3,
"level3_id": null,
"created_at": "2022-07-07T23:26:56.000000Z",
"updated_at": "2022-07-07T23:26:56.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the product variation |
reference | string | Variation reference |
ean_code | string | Variation ean code |
provider_reference | string | Variation provider reference |
buy_price_ht | number | Variation unit buy price |
unit_price_ht | number | Variation Unit sale price excluding VAT |
unit_price_ttc | number | Variation Unit selling price including VAT |
stock_quantity | number | Variation real stock quantity |
stock_theoretical_quantity | number | Variation theorical stock quantity |
level1_id | integer | Variation ID for Level 1 |
level2_id | integer | Variation ID for Level 2 |
level3_id | integer | Variation ID for Level 3 |
Get All products
curl "/catalog/product" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Product object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all catalog products.
HTTP Request
GET /catalog/product
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , name , unit_price_ht , unit_price_tva , unit_price_ttc , default_quantity , total_ht , total_tva , total_ttc , various_costs , total_costs , gross_margin_amount , gross_margin_rate , markup_rate , sale_category.label , vat_rate.rate , unit.label , not_for_sale , charge_category.label , ean_code , unit_buy_price_ht , with_stock , stock_quantity , stock_theoretical_quantity , variations_length , status.label |
search | Make a global search. Search in : reference , name , unit_price_ht , unit_price_tva , unit_price_ttc , default_quantity , total_ht , total_tva , total_ttc , various_costs , total_costs , gross_margin_amount , gross_margin_rate , markup_rate , sale_category.label , vat_rate.rate , unit.label , not_for_sale , charge_category.label , ean_code , unit_buy_price_ht , with_stock , stock_quantity , variations_length |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : reference (string) , name (string) , sale_category (integer) , status (integer) , charge_category (integer) , not_for_sale (boolean) , ean (string) , with_stock (boolean) , has_variations (boolean) , providers (integer) |
|
include | Related data to add to the answer Availables datas : sale_category , vat_rate , unit , charge_category , custom_quantity_prices , custom_type_prices , default_picture , providers_references , variation_levels , variations , custom_prices |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a product
curl "/catalog/product" \
-X POST \
-H "" \
-d "name=Product&reference=REF1"
The above command returns JSON structured like this:
{
"id": 1,
...
// A Product object
}
This endpoint create a product.
HTTP Request
POST /catalog/product
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
reference | required | string | Unique reference of the product |
name | required | string | Name of the product. |
designation | string | Designation of the product | |
unit_price_ht | number | Unit Price HT | |
unit_price_ttc | number | Unit Price TTC. Not used if unit_price_ht is present. |
|
default_quantity | number | Default quantity for sales | |
unit | string | The unit name | |
cant_change_price | boolean | Prevent the modification of the sale price in sales form | |
various_costs | number | Various costs | |
sale_category | string | The sale category name | |
vat_rate | integer | The default Vat Rate ID | |
status | boolean | If the product is active | |
custom_price_mode | string | The custom prices mode. Can be :
|
|
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
|
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
|
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
|
custom_quantity_prices.* | array | ||
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price | |
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price | |
custom_quantity_prices.*.price | number | Unit Price HT | |
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Set the custom prices. |
|
custom_type_prices.* | array | ||
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
custom_type_prices.*.price | number | Unit Price HT | |
add_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Add a new custom price. |
|
add_custom_type_prices.* | array | ||
add_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
add_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
add_custom_type_prices.*.price | number | Unit Price HT | |
remove_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Remove a custom price |
|
remove_custom_type_prices.* | array | ||
remove_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
remove_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
not_for_sale | boolean | If the product is not intended for sale | |
charge_category | string | The charge category name | |
ean_code | string | The EAN code of the product | |
unit_weight | string | The weight of the product | |
size_length | number | The length of the product | |
size_width | number | The width of the product | |
size_height | number | The height of the product | |
eco_tax_ht | number | Amount excluding VAT of the eco-contribution | |
eco_tax_ttc | number | Amount including tax of the eco-contribution. Not used if eco_tax_ht is present |
|
unit_buy_price_ht | number | Unit purchase price excluding VAT. Not used if the product has providers references |
|
with_stock | boolean | If stock management is active on the product | |
stock_quantity | number | The real stock quantity. Not used if variations_length > 0 |
|
stock_theoretical_quantity | number | The theorical stock quantity. Not used if variations_length > 0 |
|
stock_minimum | number | The minimum stock quantity for receive an alert | |
stock_maximum | number | The maximum stock quantity for receive an alert | |
stock_alert | number | The alert stock quantity for receive an alert | |
variations_length | integer | The number of levels of variation that the product has. Minimum : 0 Maximum : 3 |
|
variation_level1 | string | The variation name for the level 1 | |
variation_level2 | string | The variation name for the level 2 | |
variation_level3 | string | The variation name for the level 3 | |
variations | array | Set the product variations | |
variations.* | array | ||
variations.*.level1 | array | Level 1 name | |
variations.*.level2 | array | Level 2 name | |
variations.*.level3 | array | Level 3 name | |
variations.*.reference | array | Variation reference | |
variations.*.ean_code | array | Variation ean code | |
variations.*.provider_reference | array | Variation provider reference | |
variations.*.buy_price_ht | array | Variation unit buy price | |
variations.*.unit_price_ht | array | Variation Unit sale price excluding VAT | |
variations.*.unit_price_ttc | array | Variation Unit selling price including VAT | |
variations.*.stock_quantity | array | Variation real stock quantity | |
variations.*.stock_theoretical_quantity | array | Variation theorical stock quantity | |
add_variations | array | Add new product variations | |
add_variations.* | array | ||
add_variations.*.level1 | array | Level 1 name | |
add_variations.*.level2 | array | Level 2 name | |
add_variations.*.level3 | array | Level 3 name | |
add_variations.*.reference | array | Variation reference | |
add_variations.*.ean_code | array | Variation ean code | |
add_variations.*.provider_reference | array | Variation provider reference | |
add_variations.*.buy_price_ht | array | Variation unit buy price | |
add_variations.*.unit_price_ht | array | Variation Unit sale price excluding VAT | |
add_variations.*.unit_price_ttc | array | Variation Unit selling price including VAT | |
add_variations.*.stock_quantity | array | Variation real stock quantity | |
add_variations.*.stock_theoretical_quantity | array | Variation theorical stock quantity | |
remove_variations | array | Remove product variations | |
remove_variations.* | array | ||
remove_variations.*.level1 | array | Level 1 name | |
remove_variations.*.level2 | array | Level 2 name | |
remove_variations.*.level3 | array | Level 3 name | |
providers | array | Set the providers who sale the product. Only if variations_length > 0 |
|
providers.* | integer | Customer ID | |
providers_references | array | Set the providers references. Only if variations_length = 0 |
|
providers_references.* | array | ||
providers_references.*.customer | integer | Customer ID | |
providers_references.*.reference | string | Provider reference | |
providers_references.*.buy_price_ht | number | Unit buy price | |
providers_references.*.various_costs | number | Various costs | |
add_providers_references | array | Add new providers references. Only if variations_length = 0 |
|
add_providers_references.* | array | ||
add_providers_references.*.customer | integer | Customer ID | |
add_providers_references.*.reference | string | Provider reference | |
add_providers_references.*.buy_price_ht | number | Unit buy price | |
add_providers_references.*.various_costs | number | Various costs | |
remove_providers_references | array | Remove providers references. Only if variations_length = 0 |
|
remove_providers_references.* | array | ||
remove_providers_references.*.customer | integer | Customer ID | |
remove_providers_references.*.reference | string | Provider reference |
Retrieve a product
curl "/catalog/product/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Product object
}
This endpoint retrieves a specific product.
HTTP Request
GET /catalog/product/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the product |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : sale_category , vat_rate , unit , charge_category , custom_quantity_prices , custom_type_prices , default_picture , providers_references , variation_levels , variations , custom_prices |
Update a Product
curl "/catalog/product/1" \
-X PUT \
-H "" \
-d "name=Product"
The above command returns JSON structured like this:
{
"id": 1,
...
// A Product object
}
This endpoint update a specific product.
HTTP Request
PUT /catalog/product/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the product to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
reference | string | Unique reference of the product |
name | string | Name of the product. |
designation | string | Designation of the product |
unit_price_ht | number | Unit Price HT |
unit_price_ttc | number | Unit Price TTC. Not used if unit_price_ht is present. |
default_quantity | number | Default quantity for sales |
unit | string | The unit name |
cant_change_price | boolean | Prevent the modification of the sale price in sales form |
various_costs | number | Various costs |
sale_category | string | The sale category name |
vat_rate | integer | The default Vat Rate ID |
status | boolean | If the product is active |
custom_price_mode | string | The custom prices mode. Can be :
|
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
custom_quantity_prices.* | array | |
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price |
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price |
custom_quantity_prices.*.price | number | Unit Price HT |
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Set the custom prices. |
custom_type_prices.* | array | |
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
custom_type_prices.*.price | number | Unit Price HT |
add_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Add a new custom price. |
add_custom_type_prices.* | array | |
add_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
add_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
add_custom_type_prices.*.price | number | Unit Price HT |
remove_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Remove a custom price |
remove_custom_type_prices.* | array | |
remove_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
remove_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
not_for_sale | boolean | If the product is not intended for sale |
charge_category | string | The charge category name |
ean_code | string | The EAN code of the product |
unit_weight | string | The weight of the product |
size_length | number | The length of the product |
size_width | number | The width of the product |
size_height | number | The height of the product |
eco_tax_ht | number | Amount excluding VAT of the eco-contribution |
eco_tax_ttc | number | Amount including tax of the eco-contribution. Not used if eco_tax_ht is present |
unit_buy_price_ht | number | Unit purchase price excluding VAT. Not used if the product has providers references |
with_stock | boolean | If stock management is active on the product |
stock_quantity | number | The real stock quantity. Not used if variations_length > 0 |
stock_theoretical_quantity | number | The theorical stock quantity. Not used if variations_length > 0 |
stock_minimum | number | The minimum stock quantity for receive an alert |
stock_maximum | number | The maximum stock quantity for receive an alert |
stock_alert | number | The alert stock quantity for receive an alert |
variations_length | integer | The number of levels of variation that the product has. Minimum : 0 Maximum : 3 |
variation_level1 | string | The variation name for the level 1 |
variation_level2 | string | The variation name for the level 2 |
variation_level3 | string | The variation name for the level 3 |
variations | array | Set the product variations |
variations.* | array | |
variations.*.level1 | string | Level 1 name |
variations.*.level2 | string | Level 2 name |
variations.*.level3 | string | Level 3 name |
variations.*.reference | string | Variation reference |
variations.*.ean_code | string | Variation ean code |
variations.*.provider_reference | string | Variation provider reference |
variations.*.buy_price_ht | number | Variation unit buy price |
variations.*.unit_price_ht | number | Variation Unit sale price excluding VAT |
variations.*.unit_price_ttc | number | Variation Unit selling price including VAT |
variations.*.stock_quantity | number | Variation real stock quantity |
variations.*.stock_theoretical_quantity | number | Variation theorical stock quantity |
add_variations | array | Add new product variations |
add_variations.* | array | |
add_variations.*.level1 | string | Level 1 name |
add_variations.*.level2 | string | Level 2 name |
add_variations.*.level3 | string | Level 3 name |
add_variations.*.reference | string | Variation reference |
add_variations.*.ean_code | string | Variation ean code |
add_variations.*.provider_reference | string | Variation provider reference |
add_variations.*.buy_price_ht | number | Variation unit buy price |
add_variations.*.unit_price_ht | number | Variation Unit sale price excluding VAT |
add_variations.*.unit_price_ttc | number | Variation Unit selling price including VAT |
add_variations.*.stock_quantity | number | Variation real stock quantity |
add_variations.*.stock_theoretical_quantity | number | Variation theorical stock quantity |
remove_variations | array | Remove product variations |
remove_variations.* | array | |
remove_variations.*.level1 | string | Level 1 name |
remove_variations.*.level2 | string | Level 2 name |
remove_variations.*.level3 | string | Level 3 name |
providers | array | Set the providers who sale the product. Only if variations_length > 0 |
providers.* | integer | Customer ID |
providers_references | array | Set the providers references. Only if variations_length = 0 |
providers_references.* | array | |
providers_references.*.customer | integer | Customer ID |
providers_references.*.reference | string | Provider reference |
providers_references.*.buy_price_ht | number | Unit buy price |
providers_references.*.various_costs | number | Various costs |
add_providers_references | array | Add new providers references. Only if variations_length = 0 |
add_providers_references.* | array | |
add_providers_references.*.customer | integer | Customer ID |
add_providers_references.*.reference | string | Provider reference |
add_providers_references.*.buy_price_ht | number | Unit buy price |
add_providers_references.*.various_costs | number | Various costs |
remove_providers_references | array | Remove providers references. Only if variations_length = 0 |
remove_providers_references.* | array | |
remove_providers_references.*.customer | integer | Customer ID |
remove_providers_references.*.reference | string | Provider reference |
Delete a Product
curl "/catalog/product/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific product.
HTTP Request
DELETE /catalog/product/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the product to delete |
Provider commands
The Provider Command object
The Provider Command object
{
"id": 1,
"date": "2022-06-27",
"reference": "CMD00001",
"title": null,
"provider_id": 2,
"provider": {...},
"contact_id": 1,
"contact": {...},
"road1": null,
"road2": null,
"road3": null,
"postal_code": null,
"town": null,
"country_id": 67,
"country": {...},
"comments": null,
"status": 0,
"status_label": "Brouillon",
"options": {
"contact": true,
"reference_column": true,
"units": false,
"not_show_price": false
},
"currency_id": 51,
"currency": {...},
"pdf_model_id": 4,
"pdf_model": {...},
"contents": [
{...},
{...}
],
"vatrates": [
{
"rate": 20,
"ht": 10,
"tva": 2,
"ttc": 12
}
],
"total_ht": "10.00",
"total_tva": "2.00",
"total_ttc": "12.00",
"created_at": "2022-06-27T21:41:45.000000Z",
"updated_at": "2022-06-27T21:41:45.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the command |
date | string | Date of the command |
reference | string | Unique reference of the command |
title | string | Title of the command. |
provider_id | integer | Customer ID |
provider | object | A Customer object. Present only if requested |
contact_id | integer | Contact ID |
contact | object | A Contact object. Present only if requested |
road1 | string | Delivery address - Road 1 |
road2 | string | Delivery address - Road 2 |
road3 | string | Delivery address - Road 3 |
postal_code | string | Delivery address - Postal code |
town | string | Delivery address - Town |
country_id | integer | Delivery address - Country ID |
country | object | Delivery address - Country. A Country object. Present only if requested |
comments | string | Comments |
status | integer | Status of the command. Can be :
|
status_label | string | The label of the status |
options | object | Pdf option |
options.contact | boolean | If the contact must be displayed on the PDF |
options.reference_column | boolean | If the reference column must be displayed on the PDF |
options.units | boolean | If the units must be displayed on the PDF |
options.not_show_price | boolean | If prices should not be displayed |
currency_id | integer | Currency ID |
currency | object | A Currency object. Present only if requested |
pdf_model_id | integer | Pdf Model ID |
pdf_model | object | A Pdf Model object. Present only if requested |
contents | array | An array of Provider Command Content object. Present only if requested |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
total_ht | number | Total of the order excluding VAT |
total_tva | number | VAT order total |
total_ttc | number | Total of the order including tax |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Provider Command Content object
The Provider Command Content object
{
"id": 1,
"reference": null,
"designation": "dede",
"unit_price_ht": "10.00000",
"unit_price_tva": "2.00000",
"unit_price_ttc": "12.00000",
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"vat_rate_id": 1,
"vat_rate": {...},
"total_ht": "10.00",
"total_tva": "2.00",
"total_ttc": "12.00",
"product_id": 1,
"product": {...},
"variation_id": null,
"variation": null,
"quantity_to_deliver": "1.00000",
"delivered_quantity": "0.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the command content |
reference | string | Reference |
designation | string | Designation. |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
quantity | number | Quantity of the command content |
unit_id | integer | Unit ID |
unit | object | A Unit object |
vat_rate_id | integer | Vat Rate ID |
vat_rate | object | A Vat Rate object |
total_ht | number | Total of the command content excluding VAT |
total_tva | number | VAT command content total |
total_ttc | number | Total of the command content including tax |
product_id | integer | Product ID |
product | object | A Product object |
variation_id | integer | Product Variation ID |
variation | object | A Product Variation object |
quantity_to_deliver | number | Quantity to deliver |
delivered_quantity | number | Delivered quantity |
Get All Provider Commands
curl "/catalog/command" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"date": "2022-06-27",
"reference": "CMD00001",
"title": null,
"provider_id": 2,
"provider": {...},
"contact_id": 1,
"contact": {...},
"road1": null,
"road2": null,
"road3": null,
"postal_code": null,
"town": null,
"country_id": 67,
"country": {...},
"comments": null,
"status": 0,
"status_label": "Brouillon",
"options": {
"contact": true,
"reference_column": true,
"units": false,
"not_show_price": false
},
"currency_id": 51,
"currency": {...},
"pdf_model_id": 4,
"pdf_model": {...},
"contents": [
{...},
{...}
],
"vatrates": [
{
"rate": 20,
"ht": 10,
"tva": 2,
"ttc": 12
}
],
"total_ht": "10.00",
"total_tva": "2.00",
"total_ttc": "12.00",
"created_at": "2022-06-27T21:41:45.000000Z",
"updated_at": "2022-06-27T21:41:45.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all provider commands.
HTTP Request
GET /catalog/command
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , date , title , road1 , road2 , road3 , postal_code , town , comments , total_ht , total_tva , total_ttc , provider.name , contact.fullname , status_label , country.name , created_at , updated_at |
search | Make a global search. Search in : reference , date , title , total_ht , total_tva , total_ttc , town , postal_code , customer.company_name , contact.lastname |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : reference (string) , date_since (date) , date_until (date) , customer (integer) , status (integer) |
|
include | Related data to add to the answer Availables datas : provider , contact , country , pdf_model , currency , vatrates , contents |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a provider command
curl "/catalog/command" \
-X POST \
-H "" \
-d "date=2022-07-01&..."
The above command returns JSON structured like this:
{
"id": 1,
"date": "2022-06-27",
"reference": "CMD00001",
"title": null,
"provider_id": 2,
"provider": {...},
"contact_id": 1,
"contact": {...},
"road1": null,
"road2": null,
"road3": null,
"postal_code": null,
"town": null,
"country_id": 67,
"country": {...},
"comments": null,
"status": 0,
"status_label": "Brouillon",
"options": {
"contact": true,
"reference_column": true,
"units": false,
"not_show_price": false
},
"currency_id": 51,
"currency": {...},
"pdf_model_id": 4,
"pdf_model": {...},
"contents": [
{...},
{...}
],
"vatrates": [
{
"rate": 20,
"ht": 10,
"tva": 2,
"ttc": 12
}
],
"total_ht": "10.00",
"total_tva": "2.00",
"total_ttc": "12.00",
"created_at": "2022-06-27T21:41:45.000000Z",
"updated_at": "2022-06-27T21:41:45.000000Z"
}
This endpoint create a provider command.
HTTP Request
POST /catalog/command
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the command |
title | string | Title of the command. | |
customer | required | integer | Customer ID |
contact | integer | Contact ID | |
road1 | string | Delivery address - Road 1 | |
road2 | string | Delivery address - Road 2 | |
road3 | string | Delivery address - Road 3 | |
postal_code | string | Delivery address - Postal code | |
town | string | Delivery address - Town | |
country | string | Delivery address - Country code | |
comments | string | Comments | |
status | integer | Status of the command. Can be :
|
|
options | object | Pdf option | |
options.contact | boolean | If the contact must be displayed on the PDF | |
options.reference_column | boolean | If the reference column must be displayed on the PDF | |
options.units | boolean | If the units must be displayed on the PDF | |
options.not_show_price | boolean | If prices should not be displayed | |
currency | integer | Currency ID | |
pdf_model | required | integer | Pdf Model ID |
contents | required | array | The command contents |
contents.* | array | ||
contents.*.reference | string | Reference | |
contents.*.designation | required | string | Designation |
contents.*.unit_price_ht | required | number | Unit Price HT |
contents.*.quantity | required | number | Quantity of the command content |
contents.*.vat_rate | required | integer | Vat Rate ID |
contents.*.product | integer | Product ID | |
contents.*.variation | integer | Variation ID | |
contents.*.delivered_quantity | number | Delivered Quantity |
Retrieve a provider command
curl "/catalog/command/4" \
-H ""
The above command returns JSON structured like this:
{
"id": 4,
...
// A Provider Command Object
}
This endpoint retrieves a specific provider command.
HTTP Request
GET /catalog/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the provider command |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : provider , contact , country , pdf_model , currency , vatrates , contents |
Update a Provider Command
curl "/catalog/command/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
"date": "2022-06-27",
"reference": "CMD00001",
"title": null,
"provider_id": 2,
"provider": {...},
"contact_id": 1,
"contact": {...},
"road1": null,
"road2": null,
"road3": null,
"postal_code": null,
"town": null,
"country_id": 67,
"country": {...},
"comments": null,
"status": 0,
"status_label": "Brouillon",
"options": {
"contact": true,
"reference_column": true,
"units": false,
"not_show_price": false
},
"currency_id": 51,
"currency": {...},
"pdf_model_id": 4,
"pdf_model": {...},
"contents": [
{...},
{...}
],
"vatrates": [
{
"rate": 20,
"ht": 10,
"tva": 2,
"ttc": 12
}
],
"total_ht": "10.00",
"total_tva": "2.00",
"total_ttc": "12.00",
"created_at": "2022-06-27T21:41:45.000000Z",
"updated_at": "2022-06-27T21:41:45.000000Z"
}
This endpoint update a specific provider command.
HTTP Request
PUT /catalog/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the command |
title | string | Title of the command. | |
customer | required | integer | Customer ID |
contact | integer | Contact ID | |
road1 | string | Delivery address - Road 1 | |
road2 | string | Delivery address - Road 2 | |
road3 | string | Delivery address - Road 3 | |
postal_code | string | Delivery address - Postal code | |
town | string | Delivery address - Town | |
country | string | Delivery address - Country code | |
comments | string | Comments | |
status | integer | Status of the command. Can be :
|
|
options | object | Pdf option | |
options.contact | boolean | If the contact must be displayed on the PDF | |
options.reference_column | boolean | If the reference column must be displayed on the PDF | |
options.units | boolean | If the units must be displayed on the PDF | |
options.not_show_price | boolean | If prices should not be displayed | |
currency | integer | Currency ID | |
pdf_model | required | integer | Pdf Model ID |
contents | required | array | The command contents |
contents.* | array | ||
contents.*.id | integer | Id of the content for update an existing provider content | |
contents.*.reference | string | Reference | |
contents.*.designation | required | string | Designation |
contents.*.unit_price_ht | required | number | Unit Price HT |
contents.*.quantity | required | number | Quantity of the command content |
contents.*.vat_rate | required | integer | Vat Rate ID |
contents.*.product | integer | Product ID | |
contents.*.variation | integer | Variation ID | |
contents.*.delivered_quantity | number | Delivered Quantity |
Delete a Provider Command
curl "/catalog/command/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific command.
HTTP Request
DELETE /catalog/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command to delete |
Delivery Receipt of Provider Command
curl "/catalog/command/1/delivery" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Provider Command Object
}
This endpoint provider to enter the products delivered on a provider command.
HTTP Request
PUT /catalog/command/<ID>/delivery
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
contents | required | array | The command contents |
contents.* | array | ||
contents.*.id | required | integer | Id of the provider command content |
contents.*.delivered_quantity | required | number | Delivered Quantity |
Services
The Service object
The Service object
{
"id": 1,
"reference": "REF",
"name": "Service",
"designation": "Service designation",
"unit_price_ht": "30.00000",
"unit_price_tva": "6.00000",
"unit_price_ttc": "36.00000",
"default_quantity": "1.00000",
"unit_id": null,
"unit": null,
"cant_change_price": false,
"total_ht": "30.00",
"total_tva": "6.00",
"total_ttc": "36.00",
"various_costs": "5.00000",
"total_costs": "20.00000",
"gross_margin_amount": "10.00",
"gross_margin_rate": "50.00",
"markup_rate": "33.33",
"sale_category_id": null,
"sale_category": null,
"vat_rate_id": 1,
"vat_rate": {
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-07-08T10:35:37.000000Z",
"updated_at": "2022-07-08T10:35:37.000000Z",
"custom_price_mode": "quantity",
"custom_price_quantity_mode": 5,
"custom_price_quantity_month_length": null,
"custom_quantity_prices": [],
"custom_type_prices": [],
"default_picture_id": null,
"default_picture": null,
"hourly_person_cost": "15.00",
"products_costs": "0.00",
"workforce_costs": "15.00",
"number_people_needed": 1,
"duration": 1,
"duration_type": "hour",
"duration_mn": 60,
"duration_hour": 1,
"allowed_all_technicians": true,
"technicians": [],
"work_description": null,
"products_stock_management": true,
"products": []
}
Attribute | Type | Description | ||
---|---|---|---|---|
id | integer | Unique identifier for the service | ||
reference | string | Unique reference of the service | ||
name | string | Name of the service. | ||
designation | string | Designation of the service | ||
unit_price_ht | number | Unit Price HT | ||
unit_price_tva | number | Unit Price TVA | ||
unit_price_ttc | number | Unit Price TTC | ||
default_quantity | number | Default quantity for sales | ||
unit_id | integer | The unit ID | ||
unit | object | A Unit object. Present only if requested |
||
cant_change_price | boolean | Prevent the modification of the sale price in sales form | ||
total_ht | number | Total HT | ||
total_tva | number | Total TVA | ||
total_ttc | number | Total TTC | ||
various_costs | number | Various costs | ||
total_costs | number | Total costs | ||
gross_margin_amount | number | Gross margin amount | ||
gross_margin_rate | number | Gross margin rate | ||
markup_rate | number | Markup rate | ||
sale_category_id | integer | The sale category ID | ||
sale_category | object | A Sale Category object. Present only if requested |
||
vat_rate_id | integer | The default Vat Rate ID | ||
vat_rate | object | A Vat Rate object. Present only if requested |
||
status | object | The status of the service | ||
status.active | boolean | If the service is active | ||
status.name | string | Status label | ||
created_at | string | The creation datetime | ||
updated_at | string | The last update datetime | ||
custom_price_mode | string | The custom prices mode. Can be :
|
||
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
||
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
||
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
||
custom_quantity_prices.* | array | |||
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price | ||
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price | ||
custom_quantity_prices.*.price | number | Unit Price HT | ||
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. |
||
custom_type_prices.* | array | |||
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
||
custom_type_prices.*.element | object | If custom_type_prices..type = 'type', a Customer Type object. If custom_type_prices..type = 'customer', a Customer object |
||
custom_type_prices.*.price | number | Unit Price HT | ||
default_picture_id | integer | The default picture ID | ||
default_picture | object | A File object. Present only if requested |
||
hourly_person_cost | number | The hourly costs of a technician for the performance of the service | ||
products_costs | number | The product costs for the performance of the service | ||
workforce_costs | number | The workforce costs for the performance of the service | ||
number_people_needed | integer | The number of technicians needed to perform the service | ||
duration | number | Duration of the service | ||
duration_type | string | Type of duration. Can be : hour , day |
||
duration_mn | number | Duration of the service in minutes | ||
duration_hour | number | Duration of the servicen hours | ||
allowed_all_technicians | boolean | If all the technicians can carry out the service | ||
technicians | array | Technicians who can perform the service. If allowed_all_technicians = false. An array of Team User object. Present only if requested |
||
work_description | string | Description for the technicians | ||
products_stock_management | boolean | Whether products should be deducted from stock automatically | ||
products | array | List of required products. Present only if requested |
||
products.* | array | |||
products.*.product | object | A Product object | ||
products.*.unit_price_ht | number | The unit price HT of the product | ||
products.*.quantity | number | The needed quantity of the product | ||
products.*.total_ht | number | Total HT |
Get All Services
curl "/catalog/service" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Service object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all catalog services.
HTTP Request
GET /catalog/service
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , name , unit_price_ht , unit_price_tva , unit_price_ttc , default_quantity , total_ht , total_tva , total_ttc , various_costs , total_costs , gross_margin_amount , gross_margin_rate , markup_rate , sale_category.label , vat_rate.rate , unit.label , hourly_person_cost , products_costs , workforce_costs , number_people_needed , created_at , updated_at , status.name |
search | Make a global search. Search in : name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : reference (string) , name (string) , sale_category (integer) , status (integer) |
|
include | Related data to add to the answer Availables datas : sale_category , vat_rate , unit , technicians , products , default_picture , custom_quantity_prices , custom_type_prices , custom_prices |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a service
curl "/catalog/service" \
-X POST \
-H "" \
-d "name=Service&reference=REF1"
The above command returns JSON structured like this:
{
"id": 1,
...
// A Service object
}
This endpoint create a service.
HTTP Request
POST /catalog/service
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
reference | required | string | Unique reference of the service |
name | required | string | Name of the service. |
designation | string | Designation of the service | |
unit_price_ht | number | Unit Price HT | |
unit_price_ttc | number | Unit Price TTC. Not used if unit_price_ht is present. |
|
default_quantity | number | Default quantity for sales | |
unit | string | The unit name | |
cant_change_price | boolean | Prevent the modification of the sale price in sales form | |
various_costs | number | Various costs | |
sale_category | string | The sale category name | |
vat_rate | integer | The default Vat Rate ID | |
status | boolean | If the product is active | |
custom_price_mode | string | The custom prices mode. Can be :
|
|
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
|
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
|
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
|
custom_quantity_prices.* | array | ||
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price | |
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price | |
custom_quantity_prices.*.price | number | Unit Price HT | |
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Set the custom prices. |
|
custom_type_prices.* | array | ||
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
custom_type_prices.*.price | number | Unit Price HT | |
add_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Add a new custom price. |
|
add_custom_type_prices.* | array | ||
add_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
add_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
add_custom_type_prices.*.price | number | Unit Price HT | |
remove_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Remove a custom price |
|
remove_custom_type_prices.* | array | ||
remove_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
|
remove_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
|
not_for_sale | boolean | If the product is not intended for sale | |
hourly_person_cost | number | The hourly costs of a technician for the performance of the service | |
products_costs | number | The product costs for the performance of the service | |
workforce_costs | number | The workforce costs for the performance of the service | |
number_people_needed | integer | The number of technicians needed to perform the service | |
duration | number | Duration of the service | |
duration_type | string | Type of duration. Can be : hour , day |
|
allowed_all_technicians | boolean | If all the technicians can carry out the service | |
technicians | array | Set the technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
|
add_technicians | array | Add technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
|
remove_technicians | array | Remove technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
|
work_description | string | Description for the technicians | |
products_stock_management | boolean | Whether products should be deducted from stock automatically | |
products | array | Set the required products. Present only if requested |
|
products.* | array | ||
products.*.product | integer | A Product ID | |
products.*.quantity | number | The needed quantity of the product | |
add_products | array | Add required products. Present only if requested |
|
add_products.* | array | ||
add_products.*.product | integer | A Product ID | |
add_products.*.quantity | number | The needed quantity of the product | |
remove_products | array | Remove required products. Present only if requested |
|
remove_products.* | array | ||
remove_products.*.product | integer | A Product ID |
Retrieve a Service
curl "/catalog/service/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Service object
}
This endpoint retrieves a specific service.
HTTP Request
GET /catalog/service/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the service |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : sale_category , vat_rate , unit , technicians , products , default_picture , custom_quantity_prices , custom_type_prices , custom_prices |
Update a Service
curl "/catalog/service/1" \
-X PUT \
-H "" \
-d "name=Service"
The above command returns JSON structured like this:
{
"id": 1,
...
// A Service object
}
This endpoint update a specific service.
HTTP Request
PUT /catalog/service/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the service to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
reference | string | Unique reference of the service |
name | string | Name of the service. |
designation | string | Designation of the service |
unit_price_ht | number | Unit Price HT |
unit_price_ttc | number | Unit Price TTC. Not used if unit_price_ht is present. |
default_quantity | number | Default quantity for sales |
unit | string | The unit name |
cant_change_price | boolean | Prevent the modification of the sale price in sales form |
various_costs | number | Various costs |
sale_category | string | The sale category name |
vat_rate | integer | The default Vat Rate ID |
status | boolean | If the product is active |
custom_price_mode | string | The custom prices mode. Can be :
|
custom_price_quantity_mode | integer | If custom_price_mode = quantity , The method of calculating the quantities.Can be :
|
custom_price_quantity_month_length | integer | If custom_price_quantity_mode = 4 , the number of month for calculating the quantities |
custom_quantity_prices | array | When custom_price_mode = quantity , the custom prices. |
custom_quantity_prices.* | array | |
custom_quantity_prices.*.minimum | integer | Minimum quantity to apply the price |
custom_quantity_prices.*.maximum | integer | Maximum quantity to apply the price |
custom_quantity_prices.*.price | number | Unit Price HT |
custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Set the custom prices. |
custom_type_prices.* | array | |
custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
custom_type_prices.*.price | number | Unit Price HT |
add_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Add a new custom price. |
add_custom_type_prices.* | array | |
add_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
add_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
add_custom_type_prices.*.price | number | Unit Price HT |
remove_custom_type_prices | array | When custom_price_mode != quantity , the custom prices. Remove a custom price |
remove_custom_type_prices.* | array | |
remove_custom_type_prices.*.type | string | The type of item to consider for applying the custom price. Can be :
|
remove_custom_type_prices.*.element | integer | If custom_type_prices..type = 'type', a Customer Type ID. If custom_type_prices..type = 'customer', a Customer ID |
not_for_sale | boolean | If the product is not intended for sale |
hourly_person_cost | number | The hourly costs of a technician for the performance of the service |
products_costs | number | The product costs for the performance of the service |
workforce_costs | number | The workforce costs for the performance of the service |
number_people_needed | integer | The number of technicians needed to perform the service |
duration | number | Duration of the service |
duration_type | string | Type of duration. Can be : hour , day |
allowed_all_technicians | boolean | If all the technicians can carry out the service |
technicians | array | Set the technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
add_technicians | array | Add technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
remove_technicians | array | Remove technicians who can perform the service. If allowed_all_technicians = false. An array of Team User Id |
work_description | string | Description for the technicians |
products_stock_management | boolean | Whether products should be deducted from stock automatically |
products | array | Set the required products. Present only if requested |
products.* | array | |
products.*.product | integer | A Product ID |
products.*.quantity | number | The needed quantity of the product |
add_products | array | Add required products. Present only if requested |
add_products.* | array | |
add_products.*.product | integer | A Product ID |
add_products.*.quantity | number | The needed quantity of the product |
remove_products | array | Remove required products. Present only if requested |
remove_products.* | array | |
remove_products.*.product | integer | A Product ID |
Delete a Service
curl "/catalog/service/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific service.
HTTP Request
DELETE /catalog/service/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the service to delete |
Charges
Charges
The Charge object
The Charge object
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the charge |
type | integer | Type of charge : 1: Charge 2: Credit |
date | string | Date of charge |
reference | string | Reference of the charge |
title | string | Title of the charge |
customer_id | integer | The provider ID |
customer | object | The provider object. A Customer object. Present only if requested |
contact_id | integer | The contact ID |
contact | object | The contact object. A Contact object. Present only if requested |
invoice_reference | string | The provider invoice reference |
currency_id | integer | The currency ID |
currency | object | The currency object. A Currency object. Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
total_ht | number | The total excluding VAT of the charge |
total_tva | number | The VAT total of the charge |
total_ttc | number | The total including VAT of the charge |
to_paid | number | The amount to be paid |
already_paid | number | The amount already paid |
stay_to_pay | number | The amount remaining to be paid |
status | integer | The status of the charge. 1: Draft 2: To paid 3: Partially paid 4: Paid |
status_label | string | The label of the status |
contents | array | An array of Charge Content object |
credits | array | List of credits used to pay this charge Present only if type=1 and if requested An array of Charge credit use object |
uses | array | List of uses of credit. Present only if type=2 and if requested An array of Charge credit use object |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Charge Content object
The Charge Content object
{
"id": 23,
"designation": "Printer cartridge",
"charge_category_id": 12,
"charge_category": {...},
"unit_price_ht": 100,
"unit_price_tva": 20,
"unit_price_ttc": 120,
"quantity": 1,
"unit_id": 12,
"unit": {...},
"vat_rate_id": 12,
"vat_rate_value": 20,
"vat_rate": {...},
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"catalog": {...},
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the charge |
designation | integer | Designation of purchase |
charge_category_id | integer | The charge category ID |
charge_category | object | The charge category object. A Charge Category object. |
unit_price_ht | number | The unit price excluding VAT |
unit_price_tva | number | The VAT unit price amount |
unit_price_ttc | number | The unit price including VAT |
quantity | number | The quantity |
unit_id | integer | The unit ID |
unit | object | The unit object. A Unit object. |
vat_rate_id | integer | The vat rate ID |
vat_rate_value | number | The vat rate value |
vat_rate | object | The vat rate object. A Vat Rate object. |
total_ht | number | The total excluding VAT |
total_tva | number | The VAT total |
total_ttc | number | The total including VAT |
catalog | object | The linked catalog element. Present only if a catalog element is linked |
catalog.type | string | Type of linked element |
catalog.id | integer | ID of linked element |
catalog.element | object | The catalog element object. Can be : - A Product object - A Service object |
The Charge Credit Use object
The Charge Credit Use object
{
"amount": 50,
"charge_id": 12,
"charge": {...},
}
Attribute | Type | Description |
---|---|---|
amount | number | The amount |
charge_id | integer | The charge ID |
charge | object | The charge object. A Charge object. |
Get All Charges
curl "/charge" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all charges.
HTTP Request
GET /charge
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : date , reference , title , customer.name , contact.fullname , invoice_reference , total_ht , total_tva , total_ttc , already_paid , stay_to_pay , status , status_label |
search | Make a global search. Search in : date , reference , title , customer.company_name , customer.lastname , contact.lastname , invoice_reference , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : customer (int) , contact (int) , date_since (date) , date_until (date) , reference (string) , invoice_reference (string) , created_since (date) , created_until (date) , status (int) , exclude (int) , type (int) , with_currency (boolean) |
|
include | Related data to add to the answer Availables datas : customer , contact , currency , contents , credits |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a charge
curl "/charge" \
-X POST \
-H "" \
-d "date=2022-12-12&..."
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint create a charge.
HTTP Request
POST /charge
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
date | required | string | Date of the charge |
title | string | Title of the charge | |
customer | required | integer | The provider ID |
contact | integer | The contact ID | |
currency | integer | The currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
contents | required | array | The content of the charge |
contents.*.designation | required | string | Designation of purchase |
contents.*.custom_vat_rate | boolean | If you do not use a VAT rate and the VAT amount is entered manually | |
contents.*.unit_price_ht | required if unit_price_ttc is not present | number | The unit price excluding VAT |
contents.*.unit_price_tva | required if custom_vat_rate = true | number | The VAT unit price amount |
contents.*.unit_price_ttc | required if unit_price_ht is not present | number | The unit price including VAT |
contents.*.quantity | required | number | If access is read-only |
contents.*.unit | string | The unit | |
contents.*.vat_rate | required if custom_vat_rate = false | integer | The vat rate id |
contents.*.charge_category | integer | The charge category ID | |
contents.*.catalog | array | The linked catalog element | |
contents.*.catalog.type | required | string | Can be product or service |
contents.*.catalog.id | required | integer | The catalog element ID |
Retrieve a charge
curl "/charge/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific charge.
HTTP Request
GET /charge/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the charge to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : customer , contact , currency , contents , credits |
Update a charge
curl "/charge/1" \
-X PUT \
-H "" \
-d "date=2022-12-12"
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint update a specific charge.
HTTP Request
PUT /charge/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the charge to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
date | string | Date of the charge |
title | string | Title of the charge |
customer | integer | The provider ID |
contact | integer | The contact ID |
currency | integer | The currency ID |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
contents | array | The content of the charge |
contents.*.designation | string | Designation of purchase |
contents.*.custom_vat_rate | boolean | If you do not use a VAT rate and the VAT amount is entered manually |
contents.*.unit_price_ht | number | The unit price excluding VAT |
contents.*.unit_price_tva | number | The VAT unit price amount |
contents.*.unit_price_ttc | number | The unit price including VAT |
contents.*.quantity | number | If access is read-only |
contents.*.unit | string | The unit |
contents.*.vat_rate | integer | The vat rate id |
contents.*.charge_category | integer | The charge category ID |
contents.*.catalog | array | The linked catalog element |
contents.*.catalog.type | string | Can be product or service |
contents.*.catalog.id | integer | The catalog element ID |
Delete a Charge
curl "/charge/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific charge.
HTTP Request
DELETE /charge/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the charge to delete |
Use Credits to pay a Charge
curl "/charge/1/credit" \
-X POST \
-H "" \
-d "credits=..."
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"date": "2022-09-15",
"reference": "CHA0015",
"title": "Charge title",
"customer_id": 12,
"customer": {...},
"contact_id": 87,
"contact": {...},
"invoice_reference": "FA12-00145",
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"total_ht": 100,
"total_tva": 20,
"total_ttc": 120,
"to_paid": 120,
"already_paid": 0,
"stay_to_pay": 120,
"status": 1,
"status_label": "Draft",
"contents": [{...}],
"credits": [{...}],
"uses": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint pay a charge with credits.
HTTP Request
POST /charge/<ID>/credit
Datas Parameters
Parameter | Type | Description | ||
---|---|---|---|---|
credits | required if add_credits and remove_credits is not present | array | Liste of credits to use | |
credits.* | integer | Id of credit | ||
add_credits | array | Liste of credits to use | ||
add_credits.* | integer | Id of credit | ||
remove_credits | array | Liste of credits to use | ||
remove_credits.* | integer | Id of credit |
Payments
The Payment object
The Payment object
{
"id": 23,
"type": 1,
"customer_id": 12,
"customer": {...},
"date": "2022-09-15",
"reference": "465486743131",
"comments": null,
"amount": 120,
"amount_used": 120,
"stay_to_use": 0,
"ht": 100,
"tva": 20,
"ttc": 120,
"status": 3,
"status_label": "Used",
"payment_method_id": 87,
"payment_method": {...},
"account_id": 87,
"account": {...},
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"charges": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the payment |
type | integer | Type of payment : 1: Charge 2: Credit |
customer_id | integer | The provider ID |
customer | object | The provider object. A Customer object. Present only if requested |
date | string | Date of payment |
reference | string | Reference of the payment |
comments | string | Comments |
amount | number | Amount of the payment |
amount_used | number | Amount already assigned to charges |
stay_to_use | number | Amount remaining to be allocated |
status | integer | The status of the payment. 1: To use 2: Partially use 3: Used |
status_label | string | The label of the status |
payment_method_id | integer | The payment method ID |
payment_method | object | The payment method object. A Payment Method object. Present only if requested |
account_id | integer | The account ID |
account | object | The account object. A Bank Account object. Present only if requested |
currency_id | integer | The currency ID |
currency | object | The currency object. A Currency object. Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
charges | array | List of payment uses. Present only if requested |
charges.*.ht | number | The amount excluding VAT |
charges.*.tva | number | The VAT amount |
charges.*.ttc | number | The amount including VAT |
charges.*.charge_id | integer | The charge ID |
charges.*.charge | object | The charge object. A Charge object |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Payments
curl "/charge/payment" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"type": 1,
"customer_id": 12,
"customer": {...},
"date": "2022-09-15",
"reference": "465486743131",
"comments": null,
"amount": 120,
"amount_used": 120,
"stay_to_use": 0,
"ht": 100,
"tva": 20,
"ttc": 120,
"status": 3,
"status_label": "Used",
"payment_method_id": 87,
"payment_method": {...},
"account_id": 87,
"account": {...},
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"charges": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all payments.
HTTP Request
GET /charge/payment
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : date , reference , amount , amount_used , stay_to_use , ht , tva , ttc , payment_method.label , account.name , currency.code , type , customer.name |
search | Make a global search. Search in : reference , amount , payment_method.label , account.name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : customer (integer) , type (integer) , charge (integer) , charge_reference (string) , status (integer) , date_since (date) , date_until (date) , reference (string) , created_since (date) , created_until (date) |
|
include | Related data to add to the answer Availables datas : payment_method , account , currency , customer , charges |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a payment
curl "/charge/payment" \
-X POST \
-H "" \
-d "date=2022-12-12&..."
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"customer_id": 12,
"customer": {...},
"date": "2022-09-15",
"reference": "465486743131",
"comments": null,
"amount": 120,
"amount_used": 120,
"stay_to_use": 0,
"ht": 100,
"tva": 20,
"ttc": 120,
"status": 3,
"status_label": "Used",
"payment_method_id": 87,
"payment_method": {...},
"account_id": 87,
"account": {...},
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"charges": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint create a payment.
HTTP Request
POST /charge/payment
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
account | integer | The bank account ID | |
payment_method | required | integer | The payement method ID |
date | required | string | Date of the payment |
reference | string | The payment reference | |
amount | number | The payment amount | |
charges | required | array | The charge who use the payment |
charges.*.id | number | The charge ID | |
charges.*.amount | required | array | The amount to use |
comments | required | string | Comments |
currency | boolean | The currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
Retrieve a payment
curl "/charge/payment/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"customer_id": 12,
"customer": {...},
"date": "2022-09-15",
"reference": "465486743131",
"comments": null,
"amount": 120,
"amount_used": 120,
"stay_to_use": 0,
"ht": 100,
"tva": 20,
"ttc": 120,
"status": 3,
"status_label": "Used",
"payment_method_id": 87,
"payment_method": {...},
"account_id": 87,
"account": {...},
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"charges": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific payment.
HTTP Request
GET /charge/payment/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : payment_method , account , currency , customer , charges |
Update a payment
curl "/charge/payment/1" \
-X PUT \
-H "" \
-d "date=2022-12-12"
The above command returns JSON structured like this:
{
"id": 23,
"type": 1,
"customer_id": 12,
"customer": {...},
"date": "2022-09-15",
"reference": "465486743131",
"comments": null,
"amount": 120,
"amount_used": 120,
"stay_to_use": 0,
"ht": 100,
"tva": 20,
"ttc": 120,
"status": 3,
"status_label": "Used",
"payment_method_id": 87,
"payment_method": {...},
"account_id": 87,
"account": {...},
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": 1,
"charges": [{...}],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint update a specific payment.
HTTP Request
PUT /charge/payment/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
account | integer | The bank account ID |
payment_method | integer | The payement method ID |
date | string | Date of the payment |
reference | string | The payment reference |
amount | number | The payment amount |
charges | array | The charge who use the payment |
charges.*.id | number | The charge ID |
charges.*.amount | array | The amount to use |
comments | string | Comments |
currency | boolean | The currency ID |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
Delete a Payment
curl "/charge/payment/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific payment.
HTTP Request
DELETE /charge/payment/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment to delete |
Communication
Files Library
The File Library object
See File object
Get All Files Library
curl "/mail/library" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..."
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all files library.
HTTP Request
GET /mail/library
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : name , filename , created_at , updated_at |
search | Make a global search. Search in : name , filename |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Add a file to the mail library
curl "/mail/library" \
-X POST \
-H "" \
-d "name=My file&..."
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..."
}
This endpoint create add a file to the library.
HTTP Request
POST /mail/library
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | string | Internal name. | |
file | required | file | The file |
Retrieve a file library
curl "/mail/library/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..."
}
This endpoint retrieves a specific file library.
HTTP Request
GET /mail/library/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the file library to retrieve |
Update a file library
curl "/mail/library/1" \
-X POST \
-H "" \
-d "name=My model"
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..."
}
This endpoint update a specific file library.
HTTP Request
PUT /mail/library/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the file library to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Internal name. |
file | file | The file |
Delete a File Library
curl "/mail/library/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific file library.
HTTP Request
DELETE /mail/library/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the file library to delete |
Mails
The Mail object
The Mail object
{
"id": 23,
"datetime": "2024-12-12 13:45:00",
"internal_datetime": "2024-12-12 13:45:00",
"read_at": "2024-12-12 13:45:00",
"deleted_at": "2024-12-12 13:45:00",
"subject": "Subject",
"snippet": "Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta.",
"from_name": "Sender Name",
"from_address": "email@test.fr",
"html": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.<br/><br/>Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"text": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"raw": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"is_reminder": "boolean",
"attachments": [
{...},
{...}
],
"sender_id": 1,
"sender": {...},
"to": [
{...},
{...}
],
"cc": [
{...},
{...}
],
"cci": [
{...},
{...}
],
"recipients": [
{...},
{...}
],
"team_user_id": 1,
"team_user": {...},
"send_status": true,
"send_error": null,
"elements": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the mail |
datetime | string | Datetime when the mail is received or sent |
internal_datetime | string | Internal datetime when the mail is received or sent |
read_at | string | Datetime when the email is read |
deleted_at | string | Datetime when the email is deleted |
subject | string | Subject of the mail |
snippet | string | Snippet of the content |
from_name | string | Sender name |
from_address | string | Sender mail address |
html | string | HTML content |
text | string | Text content |
raw | string | Raw content |
is_reminder | boolean | If the mail is send from the invoice reminder |
attachments | array | Array of File object. Present only if requested |
sender_id | integer | The sender ID |
sender | object | The sender object. A Sender object. Present only if requested |
to | array | Array of Recipient object. Present only if requested |
cc | array | Array of Recipient object. Present only if requested |
cci | array | Array of Recipient object. Present only if requested |
team_user_id | integer | The team user ID |
team_user | object | A TeamUser object. Present only if requested |
send_status | boolean | True if the mail was sent |
send_error | string | Sent errors |
elements | array | Array of Linked Mail Element. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Mail Recipient object
The Mail Recipient object
{
"id": 23,
"type": "contact",
"name": "John Doe",
"mail": "john.doe@test.com",
"data": {...}
}
Attribute | Type | Description |
---|---|---|
id | integer | Id of the recipient. Null if the recipient is not a linked element |
type | string | Type of recipient. Null if the recipient is not a linked element |
name | string | Name. Null if the recipient is not a linked element |
string | Mail address | |
data | string | Recipient data object. Null if the recipient is not a linked element |
The Linked Mail Element object
The Linked Mail Element object
{
"id": 23,
"type": "contact",
"title": "John Doe",
"data": {...}
}
Attribute | Type | Description |
---|---|---|
id | integer | Id of the element. |
type | string | Type of element. |
title | string | Label |
data | string | Element data object. |
Get All Mails
curl "/mail" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"datetime": "2024-12-12 13:45:00",
"internal_datetime": "2024-12-12 13:45:00",
"read_at": "2024-12-12 13:45:00",
"deleted_at": "2024-12-12 13:45:00",
"subject": "Subject",
"snippet": "Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta.",
"from_name": "Sender Name",
"from_address": "email@test.fr",
"html": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.<br/><br/>Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"text": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"raw": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"is_reminder": "boolean",
"attachments": [
{...},
{...}
],
"sender_id": 1,
"sender": {...},
"to": [
{...},
{...}
],
"cc": [
{...},
{...}
],
"cci": [
{...},
{...}
],
"recipients": [
{...},
{...}
],
"team_user_id": 1,
"team_user": {...},
"send_status": true,
"send_error": null,
"elements": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all mails.
HTTP Request
GET /mail
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : datetime , internal_datetime |
search | Make a global search. Search in : subject |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : senderId (int) , sinceDate (date) , untilDate (date) , subject , from_mail , to_mail , with_attachment (boolean) , elements ([[id, type],...]) |
|
include | Related data to add to the answer Availables datas : attachments , sender , recipients , elements , recipients.element , teamUser |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Send a mail
curl "/mail/send" \
-X POST \
-H "" \
-d "date=2022-12-12&..."
The above command returns JSON structured like this:
{
"id": 23,
"datetime": "2024-12-12 13:45:00",
"internal_datetime": "2024-12-12 13:45:00",
"read_at": "2024-12-12 13:45:00",
"deleted_at": "2024-12-12 13:45:00",
"subject": "Subject",
"snippet": "Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta.",
"from_name": "Sender Name",
"from_address": "email@test.fr",
"html": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.<br/><br/>Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"text": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"raw": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"is_reminder": "boolean",
"attachments": [
{...},
{...}
],
"sender_id": 1,
"sender": {...},
"to": [
{...},
{...}
],
"cc": [
{...},
{...}
],
"cci": [
{...},
{...}
],
"recipients": [
{...},
{...}
],
"team_user_id": 1,
"team_user": {...},
"send_status": true,
"send_error": null,
"elements": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint send an mail.
HTTP Request
POST /mail/send
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
sender | integer | The sender ID | |
subject | string | Subject | |
html | string | Html content | |
text | string | Text content (automatically generated from html) | |
to | array | Email recipients | |
to.*.email | required | string | Email address |
to.*.id | integer | If is a linked element, the ID | |
to.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
cc | array | Email copy recipients | |
cc.*.email | required | string | Email address |
cc.*.id | integer | If is a linked element, the ID | |
cc.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
cci | array | Email blind copy recipients | |
cci.*.email | required | string | Email address |
cci.*.id | integer | If is a linked element, the ID | |
cci.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
elements | array | The linked elements of the email | |
elements.*.id | required | integer | ID of the element |
elements.*.type | required | string | Type of element. Can be: customer , contact , providerCommand , quotation , command , proforma , delivery , invoice , credit , opportunity , customerSepa , contract , charge , construction , planification |
Insert a sent mail without send it
curl "/mail/send/insert" \
-X POST \
-H "" \
-d "date=2022-12-12&..."
The above command returns JSON structured like this:
{
"id": 23,
"datetime": "2024-12-12 13:45:00",
"internal_datetime": "2024-12-12 13:45:00",
"read_at": "2024-12-12 13:45:00",
"deleted_at": "2024-12-12 13:45:00",
"subject": "Subject",
"snippet": "Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta.",
"from_name": "Sender Name",
"from_address": "email@test.fr",
"html": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.<br/><br/>Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"text": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"raw": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"is_reminder": "boolean",
"attachments": [
{...},
{...}
],
"sender_id": 1,
"sender": {...},
"to": [
{...},
{...}
],
"cc": [
{...},
{...}
],
"cci": [
{...},
{...}
],
"recipients": [
{...},
{...}
],
"team_user_id": 1,
"team_user": {...},
"send_status": true,
"send_error": null,
"elements": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint send an mail.
HTTP Request
POST /mail/send/insert
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
sender | integer | The sender ID | |
subject | string | Subject | |
html | string | Html content | |
text | string | Text content (automatically generated from html) | |
to | array | Email recipients | |
to.*.email | required | string | Email address |
to.*.id | integer | If is a linked element, the ID | |
to.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
cc | array | Email copy recipients | |
cc.*.email | required | string | Email address |
cc.*.id | integer | If is a linked element, the ID | |
cc.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
cci | array | Email blind copy recipients | |
cci.*.email | required | string | Email address |
cci.*.id | integer | If is a linked element, the ID | |
cci.*.type | required with id | string | The type of element. Can be: teamUser , customer , contact |
elements | array | The linked elements of the email | |
elements.*.id | required | integer | ID of the element |
elements.*.type | required | string | Type of element. Can be: customer , contact , providerCommand , quotation , command , proforma , delivery , invoice , credit , opportunity , customerSepa , contract , charge , construction , planification |
Retrieve a mail
curl "/mail/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"datetime": "2024-12-12 13:45:00",
"internal_datetime": "2024-12-12 13:45:00",
"read_at": "2024-12-12 13:45:00",
"deleted_at": "2024-12-12 13:45:00",
"subject": "Subject",
"snippet": "Sed tamen haec cum ita tutius observentur, quidam vigore artuum inminuto rogati ad nuptias ubi aurum dextris manibus cavatis offertur, inpigre vel usque Spoletium pergunt. haec nobilium sunt instituta.",
"from_name": "Sender Name",
"from_address": "email@test.fr",
"html": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.<br/><br/>Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"text": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"raw": "Quae dum ita struuntur, indicatum est apud Tyrum indumentum regale textum occulte, incertum quo locante vel cuius usibus apparatum. ideoque rector provinciae tunc pater Apollinaris eiusdem nominis ut conscius ductus est aliique congregati sunt ex diversis civitatibus multi, qui atrocium criminum ponderibus urgebantur.",
"is_reminder": "boolean",
"attachments": [
{...},
{...}
],
"sender_id": 1,
"sender": {...},
"to": [
{...},
{...}
],
"cc": [
{...},
{...}
],
"cci": [
{...},
{...}
],
"recipients": [
{...},
{...}
],
"team_user_id": 1,
"team_user": {...},
"send_status": true,
"send_error": null,
"elements": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific mail.
HTTP Request
GET /mail/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the mail to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : labels , attachments , events , headers , sender , recipients , elements , recipients.element , teamUser |
Delete a Mail
curl "/mail/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific mail.
HTTP Request
DELETE /mail/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the mail to delete |
Mail Models
The Mail Model object
The Mail Model object
{
"id": 23,
"name": "My model",
"subject": "The subject",
"html": "Hello,<br/><br/>This is a message",
"text": "Hello,\n\nThis is a message",
"attachments": [
{...},
{...}
],
"library_files": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the mail model |
name | string | Internal name. |
subject | string | The subject |
html | string | The message (html version) |
text | string | The message (text version) |
attachments | array | Attachments An array of File object. Present only if requested |
library_files | array | Attachments from the file library An array of File object. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Mail Models
curl "/mail/model" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"name": "My model",
"subject": "The subject",
"html": "Hello,<br/><br/>This is a message",
"text": "Hello,\n\nThis is a message",
"attachments": [
{...},
{...}
],
"library_files": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all mail models.
HTTP Request
GET /mail/model
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : name |
search | Make a global search. Search in : name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
include | Related data to add to the answer Availables datas : attachments |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a mail model
curl "/mail/model" \
-X POST \
-H "" \
-d "name=My model&..."
The above command returns JSON structured like this:
{
"id": 23,
"name": "My model",
"subject": "The subject",
"html": "Hello,<br/><br/>This is a message",
"text": "Hello,\n\nThis is a message",
"attachments": [
{...},
{...}
],
"library_files": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint create a mail model.
HTTP Request
POST /mail/model
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | required | string | Internal name. |
subject | required | string | The subject |
html | required | string | The message (html version) |
text | string | If null, automatically generated from html | |
attachments | array | Set the model attachments. Array of files |
|
library_files | array | Set the library files. Array of file ids |
Retrieve a mail model
curl "/mail/model/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"name": "My model",
"subject": "The subject",
"html": "Hello,<br/><br/>This is a message",
"text": "Hello,\n\nThis is a message",
"attachments": [
{...},
{...}
],
"library_files": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific mail model.
HTTP Request
GET /mail/model/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the model to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : attachments |
Update a mail model
curl "/mail/model/1" \
-X PUT \
-H "" \
-d "name=My model"
The above command returns JSON structured like this:
{
"id": 23,
"name": "My model",
"subject": "The subject",
"html": "Hello,<br/><br/>This is a message",
"text": "Hello,\n\nThis is a message",
"attachments": [
{...},
{...}
],
"library_files": [
{...},
{...}
],
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint update a specific mail model.
HTTP Request
PUT /mail/model/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the mail model to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Internal name. |
subject | string | The subject |
html | string | The message (html version) |
text | string | If null, automatically generated from html |
attachments | array | Set the model attachments. Array of files |
add_attachments | array | Add attachments. Array of files |
remove_attachments | array | Remove attachments Array of file ids to delete |
library_files | array | Set the library files. Array of file ids |
add_library_files | array | Add library files. Array of file ids |
remove_library_files | array | Remove library files. Array of file ids |
Delete a Mail Model
curl "/mail/model/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific mail model.
HTTP Request
DELETE /mail/model/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the model to delete |
Senders
The Sender object
The Sender object
{
"id": 23,
"name": "John Doe",
"address": "john.doe@test.com",
"signature": "John Doe<br/>CEO",
"type": "smtp",
"track_open": true,
"track_click": true,
"share": false,
"smtp": {
"server": "127.0.0.1",
"port": 587,
"security": "tls",
"authentification": true,
"login": "john.doe@test.com"
},
"validate_at": "2024-12-12 13:45:00",
"is_validated": true,
"use_default": true,
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the sender |
name | string | Name of the sender. By default, use the name of the logged user. |
address | string | The email address |
signature | string | The signature |
type | string | Type of configuration : default, smtp, google, outlook |
track_open | boolean | If the email open should be tracked |
track_click | boolean | If the email links click should be tracked |
share | boolean | If the sender must be shared with the other users |
smtp | object | The smtp configuration. Present only if requested and type = smtp |
smtp.server | string | Adresse of the server |
smtp.port | integer | Port to use |
smtp.security | string | Type of security : none, ssl, tls |
smtp.authentification | boolean | If the server has an authentication |
smtp.login | string | Server login |
validate_at | string | Datetime of sender validation |
use_default | boolean | If the sender is selected by default |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Senders
curl "/mail/sender" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 23,
"name": "John Doe",
"address": "john.doe@test.com",
"signature": "John Doe<br/>CEO",
"type": "smtp",
"track_open": true,
"track_click": true,
"share": false,
"smtp": {
"server": "127.0.0.1",
"port": 587,
"security": "tls",
"authentification": true,
"login": "john.doe@test.com"
},
"validate_at": "2024-12-12 13:45:00",
"is_validated": true,
"use_default": true,
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all senders.
HTTP Request
GET /mail/sender
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : name , address , track_click , track_open , share , is_validated , use_default |
search | Make a global search. Search in : name , address |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : address , type , status (boolean) , isValidate (boolean) |
|
include | Related data to add to the answer Availables datas : smtp |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a sender
curl "/mail/sender" \
-X POST \
-H "" \
-d "address=john.doe@test.com&..."
The above command returns JSON structured like this:
{
"id": 23,
"name": "John Doe",
"address": "john.doe@test.com",
"signature": "John Doe<br/>CEO",
"type": "smtp",
"track_open": true,
"track_click": true,
"share": false,
"smtp": {
"server": "127.0.0.1",
"port": 587,
"security": "tls",
"authentification": true,
"login": "john.doe@test.com"
},
"validate_at": "2024-12-12 13:45:00",
"is_validated": true,
"use_default": true,
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint create a sender.
HTTP Request
POST /mail/sender
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | string | Name of the sender. By default, use the name of the logged user. | |
address | required | string | The email address |
signature | string | The signature | |
type | string | Type of configuration : default, smtp | |
track_open | boolean | If the email open should be tracked | |
track_click | boolean | If the email links click should be tracked | |
share | boolean | If the sender must be shared with the other users | |
smtp | required if type = smtp | object | The smtp configuration. Only if type = smtp |
smtp.server | required | string | Adresse of the server |
smtp.port | required | integer | Port to use |
smtp.security | required | string | Type of security : none, ssl, tls |
smtp.authentification | required | boolean | If the server has an authentication |
smtp.login | required if authentification = true | string | Server login |
smtp.password | required if authentification = true | string | Server password |
use_default | boolean | If the sender is selected by default |
Retrieve a sender
curl "/mail/sender/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 23,
"name": "John Doe",
"address": "john.doe@test.com",
"signature": "John Doe<br/>CEO",
"type": "smtp",
"track_open": true,
"track_click": true,
"share": false,
"smtp": {
"server": "127.0.0.1",
"port": 587,
"security": "tls",
"authentification": true,
"login": "john.doe@test.com"
},
"validate_at": "2024-12-12 13:45:00",
"is_validated": true,
"use_default": true,
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint retrieves a specific sender.
HTTP Request
GET /mail/sender/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sender to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : smtp |
Update a sender
curl "/mail/sender/1" \
-X PUT \
-H "" \
-d "name=John Doe"
The above command returns JSON structured like this:
{
"id": 23,
"name": "John Doe",
"address": "john.doe@test.com",
"signature": "John Doe<br/>CEO",
"type": "smtp",
"track_open": true,
"track_click": true,
"share": false,
"smtp": {
"server": "127.0.0.1",
"port": 587,
"security": "tls",
"authentification": true,
"login": "john.doe@test.com"
},
"validate_at": "2024-12-12 13:45:00",
"is_validated": true,
"use_default": true,
"created_at": "2022-05-31T13:27:41.000000Z",
"updated_at": "2022-05-31T13:27:41.000000Z"
}
This endpoint update a specific sender.
HTTP Request
PUT /mail/sender/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sender to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the sender. By default, use the name of the logged user. |
address | string | The email address |
signature | string | The signature |
type | string | Type of configuration : default, smtp |
track_open | boolean | If the email open should be tracked |
track_click | boolean | If the email links click should be tracked |
share | boolean | If the sender must be shared with the other users |
smtp | object | The smtp configuration. Only if type = smtp |
smtp.server | string | Adresse of the server |
smtp.port | integer | Port to use |
smtp.security | string | Type of security : none, ssl, tls |
smtp.authentification | boolean | If the server has an authentication |
smtp.login | string | Server login |
smtp.password | string | Server password |
use_default | boolean | If the sender is selected by default |
Delete a Sender
curl "/mail/sender/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific sender.
HTTP Request
DELETE /mail/sender/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sender to delete |
Constructions
Constructions
The Construction object
The Construction object
{
"id": 1,
"reference": "CHA01232",
"title": "My construction project",
"customer_id": 1,
"customer": {...},
"contact_id": 1,
"contact": {...},
"custom_fields": [
{...},
{...}
],
"tags": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"contents": [
{...},
{...}
],
"products": [
{...},
{...}
],
"materials": [
{...},
{...}
],
"status": 1,
"invoice_status": 1,
"document_status": 1,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"full_address": "12 Rue de Dole<br/>25000 Besançon<br/>France",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"quotations": [
{...},
{...}
],
"commands": [
{...},
{...}
],
"proformas": [
{...},
{...}
],
"deliveries": [
{...},
{...}
],
"invoices": [
{...},
{...}
],
"credits": [
{...},
{...}
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the construction |
reference | object | References of the construction |
title | string | The construction title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
tags | array | An array of Tag object. Present only if requested |
total_duration_hour | integer | Total duration of construction in hours |
nb_people_needed | integer | Number of people needed for the construction |
contents | array | An array of Construction content object. Present only if requested |
products | array | An array of Construction product object. Present only if requested |
materials | array | An array of Construction material object. Present only if requested |
status | integer | The status of the construction. Can be :
|
invoice_status | integer | The invoicing status. Can be :
|
document_status | integer | The pdf generation status. Can be :
|
road1 | string | Road 1 |
road2 | string | Road 2 |
road3 | string | Road 3 |
city | string | City |
postal_code | string | Postal code |
country_id | string | Country identifier |
country | object | Country. A Country object. Present only if requested |
full_address | string | The full address |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
quotations | array | An array of Quotation object. Present only if requested |
commands | array | An array of Command object. Present only if requested |
proformas | array | An array of Proforma object. Present only if requested |
deliveries | array | An array of Delivery object. Present only if requested |
invoices | array | An array of Invoice object. Present only if requested |
credits | array | An array of Credit object. Present only if requested |
The Construction Content object
The Construction Content object
{
"id": 1,
"reference": "PRES01",
"designation": "Description of service",
"number_people_needed": 2,
"duration": 1,
"duration_type": "hour",
"quantity": 2,
"planified_quantity": 1,
"stay_to_planify": 1,
"total_duration_hour": 1,
"catalog": {...}
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the construction content |
reference | string | The reference |
designation | string | The designation |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , minute |
quantity | number | Quantity |
planified_quantity | number | Planified quantity |
stay_to_planify | number | Quantity stay to planify |
total_duration_hour | number | Total duration of service in hour |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
The Construction Product object
The Construction Product object
{
"product_id": 1,
"product": {...},
"quantity": 2
}
Attribute | Type | Description |
---|---|---|
product_id | integer | Unique identifier for the product |
product | string | A Product object |
quantity | integer | The quantity of product needed |
The Construction Material object
The Construction Material object
{
"material_id": 1,
"material": {...},
"quantity": 2
}
Attribute | Type | Description |
---|---|---|
material_id | integer | Unique identifier for the material |
material | string | A Material object |
quantity | integer | The quantity of material needed |
Get All Construction
curl "/construction" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"reference": "CHA01232",
"title": "My construction project",
"customer_id": 1,
"customer": {...},
"contact_id": 1,
"contact": {...},
"custom_fields": [
{...},
{...}
],
"tags": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"contents": [
{...},
{...}
],
"products": [
{...},
{...}
],
"materials": [
{...},
{...}
],
"status": 1,
"invoice_status": 1,
"document_status": 1,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"full_address": "12 Rue de Dole<br/>25000 Besançon<br/>France",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"quotations": [
{...},
{...}
],
"commands": [
{...},
{...}
],
"proformas": [
{...},
{...}
],
"deliveries": [
{...},
{...}
],
"invoices": [
{...},
{...}
],
"credits": [
{...},
{...}
]
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all constructions.
HTTP Request
GET /construction
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , title , customer.name , contact.name , status.town , road1 , road2 , road3 , town , postal_code |
search | Make a global search. Search in : reference , title , customer.company_name , customer.lastname , contact.lastname |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : customer (integer) , contact (integer) , reference (string) , created_since (date) , created_until (date) , status (integer) , custom_fields (array(id => integer (field ID), value => string)) |
|
include | Related data to add to the answer Availables datas : customer , contact , country , customFields , tags , products , materials , contents , linked_documents |
|
edited_since | Returns items created or updated since the specified datetime |
Create a construction
curl "/construction" \
-X POST \
-H "" \
-d "customer=1&..."
The above command returns JSON structured like this:
{
"id": 1,
"reference": "CHA01232",
"title": "My construction project",
"customer_id": 1,
"customer": {...},
"contact_id": 1,
"contact": {...},
"custom_fields": [
{...},
{...}
],
"tags": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"contents": [
{...},
{...}
],
"products": [
{...},
{...}
],
"materials": [
{...},
{...}
],
"status": 1,
"invoice_status": 1,
"document_status": 1,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"full_address": "12 Rue de Dole<br/>25000 Besançon<br/>France",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"quotations": [
{...},
{...}
],
"commands": [
{...},
{...}
],
"proformas": [
{...},
{...}
],
"deliveries": [
{...},
{...}
],
"invoices": [
{...},
{...}
],
"credits": [
{...},
{...}
]
}
This endpoint create a construction.
HTTP Request
POST /construction
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The construction title | |
customer | required | integer | The Customer ID |
contact | integer | The Contact ID | |
road1 | string | Road 1 | |
road2 | string | Road 2 | |
road3 | string | Road 3 | |
city | required | string | City |
postal_code | required | string | Postal code |
country | required | string | Country code |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
contents | array | The construction contents. | |
contents.* | array | ||
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , minute |
|
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.quantity | required | number | Quantity |
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
products | array | The construction products. | |
products.* | array | ||
products.*.product | required | integer | The product identifier |
products.*.quantity | required | integer | Quantity of product |
materials | array | The construction materials. | |
materials.* | array | ||
materials.*.material | required | integer | The material identifier |
materials.*.quantity | required | integer | Quantity of material |
Retrieve a construction
curl "/construction/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A full Construction object
}
This endpoint retrieves a specific construction.
HTTP Request
GET /construction/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the construction to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : customer , contact , country , customFields , tags , products , materials , contents , linked_documents |
Update a construction
curl "/construction/1" \
-X PUT \
-H "" \
-d "title=Title"
The above command returns JSON structured like this:
{
"id": 1,
"reference": "CHA01232",
"title": "My construction project",
"customer_id": 1,
"customer": {...},
"contact_id": 1,
"contact": {...},
"custom_fields": [
{...},
{...}
],
"tags": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"contents": [
{...},
{...}
],
"products": [
{...},
{...}
],
"materials": [
{...},
{...}
],
"status": 1,
"invoice_status": 1,
"document_status": 1,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"full_address": "12 Rue de Dole<br/>25000 Besançon<br/>France",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"quotations": [
{...},
{...}
],
"commands": [
{...},
{...}
],
"proformas": [
{...},
{...}
],
"deliveries": [
{...},
{...}
],
"invoices": [
{...},
{...}
],
"credits": [
{...},
{...}
]
}
This endpoint update a specific construction.
HTTP Request
PUT /construction/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the construction to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The construction title | |
customer | required | integer | The Customer ID |
contact | integer | The Contact ID | |
road1 | string | Road 1 | |
road2 | string | Road 2 | |
road3 | string | Road 3 | |
city | string | City | |
postal_code | string | Postal code | |
country | string | Country code | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
contents | array | The construction contents. | |
contents.* | array | ||
contents.*.id | integer | ID of content to update | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , minute |
|
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.quantity | required | number | Quantity |
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
products | array | The construction products. | |
products.* | array | ||
products.*.product | required | integer | The product identifier |
products.*.quantity | required | integer | Quantity of product |
materials | array | The construction materials. | |
materials.* | array | ||
materials.*.material | required | integer | The material identifier |
materials.*.quantity | required | integer | Quantity of material |
Delete a Construction
curl "/construction/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific construction.
HTTP Request
DELETE /construction/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the construction to delete |
Materials
The Material object
The Material object
{
"id": 1,
"reference": "REF",
"name": "Marerial",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the material |
reference | string | Reference of the material |
name | string | Name of the material |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Materials
curl "/construction/material" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"reference": "REF",
"name": "Marerial",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all materials.
HTTP Request
GET /construction/material
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , name |
search | Make a global search. Search in : reference , name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime |
Create a Material
curl "/construction/material" \
-X POST \
-H "" \
-d "label=Category"
The above command returns JSON structured like this:
{
"id": 1,
"reference": "REF",
"name": "Marerial",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a material.
HTTP Request
POST /construction/material
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
reference | string | Reference of the material | |
name | required | string | Name of the material |
Retrieve a material
curl "/construction/material/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"reference": "REF",
"name": "Marerial",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific material.
HTTP Request
GET /construction/material/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the material to retrieve |
Update a Material
curl "/construction/material/1" \
-X PUT \
-H "" \
-d "name=Material"
The above command returns JSON structured like this:
{
"id": 1,
"reference": "REF",
"name": "Marerial",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific material.
HTTP Request
PUT /construction/material/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the material to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
reference | string | Reference of the category |
name | string | Name of the category |
Delete a Material
curl "/construction/material/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific material.
HTTP Request
DELETE /construction/material/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the material to delete |
Planifications
The Construction Planification object
The Construction Planification object
{
"id": 1,
"reference": "INT102020",
"begin": "2023-12-12 10:00:00",
"end": "2023-12-12 12:00:00",
"all_contents": false,
"contents": [
{...},
{...}
],
"technicians": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"status": 1,
"document_status": 1,
"construction_id": 1,
"construction": {....},
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the planification |
reference | object | References of the planification |
begin | string | The datetime of planification's begin |
end | string | The datetime of planification's end |
all_contents | boolean | If the planification is for all construction contents |
contents | array | An array of Planification content object. Present only if requested && all_contents is false |
technicians | array | An array of Technician object. Present only if requested |
status | integer | The status of the planification. Can be :
|
total_duration_hour | integer | Total duration of construction in hours |
nb_people_needed | integer | Number of people needed for the construction |
document_status | integer | The pdf generation status. Can be :
|
construction_id | integer | The construction ID |
construction | object | A Construction object Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Construction Planification Content object
The Construction Planification Content object
{
"quantity": 1,
"content_id": 1,
"content": {...}
}
Attribute | Type | Description |
---|---|---|
quantity | number | Planified quantity |
content_id | integer | Construction content id |
content | object | A Construction Content object Present only if requested |
Get All Construction planifications
curl "/construction/planification" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"reference": "INT102020",
"begin": "2023-12-12 10:00:00",
"end": "2023-12-12 12:00:00",
"all_contents": false,
"contents": [
{...},
{...}
],
"technicians": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"status": 1,
"document_status": 1,
"construction_id": 1,
"construction": {....},
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all constructions planifications.
HTTP Request
GET /construction/planification
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : reference , construction.reference , begin , end , construction.customer.name , construction.contact.name , construction.title , construction.road1 , construction.road2 , construction.road3 , construction.town , construction.postal_code , status |
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : customer (integer) , contact (integer) , reference (string) , begin (date) , end (date) , created_since (date) , created_until (date) , status (integer) , construction (integer) , construction_reference (string) , technician (integer) |
|
include | Related data to add to the answer Availables datas : contents , technicians , construction , construction.contents |
|
edited_since | Returns items created or updated since the specified datetime |
Create a construction planification
curl "/construction/planification" \
-X POST \
-H "" \
-d "customer=1&..."
The above command returns JSON structured like this:
{
"id": 1,
"reference": "INT102020",
"begin": "2023-12-12 10:00:00",
"end": "2023-12-12 12:00:00",
"all_contents": false,
"contents": [
{...},
{...}
],
"technicians": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"status": 1,
"document_status": 1,
"construction_id": 1,
"construction": {....},
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
This endpoint create a construction planification.
HTTP Request
POST /construction/planification
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
technicians | required | array | The technicians who make the planification. |
technicians.* | array | ||
technicians.*.type | required | integer | The technician type. Can be : teamUser , technician |
technicians.*.id | required | integer | The technician ID |
all_contents | string | If the planification is for all construction contents | |
contents | required if all_contents is false | array | The construction contents. |
contents.* | array | ||
contents.*.content | required | integer | Identifier of the construction content |
contents.*.quantity | number | Quantity of construction content | |
begin | required | array | The datetime of planification's begin. |
end | required | array | The datetime of planification's end. |
status | array | The status of the planification. Can be :
|
Retrieve a construction planification
curl "/construction/planification/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A full Construction Planification object
}
This endpoint retrieves a specific construction planification.
HTTP Request
GET /construction/planification/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the planification to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : contents , technicians , construction , construction.contents |
Update a construction planification
curl "/construction/planification/1" \
-X PUT \
-H "" \
-d "title=Title"
The above command returns JSON structured like this:
{
"id": 1,
"reference": "INT102020",
"begin": "2023-12-12 10:00:00",
"end": "2023-12-12 12:00:00",
"all_contents": false,
"contents": [
{...},
{...}
],
"technicians": [
{...},
{...}
],
"total_duration_hour": 1,
"nb_people_needed": 2,
"status": 1,
"document_status": 1,
"construction_id": 1,
"construction": {....},
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
This endpoint update a specific construction planification.
HTTP Request
PUT /construction/planification/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the planification to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
technicians | array | The technicians who make the planification. | |
technicians.* | array | ||
technicians.*.type | required | integer | The technician type. Can be : teamUser , technician |
technicians.*.id | required | integer | The technician ID |
all_contents | string | If the planification is for all construction contents | |
contents | array | The construction contents. | |
contents.* | array | ||
contents.*.content | required | integer | Identifier of the construction content |
contents.*.quantity | number | Quantity of construction content | |
begin | array | The datetime of planification's begin. | |
end | array | The datetime of planification's end. | |
status | array | The status of the planification. Can be :
|
Delete a Construction Planification
curl "/construction/planification/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific construction planification.
HTTP Request
DELETE /construction/planification/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the planification to delete |
Technicians
A Technician can be a user, this allows him to access the software.
See TeamUser with roles technical
The Technician object
The Technician object
{
"id": 1,
"name": "Technician",
"email": "test@test.fr",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the technician |
name | string | Name of the technician |
string | Email of the technician | |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Technicians
curl "/construction/technician" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Technician",
"email": "test@test.fr",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all technicians.
HTTP Request
GET /construction/technicians
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : email , name |
search | Make a global search. Search in : email , name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime |
Create a Technician
curl "/construction/technicians" \
-X POST \
-H "" \
-d "name=Technician"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Technician",
"email": "test@test.fr",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a material.
HTTP Request
POST /construction/material
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | required | string | Name of the technician |
string | Email of the technician |
Retrieve a technician
curl "/construction/technician/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"name": "Technician",
"email": "test@test.fr",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific technician.
HTTP Request
GET /construction/technician/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the technician to retrieve |
Update a Material
curl "/construction/technician/1" \
-X PUT \
-H "" \
-d "name=Material"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Technician",
"email": "test@test.fr",
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific technician.
HTTP Request
PUT /construction/technician/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the technician to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
reference | string | Reference of the category |
name | string | Name of the category |
Delete a Material
curl "/construction/material/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific material.
HTTP Request
DELETE /construction/material/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the material to delete |
Customers
Customers
The Customer object
The Customer object
{
"id": 1,
"name": "Client",
"reference": {
"customer": null,
"prospect": "PR00002",
"provider": null,
"subcontractor": null
},
"type": {...},
"company_name": "Client",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"activity_id": 1,
"activity": {...},
"origin": 1,
"origin_id": {...},
"tags": [
{...},
{...}
],
"address_invoice": {...},
"address_delivery": {...},
"addresses": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"configs": {...},
"contacts": [
{...},
{...}
],
"team_user_id": 3,
"team_user": {...},
"newsletter_inscription": false,
"archived_at": null,
"created_at": "2022-06-10T17:04:06.000000Z",
"updated_at": "2022-06-10T17:04:06.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the customer |
name | string | Name of the customer |
reference | object | References of the customer |
reference.customer | string | Customer reference |
reference.prospect | string | Prospect reference |
reference.provider | string | Provider reference |
reference.subcontractor | string | Subcontractor reference |
type | object | A Customer Type object |
company_name | string | The company name. Present only if type.is_company = true |
company_type | string | The company type. Present only if type.is_company = true |
company_siret | string | The SIRET number of the company. Present only if type.is_company = true |
company_rcs | string | The RCS number of the company. Present only if type.is_company = true |
company_vatrate | string | The vatrate number of the company. Present only if type.is_company = true |
company_naf | string | The NAF code of the company. Present only if type.is_company = true |
company_capital | string | The capital of the company. Present only if type.is_company = true |
civility | object | A Civility Object. Present only if type.is_person = true |
firstname | string | Firstname. Present only if type.is_person = true |
lastname | string | Lastname. Present only if type.is_person = true |
fullname | string | Fullname. Present only if type.is_person = true |
birth_date | date | Birth date. Present only if type.is_person = true |
phone | string | Phone |
mobile | string | Mobile |
fax | string | Fax |
string | ||
website | string | Website |
activity_id | integer | The activity ID |
activity | object | The Customer Activity object. Present only if requested |
origin_id | integer | The origin ID |
origin | object | The Customer Origin object. Present only if requested |
tags | array | An array of Tag object. Present only if requested |
address_invoice | object | The invoice address. A Customer Address object. Present only if requested |
address_delivery | object | The delivery address. A Customer Address object. Present only if requested |
addresses | array | All customer addresses. An array of Customer Address object. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
configs | object | The customer config parameters. Present only if requested |
contacts | array | The customer contacts. An array of Contact object. Present only if requested |
newsletter_inscription | boolean | Newsletter subscription status |
team_user_id | integer | The sales representative ID for the customer. |
team_user | object | The sales representative for the customer. A TeamUser object. Present only if requested |
archived_at | string | The archivate datetime |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The customer config parameters
Attribute | Type | Description |
---|---|---|
sales_payment_term | object | Default payment term to use. A Payment Term object For the modification, it is necessary to send the ID of the payment term |
sales_payment_methods | array | Default payment methods to use. An array of Payment Method object For the modification, it is necessary to send an array of payment method ID |
sales_sale_term | object | Default sale term to use. A Sale Term object For the modification, it is necessary to send the ID of the sale term |
sales_payment_advance_rate | number | Default advance rate for quotation and command |
sales_escompte_rate | number | Default escompte rate |
sales_penalty_rate | number | Default penalty rate |
sales_use_global_vatrate | boolean | Enable use of one vat rate for all the document content |
sales_amounts_type | string | Amount type for document entry. Can be : ht , ttc |
sales_pdf_amounts | integer | PDF document : Type of amount to display in the content. Can be :
|
sales_currency | object | Currency used by account. A Currency object For the modification, it is necessary to send the ID of the currency |
sales_global_discount | integer | General Discount Percentage |
sales_vat_rate | object | Vat rate to use. A Vat Rate object For the modification, it is necessary to send the ID of the vat rate |
Get All Customers
curl "/customer" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Client",
"reference": {
"customer": null,
"prospect": "PR00002",
"provider": null,
"subcontractor": null
},
"type": {...},
"company_name": "Client",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"activity_id": 1,
"activity": {...},
"origin": 1,
"origin_id": {...},
"tags": [
{...},
{...}
],
"address_invoice": {...},
"address_delivery": {...},
"addresses": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"configs": {...},
"contacts": [
{...},
{...}
],
"team_user_id": 3,
"team_user": {...},
"newsletter_inscription": false,
"archived_at": null,
"created_at": "2022-06-10T17:04:06.000000Z",
"updated_at": "2022-06-10T17:04:06.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all customers.
HTTP Request
GET /customer
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : company_name , firstname , name , address_invoice.road1 , address_invoice.town , address_invoice.postal_code , address_invoice.country.name , email , website , phone , mobile , fax , type.label , activity.label , origin.label , company_siret , company_vatrate , reference.customer , reference.prospect , reference.provider , reference.subcontractor , team_user.fullname , created_at , updated_at |
search | Make a global search. Search in : company_name , firstname , lastname , email , website , phone , mobile , fax , customer_reference , prospect_reference , provider_reference , subcontractor_reference , address_invoice.town , address_invoice.postal_code |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : origin (integer) , activity (integer) , name (string) , created_since (date) , created_until (date) , company_name (string) , company_siret (string) , company_vatrate (string) , have_email_address (boolean) , email_address (string) , website (string) , have_phone_number (boolean) , phone_number (string) , have_mobile_number (boolean) , mobile_number (string) , all_phone_number (string) , have_fax_number (boolean) , fax_number (string) , firstname (string) , lastname (string) , civility (integer) , is_customer (boolean) , is_prospect (boolean) , is_provider (boolean) , is_subcontractor (boolean) , is_prospect_or_customer (boolean) , customer_reference (string) , prospect_reference (string) , provider_reference (string) , subcontractor_reference (string) , invoice_address_town (string) , invoice_address_postal_code (string) , invoice_address_country (string) , delivery_address_town (string) , delivery_address_postal_code (string) , delivery_address_country (string) , company_address_town (string) , company_address_postal_code (string) , company_address_country (string) , any_tags (array of string) , all_tags (array of string) , custom_fields (array(id => integer (field ID), value => string)) , team_user (integer) , archived (boolean) , exclude (integer) , hasContact (boolean) , customerType (integer) |
|
include | Related data to add to the answer Availables datas : activity , origin , tags , contacts , configurations , addresses , address_invoice , address_delivery , custom_fields , team_user |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a customer
curl "/customer" \
-X POST \
-H "" \
-d "type=1&company_name=Company"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Client",
"reference": {
"customer": null,
"prospect": "PR00002",
"provider": null,
"subcontractor": null
},
"type": {...},
"company_name": "Client",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"activity_id": 1,
"activity": {...},
"origin": 1,
"origin_id": {...},
"tags": [
{...},
{...}
],
"address_invoice": {...},
"address_delivery": {...},
"addresses": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"configs": {...},
"contacts": [
{...},
{...}
],
"team_user_id": 3,
"team_user": {...},
"newsletter_inscription": false,
"archived_at": null,
"created_at": "2022-06-10T17:04:06.000000Z",
"updated_at": "2022-06-10T17:04:06.000000Z"
}
This endpoint create a customer.
HTTP Request
POST /customer
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
is_customer | boolean | Is a customer | |
is_prospect | boolean | Is a prospect | |
is_provider | boolean | Is a provider | |
is_subcontractor | boolean | Is a subcontractor | |
type | required | integer | The customer type ID |
company_name | required if type.is_company = true | string | The company name |
company_type | string | The company type | |
company_siret | string | The SIRET number of the company | |
company_rcs | string | The RCS number of the company | |
company_vatrate | string | The vatrate number of the company | |
company_naf | string | The NAF code of the company | |
company_capital | string | The capital of the company | |
civility | integer | The civility ID | |
firstname | string | Firstname. Present only if type.is_person = true |
|
lastname | required if type.is_person = true | string | Lastname. Present only if type.is_person = true |
fullname | string | Fullname. Present only if type.is_person = true |
|
birth_date | date | Birth date. Present only if type.is_person = true |
|
phone | string | Phone | |
mobile | string | Mobile | |
fax | string | Fax | |
string | |||
website | string | Website | |
activity | integer | The activity ID | |
origin | integer | The origin ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
address_invoice | object | The invoice address | |
address_invoice.label | string | Name of the address | |
address_invoice.road1 | string | Road line 1 | |
address_invoice.road2 | string | Road line 2 | |
address_invoice.road3 | string | Road line 3 | |
address_invoice.postal_code | required | string | Postal code |
address_invoice.town | required | string | Town |
address_invoice.country | required | integer | Country code |
address_delivery | object | The delivery address | |
address_delivery.label | string | Name of the address | |
address_delivery.road1 | string | Road line 1 | |
address_delivery.road2 | string | Road line 2 | |
address_delivery.road3 | string | Road line 3 | |
address_delivery.postal_code | required | string | Postal code |
address_delivery.town | required | string | Town |
address_delivery.country | required | integer | Country code |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
configs | object | The customer config parameters | |
newsletter_inscription | boolean | Newsletter subscription status | |
team_user | integer | The sales representative ID for the customer. | |
archived | boolean | If the customer is archivate |
Retrieve a customer
curl "/customer/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A full Customer object
}
This endpoint retrieves a specific customer.
HTTP Request
GET /customer/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the customer to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : activity , origin , tags , contacts , configurations , addresses , address_invoice , address_delivery , custom_fields , team_user |
Update a customer
curl "/customer/1" \
-X PUT \
-H "" \
-d "company_name=Company"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Client",
"reference": {
"customer": null,
"prospect": "PR00002",
"provider": null,
"subcontractor": null
},
"type": {...},
"company_name": "Client",
"company_type": null,
"company_siret": null,
"company_rcs": null,
"company_vatrate": null,
"company_naf": null,
"company_capital": null,
"phone": null,
"mobile": null,
"fax": null,
"email": null,
"website": null,
"activity_id": 1,
"activity": {...},
"origin": 1,
"origin_id": {...},
"tags": [
{...},
{...}
],
"address_invoice": {...},
"address_delivery": {...},
"addresses": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"configs": {...},
"contacts": [
{...},
{...}
],
"team_user_id": 3,
"team_user": {...},
"newsletter_inscription": false,
"archived_at": null,
"created_at": "2022-06-10T17:04:06.000000Z",
"updated_at": "2022-06-10T17:04:06.000000Z"
}
This endpoint update a specific customer.
HTTP Request
PUT /customer/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the customer to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
is_customer | boolean | Is a customer |
is_prospect | boolean | Is a prospect |
is_provider | boolean | Is a provider |
is_subcontractor | boolean | Is a subcontractor |
type | integer | The customer type ID |
company_name | string | The company name |
company_type | string | The company type |
company_siret | string | The SIRET number of the company |
company_rcs | string | The RCS number of the company |
company_vatrate | string | The vatrate number of the company |
company_naf | string | The NAF code of the company |
company_capital | string | The capital of the company |
civility | integer | The civility ID |
firstname | string | Firstname. Present only if type.is_person = true |
lastname | string | Lastname. Present only if type.is_person = true |
fullname | string | Fullname. Present only if type.is_person = true |
birth_date | date | Birth date. Present only if type.is_person = true |
phone | string | Phone |
mobile | string | Mobile |
fax | string | Fax |
string | ||
website | string | Website |
activity | integer | The activity ID |
origin | integer | The origin ID |
tags | array | An array of string |
attach_tags | array | An array of string |
detach_tags | array | An array of string |
address_invoice | object | The invoice address |
address_invoice.label | string | Name of the address |
address_invoice.road1 | string | Road line 1 |
address_invoice.road2 | string | Road line 2 |
address_invoice.road3 | string | Road line 3 |
address_invoice.postal_code | string | Postal code |
address_invoice.town | string | Town |
address_invoice.country | integer | Country code |
address_delivery | object | The delivery address |
address_delivery.label | string | Name of the address |
address_delivery.road1 | string | Road line 1 |
address_delivery.road2 | string | Road line 2 |
address_delivery.road3 | string | Road line 3 |
address_delivery.postal_code | string | Postal code |
address_delivery.town | string | Town |
address_delivery.country | integer | Country code |
custom_fields | array | The custom fields values. |
custom_fields.* | array | |
custom_fields.*.id | array | The custom field ID. |
custom_fields.*.value | array | The custom field values. |
configs | object | The customer config parameters |
newsletter_inscription | boolean | Newsletter subscription status |
team_user | integer | The sales representative ID for the customer. |
archived | boolean | If the customer is archivate |
Delete a Customer
curl "/customer/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific customer.
HTTP Request
DELETE /customer/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the customer to delete |
Customers Activities
The Customer Activity object
The Customer Activity object
{
"id": 1,
"label": "Agroalimentaire",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the activity |
label | string | Name of the activity |
use_default | boolean | If the activity is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Customers Activities
curl "/customer/activity" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Agroalimentaire",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all activities.
HTTP Request
GET /customer/activity
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Customer Activity
curl "/customer/activity" \
-X POST \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Agroalimentaire",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create an activity.
HTTP Request
POST /customer/activity
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the activity |
use_default | boolean | If the activity is selected by default in App |
Retrieve a Customer Activity
curl "/customer/activity/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Agroalimentaire",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific activity.
HTTP Request
GET /customer/activity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the activity to retrieve |
Update a Customer Activity
curl "/customer/activity/1" \
-X PUT \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Agroalimentaire",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific activity.
HTTP Request
PUT /customer/activity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the activity to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the activity |
use_default | boolean | If the activity is selected by default in App |
Delete a Customer Activity
curl "/customer/activity/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific activity.
HTTP Request
DELETE /customer/activity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the activity to delete |
Customers Addresses
The Customer Address object
The Customer Address object
{
"id": 1,
"label": null,
"use_for_invoice": true,
"use_for_delivery": true,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"postal_code": "25000",
"town": "Besançon",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"created_at": "2022-05-20T16:11:58.000000Z",
"updated_at": "2022-05-20T16:11:58.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the address |
label | string | Name of the address |
use_for_invoice | boolean | Use the address for invoice |
use_for_delivery | boolean | Use the address for delivery |
road1 | string | Road line 1 |
road2 | string | Road line 2 |
road3 | string | Road line 3 |
postal_code | string | Postal code |
town | string | Town |
country_id | integer | Country id |
country | object | A Country object |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Customers Addresses
curl "/customer/1/address" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": null,
"use_for_invoice": true,
"use_for_delivery": true,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"postal_code": "25000",
"town": "Besançon",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"created_at": "2022-05-20T16:11:58.000000Z",
"updated_at": "2022-05-20T16:11:58.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all addresses for a specific customer.
HTTP Request
GET /customer/<CUSTOMER>/address
URL Parameters
Parameter | Description |
---|---|
CUSTOMER | The ID of the customer |
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Customer Address
curl "/customer/1/address" \
-X POST \
-H "" \
-d "label=Default address&postal_code=25000&..."
The above command returns JSON structured like this:
{
"id": 1,
"label": null,
"use_for_invoice": true,
"use_for_delivery": true,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"postal_code": "25000",
"town": "Besançon",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"created_at": "2022-05-20T16:11:58.000000Z",
"updated_at": "2022-05-20T16:11:58.000000Z"
}
This endpoint create an address for a specific customer.
HTTP Request
POST /customer/<CUSTOMER>/address
URL Parameters
Parameter | Description |
---|---|
CUSTOMER | The ID of the customer |
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | string | Name of the address | |
use_for_invoice | boolean | Use the address for invoice | |
use_for_delivery | boolean | Use the address for delivery | |
road1 | string | Road line 1 | |
road2 | string | Road line 2 | |
road3 | string | Road line 3 | |
postal_code | required | string | Postal code |
town | required | string | Town |
country | required | integer | Country code |
Retrieve a Customer Address
curl "/customer/1/address/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": null,
"use_for_invoice": true,
"use_for_delivery": true,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"postal_code": "25000",
"town": "Besançon",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"created_at": "2022-05-20T16:11:58.000000Z",
"updated_at": "2022-05-20T16:11:58.000000Z"
}
This endpoint retrieves a specific customer address.
HTTP Request
GET /customer/<CUSTOMER>/address/<ID>
URL Parameters
Parameter | Description |
---|---|
CUSTOMER | The ID of the customer |
ID | The ID of the address to retrieve |
Update a Customer Address
curl "/customer/1/address/1" \
-X PUT \
-H "" \
-d "label=Default address"
The above command returns JSON structured like this:
{
"id": 1,
"label": null,
"use_for_invoice": true,
"use_for_delivery": true,
"road1": "12 Rue de Dole",
"road2": null,
"road3": null,
"postal_code": "25000",
"town": "Besançon",
"country_id": 67,
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"created_at": "2022-05-20T16:11:58.000000Z",
"updated_at": "2022-05-20T16:11:58.000000Z"
}
This endpoint update a specific address.
HTTP Request
PUT /customer/<CUSTOMER>/address/<ID>
URL Parameters
Parameter | Description |
---|---|
CUSTOMER | The ID of the customer |
ID | The ID of the address to retrieve |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the address |
use_for_invoice | boolean | Use the address for invoice |
use_for_delivery | boolean | Use the address for delivery |
road1 | string | Road line 1 |
road2 | string | Road line 2 |
road3 | string | Road line 3 |
postal_code | string | Postal code |
town | string | Town |
country | integer | Country code |
Delete a Customer Address
curl "/customer/1/address/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific customer address.
HTTP Request
DELETE /customer/<CUSTOMER>/address/<ID>
URL Parameters
Parameter | Description |
---|---|
CUSTOMER | The ID of the customer |
ID | The ID of the address to delete |
Customers Origins
The Customer Origin object
The Customer Origin object
{
"id": 1,
"label": "Site internet",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the origin |
label | string | Name of the origin |
use_default | boolean | If the origin is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Customers Origins
curl "/customer/origin" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Site internet",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all origins.
HTTP Request
GET /customer/origin
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Customer Origin
curl "/customer/origin" \
-X POST \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Site internet",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create an origin.
HTTP Request
POST /customer/origin
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the origin |
use_default | boolean | If the origin is selected by default in App |
Retrieve a Customer Origin
curl "/customer/origin/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Site internet",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific origin.
HTTP Request
GET /customer/origin/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the origin to retrieve |
Update a Customer Origin
curl "/customer/origin/1" \
-X PUT \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Site internet",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific origin.
HTTP Request
PUT /customer/origin/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the origin to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the origin |
use_default | boolean | If the origin is selected by default in App |
Delete a Customer Origin
curl "/customer/origin/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific origin.
HTTP Request
DELETE /customer/origin/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the origin to delete |
Customers Types
The Customer Type object
The Customer Type object
{
"id": 1,
"label": "Entreprise",
"is_company": true,
"is_person": false,
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the type |
label | string | Name of the type |
is_company | boolean | If the customer have a company name |
is_person | boolean | If the customer have firstname & lastname |
use_default | boolean | If the type is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Customers Types
curl "/customer/type" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Entreprise",
"is_company": true,
"is_person": false,
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all types.
HTTP Request
GET /customer/type
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , is_company , is_person , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : with_person (boolean) , with_company (boolean) |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Customer Type
curl "/customer/type" \
-X POST \
-H "" \
-d "label=Entreprise&is_company=1"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Entreprise",
"is_company": true,
"is_person": false,
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a type.
HTTP Request
POST /customer/type
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the type |
is_company | required if is_person = false | boolean | If the customer have a company name |
is_person | required if is_company = false | boolean | If the customer have firstname & lastname |
use_default | boolean | If the type is selected by default in App |
Retrieve a Customer Type
curl "/customer/type/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Entreprise",
"is_company": true,
"is_person": false,
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific type.
HTTP Request
GET /customer/type/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the type to retrieve |
Update a Customer Type
curl "/customer/type/1" \
-X PUT \
-H "" \
-d "label=Entreprise"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Entreprise",
"is_company": true,
"is_person": false,
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific type.
HTTP Request
PUT /customer/type/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the type to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the type |
is_company | boolean | If the customer have a company name |
is_person | boolean | If the customer have firstname & lastname |
use_default | boolean | If the type is selected by default in App |
Delete a Customer Type
curl "/customer/type/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific type.
HTTP Request
DELETE /customer/type/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the type to delete |
Contacts
The Contact object
The Contact object
{
"id": 1,
"civility": {...},
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "M. Firstname Lastname",
"function_id": 1,
"function": {...},
"phone": "+33169000000",
"mobile": "+33669000000",
"fax": "+33169000001",
"email": "test@kwixeo.fr",
"website": "www.kwixeo.fr",
"road1": null,
"road2": null,
"road3": null,
"postal_code": "91230",
"town": "Montgeron",
"country_id": 67,
"country": {...},
"comments": null,
"tags": [
{...},
{...}
],
"newsletter_inscription": false,
"created_at": "2022-06-01T09:20:03.000000Z",
"updated_at": "2022-06-10T17:08:11.000000Z",
"customers": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the contact |
civility | object | A Civility Object. |
firstname | string | Firstname. |
lastname | string | Lastname. |
fullname | string | Fullname. |
function_id | integer | The contact function ID |
function | object | A Contact Function object. Present only if requested |
phone | string | Phone |
mobile | string | Mobile |
fax | string | Fax |
string | ||
website | string | Website |
road1 | string | Road line 1 |
road2 | string | Road line 2 |
road3 | string | Road line 3 |
postal_code | string | Postal code |
town | string | Town |
country_id | integer | Country id |
country | object | A Country object |
comments | string | Comments |
tags | array | An array of Tag object. Present only if requested |
newsletter_inscription | boolean | Newsletter subscription status |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
customers | array | The customers to which the contact is attached. An array of Customer object. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
Get All contacts
curl "/customer/contact" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"civility": {...},
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "M. Firstname Lastname",
"function_id": 1,
"function": {...},
"phone": "+33169000000",
"mobile": "+33669000000",
"fax": "+33169000001",
"email": "test@kwixeo.fr",
"website": "www.kwixeo.fr",
"road1": null,
"road2": null,
"road3": null,
"postal_code": "91230",
"town": "Montgeron",
"country_id": 67,
"country": {...},
"comments": null,
"tags": [
{...},
{...}
],
"newsletter_inscription": false,
"created_at": "2022-06-01T09:20:03.000000Z",
"updated_at": "2022-06-10T17:08:11.000000Z",
"customers": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
]
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all contacts.
HTTP Request
GET /customer/contact
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : fullname , civility.name , firstname , lastname , postal_code , town , country.name , email , website , phone , mobile , fax , comments , function.label , created_at , updated_at |
search | Make a global search. Search in : customers.company_name , customers.lastname , firstname , lastname , road1 , postal_code , town , country.name_fr , phone , mobile , fax , email , website , function.label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : firstname (string) , lastname (string) , civility (integer) , have_email_address (boolean) , email_address (string) , website (string) , have_phone_number (boolean) , phone_number (string) , have_mobile_number (boolean) , mobile_number (string) , all_phone_number (string) , have_fax_number (boolean) , fax_number (string) , address_country (string) , address_country_code (string) , address_country_name (string) , address_postal_code (string) , address_town (string) , any_tags (array of string) , all_tags (array of string) , with_customer (boolean) |
|
include | Related data to add to the answer Availables datas : customers , function , tags , custom_fields |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a contact
curl "/customer/contact" \
-X POST \
-H "" \
-d "lastname=Lastname"
The above command returns JSON structured like this:
{
"id": 1,
"civility": {...},
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "M. Firstname Lastname",
"function_id": 1,
"function": {...},
"phone": "+33169000000",
"mobile": "+33669000000",
"fax": "+33169000001",
"email": "test@kwixeo.fr",
"website": "www.kwixeo.fr",
"road1": null,
"road2": null,
"road3": null,
"postal_code": "91230",
"town": "Montgeron",
"country_id": 67,
"country": {...},
"comments": null,
"tags": [
{...},
{...}
],
"newsletter_inscription": false,
"created_at": "2022-06-01T09:20:03.000000Z",
"updated_at": "2022-06-10T17:08:11.000000Z",
"customers": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
]
}
This endpoint create a contact.
HTTP Request
POST /customer/contact
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
civility | integer | The civility ID | |
firstname | string | Firstname | |
lastname | required | string | Lastname |
function | integer | The contact function ID | |
phone | string | Phone | |
mobile | string | Mobile | |
fax | string | Fax | |
string | |||
website | string | Website | |
road1 | string | Road line 1 | |
road2 | string | Road line 2 | |
road3 | string | Road line 3 | |
postal_code | string | Postal code | |
town | string | Town | |
country | integer | Country code | |
comments | string | Comments | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
newsletter_inscription | boolean | Newsletter subscription status | |
customers | array | Array of customer ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. |
Retrieve a contact
curl "/customer/contact/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Contact object
}
This endpoint retrieves a specific contact.
HTTP Request
GET /customer/contact/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the contact to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : customers , function , tags , custom_fields |
Update a Contact
curl "/customer/contact/1" \
-X PUT \
-H "" \
-d "lastname=Lastname"
The above command returns JSON structured like this:
{
"id": 1,
"civility": {...},
"firstname": "Firstname",
"lastname": "Lastname",
"fullname": "M. Firstname Lastname",
"function_id": 1,
"function": {...},
"phone": "+33169000000",
"mobile": "+33669000000",
"fax": "+33169000001",
"email": "test@kwixeo.fr",
"website": "www.kwixeo.fr",
"road1": null,
"road2": null,
"road3": null,
"postal_code": "91230",
"town": "Montgeron",
"country_id": 67,
"country": {...},
"comments": null,
"tags": [
{...},
{...}
],
"newsletter_inscription": false,
"created_at": "2022-06-01T09:20:03.000000Z",
"updated_at": "2022-06-10T17:08:11.000000Z",
"customers": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
]
}
This endpoint update a specific contact.
HTTP Request
PUT /customer/contact/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the contact to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
civility | integer | The civility ID |
firstname | string | Firstname |
lastname | string | Lastname |
function | integer | The contact function ID |
phone | string | Phone |
mobile | string | Mobile |
fax | string | Fax |
string | ||
website | string | Website |
road1 | string | Road line 1 |
road2 | string | Road line 2 |
road3 | string | Road line 3 |
postal_code | string | Postal code |
town | string | Town |
country | integer | Country code |
comments | string | Comments |
tags | array | An array of string |
attach_tags | array | An array of string |
detach_tags | array | An array of string |
newsletter_inscription | boolean | Newsletter subscription status |
customers | array | Array of customer ID |
custom_fields | array | The custom fields values. |
custom_fields.* | array | |
custom_fields.*.id | array | The custom field ID. |
custom_fields.*.value | array | The custom field values. |
Delete a Contact
curl "/customer/contact/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific contact.
HTTP Request
DELETE /customer/contact/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the contact to delete |
Contacts Functions
The Contact Function object
The Contact Function object
{
"id": 1,
"label": "Comptable",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the function |
label | string | Name of the function |
use_default | boolean | If the function is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Contacts Functions
curl "/customer/contact/function" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Comptable",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all functions.
HTTP Request
GET /customer/contact/function
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Contact Function
curl "/customer/contact/function" \
-X POST \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Comptable",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a function.
HTTP Request
POST /customer/contact/function
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the function |
use_default | boolean | If the function is selected by default in App |
Retrieve a Contact Function
curl "/customer/contact/function/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Comptable",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific function.
HTTP Request
GET /customer/contact/function/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the function to retrieve |
Update a Contact Function
curl "/customer/contact/function/1" \
-X PUT \
-H "" \
-d "label=Agroalimentaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Comptable",
"use_default": false,
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific function.
HTTP Request
PUT /customer/contact/function/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the function to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the function |
use_default | boolean | If the function is selected by default in App |
Delete a Contact Function
curl "/customer/contact/function/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific function.
HTTP Request
DELETE /customer/contact/function/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the function to delete |
Custom Fields
The Custom Field object
The Custom Field object
{
"id": 1,
"label": "Custom field",
"type": "select",
"is_required": false,
"usage": [
"customer"
],
"options": [
{
"id": 1,
"value": "Option 1"
},
{
"id": 2,
"value": "Option 2"
}
],
"created_at": "2022-06-14T08:07:33.000000Z",
"updated_at": "2022-06-14T08:07:33.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the custom field |
label | string | Name of the custom field |
type | string | Type of custom field. Can be : amount , checkbox , date , number , phone , quantity , radio , rich-editor , select , text , textarea , customer , contact , product , service |
is_required | boolean | If the custom field is a required data |
usage | array | The data type where the custom field should appear. Can be : customer , prospect , provider , subcontractor , contact , product , service , quotation , command , delivery , proforma , invoice , credit |
options | array | The custom field options. Only when type = checkbox , radio or select An array of Custom Field Option object |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Custom Field Option object
The Custom Field Option object
{
"id": 1,
"value": "Value"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the custom field option |
value | string | Value of the custom field option |
The Custom Field Value object
The Custom Field Value object
{
"id": 1,
"label": "Custom field name",
"type": "text",
"value": "Custom field value"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the custom field |
label | string | Name of the custom field |
type | string | Type of custom field |
value | string, number, object or array | Value of the custom field option Value type depends on custom field type |
Get All custom fields
curl "/config/custom_field" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Custom field",
"type": "select",
"is_required": false,
"usage": [
"customer"
],
"options": [
{
"id": 1,
"value": "Option 1"
},
{
"id": 2,
"value": "Option 2"
}
],
"created_at": "2022-06-14T08:07:33.000000Z",
"updated_at": "2022-06-14T08:07:33.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all custom fields.
HTTP Request
GET /config/custom_field
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : usage (string) , type (string) |
|
include | Related data to add to the answer Availables datas : options |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a custom field
curl "/config/custom_field" \
-X POST \
-H "" \
-d "label=Custom Field&type=select&usage[]=customer&options[]=Option 1&options[]=Option 2"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Custom field",
"type": "select",
"is_required": false,
"usage": [
"customer"
],
"options": [
{
"id": 1,
"value": "Option 1"
},
{
"id": 2,
"value": "Option 2"
}
],
"created_at": "2022-06-14T08:07:33.000000Z",
"updated_at": "2022-06-14T08:07:33.000000Z"
}
This endpoint create a custom field.
HTTP Request
POST /config/custom_field
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the custom field |
type | required | string | Type of custom field. Can be : amount , checkbox , date , number , phone , quantity , radio , rich-editor , select , text , textarea , customer , contact , product , service |
is_required | boolean | If the custom field is a required data | |
usage | required | array | The data type where the custom field should appear. Can be : customer , prospect , provider , subcontractor , contact , product , service , quotation , command , delivery , proforma , invoice , credit |
options | array | Set the options values. Only when type = checkbox , radio or select |
|
options.* | string | The custom field option value |
Retrieve a custom field
curl "/config/custom_field/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Custom field",
"type": "select",
"is_required": false,
"usage": [
"customer"
],
"options": [
{
"id": 1,
"value": "Option 1"
},
{
"id": 2,
"value": "Option 2"
}
],
"created_at": "2022-06-14T08:07:33.000000Z",
"updated_at": "2022-06-14T08:07:33.000000Z"
}
This endpoint retrieves a specific custom field.
HTTP Request
GET /config/custom_field/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the custom field to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : timezone , team_user , team_users |
Update a custom field
curl "/config/custom_field/1" \
-X PUT \
-H "" \
-d "label=Custom Field"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Custom field",
"type": "select",
"is_required": false,
"usage": [
"customer"
],
"options": [
{
"id": 1,
"value": "Option 1"
},
{
"id": 2,
"value": "Option 2"
}
],
"created_at": "2022-06-14T08:07:33.000000Z",
"updated_at": "2022-06-14T08:07:33.000000Z"
}
This endpoint update a specific custom field.
HTTP Request
PUT /config/custom_field/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the custom field to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the custom field |
type | string | Type of custom field. Can be : amount , checkbox , date , number , phone , quantity , radio , rich-editor , select , text , textarea , customer , contact , product , service |
is_required | boolean | If the custom field is a required data |
usage | array | The data type where the custom field should appear. Can be : customer , prospect , provider , subcontractor , contact , product , service , quotation , command , delivery , proforma , invoice , credit |
options | array | Set the options values. Only when type = checkbox , radio or select |
options.* | string | The custom field option value |
add_options | array | Add options values. Only when type = checkbox , radio or select |
add_options.* | string | The custom field option value |
remove_options | array | Remove options values. Only when type = checkbox , radio or select |
remove_options.* | string | The custom field option value |
Delete a Custom Field
curl "/config/custom_field/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific custom field.
HTTP Request
DELETE /config/custom_field/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the custom field to delete |
Opportunities & Funnels
Funnels
The Funnel object
The Funnel object
{
"id": 1,
"name": "My funnel",
"categories": [
{...},
{...}
],
"steps": [
{...},
{...}
],
"restricted": true,
"team_users": [
{...},
{...}
],
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the funnel |
name | string | Name of the funnel |
categories | array | An array of Funnel category object. Present only if requested |
steps | array | An array of Funnel step object. Present only if requested |
restricted | boolean | True if the funnel is restricted to specific team users |
team_users | array | An array of Team user object. Only when restricted is true and present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Funnel Category object
The Funnel Category object
{
"id": 1,
"label": "My category",
"color": "#000000",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the funnel category |
label | string | The name of the category |
color | string | The hex color code |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
The Funnel Step object
The Funnel Step object
{
"id": 1,
"name": "My step",
"probability": 90,
"order": 1,
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the funnel step |
name | string | The name of the step |
probability | integer | The probability to win the opportunity |
order | integer | Order of the step in the funnel |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Funnels
curl "/opportunity/funnel" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Funnel object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all funnels.
HTTP Request
GET /opportunity/funnel
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : name |
search | Make a global search. Search in : name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page @ |
include | Related data to add to the answer Available datas : categories , steps , team_users |
|
edited_since | Returns items created or updated since the specified datetime |
Create a Funnel
curl "/opportunity/funnel" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Funnel object
}
This endpoint create a funnel.
HTTP Request
POST /opportunity/funnel
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
name | required | string | Name of the funnel |
categories | array | Array with the funnel categories | |
categories.*.name | required | string | The name of the category |
categories.*.color | string | The hex color code | |
categories | array | The categories of the funnel | |
categories.*.label | required | string | The name of the category |
categories.*.color | string | The hex color code | |
steps | array | The steps of the funnel | |
steps.name | required | string | The name of the step |
steps.*.probability | integer | The probability to win the opportunity | |
restricted | boolean | True if the funnel is restricted to specific team users | |
team_users | array | The team users who can access to the funnel |
Retrieve a Funnel
curl "/opportunity/funnel/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Funnel object
}
This endpoint retrieves a specific funnel.
HTTP Request
GET /opportunity/funnel/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the funnel |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Available datas : categories , steps , team_users |
Update a Funnel
curl "/opportunity/funnel/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Funnel object
}
This endpoint update a specific funnel.
HTTP Request
PUT /opportunity/funnel/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the funnel to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
name | required | string | Name of the funnel |
categories | array | Array with the funnel categories | |
categories.*.name | required | string | The name of the category |
categories.*.color | string | The hex color code | |
categories | array | The categories of the funnel | |
categories.*.label | required | string | The name of the category |
categories.*.color | string | The hex color code | |
add_categories | array | Add categories to the funnel | |
add_categories.*.label | required | string | The name of the category |
add_categories.*.color | string | The hex color code | |
remove_categories | array | Remove categories from the funnel | |
remove_categories.* | string | The name of the category | |
steps | array | The steps of the funnel | |
steps.name | required | string | The name of the step |
steps.*.probability | integer | The probability to win the opportunity | |
restricted | boolean | True if the funnel is restricted to specific team users | |
team_users | array | The team users who can access to the funnel |
Delete a Funnel
curl "/opportunity/funnel/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific funnel.
HTTP Request
DELETE /opportunity/funnel/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the funnel to delete |
Opportunities
The Opportunity object
The Opportunity object
{
"id": 1,
"reference": "OPP00001",
"title": "My opportunity title",
"customer_id": 1,
"customer": {...},
"contact_id": 1,
"contact": {...},
"description": "Description of my opportunity",
"amount": 100,
"expire_at": "2023-12-31",
"probability": 90,
"status": 1,
"status_label": "In progress",
"step_id": 1,
"step": {...},
"category_id": 1,
"category": {...},
"funnel": {...},
"team_user_id": 1,
"team_user": {...},
"custom_fields": [
{...},
{...}
],
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"winned_at": "2023-12-31",
"losed_at": "2023-12-31",
"cancelled_at": "2023-12-31",
"quotations": [
{...},
{...}
],
"commands": [
{...},
{...}
],
"proformas": [
{...},
{...}
],
"deliveries": [
{...},
{...}
],
"invoices": [
{...},
{...}
],
"credits": [
{...},
{...}
],
"quotation_ca": 1000,
"quotation_margin": 900,
"quotation_costs": 100,
"quotation_valid_ca": 1000,
"quotation_valid_margin": 900,
"quotation_valid_costs": 100,
"command_ca": 1000,
"command_margin": 900,
"command_costs": 100,
"proforma_ca": 1000,
"proforma_margin": 900,
"proforma_costs": 100,
"delivery_ca": 1000,
"delivery_margin": 900,
"delivery_costs": 100,
"invoice_ca": 1000,
"invoice_margin": 900,
"invoice_costs": 100,
"credit_ca": 0,
"credit_margin": 0,
"credit_costs": 0,
"sales_ca": 1000,
"sales_margin": 900,
"sales_costs": 100
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the opportunity |
reference | string | The reference of the opportunity |
title | integer | The title of the opportunity |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
description | string | The description of the opportunity |
amount | number | The potential amount of the opportunity |
expire_at.name | string | The expiration date of the opportunity |
probability | integer | The probability to win the opportunity |
status | integer | The status of the opportunity. Can be :
|
status_label | string | The label of the status |
step_id | integer | The id of the step |
step | object | A Funnel Step object Present only if requested |
category_id | string | Billing address : Postal code |
category | object | A Funnel Category object Present only if requested |
funnel | object | A Funnel object. Present only if requested |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
winned_at | string | The win date |
losed_at | string | The lose date |
cancelled_at | string | The cancel date |
quotations | array | The linked quotations. An array of Quotation object. Present only if requested |
commands | array | The linked commands. An array of Command object. Present only if requested |
proformas | array | The linked proformas. An array of Proforma object. Present only if requested |
deliveries | array | The linked deliveries. An array of Delivery object. Present only if requested |
invoices | array | The linked invoices. An array of Invoice object. Present only if requested |
credits | array | The linked credits. An array of Credit object. Present only if requested |
quotation_ca | number | The turnover of linked quotations |
quotation_margin | number | The gross margin of linked quotations |
quotation_costs | number | The costs amount of linked quotations |
quotation_valid_ca | number | The turnover of linked validated quotations |
quotation_valid_margin | number | The gross margin of linked validated quotations |
quotation_valid_costs | number | The costs amount of linked validated quotations |
command_ca | number | The gross margin of linked commands |
command_margin | number | The costs amount of linked commands |
command_costs | number | The costs amount of linked commands |
proforma_ca | number | The gross margin of linked proformas |
proforma_margin | number | The costs amount of linked proformas |
proforma_costs | number | The costs amount of linked proformas |
delivery_ca | number | The gross margin of linked deliveries |
delivery_margin | number | The costs amount of linked deliveries |
delivery_costs | number | The costs amount of linked deliveries |
invoice_ca | number | The gross margin of linked invoices |
invoice_margin | number | The costs amount of linked invoices |
invoice_costs | number | The costs amount of linked invoices |
credit_ca | number | The gross margin of linked credits |
credit_margin | number | The costs amount of linked credits |
credit_costs | number | The costs amount of linked credits |
sales_ca | number | The gross margin of linked invoices & credits |
sales_margin | number | The costs amount of linked invoices & credits |
sales_costs | number | The costs amount of linked invoices & credits |
Get All Opportunities
curl "/opportunity" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// an Opportunity object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all opportunities.
HTTP Request
GET /opportunity
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : title , amount , expire_at , probability , reference , customer.name , contact.fullname , status_label , status , step.name , category.label , funnel.name , quotation_ca , quotation_costs , quotation_margin , quotation_valid_ca , quotation_valid_costs , quotation_valid_margin , command_ca , command_costs , command_margin , proforma_ca , proforma_costs , proforma_margin , delivery_ca , delivery_costs , delivery_margin , invoice_ca , invoice_costs , invoice_margin , credit_ca , credit_costs , credit_margin , sales_ca , sales_costs , sales_margin , team_user.fullname , created_at , updated_at , winned_at , losed_at , cancelled_at |
search | Make a global search. Search in : title |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Available filters : created_since , created_until , edited_since , edited_until , customer , contact , custom_fields , team_user , expire_since , expire_until , status , step , funnel , category |
|
include | Related data to add to the answer Available datas : step , category , funnel , teamUser , customer , contact , customFields , linked_documents |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create an Opportunity
curl "/opportunity" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// An Opportunity object
}
This endpoint create an opportunity.
HTTP Request
POST /opportunity
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
customer | required | integer | The Customer ID |
contact | integer | The Contact ID | |
title | string | The opportunity title | |
description | string | The opportunity description | |
amount | string | The opportunity potential amount | |
expire_at | string | The opportunity expiration date | |
probability | string | The probability to win the opportunity | |
status | string | The status of the opportunity. Can be :
|
|
step | required | integer | The funnel step ID |
category | integer | The funnel category ID | |
team_user | integer | The team user ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
affairs | array | An array of the linked affairs. | |
affairs.* | integer | The ID of the affair. |
Retrieve an Opportunity
curl "/opportunity/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Opportunity object
}
This endpoint retrieves a specific opportunity.
HTTP Request
GET /opportunity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the opportunity |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Available datas : step , category , funnel , teamUser , customer , contact , customFields , linked_documents |
Update an Opportunity
curl "/opportunity/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// An Opportunity object
}
This endpoint update a specific opportunity.
HTTP Request
PUT /opportunity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the opportunity to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
customer | required | integer | The Customer ID |
contact | integer | The Contact ID | |
title | string | The opportunity title | |
description | string | The opportunity description | |
amount | string | The opportunity potential amount | |
expire_at | string | The opportunity expiration date | |
probability | string | The probability to win the opportunity | |
status | string | The status of the opportunity. Can be :
|
|
step | required | integer | The funnel step ID |
category | integer | The funnel category ID | |
team_user | integer | The team user ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
affairs | array | An array of the linked affairs. | |
affairs.* | integer | The ID of the affair. | |
add_affairs | array | An array of the affairs to link to the opportunity. | |
add_affairs.* | integer | The ID of the affair. | |
remove_affairs | array | An array of the affairs to unlink to the opportunity. | |
remove_affairs.* | integer | The ID of the affair. |
Delete an Opportunity
curl "/opportunity/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific opportunity.
HTTP Request
DELETE /opportunity/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the opportunity to delete |
Sales
Commands
The Command object
The Command object
{
"id": 1,
"date": "2022-07-05",
"number": 1,
"version": 1,
"reference": "DEV00001",
"is_draft": false,
"creation_date": "2022-07-05T05:55:49.000000Z",
"pdf_model_id": 4,
"pdf_model": {...},
"title": null,
"customer_id": 1,
"customer": {...},
"customer_vatrate": null,
"customer_command_reference": null,
"contact_id": 1,
"contact": {...},
"billing_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"delivery_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"comments": null,
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": "1.00000",
"use_global_vatrate": false,
"vat_rate_id": null,
"vat_rate": null,
"secondary_quantity_mode": "global",
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_content_ht": "280.00",
"total_content_tva": "56.00",
"total_content_ttc": "336.00",
"total_ecotaxe_ht": "0.00",
"total_ecotaxe_tva": "0.00",
"total_ecotaxe_ttc": "0.00",
"global_discount_type": "pourcent",
"global_discount_value": "0.00",
"global_discount_type_amount": "ht",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_ht": "280.00",
"total_tva": "56.00",
"total_ttc": "336.00",
"vatrates": [
{
"rate": 20,
"vat_rate_id": 1,
"vat_rate": {...},
"ht": 280,
"tva": 56,
"ttc": 336
}
],
"status": 3,
"status_label": "Envoyé",
"pdf_status": 2,
"catalog_costs": 0,
"various_costs": 0,
"total_costs": 0,
"workforce_costs": 0,
"total_charge": 0,
"gross_margin_amount": 280,
"gross_margin_rate": 100,
"markup_rate": 100,
"total_duration_hour": 0,
"nb_people_needed": 0,
"total_weight": "0.00",
"total_quantity_1": "2.00000",
"total_quantity_2": "4.00000",
"total_quantity": "4.00000",
"input_mode": "ht",
"params": null,
"team_user_id": 4,
"team_user": {...},
"sale_term_id": 1,
"sale_term": {...},
"tags": [
{...},
{...}
],
"payment_methods": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"input_options": {
"allow_delivery_address": true,
"allow_options": false,
"ean": 0,
"weight": 0,
"eco_participation": 0,
"col_number": false,
"col_reference": true,
"col_picture": false,
"col_unit": false,
"stock_display": 1,
"stock_tracabilities": false,
"costs_entries": 0,
"various_costs": false,
"workforce_entries": 0,
"gross_margin_amount": false,
"gross_margin_rate": false,
"markup_rate": false,
"secondary_quantity_unit": true
},
"pdf_options": {
"amounts": 3,
"discounts": 1,
"comments": 2,
"units": 2,
"pictures": 1,
"number_column": 1,
"reference_column": 1,
"ean_column": 1,
"weight_column": 1,
"vatrate_column": false,
"total_quantity": false,
"contact": 1,
"country": 1,
"vatrate_number": 1
},
"affair_id": 1,
"affair": {...},
"delivery_status": 1,
"delivery_status_label": "À livrer",
"already_billed": "0.00",
"pourcent_billed": "0.00",
"to_bill": "336.00",
"pourcent_to_bill": "100.00",
"penalty_rate": "0.00",
"penalty_rate_law": true,
"escompte_rate": "0.00",
"escompte_amount_ht": "0.00",
"escompte_amount_tva": "0.00",
"escompte_amount_ttc": "0.00",
"collection_costs_law": true,
"payment_term_id": 2,
"payment_term": {...},
"payment_term_value": "30 jours",
"grant_id": null,
"grant": null,
"grant_amount": "0.00",
"grant_label": null,
"grant_pdf_mentions": null,
"guarantee_holdback_pourcent": "0.00",
"guarantee_holdback_amount": "0.00",
"guarantee_holdback_duration": 0,
"expire_at": "2022-08-15T22:00:00.000000Z",
"accepted_at": null,
"advance_payment_type": "pourcent",
"advance_payment_value": "0.00",
"advance_payment_amount": "0.00",
"contents": [
{...},
{...},
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document |
date | string | Date of the document |
number | integer | The Unique incremental number of the document |
version | integer | The document version number |
reference | string | The Unique document reference |
is_draft | boolean | If the document is a draft |
creation_date | string | The create date of the document version |
pdf_model_id | integer | The Pdf Model ID |
pdf_model | object | A Pdf Model object Present only if requested |
title | string | The document title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
customer_vatrate | string | The customer vat rate number |
customer_command_reference | string | The customer command reference |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
billing_address | object | Billing address |
billing_address.name | string | Billing address : customer name |
billing_address.contact | string | Billing address : contact name |
billing_address.road | string | Billing address : Road 1 |
billing_address.road2 | string | Billing address : Road 2 |
billing_address.road3 | string | Billing address : Road 3 |
billing_address.city | string | Billing address : City |
billing_address.postal_code | string | Billing address : Postal code |
billing_address.country_code | string | Billing address : Country code |
billing_address.country | object | Billing address : Country. A Country object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
delivery_address | object | Delivery address |
delivery_address.name | string | Delivery address : customer name |
delivery_address.contact | string | Delivery address : contact name |
delivery_address.road | string | Delivery address : Road 1 |
delivery_address.road2 | string | Delivery address : Road 2 |
delivery_address.road3 | string | Delivery address : Road 3 |
delivery_address.city | string | Delivery address : City |
delivery_address.postal_code | string | Delivery address : Postal code |
delivery_address.country_code | string | Delivery address : Country code |
delivery_address.country | object | Delivery address : Country. A Country object. Present only if requested |
delivery_address.comments | string | Delivery address : Comments |
comments | string | Comments for the customer |
currency_id | integer | The Currency ID |
currency | object | A Currency object Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
use_global_vatrate | boolean | If the document uses a single VAT rate |
vat_rate_id | integer | If use_global_vatrate = true, the VAT rate ID |
vat_rate | object | If use_global_vatrate = true, a VAT Rate object Present only if requested |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value |
secondary_unit_id | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID |
secondary_unit | object | If secondary_quantity_mode = 'global', the secondary quantity Unit object. Present only if requested |
total_content_ht | number | The total excluding VAT of the content |
total_content_tva | number | The total VAT of the content |
total_content_ttc | number | The total including VAT of the content |
total_ecotaxe_ht | number | The total amount excluding VAT of the eco-contribution |
total_ecotaxe_tva | number | The total VAT amount of the eco-contribution |
total_ecotaxe_ttc | number | The total amount including tax of the eco-contribution |
global_discount_type | string | The type of the global discount. Can be :
|
global_discount_value | number | The value of the global discount |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
global_discount_ht | number | The amount excluding VAT of the global discount |
global_discount_tva | number | The VAT amount of the global discount |
global_discount_ttc | number | The amount including VAT of the global discount |
total_ht | number | The total excluding VAT of the document |
total_tva | number | The VAT total of the document |
total_ttc | number | The total including VAT of the document |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.vat_rate | object | A Vat Rate object |
vatrates.vat_rate_id | integer | The Vat Rate ID |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
status | integer | The status of the document. Can be :
|
status_label | string | The status label |
pdf_status | integer | The pdf generation status. Can be :
|
catalog_costs | number | Product costs |
various_costs | number | Various costs |
total_costs | number | Total costs |
workforce_costs | number | Workforce costs |
total_charge | number | Total charges |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
total_duration_hour | number | Total duration of services |
nb_people_needed | integer | Number of technicians required |
total_weight | number | Total weight |
total_quantity_1 | number | Total of quantity 1 |
total_quantity_2 | number | Total of quantity 2 |
total_quantity | number | Total quantity |
input_mode | string | Input mode. Can be : ht , ttc |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
sale_term_id | integer | The sale term ID |
sale_term | object | A Sale Term object Present only if requested |
tags | array | An array of Tag object. Present only if requested |
payment_methods | array | An array of Payment Method. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
input_options | object | Document form options |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form |
input_options.allow_options | boolean | Enable the ability to offer options in documents form |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
input_options.col_number | boolean | Show the number for lines in documents form |
input_options.col_reference | boolean | Show the reference for lines in documents form |
input_options.col_picture | boolean | Show the pictures for lines in documents form |
input_options.col_unit | boolean | Show the unites for lines in documents form |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
input_options.various_costs | boolean | Ability to enter various costs in documents form |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form |
input_options.markup_rate | boolean | Show the markup rate in documents form |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
pdf_options | object | PDF document options |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
pdf_options.comments | integer | Comments display mode. Can be :
|
pdf_options.units | integer | Unit display mode. Can be :
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) |
pdf_options.contact | integer | Contact display |
pdf_options.country | integer | Country display |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. |
affair_id | integer | The affair ID |
affair | object | The Affair object. Present only if requested |
delivery_status | integer | The deivery status of the document. Can be :
|
delivery_status_label | string | The deivery status label |
already_billed | number | Amount already billed |
pourcent_billed | integer | Pourcent alread billed |
to_bill | number | Amount to bill |
pourcent_to_bill | integer | Pourcent to bill |
penalty_rate | number | The penalty rate |
penalty_rate_law | boolean | If the penalty rate law must be displayed |
escompte_rate | number | The escompte rate |
escompte_amount_ht | number | The amount excluding tax of the escompte |
escompte_amount_tva | number | The VAT amount of the escompte |
escompte_amount_ttc | number | The amount including tax of the escompte |
collection_costs_law | boolean | If the collection costs law must be displayed |
payment_term_id | integer | The payment term ID |
payment_term | object | A Payment Term object. Present only if requested |
payment_term_value | string | The payment term label |
grant_id | integer | The grant ID |
grant | object | A Grant object. Present only if requested |
grant_amount | number | The grant amount |
grant_label | number | The grant label |
grant_pdf_mentions | string | The grant mention to appear on the PDF |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent |
guarantee_holdback_amount | number | The guarantee holdback amount |
guarantee_holdback_duration | integer | The guarantee holdback duration in month |
expire_at | string | The expiration date |
accepted_at | string | The date of acceptance by the client |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
advance_payment_value | number | The advance payment value |
advance_payment_amount | number | The advance payment amount |
contents | array | An array of Command Content object |
The Command Content object
The Command Content object
{
"id": 1,
"variation_id": 1,
"variation": {...},
"picture_id": 1,
"picture": {...},
"affair_content_id": 1,
"is_comments": false,
"is_subtotal": false,
"is_pagebreak": false,
"is_hidden": false,
"line_number": 1,
"reference": null,
"designation": "test",
"comments": null,
"ean_code": null,
"sale_category_id": 1,
"sale_category": {...},
"weight_unit": null,
"total_weight": "0.00",
"discount_type": "pourcent",
"discount_value": "10.00",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"ecotax_u_ht": "0.00",
"ecotax_u_tva": "0.00",
"ecotax_u_ttc": "0.00",
"unit_price_net_ht": "90.00000",
"unit_price_net_tva": "18.00000",
"unit_price_net_ttc": "108.00000",
"is_option": false,
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_quantity": "2.00000",
"vat_rate_id": 1,
"vat_rate_value": "20.00",
"vat_rate": {...},
"subtotal_ht": "200.00",
"subtotal_tva": "40.00",
"subtotal_ttc": "240.00",
"total_ecotax_ht": "0.00",
"total_ecotax_tva": "0.00",
"total_ecotax_ttc": "0.00",
"discount_ht": null,
"discount_tva": null,
"discount_ttc": null,
"total_ht": "180.00",
"total_tva": "36.00",
"total_ttc": "216.00",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_net_ht": "-100.00",
"total_net_tva": "-20.00",
"total_net_ttc": "-120.00",
"catalog_costs_u": 0,
"various_costs_u": 0,
"total_costs_u": 0,
"hourly_person_cost": 0,
"number_people_needed": 0,
"duration": 0,
"duration_type": "hour",
"workforce_costs_u": 0,
"total_charge_u": 0,
"gross_margin_amount_u": 90,
"total_catalog_costs": 0,
"total_various_costs": 0,
"total_costs": 0,
"total_duration_hour": 0,
"total_workforce": 0,
"total_charge": 0,
"gross_margin_amount": 180,
"gross_margin_rate": 100,
"markup_rate": 100,
"delivered_quantity": "0.00000",
"quantity_to_deliver": "1.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document content |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
variation_id | integer | The product variation ID |
variation | object | A Product Variation object. Present only if requested |
picture_id | integer | The picture ID |
picture | object | A File object. Present only if requested |
affair_content_id | integer | The affair content ID. Used to link the content of documents between linked documents (quotes, delivery notes, invoices, etc.) |
is_comments | boolean | If the line is a comment line |
is_subtotal | boolean | If the row is a subtotal row |
is_pagebreak | boolean | If the line is a page break |
line_number | integer | The line number |
reference | string | The reference |
designation | string | The designation |
comments | string | A comment not visible to the customer |
ean_code | string | The EAN code |
sale_category_id | integer | The sale category ID |
sale_category | object | A Sale Category object. Present only if requested |
weight_unit | string | The unit weight |
total_weight | number | The total weight |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT |
ecotax_u_tva | number | Unit amount of the VAT eco-contribution |
ecotax_u_ttc | number | Unit amount of the eco-contribution including tax |
discount_type | string | The type of discount. Can be :
|
discount_value | number | The value of discount |
discount_ht | number | Unit amount excluding tax of the discount |
discount_tva | number | Unit VAT amount of the discount |
discount_ttc | number | Unit amount including VAT of the discount |
unit_price_net_ht | number | Discounted unit price excluding tax |
unit_price_net_tva | number | Unit price VAT discounted |
unit_price_net_ttc | number | Discounted unit price including VAT |
is_option | boolean | If line is an option |
quantity | number | Quantity |
unit_id | integer | The unit ID |
unit | object | A Unit object. Present only if requested |
secondary_quantity | number | The secondary quantity |
secondary_unit_id | integer | The unit ID for the secondary quantity |
secondary_unit | object | The unit for the secondary quantity. A Unit object. Present only if requested |
total_quantity | number | The total quantity |
vat_rate_id | integer | The Vat rate ID |
vat_rate | object | A Vat Rate object. Present only if requested |
vat_rate_value | number | The Vat Rate value |
subtotal_ht | number | If the line is a subtotal, the HT subtotal |
subtotal_tva | number | If the line is a subtotal, the TVA subtotal |
subtotal_ttc | number | If the line is a subtotal, the TTC subtotal |
total_ecotax_ht | number | Total amount excluding VAT of the eco-contribution |
total_ecotax_tva | number | Total VAT amount of the eco-contribution |
total_ecotax_ttc | number | Total amount including VAT of the eco-contribution |
total_ht | number | Total HT |
total_tva | number | Total TVA |
total_ttc | number | Total TTC |
global_discount_ht | number | HT Part of the general discount applied to this line |
global_discount_tva | number | TVA Part of the general discount applied to this line |
global_discount_ttc | number | TTC Part of the general discount applied to this line |
total_net_ht | number | Total NET HT of the line |
total_net_tva | number | Total NET TVA of the line |
total_net_ttc | number | Total NET TTC of the line |
catalog_costs_u | number | Unit product costs |
various_costs_u | number | Unit various costs |
total_costs_u | number | Unit total costs |
hourly_person_cost | number | Technician hourly costs |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , day |
workforce_costs_u | number | The unit workforce costs |
total_charge_u | number | Total unit charge |
gross_margin_amount_u | number | Unit gross margin amount |
total_catalog_costs | number | Total product costs |
total_various_costs | number | Total various costs |
total_costs | number | Total total costs |
total_duration_hour | number | Total duration of service in hour |
total_workforce | number | Total workforce costs |
total_charge | number | Total charge |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
delivered_quantity | number | The delivered quantity |
quantity_to_deliver | number | The quantity to deliver |
Get All Commands
curl "/sales/command" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Command object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all commands.
HTTP Request
GET /sales/command
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : number , reference , customer_command_reference , title , date , expire_at , customer.name , contact.fullname , billing_address.city , billing_address.postal_code , billing_address.country.name , delivery_address.city , delivery_address.postal_code , delivery_address.country.name , total_ht , total_tva , total_ttc , already_billed , pourcent_billed , to_bill , pourcent_to_bill , total_costs , workforce_costs , total_charge , gross_margin_amount , gross_margin_rate , markup_rate , team_user.fullname , status_label , delivery_status_label , affair.reference |
search | Make a global search. Search in : reference , customer.company_name , customer.lastname , contact.lastname , customer_command_reference , title , billing_address_city , billing_address_postal_code , billing_address_country.name_fr , delivery_address_city , delivery_address_postal_code , delivery_address_country.name_fr , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : team_user (integer) , customer (integer) , contact (integer) , any_tags (array of string) , all_tags (array of string) , status (integer) , date_since (date) , date_until (date) , expire_since (date) , expire_until (date) , is_draft (boolean) , main_currency (boolean) , with_currency (integer) , delivery_status (integer) , can_be_billed (boolean) |
|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , payment_methods |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Command
curl "/sales/command" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint create a command.
HTTP Request
POST /sales/command
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the document |
is_draft | boolean | If the document is a draft | |
pdf_model | required | integer | The Pdf Model ID |
title | string | The document title | |
customer | required | integer | The Customer ID |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | required | string | Billing address : City |
billing_address_postal_code | required | string | Billing address : Postal code |
billing_address_country | required | string | Billing address : Country code |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | required | array | |
contents.* | object | ||
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Retrieve a Command
curl "/sales/command/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint retrieves a specific command.
HTTP Request
GET /sales/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , linked_elements , payment_methods |
Retrieve the PDF of a Command
curl "/sales/command/1/pdf" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..." // The file content base64 encoded
// A File object
}
This endpoint retrieves the PDF of a command.
HTTP Request
GET /sales/command/<ID>/pdf
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Update a Command
curl "/sales/command/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint update a specific command.
HTTP Request
PUT /sales/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
pdf_model | integer | The Pdf Model ID | |
title | string | The document title | |
customer | integer | The Customer ID | |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | string | Billing address : City | |
billing_address_postal_code | string | Billing address : Postal code | |
billing_address_country | string | Billing address : Country code | |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | array | ||
contents.* | object | ||
contents.*.affair_content | integer | The affair content ID. Used to updated an existing line. |
|
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Lite update a Command
curl "/sales/command/1/lite" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint update a specific command.
HTTP Request
PUT /sales/command/<ID>/lite
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The document title | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
team_user | integer | The sales representative ID for the document | |
contact | integer | The Contact ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
status | integer | The status of the document. Can be :
|
Create a quotation for a command
curl "/sales/command/1/quotation" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint create a quotation from a command.
HTTP Request
PUT /sales/command/<ID>/quotation
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the command must be created in draft |
Create a proforma for a command
curl "/sales/command/1/proforma" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint create a proforma from a command.
HTTP Request
PUT /sales/command/<ID>/proforma
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the proforma must be created in draft |
Create a deposit invoice from the command
curl "/sales/command/1/deposit-invoice" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint bill a command.
HTTP Request
PUT /sales/command/<ID>/deposit-invoice
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the deposit invoice must be created in draft | |
with_vatrate | boolean | If the deposit invoice should have VAT | |
amount | array | The amount of the deposit | |
percentage | array | The percentage of the deposit Is not used if the amount is present |
Bill a command
curl "/sales/command/1/bill" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint create an invoice from the command.
HTTP Request
PUT /sales/command/<ID>/bill
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft |
Deliver a command
curl "/sales/command/1/deliver" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Delivery object
}
This endpoint deliver a command.
HTTP Request
PUT /sales/command/<ID>/deliver
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft | |
contents | array | The content of the command to deliver | |
contents.* | array | ||
contents.*.id | integer | The affair content id of the command line to delivery | |
contents.*.quantity | number | The quantity to deliver |
Delete a Command
curl "/sales/command/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific command.
HTTP Request
DELETE /sales/command/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the command to delete |
Deliveries
The Delivery object
The Delivery object
{
"id": 1,
"date": "2022-07-05",
"number": 1,
"version": 1,
"reference": "DEV00001",
"is_draft": false,
"creation_date": "2022-07-05T05:55:49.000000Z",
"pdf_model_id": 4,
"pdf_model": {...},
"title": null,
"customer_id": 1,
"customer": {...},
"customer_vatrate": null,
"customer_command_reference": null,
"contact_id": 1,
"contact": {...},
"billing_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"delivery_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"comments": null,
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": "1.00000",
"use_global_vatrate": false,
"vat_rate_id": null,
"vat_rate": null,
"secondary_quantity_mode": "global",
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_content_ht": "280.00",
"total_content_tva": "56.00",
"total_content_ttc": "336.00",
"total_ecotaxe_ht": "0.00",
"total_ecotaxe_tva": "0.00",
"total_ecotaxe_ttc": "0.00",
"global_discount_type": "pourcent",
"global_discount_value": "0.00",
"global_discount_type_amount": "ht",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_ht": "280.00",
"total_tva": "56.00",
"total_ttc": "336.00",
"vatrates": [
{
"rate": 20,
"vat_rate_id": 1,
"vat_rate": {...},
"ht": 280,
"tva": 56,
"ttc": 336
}
],
"status": 3,
"status_label": "Envoyé",
"pdf_status": 2,
"catalog_costs": 0,
"various_costs": 0,
"total_costs": 0,
"workforce_costs": 0,
"total_charge": 0,
"gross_margin_amount": 280,
"gross_margin_rate": 100,
"markup_rate": 100,
"total_duration_hour": 0,
"nb_people_needed": 0,
"total_weight": "0.00",
"total_quantity_1": "2.00000",
"total_quantity_2": "4.00000",
"total_quantity": "4.00000",
"input_mode": "ht",
"params": null,
"team_user_id": 4,
"team_user": {...},
"sale_term_id": 1,
"sale_term": {...},
"tags": [
{...},
{...}
],
"payment_methods": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"input_options": {
"allow_delivery_address": true,
"allow_options": false,
"ean": 0,
"weight": 0,
"eco_participation": 0,
"col_number": false,
"col_reference": true,
"col_picture": false,
"col_unit": false,
"stock_display": 1,
"stock_tracabilities": false,
"costs_entries": 0,
"various_costs": false,
"workforce_entries": 0,
"gross_margin_amount": false,
"gross_margin_rate": false,
"markup_rate": false,
"secondary_quantity_unit": true
},
"pdf_options": {
"amounts": 3,
"discounts": 1,
"comments": 2,
"units": 2,
"pictures": 1,
"number_column": 1,
"reference_column": 1,
"ean_column": 1,
"weight_column": 1,
"vatrate_column": false,
"total_quantity": false,
"contact": 1,
"country": 1,
"vatrate_number": 1
},
"affair_id": 1,
"affair": {...},
"delivery_status": 1,
"delivery_status_label": "À livrer",
"already_billed": "0.00",
"pourcent_billed": "0.00",
"to_bill": "336.00",
"pourcent_to_bill": "100.00",
"penalty_rate": "0.00",
"penalty_rate_law": true,
"escompte_rate": "0.00",
"escompte_amount_ht": "0.00",
"escompte_amount_tva": "0.00",
"escompte_amount_ttc": "0.00",
"collection_costs_law": true,
"payment_term_id": 2,
"payment_term": {...},
"payment_term_value": "30 jours",
"grant_id": null,
"grant": null,
"grant_amount": "0.00",
"grant_label": null,
"grant_pdf_mentions": null,
"guarantee_holdback_pourcent": "0.00",
"guarantee_holdback_amount": "0.00",
"guarantee_holdback_duration": 0,
"expire_at": "2022-08-15T22:00:00.000000Z",
"accepted_at": null,
"advance_payment_type": "pourcent",
"advance_payment_value": "0.00",
"advance_payment_amount": "0.00",
"contents": [
{...},
{...},
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document |
date | string | Date of the document |
number | integer | The Unique incremental number of the document |
version | integer | The document version number |
reference | string | The Unique document reference |
is_draft | boolean | If the document is a draft |
creation_date | string | The create date of the document version |
pdf_model_id | integer | The Pdf Model ID |
pdf_model | object | A Pdf Model object Present only if requested |
title | string | The document title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
customer_vatrate | string | The customer vat rate number |
customer_command_reference | string | The customer command reference |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
billing_address | object | Billing address |
billing_address.name | string | Billing address : customer name |
billing_address.contact | string | Billing address : contact name |
billing_address.road | string | Billing address : Road 1 |
billing_address.road2 | string | Billing address : Road 2 |
billing_address.road3 | string | Billing address : Road 3 |
billing_address.city | string | Billing address : City |
billing_address.postal_code | string | Billing address : Postal code |
billing_address.country_code | string | Billing address : Country code |
billing_address.country | object | Billing address : Country. A Country object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
delivery_address | object | Delivery address |
delivery_address.name | string | Delivery address : customer name |
delivery_address.contact | string | Delivery address : contact name |
delivery_address.road | string | Delivery address : Road 1 |
delivery_address.road2 | string | Delivery address : Road 2 |
delivery_address.road3 | string | Delivery address : Road 3 |
delivery_address.city | string | Delivery address : City |
delivery_address.postal_code | string | Delivery address : Postal code |
delivery_address.country_code | string | Delivery address : Country code |
delivery_address.country | object | Delivery address : Country. A Country object. Present only if requested |
delivery_address.comments | string | Delivery address : Comments |
comments | string | Comments for the customer |
currency_id | integer | The Currency ID |
currency | object | A Currency object Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
use_global_vatrate | boolean | If the document uses a single VAT rate |
vat_rate_id | integer | If use_global_vatrate = true, the VAT rate ID |
vat_rate | object | If use_global_vatrate = true, a VAT Rate object Present only if requested |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value |
secondary_unit_id | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID |
secondary_unit | object | If secondary_quantity_mode = 'global', the secondary quantity Unit object. Present only if requested |
total_content_ht | number | The total excluding VAT of the content |
total_content_tva | number | The total VAT of the content |
total_content_ttc | number | The total including VAT of the content |
total_ecotaxe_ht | number | The total amount excluding VAT of the eco-contribution |
total_ecotaxe_tva | number | The total VAT amount of the eco-contribution |
total_ecotaxe_ttc | number | The total amount including tax of the eco-contribution |
global_discount_type | string | The type of the global discount. Can be :
|
global_discount_value | number | The value of the global discount |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
global_discount_ht | number | The amount excluding VAT of the global discount |
global_discount_tva | number | The VAT amount of the global discount |
global_discount_ttc | number | The amount including VAT of the global discount |
total_ht | number | The total excluding VAT of the document |
total_tva | number | The VAT total of the document |
total_ttc | number | The total including VAT of the document |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.vat_rate | object | A Vat Rate object |
vatrates.vat_rate_id | integer | The Vat Rate ID |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
status | integer | The status of the document. Can be :
|
status_label | string | The status label |
pdf_status | integer | The pdf generation status. Can be :
|
catalog_costs | number | Product costs |
various_costs | number | Various costs |
total_costs | number | Total costs |
workforce_costs | number | Workforce costs |
total_charge | number | Total charges |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
total_duration_hour | number | Total duration of services |
nb_people_needed | integer | Number of technicians required |
total_weight | number | Total weight |
total_quantity_1 | number | Total of quantity 1 |
total_quantity_2 | number | Total of quantity 2 |
total_quantity | number | Total quantity |
input_mode | string | Input mode. Can be : ht , ttc |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
sale_term_id | integer | The sale term ID |
sale_term | object | A Sale Term object Present only if requested |
tags | array | An array of Tag object. Present only if requested |
payment_methods | array | An array of Payment Method. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
input_options | object | Document form options |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form |
input_options.allow_options | boolean | Enable the ability to offer options in documents form |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
input_options.col_number | boolean | Show the number for lines in documents form |
input_options.col_reference | boolean | Show the reference for lines in documents form |
input_options.col_picture | boolean | Show the pictures for lines in documents form |
input_options.col_unit | boolean | Show the unites for lines in documents form |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
input_options.various_costs | boolean | Ability to enter various costs in documents form |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form |
input_options.markup_rate | boolean | Show the markup rate in documents form |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
pdf_options | object | PDF document options |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
pdf_options.comments | integer | Comments display mode. Can be :
|
pdf_options.units | integer | Unit display mode. Can be :
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) |
pdf_options.contact | integer | Contact display |
pdf_options.country | integer | Country display |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. |
affair_id | integer | The affair ID |
affair | object | The Affair object. Present only if requested |
delivery_status | integer | The deivery status of the document. Can be :
|
delivery_status_label | string | The deivery status label |
already_billed | number | Amount already billed |
pourcent_billed | integer | Pourcent alread billed |
to_bill | number | Amount to bill |
pourcent_to_bill | integer | Pourcent to bill |
penalty_rate | number | The penalty rate |
penalty_rate_law | boolean | If the penalty rate law must be displayed |
escompte_rate | number | The escompte rate |
escompte_amount_ht | number | The amount excluding tax of the escompte |
escompte_amount_tva | number | The VAT amount of the escompte |
escompte_amount_ttc | number | The amount including tax of the escompte |
collection_costs_law | boolean | If the collection costs law must be displayed |
payment_term_id | integer | The payment term ID |
payment_term | object | A Payment Term object. Present only if requested |
payment_term_value | string | The payment term label |
package_qty | string | The number of packages |
delivery_mode | string | The delivery method |
delivery_tracking | string | Delivery tracking number |
contents | array | An array of Delivery Content object |
The Delivery Content object
The Delivery Content object
{
"id": 1,
"variation_id": 1,
"variation": {...},
"picture_id": 1,
"picture": {...},
"affair_content_id": 1,
"is_comments": false,
"is_subtotal": false,
"is_pagebreak": false,
"is_hidden": false,
"line_number": 1,
"reference": null,
"designation": "test",
"comments": null,
"ean_code": null,
"sale_category_id": 1,
"sale_category": {...},
"weight_unit": null,
"total_weight": "0.00",
"discount_type": "pourcent",
"discount_value": "10.00",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"ecotax_u_ht": "0.00",
"ecotax_u_tva": "0.00",
"ecotax_u_ttc": "0.00",
"unit_price_net_ht": "90.00000",
"unit_price_net_tva": "18.00000",
"unit_price_net_ttc": "108.00000",
"is_option": false,
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_quantity": "2.00000",
"vat_rate_id": 1,
"vat_rate_value": "20.00",
"vat_rate": {...},
"subtotal_ht": "200.00",
"subtotal_tva": "40.00",
"subtotal_ttc": "240.00",
"total_ecotax_ht": "0.00",
"total_ecotax_tva": "0.00",
"total_ecotax_ttc": "0.00",
"discount_ht": null,
"discount_tva": null,
"discount_ttc": null,
"total_ht": "180.00",
"total_tva": "36.00",
"total_ttc": "216.00",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_net_ht": "-100.00",
"total_net_tva": "-20.00",
"total_net_ttc": "-120.00",
"catalog_costs_u": 0,
"various_costs_u": 0,
"total_costs_u": 0,
"hourly_person_cost": 0,
"number_people_needed": 0,
"duration": 0,
"duration_type": "hour",
"workforce_costs_u": 0,
"total_charge_u": 0,
"gross_margin_amount_u": 90,
"total_catalog_costs": 0,
"total_various_costs": 0,
"total_costs": 0,
"total_duration_hour": 0,
"total_workforce": 0,
"total_charge": 0,
"gross_margin_amount": 180,
"gross_margin_rate": 100,
"markup_rate": 100,
"delivered_quantity": "0.00000",
"quantity_to_deliver": "1.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document content |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
variation_id | integer | The product variation ID |
variation | object | A Product Variation object. Present only if requested |
picture_id | integer | The picture ID |
picture | object | A File object. Present only if requested |
affair_content_id | integer | The affair content ID. Used to link the content of documents between linked documents (quotes, delivery notes, invoices, etc.) |
is_comments | boolean | If the line is a comment line |
is_subtotal | boolean | If the row is a subtotal row |
is_pagebreak | boolean | If the line is a page break |
line_number | integer | The line number |
reference | string | The reference |
designation | string | The designation |
comments | string | A comment not visible to the customer |
ean_code | string | The EAN code |
sale_category_id | integer | The sale category ID |
sale_category | object | A Sale Category object. Present only if requested |
weight_unit | string | The unit weight |
total_weight | number | The total weight |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT |
ecotax_u_tva | number | Unit amount of the VAT eco-contribution |
ecotax_u_ttc | number | Unit amount of the eco-contribution including tax |
discount_type | string | The type of discount. Can be :
|
discount_value | number | The value of discount |
discount_ht | number | Unit amount excluding tax of the discount |
discount_tva | number | Unit VAT amount of the discount |
discount_ttc | number | Unit amount including VAT of the discount |
unit_price_net_ht | number | Discounted unit price excluding tax |
unit_price_net_tva | number | Unit price VAT discounted |
unit_price_net_ttc | number | Discounted unit price including VAT |
is_option | boolean | If line is an option |
quantity | number | Quantity |
unit_id | integer | The unit ID |
unit | object | A Unit object. Present only if requested |
secondary_quantity | number | The secondary quantity |
secondary_unit_id | integer | The unit ID for the secondary quantity |
secondary_unit | object | The unit for the secondary quantity. A Unit object. Present only if requested |
total_quantity | number | The total quantity |
vat_rate_id | integer | The Vat rate ID |
vat_rate | object | A Vat Rate object. Present only if requested |
vat_rate_value | number | The Vat Rate value |
subtotal_ht | number | If the line is a subtotal, the HT subtotal |
subtotal_tva | number | If the line is a subtotal, the TVA subtotal |
subtotal_ttc | number | If the line is a subtotal, the TTC subtotal |
total_ecotax_ht | number | Total amount excluding VAT of the eco-contribution |
total_ecotax_tva | number | Total VAT amount of the eco-contribution |
total_ecotax_ttc | number | Total amount including VAT of the eco-contribution |
total_ht | number | Total HT |
total_tva | number | Total TVA |
total_ttc | number | Total TTC |
global_discount_ht | number | HT Part of the general discount applied to this line |
global_discount_tva | number | TVA Part of the general discount applied to this line |
global_discount_ttc | number | TTC Part of the general discount applied to this line |
total_net_ht | number | Total NET HT of the line |
total_net_tva | number | Total NET TVA of the line |
total_net_ttc | number | Total NET TTC of the line |
catalog_costs_u | number | Unit product costs |
various_costs_u | number | Unit various costs |
total_costs_u | number | Unit total costs |
hourly_person_cost | number | Technician hourly costs |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , day |
workforce_costs_u | number | The unit workforce costs |
total_charge_u | number | Total unit charge |
gross_margin_amount_u | number | Unit gross margin amount |
total_catalog_costs | number | Total product costs |
total_various_costs | number | Total various costs |
total_costs | number | Total total costs |
total_duration_hour | number | Total duration of service in hour |
total_workforce | number | Total workforce costs |
total_charge | number | Total charge |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
delivered_quantity | number | The delivered quantity |
quantity_to_deliver | number | The quantity to deliver |
Get All Deliveries
curl "/sales/delivery" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Delivery object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all deliveries.
HTTP Request
GET /sales/delivery
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : number , reference , customer_command_reference , title , date , expire_at , customer.name , contact.fullname , billing_address.city , billing_address.postal_code , billing_address.country.name , delivery_address.city , delivery_address.postal_code , delivery_address.country.name , total_ht , total_tva , total_ttc , already_billed , pourcent_billed , to_bill , pourcent_to_bill , total_costs , workforce_costs , total_charge , gross_margin_amount , gross_margin_rate , markup_rate , team_user.fullname , status_label , delivery_status_label , affair.reference |
search | Make a global search. Search in : reference , customer.company_name , customer.lastname , contact.lastname , customer_command_reference , title , billing_address_city , billing_address_postal_code , billing_address_country.name_fr , delivery_address_city , delivery_address_postal_code , delivery_address_country.name_fr , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : team_user (integer) , customer (integer) , contact (integer) , any_tags (array of string) , all_tags (array of string) , status (integer) , date_since (date) , date_until (date) , is_draft (boolean) , main_currency (boolean) , with_currency (integer) , delivery_status (integer) , can_be_billed (boolean) |
|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , payment_methods |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Delivery
curl "/sales/delivery" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Delivery object
}
This endpoint create a delivery.
HTTP Request
POST /sales/delivery
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the document |
is_draft | boolean | If the document is a draft | |
pdf_model | required | integer | The Pdf Model ID |
title | string | The document title | |
customer | required | integer | The Customer ID |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | required | string | Billing address : City |
billing_address_postal_code | required | string | Billing address : Postal code |
billing_address_country | required | string | Billing address : Country code |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | required | array | |
contents.* | object | ||
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Retrieve a Delivery
curl "/sales/delivery/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Delivery object
}
This endpoint retrieves a specific delivery.
HTTP Request
GET /sales/delivery/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , linked_elements , payment_methods |
Retrieve the PDF of a Delivery
curl "/sales/delivery/1/pdf" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..." // The file content base64 encoded
// A File object
}
This endpoint retrieves the PDF of a delivery.
HTTP Request
GET /sales/delivery/<ID>/pdf
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery |
Update a Delivery
curl "/sales/delivery/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Delivery object
}
This endpoint update a specific delivery.
HTTP Request
PUT /sales/delivery/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
pdf_model | integer | The Pdf Model ID | |
title | string | The document title | |
customer | integer | The Customer ID | |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | string | Billing address : City | |
billing_address_postal_code | string | Billing address : Postal code | |
billing_address_country | string | Billing address : Country code | |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | array | ||
contents.* | object | ||
contents.*.affair_content | integer | The affair content ID. Used to updated an existing line. |
|
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Lite update a Delivery
curl "/sales/delivery/1/lite" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Delivery object
}
This endpoint update a specific delivery.
HTTP Request
PUT /sales/delivery/<ID>/lite
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The document title | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
team_user | integer | The sales representative ID for the document | |
contact | integer | The Contact ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
status | integer | The status of the document. Can be :
|
Create a command for a delivery
curl "/sales/delivery/1/command" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint create a command from a delivery.
HTTP Request
PUT /sales/delivery/<ID>/command
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the command must be created in draft |
Create a quotation for a delivery
curl "/sales/delivery/1/quotation" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Quotation object
}
This endpoint create a quotation from a delivery.
HTTP Request
PUT /sales/delivery/<ID>/quotation
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the quotation must be created in draft |
Bill a delivery
curl "/sales/delivery/1/bill" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint create a deposit invoice from the delivery.
HTTP Request
PUT /sales/delivery/<ID>/bill
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft |
Delete a Delivery
curl "/sales/delivery/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific delivery.
HTTP Request
DELETE /sales/delivery/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the delivery to delete |
Invoices
The Invoice object
The Invoice object
{
"id": 1,
"date": "2022-07-05",
"number": 1,
"version": 1,
"reference": "DEV00001",
"is_draft": false,
"creation_date": "2022-07-05T05:55:49.000000Z",
"pdf_model_id": 4,
"pdf_model": {...},
"title": null,
"customer_id": 1,
"customer": {...},
"customer_vatrate": null,
"customer_command_reference": null,
"contact_id": 1,
"contact": {...},
"billing_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"delivery_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"comments": null,
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": "1.00000",
"use_global_vatrate": false,
"vat_rate_id": null,
"vat_rate": null,
"secondary_quantity_mode": "global",
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_content_ht": "280.00",
"total_content_tva": "56.00",
"total_content_ttc": "336.00",
"total_ecotaxe_ht": "0.00",
"total_ecotaxe_tva": "0.00",
"total_ecotaxe_ttc": "0.00",
"global_discount_type": "pourcent",
"global_discount_value": "0.00",
"global_discount_type_amount": "ht",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_ht": "280.00",
"total_tva": "56.00",
"total_ttc": "336.00",
"vatrates": [
{
"rate": 20,
"vat_rate_id": 1,
"vat_rate": {...},
"ht": 280,
"tva": 56,
"ttc": 336
}
],
"status": 3,
"status_label": "Envoyé",
"pdf_status": 2,
"catalog_costs": 0,
"various_costs": 0,
"total_costs": 0,
"workforce_costs": 0,
"total_charge": 0,
"gross_margin_amount": 280,
"gross_margin_rate": 100,
"markup_rate": 100,
"total_duration_hour": 0,
"nb_people_needed": 0,
"total_weight": "0.00",
"total_quantity_1": "2.00000",
"total_quantity_2": "4.00000",
"total_quantity": "4.00000",
"input_mode": "ht",
"params": null,
"team_user_id": 4,
"team_user": {...},
"sale_term_id": 1,
"sale_term": {...},
"tags": [
{...},
{...}
],
"payment_methods": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"input_options": {
"allow_delivery_address": true,
"allow_options": false,
"ean": 0,
"weight": 0,
"eco_participation": 0,
"col_number": false,
"col_reference": true,
"col_picture": false,
"col_unit": false,
"stock_display": 1,
"stock_tracabilities": false,
"costs_entries": 0,
"various_costs": false,
"workforce_entries": 0,
"gross_margin_amount": false,
"gross_margin_rate": false,
"markup_rate": false,
"secondary_quantity_unit": true
},
"pdf_options": {
"amounts": 3,
"discounts": 1,
"comments": 2,
"units": 2,
"pictures": 1,
"number_column": 1,
"reference_column": 1,
"ean_column": 1,
"weight_column": 1,
"vatrate_column": false,
"total_quantity": false,
"contact": 1,
"country": 1,
"vatrate_number": 1
},
"affair_id": 1,
"affair": {...},
"delivery_status": 1,
"delivery_status_label": "À livrer",
"already_billed": "0.00",
"pourcent_billed": "0.00",
"to_bill": "336.00",
"pourcent_to_bill": "100.00",
"penalty_rate": "0.00",
"penalty_rate_law": true,
"escompte_rate": "0.00",
"escompte_amount_ht": "0.00",
"escompte_amount_tva": "0.00",
"escompte_amount_ttc": "0.00",
"collection_costs_law": true,
"payment_term_id": 2,
"payment_term": {...},
"payment_term_value": "30 jours",
"grant_id": null,
"grant": null,
"grant_amount": "0.00",
"grant_label": null,
"grant_pdf_mentions": null,
"guarantee_holdback_pourcent": "0.00",
"guarantee_holdback_amount": "0.00",
"guarantee_holdback_duration": 0,
"expire_at": "2022-08-15T22:00:00.000000Z",
"accepted_at": null,
"advance_payment_type": "pourcent",
"advance_payment_value": "0.00",
"advance_payment_amount": "0.00",
"contents": [
{...},
{...},
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document |
date | string | Date of the document |
number | integer | The Unique incremental number of the document |
version | integer | The document version number |
reference | string | The Unique document reference |
is_draft | boolean | If the document is a draft |
creation_date | string | The create date of the document version |
pdf_model_id | integer | The Pdf Model ID |
pdf_model | object | A Pdf Model object Present only if requested |
title | string | The document title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
customer_vatrate | string | The customer vat rate number |
customer_command_reference | string | The customer command reference |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
billing_address | object | Billing address |
billing_address.name | string | Billing address : customer name |
billing_address.contact | string | Billing address : contact name |
billing_address.road | string | Billing address : Road 1 |
billing_address.road2 | string | Billing address : Road 2 |
billing_address.road3 | string | Billing address : Road 3 |
billing_address.city | string | Billing address : City |
billing_address.postal_code | string | Billing address : Postal code |
billing_address.country_code | string | Billing address : Country code |
billing_address.country | object | Billing address : Country. A Country object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
delivery_address | object | Delivery address |
delivery_address.name | string | Delivery address : customer name |
delivery_address.contact | string | Delivery address : contact name |
delivery_address.road | string | Delivery address : Road 1 |
delivery_address.road2 | string | Delivery address : Road 2 |
delivery_address.road3 | string | Delivery address : Road 3 |
delivery_address.city | string | Delivery address : City |
delivery_address.postal_code | string | Delivery address : Postal code |
delivery_address.country_code | string | Delivery address : Country code |
delivery_address.country | object | Delivery address : Country. A Country object. Present only if requested |
delivery_address.comments | string | Delivery address : Comments |
comments | string | Comments for the customer |
currency_id | integer | The Currency ID |
currency | object | A Currency object Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
use_global_vatrate | boolean | If the document uses a single VAT rate |
vat_rate_id | integer | If use_global_vatrate = true, the VAT rate ID |
vat_rate | object | If use_global_vatrate = true, a VAT Rate object Present only if requested |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value |
secondary_unit_id | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID |
secondary_unit | object | If secondary_quantity_mode = 'global', the secondary quantity Unit object. Present only if requested |
total_content_ht | number | The total excluding VAT of the content |
total_content_tva | number | The total VAT of the content |
total_content_ttc | number | The total including VAT of the content |
total_ecotaxe_ht | number | The total amount excluding VAT of the eco-contribution |
total_ecotaxe_tva | number | The total VAT amount of the eco-contribution |
total_ecotaxe_ttc | number | The total amount including tax of the eco-contribution |
global_discount_type | string | The type of the global discount. Can be :
|
global_discount_value | number | The value of the global discount |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
global_discount_ht | number | The amount excluding VAT of the global discount |
global_discount_tva | number | The VAT amount of the global discount |
global_discount_ttc | number | The amount including VAT of the global discount |
total_ht | number | The total excluding VAT of the document |
total_tva | number | The VAT total of the document |
total_ttc | number | The total including VAT of the document |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.vat_rate | object | A Vat Rate object |
vatrates.vat_rate_id | integer | The Vat Rate ID |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
status | integer | The status of the document. Can be :
|
status_label | string | The status label |
pdf_status | integer | The pdf generation status. Can be :
|
catalog_costs | number | Product costs |
various_costs | number | Various costs |
total_costs | number | Total costs |
workforce_costs | number | Workforce costs |
total_charge | number | Total charges |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
total_duration_hour | number | Total duration of services |
nb_people_needed | integer | Number of technicians required |
total_weight | number | Total weight |
total_quantity_1 | number | Total of quantity 1 |
total_quantity_2 | number | Total of quantity 2 |
total_quantity | number | Total quantity |
input_mode | string | Input mode. Can be : ht , ttc |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
sale_term_id | integer | The sale term ID |
sale_term | object | A Sale Term object Present only if requested |
tags | array | An array of Tag object. Present only if requested |
payment_methods | array | An array of Payment Method. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
input_options | object | Document form options |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form |
input_options.allow_options | boolean | Enable the ability to offer options in documents form |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
input_options.col_number | boolean | Show the number for lines in documents form |
input_options.col_reference | boolean | Show the reference for lines in documents form |
input_options.col_picture | boolean | Show the pictures for lines in documents form |
input_options.col_unit | boolean | Show the unites for lines in documents form |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
input_options.various_costs | boolean | Ability to enter various costs in documents form |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form |
input_options.markup_rate | boolean | Show the markup rate in documents form |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
pdf_options | object | PDF document options |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
pdf_options.comments | integer | Comments display mode. Can be :
|
pdf_options.units | integer | Unit display mode. Can be :
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) |
pdf_options.contact | integer | Contact display |
pdf_options.country | integer | Country display |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. |
affair_id | integer | The affair ID |
affair | object | The Affair object. Present only if requested |
delivery_status | integer | The deivery status of the document. Can be :
|
delivery_status_label | string | The deivery status label |
already_billed | number | Amount already billed |
pourcent_billed | integer | Pourcent alread billed |
to_bill | number | Amount to bill |
pourcent_to_bill | integer | Pourcent to bill |
penalty_rate | number | The penalty rate |
penalty_rate_law | boolean | If the penalty rate law must be displayed |
escompte_rate | number | The escompte rate |
escompte_amount_ht | number | The amount excluding tax of the escompte |
escompte_amount_tva | number | The VAT amount of the escompte |
escompte_amount_ttc | number | The amount including tax of the escompte |
collection_costs_law | boolean | If the collection costs law must be displayed |
payment_term_id | integer | The payment term ID |
payment_term | object | A Payment Term object. Present only if requested |
payment_term_value | string | The payment term label |
grant_id | integer | The grant ID |
grant | object | A Grant object. Present only if requested |
grant_amount | number | The grant amount |
grant_label | number | The grant label |
grant_pdf_mentions | string | The grant mention to appear on the PDF |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent |
guarantee_holdback_amount | number | The guarantee holdback amount |
guarantee_holdback_duration | integer | The guarantee holdback duration in month |
expire_at | string | The expiration date |
accepted_at | string | The date of acceptance by the client |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
advance_payment_value | number | The advance payment value |
advance_payment_amount | number | The advance payment amount |
contents | array | An array of Invoice Content object |
The Invoice Content object
The Invoice Content object
{
"id": 1,
"variation_id": 1,
"variation": {...},
"picture_id": 1,
"picture": {...},
"affair_content_id": 1,
"is_comments": false,
"is_subtotal": false,
"is_pagebreak": false,
"is_hidden": false,
"line_number": 1,
"reference": null,
"designation": "test",
"comments": null,
"ean_code": null,
"sale_category_id": 1,
"sale_category": {...},
"weight_unit": null,
"total_weight": "0.00",
"discount_type": "pourcent",
"discount_value": "10.00",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"ecotax_u_ht": "0.00",
"ecotax_u_tva": "0.00",
"ecotax_u_ttc": "0.00",
"unit_price_net_ht": "90.00000",
"unit_price_net_tva": "18.00000",
"unit_price_net_ttc": "108.00000",
"is_option": false,
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_quantity": "2.00000",
"vat_rate_id": 1,
"vat_rate_value": "20.00",
"vat_rate": {...},
"subtotal_ht": "200.00",
"subtotal_tva": "40.00",
"subtotal_ttc": "240.00",
"total_ecotax_ht": "0.00",
"total_ecotax_tva": "0.00",
"total_ecotax_ttc": "0.00",
"discount_ht": null,
"discount_tva": null,
"discount_ttc": null,
"total_ht": "180.00",
"total_tva": "36.00",
"total_ttc": "216.00",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_net_ht": "-100.00",
"total_net_tva": "-20.00",
"total_net_ttc": "-120.00",
"catalog_costs_u": 0,
"various_costs_u": 0,
"total_costs_u": 0,
"hourly_person_cost": 0,
"number_people_needed": 0,
"duration": 0,
"duration_type": "hour",
"workforce_costs_u": 0,
"total_charge_u": 0,
"gross_margin_amount_u": 90,
"total_catalog_costs": 0,
"total_various_costs": 0,
"total_costs": 0,
"total_duration_hour": 0,
"total_workforce": 0,
"total_charge": 0,
"gross_margin_amount": 180,
"gross_margin_rate": 100,
"markup_rate": 100,
"delivered_quantity": "0.00000",
"quantity_to_deliver": "1.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document content |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
variation_id | integer | The product variation ID |
variation | object | A Product Variation object. Present only if requested |
picture_id | integer | The picture ID |
picture | object | A File object. Present only if requested |
affair_content_id | integer | The affair content ID. Used to link the content of documents between linked documents (quotes, delivery notes, invoices, etc.) |
is_comments | boolean | If the line is a comment line |
is_subtotal | boolean | If the row is a subtotal row |
is_pagebreak | boolean | If the line is a page break |
line_number | integer | The line number |
reference | string | The reference |
designation | string | The designation |
comments | string | A comment not visible to the customer |
ean_code | string | The EAN code |
sale_category_id | integer | The sale category ID |
sale_category | object | A Sale Category object. Present only if requested |
weight_unit | string | The unit weight |
total_weight | number | The total weight |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT |
ecotax_u_tva | number | Unit amount of the VAT eco-contribution |
ecotax_u_ttc | number | Unit amount of the eco-contribution including tax |
discount_type | string | The type of discount. Can be :
|
discount_value | number | The value of discount |
discount_ht | number | Unit amount excluding tax of the discount |
discount_tva | number | Unit VAT amount of the discount |
discount_ttc | number | Unit amount including VAT of the discount |
unit_price_net_ht | number | Discounted unit price excluding tax |
unit_price_net_tva | number | Unit price VAT discounted |
unit_price_net_ttc | number | Discounted unit price including VAT |
is_option | boolean | If line is an option |
quantity | number | Quantity |
unit_id | integer | The unit ID |
unit | object | A Unit object. Present only if requested |
secondary_quantity | number | The secondary quantity |
secondary_unit_id | integer | The unit ID for the secondary quantity |
secondary_unit | object | The unit for the secondary quantity. A Unit object. Present only if requested |
total_quantity | number | The total quantity |
vat_rate_id | integer | The Vat rate ID |
vat_rate | object | A Vat Rate object. Present only if requested |
vat_rate_value | number | The Vat Rate value |
subtotal_ht | number | If the line is a subtotal, the HT subtotal |
subtotal_tva | number | If the line is a subtotal, the TVA subtotal |
subtotal_ttc | number | If the line is a subtotal, the TTC subtotal |
total_ecotax_ht | number | Total amount excluding VAT of the eco-contribution |
total_ecotax_tva | number | Total VAT amount of the eco-contribution |
total_ecotax_ttc | number | Total amount including VAT of the eco-contribution |
total_ht | number | Total HT |
total_tva | number | Total TVA |
total_ttc | number | Total TTC |
global_discount_ht | number | HT Part of the general discount applied to this line |
global_discount_tva | number | TVA Part of the general discount applied to this line |
global_discount_ttc | number | TTC Part of the general discount applied to this line |
total_net_ht | number | Total NET HT of the line |
total_net_tva | number | Total NET TVA of the line |
total_net_ttc | number | Total NET TTC of the line |
catalog_costs_u | number | Unit product costs |
various_costs_u | number | Unit various costs |
total_costs_u | number | Unit total costs |
hourly_person_cost | number | Technician hourly costs |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , day |
workforce_costs_u | number | The unit workforce costs |
total_charge_u | number | Total unit charge |
gross_margin_amount_u | number | Unit gross margin amount |
total_catalog_costs | number | Total product costs |
total_various_costs | number | Total various costs |
total_costs | number | Total total costs |
total_duration_hour | number | Total duration of service in hour |
total_workforce | number | Total workforce costs |
total_charge | number | Total charge |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
delivered_quantity | number | The delivered quantity |
quantity_to_deliver | number | The quantity to deliver |
Get All Invoices
curl "/sales/invoice" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// an Invoice object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all invoices.
HTTP Request
GET /sales/invoice
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : number , reference , customer_command_reference , title , date , expire_at , customer.name , contact.fullname , billing_address.city , billing_address.postal_code , billing_address.country.name , delivery_address.city , delivery_address.postal_code , delivery_address.country.name , total_ht , total_tva , total_ttc , already_billed , pourcent_billed , to_bill , pourcent_to_bill , total_costs , workforce_costs , total_charge , gross_margin_amount , gross_margin_rate , markup_rate , team_user.fullname , status_label , delivery_status_label , affair.reference |
search | Make a global search. Search in : reference , customer.company_name , customer.lastname , contact.lastname , customer_command_reference , title , billing_address_city , billing_address_postal_code , billing_address_country.name_fr , delivery_address_city , delivery_address_postal_code , delivery_address_country.name_fr , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : team_user (integer) , customer (integer) , contact (integer) , any_tags (array of string) , all_tags (array of string) , status (integer) , date_since (date) , date_until (date) , expire_since (date) , expire_until (date) , is_draft (boolean) , main_currency (boolean) , with_currency (integer) , delivery_status (integer) , can_be_billed (boolean) , is_deposit_invoice (boolean) |
|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , payment_methods |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create an Invoice
curl "/sales/invoice" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Invoice object
}
This endpoint create a invoice.
HTTP Request
POST /sales/invoice
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the document |
is_draft | boolean | If the document is a draft | |
pdf_model | required | integer | The Pdf Model ID |
title | string | The document title | |
customer | required | integer | The Customer ID |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | required | string | Billing address : City |
billing_address_postal_code | required | string | Billing address : Postal code |
billing_address_country | required | string | Billing address : Country code |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | required | array | |
contents.* | object | ||
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Retrieve an Invoice
curl "/sales/invoice/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Invoice object
}
This endpoint retrieves a specific invoice.
HTTP Request
GET /sales/invoice/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , linked_elements , payment_methods |
Retrieve the PDF of a Invoice
curl "/sales/invoice/1/pdf" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..." // The file content base64 encoded
// A File object
}
This endpoint retrieves the PDF of a invoice.
HTTP Request
GET /sales/invoice/<ID>/pdf
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice |
Update an Invoice
curl "/sales/invoice/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Invoice object
}
This endpoint update a specific invoice.
HTTP Request
PUT /sales/invoice/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
pdf_model | integer | The Pdf Model ID | |
title | string | The document title | |
customer | integer | The Customer ID | |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | string | Billing address : City | |
billing_address_postal_code | string | Billing address : Postal code | |
billing_address_country | string | Billing address : Country code | |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | array | ||
contents.* | object | ||
contents.*.affair_content | integer | The affair content ID. Used to updated an existing line. |
|
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Lite update an Invoice
curl "/sales/invoice/1/lite" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Invoice object
}
This endpoint update a specific invoice.
HTTP Request
PUT /sales/invoice/<ID>/lite
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The document title | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
team_user | integer | The sales representative ID for the document | |
contact | integer | The Contact ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
status | integer | The status of the document. Can be :
|
Cancel an Invoice
curl "/sales/invoice/1/cancel" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Credit object
}
This endpoint update cancel a specific invoice.
HTTP Request
PUT /sales/invoice/<ID>/cancel
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice to cancel |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
contents | array | The content of the invoice to cancel | |
contents.* | array | ||
contents.*.id | integer | The affair content ID of invoice line to cancel | |
contents.*.quantity | integer | The quantity of the line to cancel | |
amount | array | The amount to cancel. Not used if contents is present |
Deliver a invoice
curl "/sales/invoice/1/deliver" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Delivery object
}
This endpoint deliver a invoice.
HTTP Request
PUT /sales/invoice/<ID>/deliver
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft | |
contents | array | The content of the invoice to deliver | |
contents.* | array | ||
contents.*.id | integer | The affair content id of the invoice line to delivery | |
contents.*.quantity | number | The quantity to deliver |
Delete an Invoice
curl "/sales/invoice/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific invoice.
HTTP Request
DELETE /sales/invoice/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice to delete |
Payment Terms
The Payment Term object
The Payment Term object
{
"id": 1,
"label": "À réception de facture",
"day_number": 0,
"end_month": false,
"end_month_day": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the payment term |
label | string | Name of the payment term |
day_number | integer | Payment at X days |
end_month | boolean | Payment at the end of the month |
end_month_day | integer | Payment at the end of the month, the day X |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Payment Terms
curl "/payment_term" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "À réception de facture",
"day_number": 0,
"end_month": false,
"end_month_day": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all payment terms.
HTTP Request
GET /payment_term
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Payment Term
curl "/payment_term" \
-X POST \
-H "" \
-d "label=À réception de facture&day_number=0"
The above command returns JSON structured like this:
{
"id": 1,
"label": "À réception de facture",
"day_number": 0,
"end_month": false,
"end_month_day": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint create a payment term.
HTTP Request
POST /payment_term
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
label | required | string | Name of the payment term |
day_number | required | integer | Payment at X days |
end_month | boolean | Payment at the end of the month | |
end_month_day | integer | Payment at the end of the month, the day X |
Retrieve a Payment Term
curl "/payment_term/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "À réception de facture",
"day_number": 0,
"end_month": false,
"end_month_day": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint retrieves a specific payment term.
HTTP Request
GET /payment_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment term to retrieve |
Update a Payment Term
curl "/payment_term/1" \
-X PUT \
-H "" \
-d "label=À réception de facture&day_number=0"
The above command returns JSON structured like this:
{
"id": 1,
"label": "À réception de facture",
"day_number": 0,
"end_month": false,
"end_month_day": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint update a specific payment term.
HTTP Request
PUT /payment_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment term to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
label | string | Name of the payment term |
day_number | integer | Payment at X days |
end_month | boolean | Payment at the end of the month |
end_month_day | integer | Payment at the end of the month, the day X |
Delete a Payment Term
curl "/payment_term/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific payment term.
HTTP Request
DELETE /payment_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment term to delete |
Proformas
The Proforma object
The Proforma object
{
"id": 1,
"date": "2022-07-05",
"number": 1,
"version": 1,
"reference": "DEV00001",
"is_draft": false,
"creation_date": "2022-07-05T05:55:49.000000Z",
"pdf_model_id": 4,
"pdf_model": {...},
"title": null,
"customer_id": 1,
"customer": {...},
"customer_vatrate": null,
"customer_proforma_reference": null,
"contact_id": 1,
"contact": {...},
"billing_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"delivery_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"comments": null,
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": "1.00000",
"use_global_vatrate": false,
"vat_rate_id": null,
"vat_rate": null,
"secondary_quantity_mode": "global",
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_content_ht": "280.00",
"total_content_tva": "56.00",
"total_content_ttc": "336.00",
"total_ecotaxe_ht": "0.00",
"total_ecotaxe_tva": "0.00",
"total_ecotaxe_ttc": "0.00",
"global_discount_type": "pourcent",
"global_discount_value": "0.00",
"global_discount_type_amount": "ht",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_ht": "280.00",
"total_tva": "56.00",
"total_ttc": "336.00",
"vatrates": [
{
"rate": 20,
"vat_rate_id": 1,
"vat_rate": {...},
"ht": 280,
"tva": 56,
"ttc": 336
}
],
"status": 3,
"status_label": "Envoyé",
"pdf_status": 2,
"catalog_costs": 0,
"various_costs": 0,
"total_costs": 0,
"workforce_costs": 0,
"total_charge": 0,
"gross_margin_amount": 280,
"gross_margin_rate": 100,
"markup_rate": 100,
"total_duration_hour": 0,
"nb_people_needed": 0,
"total_weight": "0.00",
"total_quantity_1": "2.00000",
"total_quantity_2": "4.00000",
"total_quantity": "4.00000",
"input_mode": "ht",
"params": null,
"team_user_id": 4,
"team_user": {...},
"sale_term_id": 1,
"sale_term": {...},
"tags": [
{...},
{...}
],
"payment_methods": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"input_options": {
"allow_delivery_address": true,
"allow_options": false,
"ean": 0,
"weight": 0,
"eco_participation": 0,
"col_number": false,
"col_reference": true,
"col_picture": false,
"col_unit": false,
"stock_display": 1,
"stock_tracabilities": false,
"costs_entries": 0,
"various_costs": false,
"workforce_entries": 0,
"gross_margin_amount": false,
"gross_margin_rate": false,
"markup_rate": false,
"secondary_quantity_unit": true
},
"pdf_options": {
"amounts": 3,
"discounts": 1,
"comments": 2,
"units": 2,
"pictures": 1,
"number_column": 1,
"reference_column": 1,
"ean_column": 1,
"weight_column": 1,
"vatrate_column": false,
"total_quantity": false,
"contact": 1,
"country": 1,
"vatrate_number": 1
},
"affair_id": 1,
"affair": {...},
"delivery_status": 1,
"delivery_status_label": "À livrer",
"already_billed": "0.00",
"pourcent_billed": "0.00",
"to_bill": "336.00",
"pourcent_to_bill": "100.00",
"penalty_rate": "0.00",
"penalty_rate_law": true,
"escompte_rate": "0.00",
"escompte_amount_ht": "0.00",
"escompte_amount_tva": "0.00",
"escompte_amount_ttc": "0.00",
"collection_costs_law": true,
"payment_term_id": 2,
"payment_term": {...},
"payment_term_value": "30 jours",
"grant_id": null,
"grant": null,
"grant_amount": "0.00",
"grant_label": null,
"grant_pdf_mentions": null,
"guarantee_holdback_pourcent": "0.00",
"guarantee_holdback_amount": "0.00",
"guarantee_holdback_duration": 0,
"expire_at": "2022-08-15T22:00:00.000000Z",
"accepted_at": null,
"advance_payment_type": "pourcent",
"advance_payment_value": "0.00",
"advance_payment_amount": "0.00",
"contents": [
{...},
{...},
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document |
date | string | Date of the document |
number | integer | The Unique incremental number of the document |
version | integer | The document version number |
reference | string | The Unique document reference |
is_draft | boolean | If the document is a draft |
creation_date | string | The create date of the document version |
pdf_model_id | integer | The Pdf Model ID |
pdf_model | object | A Pdf Model object Present only if requested |
title | string | The document title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
customer_vatrate | string | The customer vat rate number |
customer_proforma_reference | string | The customer proforma reference |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
billing_address | object | Billing address |
billing_address.name | string | Billing address : customer name |
billing_address.contact | string | Billing address : contact name |
billing_address.road | string | Billing address : Road 1 |
billing_address.road2 | string | Billing address : Road 2 |
billing_address.road3 | string | Billing address : Road 3 |
billing_address.city | string | Billing address : City |
billing_address.postal_code | string | Billing address : Postal code |
billing_address.country_code | string | Billing address : Country code |
billing_address.country | object | Billing address : Country. A Country object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
delivery_address | object | Delivery address |
delivery_address.name | string | Delivery address : customer name |
delivery_address.contact | string | Delivery address : contact name |
delivery_address.road | string | Delivery address : Road 1 |
delivery_address.road2 | string | Delivery address : Road 2 |
delivery_address.road3 | string | Delivery address : Road 3 |
delivery_address.city | string | Delivery address : City |
delivery_address.postal_code | string | Delivery address : Postal code |
delivery_address.country_code | string | Delivery address : Country code |
delivery_address.country | object | Delivery address : Country. A Country object. Present only if requested |
delivery_address.comments | string | Delivery address : Comments |
comments | string | Comments for the customer |
currency_id | integer | The Currency ID |
currency | object | A Currency object Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
use_global_vatrate | boolean | If the document uses a single VAT rate |
vat_rate_id | integer | If use_global_vatrate = true, the VAT rate ID |
vat_rate | object | If use_global_vatrate = true, a VAT Rate object Present only if requested |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value |
secondary_unit_id | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID |
secondary_unit | object | If secondary_quantity_mode = 'global', the secondary quantity Unit object. Present only if requested |
total_content_ht | number | The total excluding VAT of the content |
total_content_tva | number | The total VAT of the content |
total_content_ttc | number | The total including VAT of the content |
total_ecotaxe_ht | number | The total amount excluding VAT of the eco-contribution |
total_ecotaxe_tva | number | The total VAT amount of the eco-contribution |
total_ecotaxe_ttc | number | The total amount including tax of the eco-contribution |
global_discount_type | string | The type of the global discount. Can be :
|
global_discount_value | number | The value of the global discount |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
global_discount_ht | number | The amount excluding VAT of the global discount |
global_discount_tva | number | The VAT amount of the global discount |
global_discount_ttc | number | The amount including VAT of the global discount |
total_ht | number | The total excluding VAT of the document |
total_tva | number | The VAT total of the document |
total_ttc | number | The total including VAT of the document |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.vat_rate | object | A Vat Rate object |
vatrates.vat_rate_id | integer | The Vat Rate ID |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
status | integer | The status of the document. Can be :
|
status_label | string | The status label |
pdf_status | integer | The pdf generation status. Can be :
|
catalog_costs | number | Product costs |
various_costs | number | Various costs |
total_costs | number | Total costs |
workforce_costs | number | Workforce costs |
total_charge | number | Total charges |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
total_duration_hour | number | Total duration of services |
nb_people_needed | integer | Number of technicians required |
total_weight | number | Total weight |
total_quantity_1 | number | Total of quantity 1 |
total_quantity_2 | number | Total of quantity 2 |
total_quantity | number | Total quantity |
input_mode | string | Input mode. Can be : ht , ttc |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
sale_term_id | integer | The sale term ID |
sale_term | object | A Sale Term object Present only if requested |
tags | array | An array of Tag object. Present only if requested |
payment_methods | array | An array of Payment Method. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
input_options | object | Document form options |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form |
input_options.allow_options | boolean | Enable the ability to offer options in documents form |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
input_options.col_number | boolean | Show the number for lines in documents form |
input_options.col_reference | boolean | Show the reference for lines in documents form |
input_options.col_picture | boolean | Show the pictures for lines in documents form |
input_options.col_unit | boolean | Show the unites for lines in documents form |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
input_options.various_costs | boolean | Ability to enter various costs in documents form |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form |
input_options.markup_rate | boolean | Show the markup rate in documents form |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
pdf_options | object | PDF document options |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
pdf_options.comments | integer | Comments display mode. Can be :
|
pdf_options.units | integer | Unit display mode. Can be :
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) |
pdf_options.contact | integer | Contact display |
pdf_options.country | integer | Country display |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. |
affair_id | integer | The affair ID |
affair | object | The Affair object. Present only if requested |
delivery_status | integer | The deivery status of the document. Can be :
|
delivery_status_label | string | The deivery status label |
already_billed | number | Amount already billed |
pourcent_billed | integer | Pourcent alread billed |
to_bill | number | Amount to bill |
pourcent_to_bill | integer | Pourcent to bill |
penalty_rate | number | The penalty rate |
penalty_rate_law | boolean | If the penalty rate law must be displayed |
escompte_rate | number | The escompte rate |
escompte_amount_ht | number | The amount excluding tax of the escompte |
escompte_amount_tva | number | The VAT amount of the escompte |
escompte_amount_ttc | number | The amount including tax of the escompte |
collection_costs_law | boolean | If the collection costs law must be displayed |
payment_term_id | integer | The payment term ID |
payment_term | object | A Payment Term object. Present only if requested |
payment_term_value | string | The payment term label |
grant_id | integer | The grant ID |
grant | object | A Grant object. Present only if requested |
grant_amount | number | The grant amount |
grant_label | number | The grant label |
grant_pdf_mentions | string | The grant mention to appear on the PDF |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent |
guarantee_holdback_amount | number | The guarantee holdback amount |
guarantee_holdback_duration | integer | The guarantee holdback duration in month |
expire_at | string | The expiration date |
accepted_at | string | The date of acceptance by the client |
contents | array | An array of Proforma Content object |
The Proforma Content object
The Proforma Content object
{
"id": 1,
"variation_id": 1,
"variation": {...},
"picture_id": 1,
"picture": {...},
"affair_content_id": 1,
"is_comments": false,
"is_subtotal": false,
"is_pagebreak": false,
"is_hidden": false,
"line_number": 1,
"reference": null,
"designation": "test",
"comments": null,
"ean_code": null,
"sale_category_id": 1,
"sale_category": {...},
"weight_unit": null,
"total_weight": "0.00",
"discount_type": "pourcent",
"discount_value": "10.00",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"ecotax_u_ht": "0.00",
"ecotax_u_tva": "0.00",
"ecotax_u_ttc": "0.00",
"unit_price_net_ht": "90.00000",
"unit_price_net_tva": "18.00000",
"unit_price_net_ttc": "108.00000",
"is_option": false,
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_quantity": "2.00000",
"vat_rate_id": 1,
"vat_rate_value": "20.00",
"vat_rate": {...},
"subtotal_ht": "200.00",
"subtotal_tva": "40.00",
"subtotal_ttc": "240.00",
"total_ecotax_ht": "0.00",
"total_ecotax_tva": "0.00",
"total_ecotax_ttc": "0.00",
"discount_ht": null,
"discount_tva": null,
"discount_ttc": null,
"total_ht": "180.00",
"total_tva": "36.00",
"total_ttc": "216.00",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_net_ht": "-100.00",
"total_net_tva": "-20.00",
"total_net_ttc": "-120.00",
"catalog_costs_u": 0,
"various_costs_u": 0,
"total_costs_u": 0,
"hourly_person_cost": 0,
"number_people_needed": 0,
"duration": 0,
"duration_type": "hour",
"workforce_costs_u": 0,
"total_charge_u": 0,
"gross_margin_amount_u": 90,
"total_catalog_costs": 0,
"total_various_costs": 0,
"total_costs": 0,
"total_duration_hour": 0,
"total_workforce": 0,
"total_charge": 0,
"gross_margin_amount": 180,
"gross_margin_rate": 100,
"markup_rate": 100,
"delivered_quantity": "0.00000",
"quantity_to_deliver": "1.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document content |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
variation_id | integer | The product variation ID |
variation | object | A Product Variation object. Present only if requested |
picture_id | integer | The picture ID |
picture | object | A File object. Present only if requested |
affair_content_id | integer | The affair content ID. Used to link the content of documents between linked documents (quotes, delivery notes, invoices, etc.) |
is_comments | boolean | If the line is a comment line |
is_subtotal | boolean | If the row is a subtotal row |
is_pagebreak | boolean | If the line is a page break |
line_number | integer | The line number |
reference | string | The reference |
designation | string | The designation |
comments | string | A comment not visible to the customer |
ean_code | string | The EAN code |
sale_category_id | integer | The sale category ID |
sale_category | object | A Sale Category object. Present only if requested |
weight_unit | string | The unit weight |
total_weight | number | The total weight |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT |
ecotax_u_tva | number | Unit amount of the VAT eco-contribution |
ecotax_u_ttc | number | Unit amount of the eco-contribution including tax |
discount_type | string | The type of discount. Can be :
|
discount_value | number | The value of discount |
discount_ht | number | Unit amount excluding tax of the discount |
discount_tva | number | Unit VAT amount of the discount |
discount_ttc | number | Unit amount including VAT of the discount |
unit_price_net_ht | number | Discounted unit price excluding tax |
unit_price_net_tva | number | Unit price VAT discounted |
unit_price_net_ttc | number | Discounted unit price including VAT |
is_option | boolean | If line is an option |
quantity | number | Quantity |
unit_id | integer | The unit ID |
unit | object | A Unit object. Present only if requested |
secondary_quantity | number | The secondary quantity |
secondary_unit_id | integer | The unit ID for the secondary quantity |
secondary_unit | object | The unit for the secondary quantity. A Unit object. Present only if requested |
total_quantity | number | The total quantity |
vat_rate_id | integer | The Vat rate ID |
vat_rate | object | A Vat Rate object. Present only if requested |
vat_rate_value | number | The Vat Rate value |
subtotal_ht | number | If the line is a subtotal, the HT subtotal |
subtotal_tva | number | If the line is a subtotal, the TVA subtotal |
subtotal_ttc | number | If the line is a subtotal, the TTC subtotal |
total_ecotax_ht | number | Total amount excluding VAT of the eco-contribution |
total_ecotax_tva | number | Total VAT amount of the eco-contribution |
total_ecotax_ttc | number | Total amount including VAT of the eco-contribution |
total_ht | number | Total HT |
total_tva | number | Total TVA |
total_ttc | number | Total TTC |
global_discount_ht | number | HT Part of the general discount applied to this line |
global_discount_tva | number | TVA Part of the general discount applied to this line |
global_discount_ttc | number | TTC Part of the general discount applied to this line |
total_net_ht | number | Total NET HT of the line |
total_net_tva | number | Total NET TVA of the line |
total_net_ttc | number | Total NET TTC of the line |
catalog_costs_u | number | Unit product costs |
various_costs_u | number | Unit various costs |
total_costs_u | number | Unit total costs |
hourly_person_cost | number | Technician hourly costs |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , day |
workforce_costs_u | number | The unit workforce costs |
total_charge_u | number | Total unit charge |
gross_margin_amount_u | number | Unit gross margin amount |
total_catalog_costs | number | Total product costs |
total_various_costs | number | Total various costs |
total_costs | number | Total total costs |
total_duration_hour | number | Total duration of service in hour |
total_workforce | number | Total workforce costs |
total_charge | number | Total charge |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
delivered_quantity | number | The delivered quantity |
quantity_to_deliver | number | The quantity to deliver |
Get All Proformas
curl "/sales/proforma" \
-H ""
The above proforma returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Proforma object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all proformas.
HTTP Request
GET /sales/proforma
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : number , reference , customer_proforma_reference , title , date , expire_at , customer.name , contact.fullname , billing_address.city , billing_address.postal_code , billing_address.country.name , delivery_address.city , delivery_address.postal_code , delivery_address.country.name , total_ht , total_tva , total_ttc , already_billed , pourcent_billed , to_bill , pourcent_to_bill , total_costs , workforce_costs , total_charge , gross_margin_amount , gross_margin_rate , markup_rate , team_user.fullname , status_label , delivery_status_label , affair.reference |
search | Make a global search. Search in : reference , customer.company_name , customer.lastname , contact.lastname , customer_proforma_reference , title , billing_address_city , billing_address_postal_code , billing_address_country.name_fr , delivery_address_city , delivery_address_postal_code , delivery_address_country.name_fr , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : team_user (integer) , customer (integer) , contact (integer) , any_tags (array of string) , all_tags (array of string) , status (integer) , date_since (date) , date_until (date) , expire_since (date) , expire_until (date) , is_draft (boolean) , main_currency (boolean) , with_currency (integer) , delivery_status (integer) , can_be_billed (boolean) |
|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , payment_methods |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Proforma
curl "/sales/proforma" \
-X POST \
-H "" \
-d "title=Title&..."
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint create a proforma.
HTTP Request
POST /sales/proforma
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the document |
is_draft | boolean | If the document is a draft | |
pdf_model | required | integer | The Pdf Model ID |
title | string | The document title | |
customer | required | integer | The Customer ID |
customer_vatrate | string | The customer vat rate number | |
customer_proforma_reference | string | The customer proforma reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | required | string | Billing address : City |
billing_address_postal_code | required | string | Billing address : Postal code |
billing_address_country | required | string | Billing address : Country code |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | required | array | |
contents.* | object | ||
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Retrieve a Proforma
curl "/sales/proforma/1" \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint retrieves a specific proforma.
HTTP Request
GET /sales/proforma/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , linked_elements , payment_methods |
Retrieve the PDF of a Proforma
curl "/sales/proforma/1/pdf" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..." // The file content base64 encoded
// A File object
}
This endpoint retrieves the PDF of a proforma.
HTTP Request
GET /sales/proforma/<ID>/pdf
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Update a Proforma
curl "/sales/proforma/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint update a specific proforma.
HTTP Request
PUT /sales/proforma/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
pdf_model | integer | The Pdf Model ID | |
title | string | The document title | |
customer | integer | The Customer ID | |
customer_vatrate | string | The customer vat rate number | |
customer_proforma_reference | string | The customer proforma reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | string | Billing address : City | |
billing_address_postal_code | string | Billing address : Postal code | |
billing_address_country | string | Billing address : Country code | |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | array | ||
contents.* | object | ||
contents.*.affair_content | integer | The affair content ID. Used to updated an existing line. |
|
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Lite update a Proforma
curl "/sales/proforma/1/lite" \
-X PUT \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint update a specific proforma.
HTTP Request
PUT /sales/proforma/<ID>/lite
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The document title | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
team_user | integer | The sales representative ID for the document | |
contact | integer | The Contact ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
status | integer | The status of the document. Can be :
|
Create a quotation for a proforma
curl "/sales/proforma/1/quotation" \
-X PUT \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint create a quotation from a proforma.
HTTP Request
PUT /sales/proforma/<ID>/quotation
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the proforma must be created in draft |
Create a command for a proforma
curl "/sales/proforma/1/command" \
-X PUT \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint create a command from a proforma.
HTTP Request
PUT /sales/proforma/<ID>/command
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the command must be created in draft |
Bill a proforma
curl "/sales/proforma/1/bill" \
-X PUT \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint create an invoice from the proforma.
HTTP Request
PUT /sales/proforma/<ID>/bill
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft |
Deliver a proforma
curl "/sales/proforma/1/deliver" \
-X PUT \
-H ""
The above proforma returns JSON structured like this:
{
"id": 1,
...
// An Delivery object
}
This endpoint deliver a proforma.
HTTP Request
PUT /sales/proforma/<ID>/deliver
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft | |
contents | array | The content of the proforma to deliver | |
contents.* | array | ||
contents.*.id | integer | The affair content id of the proforma line to delivery | |
contents.*.quantity | number | The quantity to deliver |
Delete a Proforma
curl "/sales/proforma/1" \
-X DELETE \
-H ""
The above proforma returns an empty response with the Http status 204
This endpoint delete a specific proforma.
HTTP Request
DELETE /sales/proforma/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the proforma to delete |
Quotations
The Quotation object
The Quotation object
{
"id": 1,
"date": "2022-07-05",
"number": 1,
"version": 1,
"reference": "DEV00001",
"is_draft": false,
"creation_date": "2022-07-05T05:55:49.000000Z",
"pdf_model_id": 4,
"pdf_model": {...},
"title": null,
"customer_id": 1,
"customer": {...},
"customer_vatrate": null,
"customer_command_reference": null,
"contact_id": 1,
"contact": {...},
"billing_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"delivery_address": {
"name": "Client 1",
"contact": null,
"road": "12 Rue de Dole",
"road2": null,
"road3": null,
"city": "Besançon",
"postal_code": "25000",
"country_code": "FR",
"country": {
"id": 67,
"name": "France",
"code": "FR",
"ue_member": true
},
"comments": null
},
"comments": null,
"currency_id": 51,
"currency": {...},
"currency_code": "EUR",
"exchange_rate": "1.00000",
"use_global_vatrate": false,
"vat_rate_id": null,
"vat_rate": null,
"secondary_quantity_mode": "global",
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_content_ht": "280.00",
"total_content_tva": "56.00",
"total_content_ttc": "336.00",
"total_ecotaxe_ht": "0.00",
"total_ecotaxe_tva": "0.00",
"total_ecotaxe_ttc": "0.00",
"global_discount_type": "pourcent",
"global_discount_value": "0.00",
"global_discount_type_amount": "ht",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_ht": "280.00",
"total_tva": "56.00",
"total_ttc": "336.00",
"vatrates": [
{
"rate": 20,
"vat_rate_id": 1,
"vat_rate": {...},
"ht": 280,
"tva": 56,
"ttc": 336
}
],
"status": 3,
"status_label": "Envoyé",
"pdf_status": 2,
"catalog_costs": 0,
"various_costs": 0,
"total_costs": 0,
"workforce_costs": 0,
"total_charge": 0,
"gross_margin_amount": 280,
"gross_margin_rate": 100,
"markup_rate": 100,
"total_duration_hour": 0,
"nb_people_needed": 0,
"total_weight": "0.00",
"total_quantity_1": "2.00000",
"total_quantity_2": "4.00000",
"total_quantity": "4.00000",
"input_mode": "ht",
"params": null,
"team_user_id": 4,
"team_user": {...},
"sale_term_id": 1,
"sale_term": {...},
"tags": [
{...},
{...}
],
"payment_methods": [
{...},
{...}
],
"custom_fields": [
{...},
{...}
],
"input_options": {
"allow_delivery_address": true,
"allow_options": false,
"ean": 0,
"weight": 0,
"eco_participation": 0,
"col_number": false,
"col_reference": true,
"col_picture": false,
"col_unit": false,
"stock_display": 1,
"stock_tracabilities": false,
"costs_entries": 0,
"various_costs": false,
"workforce_entries": 0,
"gross_margin_amount": false,
"gross_margin_rate": false,
"markup_rate": false,
"secondary_quantity_unit": true
},
"pdf_options": {
"amounts": 3,
"discounts": 1,
"comments": 2,
"units": 2,
"pictures": 1,
"number_column": 1,
"reference_column": 1,
"ean_column": 1,
"weight_column": 1,
"vatrate_column": false,
"total_quantity": false,
"contact": 1,
"country": 1,
"vatrate_number": 1
},
"affair_id": 1,
"affair": {...},
"delivery_status": 1,
"delivery_status_label": "À livrer",
"already_billed": "0.00",
"pourcent_billed": "0.00",
"to_bill": "336.00",
"pourcent_to_bill": "100.00",
"penalty_rate": "0.00",
"penalty_rate_law": true,
"escompte_rate": "0.00",
"escompte_amount_ht": "0.00",
"escompte_amount_tva": "0.00",
"escompte_amount_ttc": "0.00",
"collection_costs_law": true,
"payment_term_id": 2,
"payment_term": {...},
"payment_term_value": "30 jours",
"grant_id": null,
"grant": null,
"grant_amount": "0.00",
"grant_label": null,
"grant_pdf_mentions": null,
"guarantee_holdback_pourcent": "0.00",
"guarantee_holdback_amount": "0.00",
"guarantee_holdback_duration": 0,
"expire_at": "2022-08-15T22:00:00.000000Z",
"accepted_at": null,
"advance_payment_type": "pourcent",
"advance_payment_value": "0.00",
"advance_payment_amount": "0.00",
"contents": [
{...},
{...},
]
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document |
date | string | Date of the document |
number | integer | The Unique incremental number of the document |
version | integer | The document version number |
reference | string | The Unique document reference |
is_draft | boolean | If the document is a draft |
creation_date | string | The create date of the document version |
pdf_model_id | integer | The Pdf Model ID |
pdf_model | object | A Pdf Model object Present only if requested |
title | string | The document title |
customer_id | integer | The Customer ID |
customer | object | A Customer object Present only if requested |
customer_vatrate | string | The customer vat rate number |
customer_command_reference | string | The customer command reference |
contact_id | integer | The Contact ID |
contact | object | A Contact object Present only if requested |
billing_address | object | Billing address |
billing_address.name | string | Billing address : customer name |
billing_address.contact | string | Billing address : contact name |
billing_address.road | string | Billing address : Road 1 |
billing_address.road2 | string | Billing address : Road 2 |
billing_address.road3 | string | Billing address : Road 3 |
billing_address.city | string | Billing address : City |
billing_address.postal_code | string | Billing address : Postal code |
billing_address.country_code | string | Billing address : Country code |
billing_address.country | object | Billing address : Country. A Country object. Present only if requested |
billing_address.comments | string | Billing address : Comments |
delivery_address | object | Delivery address |
delivery_address.name | string | Delivery address : customer name |
delivery_address.contact | string | Delivery address : contact name |
delivery_address.road | string | Delivery address : Road 1 |
delivery_address.road2 | string | Delivery address : Road 2 |
delivery_address.road3 | string | Delivery address : Road 3 |
delivery_address.city | string | Delivery address : City |
delivery_address.postal_code | string | Delivery address : Postal code |
delivery_address.country_code | string | Delivery address : Country code |
delivery_address.country | object | Delivery address : Country. A Country object. Present only if requested |
delivery_address.comments | string | Delivery address : Comments |
comments | string | Comments for the customer |
currency_id | integer | The Currency ID |
currency | object | A Currency object Present only if requested |
currency_code | string | The Currency code |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
use_global_vatrate | boolean | If the document uses a single VAT rate |
vat_rate_id | integer | If use_global_vatrate = true, the VAT rate ID |
vat_rate | object | If use_global_vatrate = true, a VAT Rate object Present only if requested |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value |
secondary_unit_id | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID |
secondary_unit | object | If secondary_quantity_mode = 'global', the secondary quantity Unit object. Present only if requested |
total_content_ht | number | The total excluding VAT of the content |
total_content_tva | number | The total VAT of the content |
total_content_ttc | number | The total including VAT of the content |
total_ecotaxe_ht | number | The total amount excluding VAT of the eco-contribution |
total_ecotaxe_tva | number | The total VAT amount of the eco-contribution |
total_ecotaxe_ttc | number | The total amount including tax of the eco-contribution |
global_discount_type | string | The type of the global discount. Can be :
|
global_discount_value | number | The value of the global discount |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
global_discount_ht | number | The amount excluding VAT of the global discount |
global_discount_tva | number | The VAT amount of the global discount |
global_discount_ttc | number | The amount including VAT of the global discount |
total_ht | number | The total excluding VAT of the document |
total_tva | number | The VAT total of the document |
total_ttc | number | The total including VAT of the document |
vatrates | array | A table with the summary by VAT rate. Present only if requested |
vatrates.rate | number | The vat rate value |
vatrates.vat_rate | object | A Vat Rate object |
vatrates.vat_rate_id | integer | The Vat Rate ID |
vatrates.ht | number | Amount excluding VAT for the VAT rate |
vatrates.tva | number | VAT amount for VAT rate |
vatrates.ttc | number | Amount including VAT for the VAT rate |
status | integer | The status of the document. Can be :
|
status_label | string | The status label |
pdf_status | integer | The pdf generation status. Can be :
|
catalog_costs | number | Product costs |
various_costs | number | Various costs |
total_costs | number | Total costs |
workforce_costs | number | Workforce costs |
total_charge | number | Total charges |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
total_duration_hour | number | Total duration of services |
nb_people_needed | integer | Number of technicians required |
total_weight | number | Total weight |
total_quantity_1 | number | Total of quantity 1 |
total_quantity_2 | number | Total of quantity 2 |
total_quantity | number | Total quantity |
input_mode | string | Input mode. Can be : ht , ttc |
team_user_id | integer | The sales representative ID for the document |
team_user | object | The sales representative for the document. A TeamUser object. Present only if requested |
sale_term_id | integer | The sale term ID |
sale_term | object | A Sale Term object Present only if requested |
tags | array | An array of Tag object. Present only if requested |
payment_methods | array | An array of Payment Method. Present only if requested |
custom_fields | array | The custom fields values. An array of Custom Field Value object. Present only if requested |
input_options | object | Document form options |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form |
input_options.allow_options | boolean | Enable the ability to offer options in documents form |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
input_options.col_number | boolean | Show the number for lines in documents form |
input_options.col_reference | boolean | Show the reference for lines in documents form |
input_options.col_picture | boolean | Show the pictures for lines in documents form |
input_options.col_unit | boolean | Show the unites for lines in documents form |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
input_options.various_costs | boolean | Ability to enter various costs in documents form |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form |
input_options.markup_rate | boolean | Show the markup rate in documents form |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
pdf_options | object | PDF document options |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
pdf_options.comments | integer | Comments display mode. Can be :
|
pdf_options.units | integer | Unit display mode. Can be :
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) |
pdf_options.contact | integer | Contact display |
pdf_options.country | integer | Country display |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. |
affair_id | integer | The affair ID |
affair | object | The Affair object. Present only if requested |
delivery_status | integer | The deivery status of the document. Can be :
|
delivery_status_label | string | The deivery status label |
already_billed | number | Amount already billed |
pourcent_billed | integer | Pourcent alread billed |
to_bill | number | Amount to bill |
pourcent_to_bill | integer | Pourcent to bill |
penalty_rate | number | The penalty rate |
penalty_rate_law | boolean | If the penalty rate law must be displayed |
escompte_rate | number | The escompte rate |
escompte_amount_ht | number | The amount excluding tax of the escompte |
escompte_amount_tva | number | The VAT amount of the escompte |
escompte_amount_ttc | number | The amount including tax of the escompte |
collection_costs_law | boolean | If the collection costs law must be displayed |
payment_term_id | integer | The payment term ID |
payment_term | object | A Payment Term object. Present only if requested |
payment_term_value | string | The payment term label |
grant_id | integer | The grant ID |
grant | object | A Grant object. Present only if requested |
grant_amount | number | The grant amount |
grant_label | number | The grant label |
grant_pdf_mentions | string | The grant mention to appear on the PDF |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent |
guarantee_holdback_amount | number | The guarantee holdback amount |
guarantee_holdback_duration | integer | The guarantee holdback duration in month |
expire_at | string | The expiration date |
accepted_at | string | The date of acceptance by the client |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
advance_payment_value | number | The advance payment value |
advance_payment_amount | number | The advance payment amount |
contents | array | An array of Quotation Content object |
The Quotation Content object
The Quotation Content object
{
"id": 1,
"variation_id": 1,
"variation": {...},
"picture_id": 1,
"picture": {...},
"affair_content_id": 1,
"is_comments": false,
"is_subtotal": false,
"is_pagebreak": false,
"is_hidden": false,
"line_number": 1,
"reference": null,
"designation": "test",
"comments": null,
"ean_code": null,
"sale_category_id": 1,
"sale_category": {...},
"weight_unit": null,
"total_weight": "0.00",
"discount_type": "pourcent",
"discount_value": "10.00",
"unit_price_ht": "100.00000",
"unit_price_tva": "20.00000",
"unit_price_ttc": "120.00000",
"ecotax_u_ht": "0.00",
"ecotax_u_tva": "0.00",
"ecotax_u_ttc": "0.00",
"unit_price_net_ht": "90.00000",
"unit_price_net_tva": "18.00000",
"unit_price_net_ttc": "108.00000",
"is_option": false,
"quantity": "1.00000",
"unit_id": 1,
"unit": {...},
"secondary_quantity": "2.00000",
"secondary_unit_id": 2,
"secondary_unit": {...},
"total_quantity": "2.00000",
"vat_rate_id": 1,
"vat_rate_value": "20.00",
"vat_rate": {...},
"subtotal_ht": "200.00",
"subtotal_tva": "40.00",
"subtotal_ttc": "240.00",
"total_ecotax_ht": "0.00",
"total_ecotax_tva": "0.00",
"total_ecotax_ttc": "0.00",
"discount_ht": null,
"discount_tva": null,
"discount_ttc": null,
"total_ht": "180.00",
"total_tva": "36.00",
"total_ttc": "216.00",
"global_discount_ht": "0.00",
"global_discount_tva": "0.00",
"global_discount_ttc": "0.00",
"total_net_ht": "-100.00",
"total_net_tva": "-20.00",
"total_net_ttc": "-120.00",
"catalog_costs_u": 0,
"various_costs_u": 0,
"total_costs_u": 0,
"hourly_person_cost": 0,
"number_people_needed": 0,
"duration": 0,
"duration_type": "hour",
"workforce_costs_u": 0,
"total_charge_u": 0,
"gross_margin_amount_u": 90,
"total_catalog_costs": 0,
"total_various_costs": 0,
"total_costs": 0,
"total_duration_hour": 0,
"total_workforce": 0,
"total_charge": 0,
"gross_margin_amount": 180,
"gross_margin_rate": 100,
"markup_rate": 100,
"delivered_quantity": "0.00000",
"quantity_to_deliver": "1.00000"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the document content |
catalog | object | Present only if a catalog element is linked |
catalog.type | string | Type of catalog element. Can be : product , service |
catalog.id | integer | Id of catalog element. Present only if requested |
catalog.element | object | The catalog element object. |
variation_id | integer | The product variation ID |
variation | object | A Product Variation object. Present only if requested |
picture_id | integer | The picture ID |
picture | object | A File object. Present only if requested |
affair_content_id | integer | The affair content ID. Used to link the content of documents between linked documents (quotes, delivery notes, invoices, etc.) |
is_comments | boolean | If the line is a comment line |
is_subtotal | boolean | If the row is a subtotal row |
is_pagebreak | boolean | If the line is a page break |
line_number | integer | The line number |
reference | string | The reference |
designation | string | The designation |
comments | string | A comment not visible to the customer |
ean_code | string | The EAN code |
sale_category_id | integer | The sale category ID |
sale_category | object | A Sale Category object. Present only if requested |
weight_unit | string | The unit weight |
total_weight | number | The total weight |
unit_price_ht | number | Unit Price HT |
unit_price_tva | number | Unit Price TVA |
unit_price_ttc | number | Unit Price TTC |
ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT |
ecotax_u_tva | number | Unit amount of the VAT eco-contribution |
ecotax_u_ttc | number | Unit amount of the eco-contribution including tax |
discount_type | string | The type of discount. Can be :
|
discount_value | number | The value of discount |
discount_ht | number | Unit amount excluding tax of the discount |
discount_tva | number | Unit VAT amount of the discount |
discount_ttc | number | Unit amount including VAT of the discount |
unit_price_net_ht | number | Discounted unit price excluding tax |
unit_price_net_tva | number | Unit price VAT discounted |
unit_price_net_ttc | number | Discounted unit price including VAT |
is_option | boolean | If line is an option |
quantity | number | Quantity |
unit_id | integer | The unit ID |
unit | object | A Unit object. Present only if requested |
secondary_quantity | number | The secondary quantity |
secondary_unit_id | integer | The unit ID for the secondary quantity |
secondary_unit | object | The unit for the secondary quantity. A Unit object. Present only if requested |
total_quantity | number | The total quantity |
vat_rate_id | integer | The Vat rate ID |
vat_rate | object | A Vat Rate object. Present only if requested |
vat_rate_value | number | The Vat Rate value |
subtotal_ht | number | If the line is a subtotal, the HT subtotal |
subtotal_tva | number | If the line is a subtotal, the TVA subtotal |
subtotal_ttc | number | If the line is a subtotal, the TTC subtotal |
total_ecotax_ht | number | Total amount excluding VAT of the eco-contribution |
total_ecotax_tva | number | Total VAT amount of the eco-contribution |
total_ecotax_ttc | number | Total amount including VAT of the eco-contribution |
total_ht | number | Total HT |
total_tva | number | Total TVA |
total_ttc | number | Total TTC |
global_discount_ht | number | HT Part of the general discount applied to this line |
global_discount_tva | number | TVA Part of the general discount applied to this line |
global_discount_ttc | number | TTC Part of the general discount applied to this line |
total_net_ht | number | Total NET HT of the line |
total_net_tva | number | Total NET TVA of the line |
total_net_ttc | number | Total NET TTC of the line |
catalog_costs_u | number | Unit product costs |
various_costs_u | number | Unit various costs |
total_costs_u | number | Unit total costs |
hourly_person_cost | number | Technician hourly costs |
number_people_needed | integer | Number of technician required |
duration | number | Duration of service |
duration_type | number | Type of duration. Can be : hour , day |
workforce_costs_u | number | The unit workforce costs |
total_charge_u | number | Total unit charge |
gross_margin_amount_u | number | Unit gross margin amount |
total_catalog_costs | number | Total product costs |
total_various_costs | number | Total various costs |
total_costs | number | Total total costs |
total_duration_hour | number | Total duration of service in hour |
total_workforce | number | Total workforce costs |
total_charge | number | Total charge |
gross_margin_amount | number | Gross margin amount |
gross_margin_rate | number | Gross margin rate |
markup_rate | number | Markup rate |
delivered_quantity | number | The delivered quantity |
quantity_to_deliver | number | The quantity to deliver |
Get All Quotations
curl "/sales/quotation" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
...
// a Quotation object
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all quotations.
HTTP Request
GET /sales/quotation
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : number , reference , customer_command_reference , title , date , expire_at , customer.name , contact.fullname , billing_address.city , billing_address.postal_code , billing_address.country.name , delivery_address.city , delivery_address.postal_code , delivery_address.country.name , total_ht , total_tva , total_ttc , already_billed , pourcent_billed , to_bill , pourcent_to_bill , total_costs , workforce_costs , total_charge , gross_margin_amount , gross_margin_rate , markup_rate , team_user.fullname , status_label , delivery_status_label , affair.reference |
search | Make a global search. Search in : reference , customer.company_name , customer.lastname , contact.lastname , customer_command_reference , title , billing_address_city , billing_address_postal_code , billing_address_country.name_fr , delivery_address_city , delivery_address_postal_code , delivery_address_country.name_fr , total_ht , total_tva , total_ttc |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : team_user (integer) , customer (integer) , contact (integer) , any_tags (array of string) , all_tags (array of string) , status (integer) , date_since (date) , date_until (date) , expire_since (date) , expire_until (date) , is_draft (boolean) , main_currency (boolean) , with_currency (integer) , delivery_status (integer) , can_be_billed (boolean) |
|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , payment_methods |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Quotation
curl "/sales/quotation" \
-X POST \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Quotation object
}
This endpoint create a quotation.
HTTP Request
POST /sales/quotation
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | required | string | Date of the document |
is_draft | boolean | If the document is a draft | |
pdf_model | required | integer | The Pdf Model ID |
title | string | The document title | |
customer | required | integer | The Customer ID |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | required | string | Billing address : City |
billing_address_postal_code | required | string | Billing address : Postal code |
billing_address_country | required | string | Billing address : Country code |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | required | array | |
contents.* | object | ||
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Retrieve a Quotation
curl "/sales/quotation/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Quotation object
}
This endpoint retrieves a specific quotation.
HTTP Request
GET /sales/quotation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : pdf_model , contact , billing_address_country , delivery_address_country , customer , currency , vat_rate , secondary_unit , grant , teamUser , payment_term , sale_term , contents , tags , affair , vatrates.vat_rate , customFields , contents.vat_rate , contents.unit , contents.secondary_unit , contents.sale_category , contents.picture , contents.catalog , contents.variation , contents.providers , custom_fields , linked_elements , payment_methods |
Retrieve the PDF of a Quotation
curl "/sales/quotation/1/pdf" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..." // The file content base64 encoded
// A File object
}
This endpoint retrieves the PDF of a quotation.
HTTP Request
GET /sales/quotation/<ID>/pdf
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Update a Quotation
curl "/sales/quotation/1" \
-X PUT \
-H "" \
-d "title=Title&..."
The above command returns JSON structured like this:
{
"id": 1,
...
// A Quotation object
}
This endpoint update a specific quotation.
HTTP Request
PUT /sales/quotation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | Date of the document | |
is_draft | boolean | If the document is a draft | |
pdf_model | integer | The Pdf Model ID | |
title | string | The document title | |
customer | integer | The Customer ID | |
customer_vatrate | string | The customer vat rate number | |
customer_command_reference | string | The customer command reference | |
contact | integer | The Contact ID | |
billing_address_name | string | Billing address : customer name | |
billing_address_contact | string | Billing address : contact name | |
billing_address_road | string | Billing address : Road 1 | |
billing_address_road2 | string | Billing address : Road 2 | |
billing_address_road3 | string | Billing address : Road 3 | |
billing_address_city | string | Billing address : City | |
billing_address_postal_code | string | Billing address : Postal code | |
billing_address_country | string | Billing address : Country code | |
billing_address_comments | string | Billing address : Comments | |
delivery_address_name | string | Delivery address : customer name | |
delivery_address_contact | string | Delivery address : contact name | |
delivery_address_road | string | Delivery address : Road 1 | |
delivery_address_road2 | string | Delivery address : Road 2 | |
delivery_address_road3 | string | Delivery address : Road 3 | |
delivery_address_city | string | Delivery address : City | |
delivery_address_postal_code | string | Delivery address : Postal code | |
delivery_address_country | object | Delivery address : Country code | |
delivery_address_comments | string | Delivery address : Comments | |
comments | string | Comments for the customer | |
currency | integer | The Currency ID | |
exchange_rate | number | The exchange rate. If the currency is different from that of the account |
|
use_global_vatrate | boolean | If the document uses a single VAT rate | |
vat_rate | integer | If use_global_vatrate = true, the VAT rate ID | |
secondary_quantity_mode | string | Secondary quantity entry mode in documents form. Can be :
|
|
secondary_quantity | number | If secondary_quantity_mode = 'global', the secondary quantity value | |
secondary_unit | integer | If secondary_quantity_mode = 'global', the secondary quantity unit ID | |
global_discount_type | string | The type of the global discount. Can be :
|
|
global_discount_value | number | The value of the global discount | |
global_discount_type_amount | string | The global discount amount type. Can be : ht , ttc |
|
status | integer | The status of the document. Can be :
|
|
input_mode | string | Input mode. Can be : ht , ttc |
|
team_user | integer | The sales representative ID for the document | |
sale_term | integer | The sale term ID | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
payment_methods | array | An array of Payment Method ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
input_options | object | Document form options | |
input_options.allow_delivery_address | boolean | Enable delivery address entry in documents form | |
input_options.allow_options | boolean | Enable the ability to offer options in documents form | |
input_options.ean | integer | Possibility to enter the EAN code in documents form. Can be :
|
|
input_options.weight | integer | Possibility to enter the weight in documents form. Can be :
|
|
input_options.eco_participation | integer | Possibility to enter the eco-participation in documents form. Can be :
|
|
input_options.col_number | boolean | Show the number for lines in documents form | |
input_options.col_reference | boolean | Show the reference for lines in documents form | |
input_options.col_picture | boolean | Show the pictures for lines in documents form | |
input_options.col_unit | boolean | Show the unites for lines in documents form | |
input_options.stock_display | integer | Show the stock quantity in documents form. Can be :
|
|
input_options.costs_entries | integer | Ability to enter costs in documents form. Can be :
|
|
input_options.various_costs | boolean | Ability to enter various costs in documents form | |
input_options.workforce_entries | integer | Entry of workforce in documents form. Can be :
|
|
input_options.gross_margin_amount | boolean | Show the gross margin amount in documents form | |
input_options.gross_margin_rate | boolean | Show the gross margin rate in documents form | |
input_options.markup_rate | boolean | Show the markup rate in documents form | |
input_options.secondary_quantity_unit | number | Secondary quantity entry mode in documents form. Can be :
|
|
pdf_options | object | PDF document options | |
pdf_options.amounts | integer | Type of amount to display in the content. Can be :
|
|
pdf_options.discounts | integer | Discount display mode. Can be :
|
|
pdf_options.comments | integer | Comments display mode. Can be :
|
|
pdf_options.units | integer | Unit display mode. Can be :
|
|
pdf_options.number_column | integer | Line number display mode. Can be :
|
|
pdf_options.reference_column | integer | Reference display mode. Can be :
|
|
pdf_options.ean_column | integer | EAN code display mode. Can be :
|
|
pdf_options.weight_column | integer | Weight display mode. Can be :
|
|
pdf_options.vatrate_column | boolean | Force the display of the VAT rate column. | |
pdf_options.total_quantity | boolean | Show total quantity column. (When using secondary quantity) | |
pdf_options.contact | integer | Contact display | |
pdf_options.country | integer | Country display | |
pdf_options.vatrate_number | integer | Display of the customer's intra-community VAT number. | |
delivery_status | integer | The deivery status of the document. Can be :
|
|
penalty_rate | number | The penalty rate | |
penalty_rate_law | boolean | If the penalty rate law must be displayed | |
escompte_rate | number | The escompte rate | |
collection_costs_law | boolean | If the collection costs law must be displayed | |
payment_term | integer | The payment term ID | |
grant | integer | The grant ID | |
grant_amount | number | The grant amount | |
guarantee_holdback_pourcent | number | The guarantee holdback pourcent | |
guarantee_holdback_amount | number | The guarantee holdback amount | |
guarantee_holdback_duration | integer | The guarantee holdback duration in month | |
expire_at | string | The expiration date | |
advance_payment_type | string | The advance payment type. Can be : amount , pourcent |
|
advance_payment_value | number | The advance payment value | |
contents | array | ||
contents.* | object | ||
contents.*.affair_content | integer | The affair content ID. Used to updated an existing line. |
|
contents.*.catalog | object | The linked catalog element | |
contents.*.catalog.type | required | string | Type of linked catalog element. Can be : product , service |
contents.*.catalog.id | required | integer | Id of linked catalog element |
contents.*.variation | integer | The product variation ID | |
contents.*.picture | integer | The picture ID | |
contents.*.is_comments | boolean | If the line is a comment line | |
contents.*.is_subtotal | boolean | If the row is a subtotal row | |
contents.*.is_pagebreak | boolean | If the line is a page break | |
contents.*.reference | string | The reference | |
contents.*.designation | required | string | The designation |
contents.*.comments | string | A comment not visible to the customer | |
contents.*.ean_code | string | The EAN code | |
contents.*.weight_unit | string | The unit weight | |
contents.*.unit_price_ht | number | Unit Price HT | |
contents.*.unit_price_ttc | number | Unit Price TTC | |
contents.*.ecotax_u_ht | number | Unit amount of the eco-contribution excluding VAT | |
contents.*.ecotax_u_ttc | number | Unit amount of the eco-contribution including tax | |
contents.*.discount_type | string | The type of discount. Can be :
|
|
contents.*.discount_value | number | The value of discount | |
contents.*.is_option | boolean | If line is an option | |
contents.*.quantity | number | Quantity | |
contents.*.unit | integer | The unit ID | |
contents.*.secondary_quantity | number | The secondary quantity | |
contents.*.secondary_unit | integer | The unit ID for the secondary quantity | |
contents.*.total_quantity | number | The total quantity | |
contents.*.vat_rate | integer | The Vat rate ID | |
contents.*.catalog_costs_u | number | Unit product costs | |
contents.*.various_costs_u | number | Unit various costs | |
contents.*.hourly_person_cost | number | Technician hourly costs | |
contents.*.number_people_needed | integer | Number of technician required | |
contents.*.duration | number | Duration of service | |
contents.*.duration_type | number | Type of duration. Can be : hour , day |
Lite update a Quotation
curl "/sales/quotation/1/lite" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Quotation object
}
This endpoint update a specific quotation.
HTTP Request
PUT /sales/quotation/<ID>/lite
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation to update |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
title | string | The document title | |
tags | array | An array of string | |
attach_tags | array | An array of string | |
detach_tags | array | An array of string | |
team_user | integer | The sales representative ID for the document | |
contact | integer | The Contact ID | |
custom_fields | array | The custom fields values. | |
custom_fields.* | array | ||
custom_fields.*.id | array | The custom field ID. | |
custom_fields.*.value | array | The custom field values. | |
status | integer | The status of the document. Can be :
|
Create a command for a quotation
curl "/sales/quotation/1/command" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Command object
}
This endpoint create a command from a quotation.
HTTP Request
PUT /sales/quotation/<ID>/command
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the command must be created in draft |
Create a proforma for a quotation
curl "/sales/quotation/1/proforma" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// A Proforma object
}
This endpoint create a proforma from a quotation.
HTTP Request
PUT /sales/quotation/<ID>/proforma
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the proforma must be created in draft |
Create a deposit invoice from the quotation
curl "/sales/quotation/1/deposit-invoice" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint bill a quotation.
HTTP Request
PUT /sales/quotation/<ID>/deposit-invoice
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the deposit invoice must be created in draft | |
with_vatrate | boolean | If the deposit invoice should have VAT | |
amount | array | The amount of the deposit | |
percentage | array | The percentage of the deposit Is not used if the amount is present |
Bill a quotation
curl "/sales/quotation/1/bill" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Invoice object
}
This endpoint create a deposit invoice from the quotation.
HTTP Request
PUT /sales/quotation/<ID>/bill
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft |
Deliver a quotation
curl "/sales/quotation/1/deliver" \
-X PUT \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
...
// An Delivery object
}
This endpoint deliver a quotation.
HTTP Request
PUT /sales/quotation/<ID>/deliver
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation |
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
date | string | The document date | |
is_draft | array | If the invoice must be created in draft | |
contents | array | The content of the quotation to deliver | |
contents.* | array | ||
contents.*.id | integer | The affair content id of the quotation line to delivery | |
contents.*.quantity | number | The quantity to deliver |
Delete a Quotation
curl "/sales/quotation/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific quotation.
HTTP Request
DELETE /sales/quotation/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the quotation to delete |
Sale Terms
The Sale Term object
The Sale Term object
{
"id": 1,
"label": "My CGV",
"content": "<div style=\"text-align: justify;\">Victus universis caro ferina est lactisque abundans copia qua sustentantur, et herbae multiplices et siquae alites capi per aucupium possint, et plerosque mos vidimus frumenti usum et vini penitus ignorantes.Eminuit autem inter humilia supergressa iam impotentia fines mediocrium delictorum nefanda Clematii cuiusdam Alexandrini nobilis mors repentina; cuius socrus cum misceri sibi generum, flagrans eius amore, non impetraret, ut ferebatur, per palatii pseudothyrum introducta, oblato pretioso reginae monili id adsecuta est, ut ad Honoratum tum comitem orientis formula missa letali omnino scelere nullo contactus idem Clematius nec hiscere nec loqui permissus occideretur.Et quia Montius inter dilancinantium manus spiritum efflaturus Epigonum et Eusebium nec professionem nec dignitatem ostendens aliquotiens increpabat, qui sint hi magna quaerebatur industria, et nequid intepesceret, Epigonus e Lycia philosophus ducitur et Eusebius ab Emissa Pittacas cognomento, concitatus orator, cum quaestor non hos sed tribunos fabricarum insimulasset promittentes armorum si novas res agitari conperissent.</div>",
"created_at": "2022-07-08T12:31:54.000000Z",
"updated_at": "2022-07-08T12:31:54.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the sale term |
label | string | Name of the sale term |
content | integer | Content of the sale term |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Sale Terms
curl "/sales/sale_term" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "My CGV",
"content": "<div style=\"text-align: justify;\">Victus universis caro ferina est lactisque abundans copia qua sustentantur, et herbae multiplices et siquae alites capi per aucupium possint, et plerosque mos vidimus frumenti usum et vini penitus ignorantes.Eminuit autem inter humilia supergressa iam impotentia fines mediocrium delictorum nefanda Clematii cuiusdam Alexandrini nobilis mors repentina; cuius socrus cum misceri sibi generum, flagrans eius amore, non impetraret, ut ferebatur, per palatii pseudothyrum introducta, oblato pretioso reginae monili id adsecuta est, ut ad Honoratum tum comitem orientis formula missa letali omnino scelere nullo contactus idem Clematius nec hiscere nec loqui permissus occideretur.Et quia Montius inter dilancinantium manus spiritum efflaturus Epigonum et Eusebium nec professionem nec dignitatem ostendens aliquotiens increpabat, qui sint hi magna quaerebatur industria, et nequid intepesceret, Epigonus e Lycia philosophus ducitur et Eusebius ab Emissa Pittacas cognomento, concitatus orator, cum quaestor non hos sed tribunos fabricarum insimulasset promittentes armorum si novas res agitari conperissent.</div>",
"created_at": "2022-07-08T12:31:54.000000Z",
"updated_at": "2022-07-08T12:31:54.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all sale terms.
HTTP Request
GET /sales/sale_term
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Sale Term
curl "/sales/sale_term" \
-X POST \
-H "" \
-d "label=My CGV&content=..."
The above command returns JSON structured like this:
{
"id": 1,
"label": "My CGV",
"content": "<div style=\"text-align: justify;\">Victus universis caro ferina est lactisque abundans copia qua sustentantur, et herbae multiplices et siquae alites capi per aucupium possint, et plerosque mos vidimus frumenti usum et vini penitus ignorantes.Eminuit autem inter humilia supergressa iam impotentia fines mediocrium delictorum nefanda Clematii cuiusdam Alexandrini nobilis mors repentina; cuius socrus cum misceri sibi generum, flagrans eius amore, non impetraret, ut ferebatur, per palatii pseudothyrum introducta, oblato pretioso reginae monili id adsecuta est, ut ad Honoratum tum comitem orientis formula missa letali omnino scelere nullo contactus idem Clematius nec hiscere nec loqui permissus occideretur.Et quia Montius inter dilancinantium manus spiritum efflaturus Epigonum et Eusebium nec professionem nec dignitatem ostendens aliquotiens increpabat, qui sint hi magna quaerebatur industria, et nequid intepesceret, Epigonus e Lycia philosophus ducitur et Eusebius ab Emissa Pittacas cognomento, concitatus orator, cum quaestor non hos sed tribunos fabricarum insimulasset promittentes armorum si novas res agitari conperissent.</div>",
"created_at": "2022-07-08T12:31:54.000000Z",
"updated_at": "2022-07-08T12:31:54.000000Z"
}
This endpoint create a sale term.
HTTP Request
POST /sales/sale_term
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
label | required | string | Name of the sale term |
content | required | integer | Content of the sale term |
Retrieve a Sale Term
curl "/sales/sale_term/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "My CGV",
"content": "<div style=\"text-align: justify;\">Victus universis caro ferina est lactisque abundans copia qua sustentantur, et herbae multiplices et siquae alites capi per aucupium possint, et plerosque mos vidimus frumenti usum et vini penitus ignorantes.Eminuit autem inter humilia supergressa iam impotentia fines mediocrium delictorum nefanda Clematii cuiusdam Alexandrini nobilis mors repentina; cuius socrus cum misceri sibi generum, flagrans eius amore, non impetraret, ut ferebatur, per palatii pseudothyrum introducta, oblato pretioso reginae monili id adsecuta est, ut ad Honoratum tum comitem orientis formula missa letali omnino scelere nullo contactus idem Clematius nec hiscere nec loqui permissus occideretur.Et quia Montius inter dilancinantium manus spiritum efflaturus Epigonum et Eusebium nec professionem nec dignitatem ostendens aliquotiens increpabat, qui sint hi magna quaerebatur industria, et nequid intepesceret, Epigonus e Lycia philosophus ducitur et Eusebius ab Emissa Pittacas cognomento, concitatus orator, cum quaestor non hos sed tribunos fabricarum insimulasset promittentes armorum si novas res agitari conperissent.</div>",
"created_at": "2022-07-08T12:31:54.000000Z",
"updated_at": "2022-07-08T12:31:54.000000Z"
}
This endpoint retrieves a specific sale term.
HTTP Request
GET /sales/sale_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sale term to retrieve |
Update a Sale Term
curl "/sales/sale_term/1" \
-X PUT \
-H "" \
-d "label=My CGV&content=..."
The above command returns JSON structured like this:
{
"id": 1,
"label": "My CGV",
"content": "<div style=\"text-align: justify;\">Victus universis caro ferina est lactisque abundans copia qua sustentantur, et herbae multiplices et siquae alites capi per aucupium possint, et plerosque mos vidimus frumenti usum et vini penitus ignorantes.Eminuit autem inter humilia supergressa iam impotentia fines mediocrium delictorum nefanda Clematii cuiusdam Alexandrini nobilis mors repentina; cuius socrus cum misceri sibi generum, flagrans eius amore, non impetraret, ut ferebatur, per palatii pseudothyrum introducta, oblato pretioso reginae monili id adsecuta est, ut ad Honoratum tum comitem orientis formula missa letali omnino scelere nullo contactus idem Clematius nec hiscere nec loqui permissus occideretur.Et quia Montius inter dilancinantium manus spiritum efflaturus Epigonum et Eusebium nec professionem nec dignitatem ostendens aliquotiens increpabat, qui sint hi magna quaerebatur industria, et nequid intepesceret, Epigonus e Lycia philosophus ducitur et Eusebius ab Emissa Pittacas cognomento, concitatus orator, cum quaestor non hos sed tribunos fabricarum insimulasset promittentes armorum si novas res agitari conperissent.</div>",
"created_at": "2022-07-08T12:31:54.000000Z",
"updated_at": "2022-07-08T12:31:54.000000Z"
}
This endpoint update a specific sale term.
HTTP Request
PUT /sales/sale_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sale term to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
label | string | Name of the sale term |
content | integer | Content of the sale term |
Delete a Sale Term
curl "/sales/sale_term/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific sale term.
HTTP Request
DELETE /sales/sale_term/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sale term to delete |
Tasks
Tasks
The Task object
The Task object
{
"id": 28,
"title": "Task title",
"datetime": "2022-05-24T22:00:00.000000Z",
"category_id": null,
"category": null,
"status": {
"value": 4,
"label": "Terminée"
},
"notes": null,
"text_notes": null,
"priority": {
"value": 2,
"label": "Normale"
},
"elements": [],
"customers": [],
"contacts": [],
"other_elements": [],
"team_users": [
{...}
],
"completed_at": "2022-06-27T16:44:22.000000Z",
"created_at": "2022-05-25T12:02:06.000000Z",
"updated_at": "2022-06-27T16:44:22.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the task |
title | string | Title of the task |
datetime | string | Datetime when the task must be carried out |
category_id | integer | The category ID of the task |
category | object | The category of the task. A Task Category Object. Present only if elements is requested |
status | object | The status of the task. Can be :
|
notes | string | Notes in HTML format |
text_notes | string | Notes in text format |
priority | object | The priority of the task. Can be :
|
elements | array | Elements who are linked to the event Present only if requested |
customers | array | Customers who are linked to the event An array of Customer object. Present only if elements is requested |
contacts | array | Contacts who are linked to the event An array of Contact object. Present only if elements is requested |
other_elements | array | Others elements who are linked to the event An array of elements object. Present only if elements is requested |
team_users | array | Team users affected by the task An array of Team User object. Present only if team_users is requested |
completed_at | string | Task completion datetime |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Tasks
curl "/task" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 28,
"title": "Task title",
"datetime": "2022-05-24T22:00:00.000000Z",
"category_id": null,
"category": null,
"status": {
"value": 4,
"label": "Terminée"
},
"notes": null,
"text_notes": null,
"priority": {
"value": 2,
"label": "Normale"
},
"elements": [],
"customers": [],
"contacts": [],
"other_elements": [],
"team_users": [
{...}
],
"completed_at": "2022-06-27T16:44:22.000000Z",
"created_at": "2022-05-25T12:02:06.000000Z",
"updated_at": "2022-06-27T16:44:22.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all tasks.
HTTP Request
GET /task/
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : title , datetime , completed_at , priority.label , status.label , category , created_at , updated_at |
search | Make a global search. Search in : title , notes , category.label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : title (string) , category (string) , status (integer) , priority (integer) , with_team_users (integer) , deadline_since (date) , deadline_since (deadline_until) , deadline , elements (array(type => string, id => integer)) |
|
include | Related data to add to the answer Availables datas : category , team_users , elements |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a task
curl "/task" \
-X POST \
-H "" \
-d "title=Task title&datetime=2022-05-24 22:00:00&status=4"
The above command returns JSON structured like this:
{
"id": 28,
"title": "Task title",
"datetime": "2022-05-24T22:00:00.000000Z",
"category_id": null,
"category": null,
"status": {
"value": 4,
"label": "Terminée"
},
"notes": null,
"text_notes": null,
"priority": {
"value": 2,
"label": "Normale"
},
"elements": [],
"customers": [],
"contacts": [],
"other_elements": [],
"team_users": [
{...}
],
"completed_at": "2022-06-27T16:44:22.000000Z",
"created_at": "2022-05-25T12:02:06.000000Z",
"updated_at": "2022-06-27T16:44:22.000000Z"
}
This endpoint create a task.
HTTP Request
POST /task
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
title | required | string | Title of the task |
datetime | string | Datetime when the task must be carried out | |
category | integer | The category ID of the task | |
status | integer | The status of the task. Can be :
|
|
notes | string | Notes in HTML format | |
priority | integer | The priority of the task. Can be :
|
|
elements | array | Elements who are linked to the event | |
elements.*.id | required | integer | Id of linked element |
elements.*.type | required | string | Type of linked element. Can be : customer , contact , providerCommand , quotation , command , delivery , proforma , invoice , credit , charge |
team_users | required | array | Team users affected by the task |
team_users.* | required | integer | Team user ID |
completed_at | string | Task completion datetime |
Retrieve a task
curl "/task/28" \
-H ""
The above command returns JSON structured like this:
{
"id": 28,
"title": "Task title",
"datetime": "2022-05-24T22:00:00.000000Z",
"category_id": null,
"category": null,
"status": {
"value": 4,
"label": "Terminée"
},
"notes": null,
"text_notes": null,
"priority": {
"value": 2,
"label": "Normale"
},
"elements": [],
"customers": [],
"contacts": [],
"other_elements": [],
"team_users": [
{...}
],
"completed_at": "2022-06-27T16:44:22.000000Z",
"created_at": "2022-05-25T12:02:06.000000Z",
"updated_at": "2022-06-27T16:44:22.000000Z"
}
This endpoint retrieves a specific task.
HTTP Request
GET /task/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task to retrieve |
Update a task
curl "/task/28" \
-X PUT \
-H "" \
-d "title=Task title"
The above command returns JSON structured like this:
{
"id": 28,
"title": "Task title",
"datetime": "2022-05-24T22:00:00.000000Z",
"category_id": null,
"category": null,
"status": {
"value": 4,
"label": "Terminée"
},
"notes": null,
"text_notes": null,
"priority": {
"value": 2,
"label": "Normale"
},
"elements": [],
"customers": [],
"contacts": [],
"other_elements": [],
"team_users": [
{...}
],
"completed_at": "2022-06-27T16:44:22.000000Z",
"created_at": "2022-05-25T12:02:06.000000Z",
"updated_at": "2022-06-27T16:44:22.000000Z"
}
This endpoint update a specific task.
HTTP Request
PUT /task/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
title | string | Title of the task |
datetime | string | Datetime when the task must be carried out |
category | integer | The category ID of the task |
status | integer | The status of the task. Can be :
|
notes | string | Notes in HTML format |
priority | integer | The priority of the task. Can be :
|
elements | array | Elements who are linked to the event |
elements.*.id | integer | Id of linked element |
elements.*.type | string | Type of linked element. Can be : customer , contact , providerCommand , quotation , command , delivery , proforma , invoice , credit , charge |
team_users | array | Team users affected by the task |
team_users.* | integer | Team user ID |
completed_at | string | Task completion datetime |
Delete a task
curl "/task/28" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific task.
HTTP Request
DELETE /task/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task to delete |
Task categories
The Task Category object
The Task Category object
{
"id": 4,
"label": "proident",
"use_default": false,
"created_at": "2022-05-19T19:31:10.000000Z",
"updated_at": "2022-05-19T19:31:10.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the category |
label | string | Name of the category |
use_default | boolean | Select the default category when creating a new task |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Task Categories
curl "/task/category" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 4,
"label": "proident",
"use_default": false,
"created_at": "2022-05-19T19:31:10.000000Z",
"updated_at": "2022-05-19T19:31:10.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all task categories.
HTTP Request
GET /task/category
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | label | Sort the data. Allowed values : label , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a task category
curl "/task/category" \
-X POST \
-H "" \
-d "label=Category name"
The above command returns JSON structured like this:
{
"id": 4,
"label": "Category name",
"use_default": false,
"created_at": "2022-05-19T19:31:10.000000Z",
"updated_at": "2022-05-19T19:31:10.000000Z"
}
This endpoint create a task category.
HTTP Request
POST /task/category
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the category |
use_default | boolean | Select the default category when creating a new task |
Retrieve a task category
curl "/task/category/4" \
-H ""
The above command returns JSON structured like this:
{
"id": 4,
"label": "proident",
"use_default": false,
"created_at": "2022-05-19T19:31:10.000000Z",
"updated_at": "2022-05-19T19:31:10.000000Z"
}
This endpoint retrieves a specific task category.
HTTP Request
GET /task/category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task category to retrieve |
Update a task category
curl "/task/category/4" \
-X PUT \
-H "" \
-d "label=Category name"
The above command returns JSON structured like this:
{
"id": 4,
"label": "Category name",
"use_default": false,
"created_at": "2022-05-19T19:31:10.000000Z",
"updated_at": "2022-05-19T19:31:10.000000Z"
}
This endpoint update a specific task category.
HTTP Request
PUT /task/category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task category to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the category |
use_default | boolean | Select the default category when creating a new task |
Delete a task category
curl "/task/category/4" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific task category.
HTTP Request
DELETE /task/category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the task category to delete |
Various
Bank Accounts
The Bank Account object
The Bank Account object
{
"id": 1,
"name": "Compte",
"owner": "Kwixéo",
"iban": "FR1420041010050500013M02606",
"bic": "CEPAFRPP751",
"sepa_id": "30001",
"account_number": "0123456789",
"bank_code": "30001",
"use_default": true,
"created_at": "2022-07-08T11:59:38.000000Z",
"updated_at": "2022-07-08T12:05:13.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the bank account |
name | string | Name of the bank account |
owner | string | Owner of the bank account |
iban | string | IBAN number |
bic | string | BIC number |
sepa_id | string | SEPA creditor identifier |
account_number | string | Account number |
bank_code | string | Bank code |
use_default | boolean | If the account is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Bank Accounts
curl "/sales/account" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Compte",
"owner": "Kwixéo",
"iban": "FR1420041010050500013M02606",
"bic": "CEPAFRPP751",
"sepa_id": "30001",
"account_number": "0123456789",
"bank_code": "30001",
"use_default": true,
"created_at": "2022-07-08T11:59:38.000000Z",
"updated_at": "2022-07-08T12:05:13.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all accounts.
HTTP Request
GET /sales/account
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , created_at , updated_at |
search | Make a global search. Search in : name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Bank Account
curl "/sales/account" \
-X POST \
-H "" \
-d "name=Account&..."
The above command returns JSON structured like this:
{
"id": 1,
"name": "Compte",
"owner": "Kwixéo",
"iban": "FR1420041010050500013M02606",
"bic": "CEPAFRPP751",
"sepa_id": "30001",
"account_number": "0123456789",
"bank_code": "30001",
"use_default": true,
"created_at": "2022-07-08T11:59:38.000000Z",
"updated_at": "2022-07-08T12:05:13.000000Z"
}
This endpoint create a bank account.
HTTP Request
POST /sales/account
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
name | required | string | Name of the bank account |
owner | string | Owner of the bank account | |
iban | string | IBAN number | |
bic | string | BIC number | |
sepa_id | string | SEPA creditor identifier | |
account_number | string | Account number | |
bank_code | string | Bank code | |
use_default | boolean | If the account is selected by default in App |
Retrieve a Bank Account
curl "/sales/account/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"name": "Compte",
"owner": "Kwixéo",
"iban": "FR1420041010050500013M02606",
"bic": "CEPAFRPP751",
"sepa_id": "30001",
"account_number": "0123456789",
"bank_code": "30001",
"use_default": true,
"created_at": "2022-07-08T11:59:38.000000Z",
"updated_at": "2022-07-08T12:05:13.000000Z"
}
This endpoint retrieves a specific bank account.
HTTP Request
GET /sales/account/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the account to retrieve |
Update a Bank Account
curl "/sales/account/1" \
-X PUT \
-H "" \
-d "name=Account"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Compte",
"owner": "Kwixéo",
"iban": "FR1420041010050500013M02606",
"bic": "CEPAFRPP751",
"sepa_id": "30001",
"account_number": "0123456789",
"bank_code": "30001",
"use_default": true,
"created_at": "2022-07-08T11:59:38.000000Z",
"updated_at": "2022-07-08T12:05:13.000000Z"
}
This endpoint update a specific bank account.
HTTP Request
PUT /sales/account/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the account to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
name | string | Name of the bank account |
owner | string | Owner of the bank account |
iban | string | IBAN number |
bic | string | BIC number |
sepa_id | string | SEPA creditor identifier |
account_number | string | Account number |
bank_code | string | Bank code |
use_default | boolean | If the account is selected by default in App |
Delete a Bank Account
curl "/sales/account/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific bank account.
HTTP Request
DELETE /sales/account/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the account to delete |
Civilities
The Civility object
The Civility object
{
"id": 1,
"name": "Monsieur",
"short_name": "M",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the civility |
name | string | Name of the civility |
short_name | string | Short name of the civility |
use_default | boolean | If the civility is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Civilities
curl "/civility" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Monsieur",
"short_name": "M",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all civilities.
HTTP Request
GET /civility
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , short_name , use_default , created_at , updated_at |
search | Make a global search. Search in : name , short_name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : name (string) , short_name (string) |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a civility
curl "/civility" \
-X POST \
-H "" \
-d "name=Monsieur&short_name=M"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Monsieur",
"short_name": "M",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint create a civility.
HTTP Request
POST /civility
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | required | string | Name of the civility |
short_name | required | string | Short name of the civility |
use_default | boolean | If the civility is selected by default in App |
Retrieve a civility
curl "/civility/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"name": "Monsieur",
"short_name": "M",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint retrieves a specific civility.
HTTP Request
GET /civility/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the civility to retrieve |
Update a civility
curl "/civility/1" \
-X PUT \
-H "" \
-d "name=Monsieur&short_name=M"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Monsieur",
"short_name": "M",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint update a specific civility.
HTTP Request
PUT /civility/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the civility to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the civility |
short_name | string | Short name of the civility |
use_default | boolean | If the civility is selected by default in App |
Delete a Civility
curl "/civility/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific civility.
HTTP Request
DELETE /civility/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the civility to delete |
Charge Categories
The Charge Category object
The Charge Category object
{
"id": 1,
"label": "Loyer",
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the category |
label | string | Name of the category |
account_number | string | Accounting account number |
parent | object | The parent category. A Charge category object. Present only if requested |
childs | array | The child categories. An array of Charge category object. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Charge categories
curl "/catalog/charge_category" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Loyer",
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all charge categories.
HTTP Request
GET /catalog/charge_category
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , parent |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : is_parent (boolean) , parent (integer) , parent (exclude) |
|
include | Related data to add to the answer Availables datas : childs , parent |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Charge Category
curl "/catalog/charge_category" \
-X POST \
-H "" \
-d "label=Category"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a charge category.
HTTP Request
POST /catalog/charge_category
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the category |
account_number | string | Accounting account number | |
parent | integer | A Charge category Id |
Retrieve a charge category
curl "/catalog/charge_category/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific charge category.
HTTP Request
GET /catalog/charge_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : childs , parent |
Update a Charge Category
curl "/catalog/charge_category/1" \
-X PUT \
-H "" \
-d "label=Category"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific charge category.
HTTP Request
PUT /catalog/charge_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
label | string | Name of the category |
account_number | string | Accounting account number |
parent | integer | A Charge category Id |
Delete a Charge Category
curl "/catalog/charge_category/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific charge category.
HTTP Request
DELETE /catalog/charge_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to delete |
Countries
The Country object
The Country object
{
"id": 1,
"name": "France",
"code": "FR",
"ue_member": true
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the country |
name | string | Name of the country |
code | string | The country code |
ue_member | boolean | If the country is a member of Europe |
Get All Countries
curl "/country" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "France",
"code": "FR",
"ue_member": true
},
{
"id": 2,
"name": "Espagne",
"code": "ES",
"ue_member": true
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all countries.
HTTP Request
GET /country
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , code |
search | Make a global search. Search in : name , code |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : ue_member (boolean) , name (string) , code (string) |
Retrieve a country
curl "/country/2" \
-H ""
The above command returns JSON structured like this:
{
"id": 2,
"name": "Espagne",
"code": "ES",
"ue_member": true
}
This endpoint retrieves a specific country.
HTTP Request
GET /country/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the country to retrieve |
Currencies
The Currency object
The Currency object
{
"id": 51,
"name": "Euro",
"code": "EUR",
"symbol": "€",
"country_id": null,
"country": {
// Country object
// ...
}
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the currency |
name | string | Name of the currency |
code | string | The currency code |
symbol | string | The symbol of the currency |
country_id | integer | The linked country identifier. Can be null if the currency is used in multiple country. |
country | object | A country object. Present only if requested |
Get All Currencies
curl "/currency" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 51,
"name": "Euro",
"code": "EUR",
"symbol": "€",
"country_id": null,
"country": {
// Country object
// ...
}
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all currencies.
HTTP Request
GET /currency
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , code , country.name |
search | Make a global search. Search in : name , code |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : name (string) , code (string) , country.name (string) , country.code (string) |
|
include | Related data to add to the answer Availables datas : country |
Retrieve a currency
curl "/currency/2" \
-H ""
The above command returns JSON structured like this:
{
"id": 2,
"name": "Espagne",
"code": "ES",
"ue_member": true
}
This endpoint retrieves a specific currency.
HTTP Request
GET /currency/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the currency to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : country |
File
The File object
The File object
{
"id": 1,
"filename": "filename.pdf",
"extension": "pdf",
"size": 196465,
"human_size": "191.86 KiB",
"created_at": "2023-11-24T18:08:59.000000Z",
"updated_at": "2023-11-24T18:08:59.000000Z",
"file": "..."
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the file |
filename | string | The filename |
extension | string | The extension for the file |
size | integer | The weight of the file |
human_size | string | Human readable file size |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
file | string | The fle content base64 encoded |
Payment Methods
The Payment Method object
The Payment Method object
{
"id": 1,
"label": "Carte bancaire",
"type": {
"id": 1,
"label": "Carte bleue"
},
"pdf_content": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the payment method |
label | string | Name of the payment method |
type | object | Type of the payment method |
type.id | integer | Unique identifier for type of the payment method. Can be :
|
type.label | string | Label for type of the payment method. |
pdf_content | string | Text to display on PDF. If not specified, the label is used. |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Payment Methods
curl "/payment_method" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Carte bancaire",
"type": {
"id": 1,
"label": "Carte bleue"
},
"pdf_content": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all payment methods.
HTTP Request
GET /payment_method
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : exclude (integer) |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Payment Method
curl "/payment_method" \
-X POST \
-H "" \
-d "label=Carte bancaire&..."
The above command returns JSON structured like this:
{
"id": 1,
"label": "Carte bancaire",
"type": {
"id": 1,
"label": "Carte bleue"
},
"pdf_content": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint create a payment method.
HTTP Request
POST /payment_method
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
label | required | string | Name of the payment method |
type | required | integer | Type of the payment method. Can be :
|
pdf_content | string | Text to display on PDF. If not specified, the label is used. |
Retrieve a Payment Method
curl "/payment_method/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Carte bancaire",
"type": {
"id": 1,
"label": "Carte bleue"
},
"pdf_content": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint retrieves a specific payment method.
HTTP Request
GET /payment_method/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment method to retrieve |
Update a Payment Method
curl "/payment_method/1" \
-X PUT \
-H "" \
-d "label=Carte bancaire"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Carte bancaire",
"type": {
"id": 1,
"label": "Carte bleue"
},
"pdf_content": null,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint update a specific payment method.
HTTP Request
PUT /payment_method/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment method to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
label | string | Name of the payment method |
type | integer | Type of the payment method. Can be :
|
pdf_content | string | Text to display on PDF. If not specified, the label is used. |
Delete a Payment Method
curl "/payment_method/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific payment method.
HTTP Request
DELETE /payment_method/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payment method to delete |
PDF Models
The PDF Model object
The PDF Model object
{
"id": 1,
"label": "Default Model",
"use_quotation": true,
"use_command": true,
"use_proforma": true,
"use_delivery": true,
"use_invoice": true,
"use_credit": true,
"use_quotation_default": false,
"use_command_default": false,
"use_proforma_default": false,
"use_delivery_default": false,
"use_invoice_default": false,
"use_credit_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the PDF model |
label | string | Name of the PDF model |
use_quotation | boolean | If the model can be used for quotation |
use_command | boolean | If the model can be used for command |
use_proforma | boolean | If the model can be used for proforma |
use_delivery | boolean | If the model can be used for delivery |
use_invoice | boolean | If the model can be used for invoice |
use_credit | boolean | If the model can be used for credit |
use_quotation_default | boolean | If the model is selected by default for quotation |
use_command_default | boolean | If the model is selected by default for command |
use_proforma_default | boolean | If the model is selected by default for proforma |
use_delivery_default | boolean | If the model is selected by default for delivery |
use_invoice_default | boolean | If the model is selected by default for invoice |
use_credit_default | boolean | If the model is selected by default for credit |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All PDF Models
curl "/sales/pdf_model" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Default Model",
"use_quotation": true,
"use_command": true,
"use_proforma": true,
"use_delivery": true,
"use_invoice": true,
"use_credit": true,
"use_quotation_default": false,
"use_command_default": false,
"use_proforma_default": false,
"use_delivery_default": false,
"use_invoice_default": false,
"use_credit_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all PDF models.
HTTP Request
GET /sales/pdf_model
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : use_quotation (boolean) , use_command (boolean) , use_proforma (boolean) , use_delivery (boolean) , use_invoice (boolean) , use_credit (boolean) |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Retrieve a PDF Model
curl "/sales/pdf_model/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Default Model",
"use_quotation": true,
"use_command": true,
"use_proforma": true,
"use_delivery": true,
"use_invoice": true,
"use_credit": true,
"use_quotation_default": false,
"use_command_default": false,
"use_proforma_default": false,
"use_delivery_default": false,
"use_invoice_default": false,
"use_credit_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T00:43:49.000000Z"
}
This endpoint retrieves a specific PDF model.
HTTP Request
GET /sales/pdf_models/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the PDF model to retrieve |
Sale Categories
The Sale Category object
The Sale Category object
{
"id": 1,
"label": "Loyer",
"account_by_vatrate": false,
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the category |
label | string | Name of the category |
account_by_vatrate | boolean | If use Accounting account number by vat rates |
account_number | string | Accounting account number. Present only if account_by_vatrate = false |
accounts | array | List of accounting account number by vat rates. Present only if account_by_vatrate = true and if requested |
accounts.* | array | |
accounts.*.vatrate | object | A Vat Rate object |
accounts.*.account_number | string | Accounting account number |
parent | object | The parent category. A Sale category object. Present only if requested |
childs | array | The child categories. An array of Sale category object. Present only if requested |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Sales categories
curl "/catalog/sale_category" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Loyer",
"account_by_vatrate": false,
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all sales categories.
HTTP Request
GET /catalog/sale_category
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , parent |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : is_parent (boolean) , parent (integer) , parent (exclude) |
|
include | Related data to add to the answer Availables datas : childs , parent , accounts |
|
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Sale Category
curl "/catalog/sale_category" \
-X POST \
-H "" \
-d "label=Category"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_by_vatrate": false,
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a sales category.
HTTP Request
POST /catalog/sale_category
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
label | required | string | Name of the category |
account_by_vatrate | boolean | If use Accounting account number by vat rates | |
account_number | string | Accounting account number. Only if account_by_vatrate = false |
|
accounts | array | List of accounting account number by vat rates. Only if account_by_vatrate = true |
|
accounts.* | array | ||
accounts.*.vatrate | integer | A Vat Rate ID | |
accounts.*.account_number | string | Accounting account number | |
parent | integer | A parent category ID. |
Retrieve a sale category
curl "/catalog/sale_category/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_by_vatrate": false,
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific sale category.
HTTP Request
GET /catalog/sale_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to retrieve |
Query Parameters
For more information, see Retrieving a single element
Parameter | Default | Description |
---|---|---|
include | Related data to add to the answer Availables datas : childs , parent , accounts |
Update a Sale Category
curl "/catalog/sale_category/1" \
-X PUT \
-H "" \
-d "label=Category"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Loyer",
"account_by_vatrate": false,
"account_number": null,
"parent": null,
"childs": [],
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific sales category.
HTTP Request
PUT /catalog/sale_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
label | string | Name of the category |
account_by_vatrate | boolean | If use Accounting account number by vat rates |
account_number | string | Accounting account number. Only if account_by_vatrate = false |
accounts | array | List of accounting account number by vat rates. Only if account_by_vatrate = true |
accounts.* | array | |
accounts.*.vatrate | integer | A Vat Rate ID |
accounts.*.account_number | string | Accounting account number |
parent | integer | A parent category ID. |
Delete a Sale Category
curl "/catalog/sale_category/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific sales category.
HTTP Request
DELETE /catalog/sale_category/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the category to delete |
Tags
The Tag object
The Tag object
{
"id": 1,
"name": "Tag"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the tag |
name | string | Name of the tag |
Get All Tags
curl "/tag" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Tag"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all tags.
HTTP Request
GET /tag
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , created_at , updated_at |
search | Make a global search. Search in : name |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a tag
curl "/tag/" \
-X POST \
-H "" \
-d "name=Tag"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Tag"
}
This endpoint create a tag.
HTTP Request
POST /tag
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
name | required | string | Name of the tag |
Retrieve a tag
curl "/tag/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"name": "Tag"
}
This endpoint retrieves a specific tag.
HTTP Request
GET /tag/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the tag to retrieve |
Update a tag
curl "/tag/1" \
-X PUT \
-H "" \
-d "name=Tag"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Tag"
}
This endpoint update a specific tag.
HTTP Request
PUT /tag/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the tag to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the tag |
Delete a Tag
curl "/tag/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific tag.
HTTP Request
DELETE /tag/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the tag to delete |
Timezones
The Timezone object
The Timezone object
{
"id": 1,
"name": "Albania",
"diff": "+01:00",
"timezone": "Europe/Tirane"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the timezone |
name | string | Name of the timezone |
diff | string | The difference with GMT time |
timezone | string | The timezone name |
Get All Currencies
curl "/timezone" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"name": "Albania",
"diff": "+01:00",
"timezone": "Europe/Tirane"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all timezones.
HTTP Request
GET /timezone
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : name , diff , timezone |
search | Make a global search. Search in : name , diff , timezone |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
filter | Apply a search filter. Availables filters : name (string) , diff (string) , timezone (string) |
Retrieve a timezone
curl "/timezone/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"name": "Albania",
"diff": "+01:00",
"timezone": "Europe/Tirane"
}
This endpoint retrieves a specific timezone.
HTTP Request
GET /timezone/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the timezone to retrieve |
Units
The Unit object
The Unit object
{
"id": 1,
"label": "Mètre",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the unit |
label | string | Name of the unit |
use_default | boolean | If the unit is selected by default in App |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Units
curl "/unit" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"label": "Mètre",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all units.
HTTP Request
GET /unit
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | name | Sort the data. Allowed values : label , use_default , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a unit
curl "/unit/" \
-X POST \
-H "" \
-d "label=Mètre"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Mètre",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint create a unit.
HTTP Request
POST /unit
Datas Parameters
Parameter | Type | Description | |
---|---|---|---|
label | required | string | Name of the unit |
use_default | boolean | If the tag is selected by default in App |
Retrieve a unit
curl "/unit/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"label": "Mètre",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint retrieves a specific unit.
HTTP Request
GET /unit/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the unit to retrieve |
Update a unit
curl "/unit/1" \
-X PUT \
-H "" \
-d "label=Mètre"
The above command returns JSON structured like this:
{
"id": 1,
"label": "Mètre",
"use_default": false,
"created_at": "2022-05-18T00:43:49.000000Z",
"updated_at": "2022-05-18T13:45:31.000000Z"
}
This endpoint update a specific unit.
HTTP Request
PUT /unit/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the unit to update |
Datas Parameters
Parameter | Type | Description |
---|---|---|
name | string | Name of the unit |
use_default | boolean | If the unit is selected by default in App |
Delete a Unit
curl "/unit/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific unit.
HTTP Request
DELETE /unit/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the unit to delete |
Vat Rates
The Vat Rate object
The Vat Rate object
{
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
Attribute | Type | Description |
---|---|---|
id | integer | Unique identifier for the vat rate |
rate | number | The vat rate |
label | string | A label for the VAT rate |
legal_notice | string | A legal notice to appear on the PDFs |
use_default | boolean | If the VAT rate should be selected by default in the app |
status | object | The vat rate status |
status.active | boolean | If the vat rate is active |
status.name | string | The status label |
created_at | string | The creation datetime |
updated_at | string | The last update datetime |
Get All Vat Rates
curl "/vat_rate" \
-H ""
The above command returns JSON structured like this:
{
"datas": [
{
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
},
{...},
{...}
],
"links": {...},
"meta": {...}
}
This endpoint retrieves all vat rates.
HTTP Request
GET /vat_rate
Query Parameters
For more information, see Retrieving a list of elements
Parameter | Default | Description |
---|---|---|
sort | created_at:desc | Sort the data. Allowed values : label , created_at , updated_at |
search | Make a global search. Search in : label |
|
page | 1 | Page to show |
per_page | 50 | Number of elements par page |
edited_since | Returns items created or updated since the specified datetime | |
with_deleted | false | Include deleted elements in the results |
Create a Vat Rate
curl "/vat_rate" \
-X POST \
-H "" \
-d "rate=20"
The above command returns JSON structured like this:
{
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint create a vat rate.
HTTP Request
POST /vat_rate
Datas Parameters
Attribute | Type | Description | |
---|---|---|---|
rate | required | number | The vat rate |
label | string | A label for the VAT rate | |
legal_notice | string | A legal notice to appear on the PDFs | |
use_default | boolean | If the VAT rate should be selected by default in the app | |
status | boolean | If the vat rate is active |
Retrieve a Vat Rate
curl "/vat_rate/1" \
-H ""
The above command returns JSON structured like this:
{
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint retrieves a specific vat rate.
HTTP Request
GET /vat_rate/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the vat rate to retrieve |
Update a Vat Rate
curl "/vat_rate/1" \
-X PUT \
-H "" \
-d "label=À réception de facture&day_number=0"
The above command returns JSON structured like this:
{
"id": 1,
"rate": 20,
"label": null,
"legal_notice": null,
"use_default": true,
"status": {
"active": true,
"name": "Actif"
},
"created_at": "2022-05-18T00:43:50.000000Z",
"updated_at": "2022-05-18T00:43:50.000000Z"
}
This endpoint update a specific vat rate.
HTTP Request
PUT /vat_rate/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the vat rate to update |
Datas Parameters
Attribute | Type | Description |
---|---|---|
rate | number | The vat rate |
label | string | A label for the VAT rate |
legal_notice | string | A legal notice to appear on the PDFs |
use_default | boolean | If the VAT rate should be selected by default in the app |
status | boolean | If the vat rate is active |
Delete a Vat Rate
curl "/vat_rate/1" \
-X DELETE \
-H ""
The above command returns an empty response with the Http status 204
This endpoint delete a specific vat rate.
HTTP Request
DELETE /vat_rate/<ID>
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the vat rate to delete |