API Documentation
API Endpoint
https://api-fulll.fulll.houseThis API is is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. JSON is returned by all API responses, including errors, although our API libraries convert responses to appropriate language-specific objects.
HTTP API ¶
HTTP Methods
GET
GET requests are the most common and widely used methods in APIs and websites. Simply put, the GET method is used to retreive data from a server at the specified resource. You have 2 use :
POST
POST requests are used to send data to the API sever to create or udpate a resource. The data sent to the server is stored in the request body of the HTTP request.
PUT
Use PUT APIs primarily to update existing resource (if resource does not exist then API may decide to create a new resource or not)
PATCH
Similar than POST, but The difference with PATCH is that you only apply partial modifications to the resource.
DELETE
The DELETE method is exactly as it sounds: delete the resource at the specified URL. This method is one of the more common in RESTful APIs.
Status Codes and Errors
Introduction
HTTP defines forty standard status codes, they are divided into the five categories presented below, We use only 3 categories:
| Category | Name |
|---|---|
| 2xx: Sucesss | Indicates that the client’s request was accepted successfully. |
| 4xx: Client Error | This category of error status codes points the finger at clients. |
| 5xx: Server Error | The server takes responsibility for these error status codes. |
Common codes
These are the most commons code you will encounter:
| Code | Status | Description |
|---|---|---|
| 200 | OK | Request was successful. |
| 201 | Created | A resource has been created on the server. |
| 202 | Accepted | The request has been accepted for processing but has not yet completed. |
| 204 | No Content | The request was processed successfully, but no response body is needed. |
| 400 | Bad Request | One or more parameters are missing or maybe mispelled. |
| 401 | Unauthorized | Invalid or missing credentials. |
| 403 | Forbidden | Usually due to an invalid authentication. |
| 404 | Not Found | You requested an invalid method. |
| 405 | Method Not Allowed | The verb/method you used to fulfill the request is not supported for this resource. |
| 409 | Conflict | The request could not be completed due to a conflict with the current state of the target resource. |
| 501 | Not implemented | Requested HTTP operation not supported. |
| 502 | Bad Gateway | The remote server returned an error. Likely a timeout. The request should be retried with exponential backoff. |
| 503 | Service Unavailable | Indicates that the services is temporarily unavailable due to system overload or maintenance. |
| 504 | Gateway Timeout | A service required to fulfill the request was not available. |
Authentication ¶
Using OAuth 2.0
OAuth 2.0 is a protocol that lets your app request authorization to private details in a Fulll user’s account without getting their password.
You’ll need an unique Client ID and Client Secret which will be used in the OAuth flow.
The Client Secret should not be shared.
Obtaining access tokens with OAuth 2.0
Fulll uses OAuth 2.0’s authorization code grant flow to issue access tokens on behalf of users.
1. Sending users to authorize
Your web app should redirect users to the following URL:
GET https://auth-fulll.fulll.house/oauth2/authorize
The following values should be passed as GET parameters:
-
client_id- provided by Fulll (required) -
redirect_uri- you can choose one of the redirection urls set-up in your profile (optional)
2. Users are redirected to your server with a verification code
If the user authorizes your app, Fulll will redirect back to your specified redirect_uri or default with a temporary code in a code GET parameter and to finish the X-Company to be sent in every request Header.
3. Exchanging a verification code for an access token
Using token route, exchange the auth code for an access token.
POST https://api-fulll.fulll.house/cred/oauth2/token
The following values should be passed as POST data:
-
grant_type- should beauthorization_code(required) -
client_id- provided by Fulll (required) -
client_secret- provided by Fulll (required) -
code- a temporary authorization code (required)
You’ll receive a JSON response containing an access_token:
{
"access_token":"bearer_token",
"token_type": "bearer",
"expires_in": "token_expiration",
"refresh_token": "refresh_token"
}
Using access tokens
The token awarded can be used in request to our web APIs.
For using it to Authenticate request, presenting them in a request’s Authorization HTTP header
GET /api/....
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399
Note: The X-Company can be omit for standard publisher. Once the token has been created, the server should store the x-company and use it in subsequent requests.
Refreshing tokens
If a token has expired, it can be refreshed using the token route.
POST https://api-fulll.fulll.house/cred/oauth2/token
The following values should be passed as POST data:
-
grant_type- should berefresh_token(required) -
client_id- provided by Fulll (required) -
client_secret- provided by Fulll (required) -
refresh_token- a refresh token provided in step 3 or after a previous refresh. A new refresh token is generated each time. (required)
Like in step 3, you’ll receive a JSON response containing an access_token:
{
"access_token":"bearer_token",
"token_type": "bearer",
"expires_in": "token_expiration",
"refresh_token": "refresh_token"
}
Accounting ¶
Preferences ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"preferences": {
"decimals": 2,
"accountsize": 8,
"maxaccountsize": 15,
"providers": "401",
"customers": "411",
"piecenumbersize": 20,
"piecelabelsize": 50,
"labelsize": 50,
"country": "FR",
"currency": "EUR",
"accwait_class": "471",
"accwait_default": "47100000",
"analytic": "complete",
"analyticclasses": "67",
"accounttypes": {
"C": [
"411",
"0"
]
},
"validation_rules": [
{
"id": "account.general.number",
"pcre": "/^[0-9]{8}$/",
"message": "Account number must contain 8 numbers"
}
],
"options": {
"currencies": false,
"payment_types": false,
"next_account_number": false,
"quantities": true
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"preferences": {
"type": "object",
"properties": {
"decimals": {
"type": "number",
"description": "Decimals count of the amounts"
},
"accountsize": {
"type": "number",
"description": "Account size (usually fixed for general accounts)"
},
"maxaccountsize": {
"type": "number",
"description": "Maximum account size for accounts with variable lengths (usually providers, clients ...)"
},
"providers": {
"type": "string",
"description": "Providers accounts begins with xxx. This rule is useful regarding accounts creations."
},
"customers": {
"type": "string",
"description": "Providers accounts begins with xxx. This rule is useful regarding accounts creations."
},
"piecenumbersize": {
"type": "number",
"description": "Maximum size for a piece number"
},
"piecelabelsize": {
"type": "number",
"description": "Maximum size for a piece label"
},
"labelsize": {
"type": "number",
"description": "Maximum size for an account label"
},
"country": {
"type": "string",
"description": "ISO code of the country"
},
"currency": {
"type": "string",
"description": "ISO code of the currency"
},
"accwait_class": {
"type": "string",
"description": "Account class for \"waiting\" accounts"
},
"accwait_default": {
"type": "string",
"description": "\"Waiting\" account by default"
},
"analytic": {
"type": "string",
"description": "Type of analytic activated on the company (none, simple or complete)"
},
"analyticclasses": {
"type": "string",
"description": "If analytic is activated, account classes to use with analyc, \"67\" means accounts beginning by 6 and 7."
},
"accounttypes": {
"type": "object",
"properties": {
"C": {
"type": "array",
"description": "List of account types for a specific <type>, for example if <type> is `C`, the list will contain all possible values a client account can begin with"
}
}
},
"validation_rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Id of the validation rules, indicates the kind of informations to validate"
},
"pcre": {
"type": "string",
"description": "Regex to validation the value"
},
"message": {
"type": "string",
"description": "Message to display if the validation fails"
}
},
"required": [
"id",
"pcre",
"message"
]
}
},
"options": {
"type": "object",
"properties": {
"currencies": {
"type": "boolean",
"description": "Indicates if multiple currencies are available"
},
"payment_types": {
"type": "boolean",
"description": "Indicates if payment types are available"
},
"next_account_number": {
"type": "boolean",
"description": "Indicates if next provider, customer and employee account are provided for creations"
},
"quantities": {
"type": "boolean",
"description": "Indicates if quantities are available"
}
}
}
},
"required": [
"decimals",
"accountsize",
"maxaccountsize",
"providers",
"customers",
"piecenumbersize",
"piecelabelsize",
"labelsize",
"country",
"currency",
"accwait_class",
"accwait_default",
"analytic",
"analyticclasses",
"accounttypes",
"validation_rules",
"options"
],
"additionalProperties": false
}
}
}Headers
Content-Type: text/plainBody
The requested company does not exist in the context.List company's preferencesGET/accounting/v1/preferences
List the accounting preferences of the company. Here you can find all informations about how accounts, labels, etc. are handled for this specific company.
Analytic
There’s two possible modes for analytic
-
simple- with a simple analytic mode, you will always 100% on a single center and a single axis. Usually only on Profit & Loss accounts. -
complete- complete mode allows splitting of amounts over multiple centers and multiple axes. Usally on all account types.
Account types
The preferences will list some account types. They’re accounts or class of accounts (accounts beginning with xxx) that are categorized. That way you can know how to list or create some specific sub account types. Each type can be empty, or have multiple entries.
Possible account types
| type | description |
|---|---|
| C | Customers |
| F | Providers |
| S | Employees |
| R | Remuneration |
| CS | Social payments |
| ET | State tax |
| AT | Other transactions in case of direct payment |
| B | Bank related accounts |
| VI | Internal cash transfer |
| VATB | VAT accounts in case of buying something |
| VATS | VAT accounts in case of selling something |
| VAT | All VAT accounts |
| SHIPS | Shipping in case of selling something |
| SHIPB | Shipping in case of buying something |
| DISCS | Discount in case of selling something |
| DISCB | Discount in case of buying something |
| BANK | Strict bank accounts |
| LOSS | Loss acounts |
| PROFIT | Profit accounts |
| CASH | Cash operations related accounts |
Validation rules
The preferences will also list some validation rules. They’re provided in addition to basic informations like the maximum length of an account to validate more precisely if informations are accepted by the accounting software. Each validation rule will have a string id, a regular expression and a message to display in case of validation fail.
Possible validation rules
| id | description |
|---|---|
| account.general.number | general account number |
| account.customer.number | customer account number |
| account.provider.number | provider account number |
| account.general.label | general account label |
| account.customer.label | customer account label |
| account.provider.label | provider account label |
| piece.number | piece number |
| piece.label | piece label |
Fiscal years ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"exercices": [
{
"code": "2018",
"datestart": "01/01/2018",
"dateend": "31/12/2018",
"closed": false
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"exercices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Fiscal year code"
},
"datestart": {
"type": "string",
"description": "Start date, \"d/M/Y\" format"
},
"dateend": {
"type": "string",
"description": "End date, \"d/M/Y\" format"
},
"closed": {
"type": "boolean",
"description": "Fiscal year is closed (true) or not (false)"
}
},
"required": [
"code",
"datestart",
"dateend",
"closed"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company does not exist in the context.List fiscal yearsGET/accounting/v1/fiscal_years{?last}
List the available fiscal years.
All existing fiscal years are listed, but closed ones are unavailable for writing.
- last
boolean(optional) Default: falseReduce to the last fiscal year
Books ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"books": [
{
"id": 17,
"label": "BANQUE",
"client_label": "MA BANQUE",
"code": "BQ",
"type": "B",
"rib": "12345 12345 12345678901 12",
"account_id": 84,
"account_number": "51200000"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"books": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Book ID"
},
"label": {
"type": "string",
"description": "Book label"
},
"client_label": {
"type": "string",
"description": "Custom label for clients"
},
"code": {
"type": "string",
"description": "Book code"
},
"type": {
"type": "string",
"description": "Book type (`A` - Purchase /`V` - Sales /`B` - Bank /`O` - Miscellaneous)"
},
"rib": {
"type": "string",
"description": "Bank Account RIB linked to the book"
},
"account_id": {
"type": [
"number",
"null"
],
"description": "Linked account ID"
},
"account_number": {
"type": [
"string",
"null"
],
"description": "Linked account number"
}
},
"required": [
"id",
"label",
"code",
"type"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
Company cannot be found in the context.List booksGET/accounting/v1/books
List books.
Accounts ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"accounts": [
{
"id": 123,
"number": "60100000",
"label": "ACHATS",
"type": "G",
"vat_id": 128,
"vat_number": "44566000",
"vat_rate": 0.2,
"vat_code": "20",
"vat_method": "E",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open",
"collective_number": "1234",
"collective_label": "label co"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"vat_id": {
"type": "number",
"description": "Acount ID of the linked vat account"
},
"vat_number": {
"type": "string",
"description": "Account number of the linked vat account"
},
"vat_rate": {
"type": "number",
"description": "VAT rate"
},
"vat_code": {
"type": "string",
"description": "VAT code"
},
"vat_method": {
"type": "string",
"description": "VAT calculation method (`E` - Excluded /`I` - Included /`R` - Reversed)"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the account"
},
"collective_number": {
"type": [
"string",
"null"
],
"description": "Collective number"
},
"collective_label": {
"type": [
"string",
"null"
],
"description": "Collective label"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
Company cannot be found in the context.Headers
Content-Type: text/plainBody
Accounts update process has encountered an error.Headers
Content-Type: application/jsonBody
`statuses` is not a valid Account status.List accountsGET/accounting/v1/accounts{?account_class,complete_mode,page,limit}
List accounts.
- account_class
string(optional) Example: GAccount type, not class
Choices:
GCFE- complete_mode
string(optional) Example: 1If 1, returns accounts with debit, credit and balance
Choices:
10- expand
string(optional) Example: statusReturn the requested property in response
- statuses
string(optional) Example: openBy default, it returns all accounts, regardless of their status.
Choices:
opencloseddeleted- page
number(optional) Default: 1Page number
- limit
number(optional)Maximum number of accounts per page
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"counterparts": [
{
"id": 123,
"number": "60100000",
"label": "ACHATS",
"type": "G",
"vat_id": 128,
"vat_number": "44566000",
"vat_rate": 0.2,
"vat_code": "20",
"vat_method": "E",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"counterparts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"vat_id": {
"type": "number",
"description": "Acount ID of the linked vat account"
},
"vat_number": {
"type": "string",
"description": "Account number of the linked vat account"
},
"vat_rate": {
"type": "number",
"description": "VAT rate"
},
"vat_code": {
"type": "string",
"description": "VAT code"
},
"vat_method": {
"type": "string",
"description": "VAT calculation method (`E` - Excluded /`I` - Included /`R` - Reversed)"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the account"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company, account number or book does not exist in the context.List counterparts of an accountGET/accounting/v1/accounts/{account_number}/counterparts/{book_code}{?third_label}
List the counterparts (linked accounts) for a given account in a given book. The account number can be of any type.
- account_number
string(required) Example: 9PROVIDERAccount number
- book_code
string(required) Example: ACBook code
- third_label
string(optional) Example: PARISFilter results with a label that contains the required string
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"infos": {
"number": "60102000",
"title": "NEW ACCOUNT",
"type": "G"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"infos": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "Account number to create"
},
"title": {
"type": "string",
"description": "Account title"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
}
},
"required": [
"number",
"title",
"type"
]
}
},
"required": [
"infos"
]
}Headers
Content-Type: application/jsonBody
{
"id": 12345
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "ID of the newly created account"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Account creationPOST/accounting/v1/accounts
Create a new account for the given type.
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"sums": [
{
"account": "60100000",
"label": "ACHATS",
"debit": 500,
"credit": 0,
"period": "11/2022",
"date": "01/11/2022",
"type": "G"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"sums": {
"type": "array",
"items": {
"type": "object",
"properties": {
"account": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"debit": {
"type": "number",
"description": "Total debit of the period"
},
"credit": {
"type": "number",
"description": "Total credit of the period"
},
"period": {
"type": "string",
"description": "Month and Year of the balance, it returns when the \"period\" parameter is set"
},
"date": {
"type": "string",
"description": "Day, Month and Year of the balance, it returns when the \"date\" parameter is set"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
}
},
"required": [
"account",
"label",
"debit",
"credit",
"type"
]
}
}
},
"required": [
"sums"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Account's balancesGET/accounting/v1/balances
Get the balance of accounts
Warning ⚠️
In the response, there is either the period or date property.
If the mode parameter is set to period, then the period property will be returned.
If the mode parameter is set to date, then the date property will be returned.
- mode
string(required) Example: periodperiod/date
Choices:
perioddate- class
string(required) Example: 6Account type (C/F) otherwise start number (706, 4456…)
- periodstart
string(optional) Example: 10/2021filter on period mm/yyyy of the exercice
- periodend
string(optional) Example: 09/2022filter on period mm/yyyy of the exercice
- exercice
string(optional) Example: 2022filter to the given code exercice, otherwise use the current (last) exercice
Providers ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"accounts": [
{
"id": 128,
"number": "9PROVIDER",
"label": "MY PROVIDER",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open",
"collective_number": "1234",
"collective_label": "label co"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Provider's number"
},
"label": {
"type": "string",
"description": "Provider's name"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the provider account"
},
"collective_number": {
"type": [
"string",
"null"
],
"description": "Collective number"
},
"collective_label": {
"type": [
"string",
"null"
],
"description": "Collective label"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
Company cannot be found in the context.Headers
Content-Type: text/plainBody
Accounts update process has encountered an error.List providersGET/accounting/v1/providers{?complete_mode,page,limit}
List of providers, which are a specific account type.
- complete_mode
string(optional) Example: 1If 1, returns accounts with debit, credit and balance
Choices:
10- page
number(optional) Default: 1Page number
- limit
number(optional)Maximum number of accounts per page
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"counterparts": [
{
"id": 123,
"number": "60100000",
"label": "ACHATS",
"type": "G",
"vat_id": 128,
"vat_number": "44566000",
"vat_rate": 0.2,
"vat_code": "20",
"vat_method": "E",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"counterparts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"vat_id": {
"type": "number",
"description": "Acount ID of the linked vat account"
},
"vat_number": {
"type": "string",
"description": "Account number of the linked vat account"
},
"vat_rate": {
"type": "number",
"description": "VAT rate"
},
"vat_code": {
"type": "string",
"description": "VAT code"
},
"vat_method": {
"type": "string",
"description": "VAT calculation method (`E` - Excluded /`I` - Included /`R` - Reversed)"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the account"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company, account number or book does not exist in the context.List counterparts of a providerGET/accounting/v1/providers/{provider_number}/counterparts/{book_code}{?third_label}
List the counterparts (linked accounts) for a given provider in a given book.
- provider_number
string(required) Example: 9PROVIDERAccount number of the provider
- book_code
string(required) Example: ACBook code
- third_label
string(optional) Example: PARISFilter results with a label that contains the required string
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"infos": {
"number": "9NEWPROV",
"title": "NEW PROVIDER"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"infos": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "Provider's number to create"
},
"title": {
"type": "string",
"description": "Provider's name"
}
},
"required": [
"number",
"title"
]
}
},
"required": [
"infos"
]
}Headers
Content-Type: application/jsonBody
{
"id": 15432
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "ID of the newly created provider"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Provider creationPOST/accounting/v1/providers
Create a new provider.
Customers ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"accounts": [
{
"id": 136,
"number": "0CUSTOMER",
"label": "MY CUSTOMER",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open",
"collective_number": "1234",
"collective_label": "label co"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Customer's number"
},
"label": {
"type": "string",
"description": "Customer's name"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the customer account"
},
"collective_number": {
"type": [
"string",
"null"
],
"description": "Collective number"
},
"collective_label": {
"type": [
"string",
"null"
],
"description": "Collective label"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
Company cannot be found in the context.Headers
Content-Type: text/plainBody
Accounts update process has encountered an error.List customersGET/accounting/v1/customers{?complete_mode,page,limit}
List of customers, which are a specific account type.
- complete_mode
string(optional) Example: 1If 1, returns accounts with debit, credit and balance
Choices:
10- page
number(optional) Default: 1Page number
- limit
number(optional)Maximum number of accounts per page
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"counterparts": [
{
"id": 123,
"number": "60100000",
"label": "ACHATS",
"type": "G",
"vat_id": 128,
"vat_number": "44566000",
"vat_rate": 0.2,
"vat_code": "20",
"vat_method": "E",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"counterparts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"vat_id": {
"type": "number",
"description": "Acount ID of the linked vat account"
},
"vat_number": {
"type": "string",
"description": "Account number of the linked vat account"
},
"vat_rate": {
"type": "number",
"description": "VAT rate"
},
"vat_code": {
"type": "string",
"description": "VAT code"
},
"vat_method": {
"type": "string",
"description": "VAT calculation method (`E` - Excluded /`I` - Included /`R` - Reversed)"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the account"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company, account number or book does not exist in the context.List counterparts of a customerGET/accounting/v1/customers/{customer_number}/counterparts/{book_code}{?third_label}
List the counterparts (linked accounts) for a given customer in a given book.
- customer_number
string(required) Example: 0CUSTOMERAccount number of the customer
- book_code
string(required) Example: VEBook code
- third_label
string(optional) Example: PARISFilter results with a label that contains the required string
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"infos": {
"number": "0NEWCUST",
"title": "NEW CUSTOMER"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"infos": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "Customer's number to create"
},
"title": {
"type": "string",
"description": "Customer's name"
}
},
"required": [
"number",
"title"
]
}
},
"required": [
"infos"
]
}Headers
Content-Type: application/jsonBody
{
"id": 14730
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "ID of the newly created customer"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Customer creationPOST/accounting/v1/customers
Create a new customer.
Employees ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"accounts": [
{
"id": 142,
"number": "421DUPUIS",
"label": "MICHEL DUPUIS",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open",
"collective_number": "1234",
"collective_label": "label co"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"accounts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Employee's number"
},
"label": {
"type": "string",
"description": "Employee's name"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the employee account"
},
"collective_number": {
"type": [
"string",
"null"
],
"description": "Collective number"
},
"collective_label": {
"type": [
"string",
"null"
],
"description": "Collective label"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
Company cannot be found in the context.Headers
Content-Type: text/plainBody
Accounts update process has encountered an error.List employeesGET/accounting/v1/employees{?complete_mode,page,limit}
List of employees, which are a specific account type.
- complete_mode
string(optional) Example: 1If 1, returns accounts with debit, credit and balance
Choices:
10- page
number(optional) Default: 1Page number
- limit
number(optional)Maximum number of accounts per page
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"counterparts": [
{
"id": 123,
"number": "60100000",
"label": "ACHATS",
"type": "G",
"vat_id": 128,
"vat_number": "44566000",
"vat_rate": 0.2,
"vat_code": "20",
"vat_method": "E",
"debit": 500,
"credit": 0,
"balance": 500,
"status": "open"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"counterparts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Account ID"
},
"number": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Account name"
},
"type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"vat_id": {
"type": "number",
"description": "Acount ID of the linked vat account"
},
"vat_number": {
"type": "string",
"description": "Account number of the linked vat account"
},
"vat_rate": {
"type": "number",
"description": "VAT rate"
},
"vat_code": {
"type": "string",
"description": "VAT code"
},
"vat_method": {
"type": "string",
"description": "VAT calculation method (`E` - Excluded /`I` - Included /`R` - Reversed)"
},
"debit": {
"type": "number",
"description": "Total debit on the current fiscal year"
},
"credit": {
"type": "number",
"description": "Total credit on the current fiscal year"
},
"balance": {
"type": "number",
"description": "Balance on the current fiscal year"
},
"status": {
"type": "string",
"description": "Status of the account"
}
},
"required": [
"id",
"number",
"label"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company, account number or book does not exist in the context.List counterparts of an employeeGET/accounting/v1/employees/{employee_number}/counterparts/{book_code}{?third_label}
List the counterparts (linked accounts) for a given employee in a given book.
- employee_number
string(required) Example: 421DUPUISAccount number of the employee
- book_code
string(required) Example: NDFBook code
- third_label
string(optional) Example: PARISFilter results with a label that contains the required string
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"infos": {
"number": "421SMITH",
"title": "JOHN SMITH"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"infos": {
"type": "object",
"properties": {
"number": {
"type": "string",
"description": "Employee's number to create"
},
"title": {
"type": "string",
"description": "Employee's name"
}
},
"required": [
"number",
"title"
]
}
},
"required": [
"infos"
]
}Headers
Content-Type: application/jsonBody
{
"id": 13547
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "ID of the newly created employee"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Employee creationPOST/accounting/v1/employees
Create a new employee.
Analytics ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"analyzes": [
{
"code": "DEP",
"name": "Departement",
"closed": false,
"axes": [
{
"code": "axis1",
"name": "Department",
"activated": true,
"sections": [
{
"code": "1",
"name": "Development",
"closed": false
}
]
}
]
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"analyzes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the analysis"
},
"name": {
"type": "string",
"description": "Name of the analysis"
},
"closed": {
"type": "boolean",
"description": "Analysis is closed (true) or not (false)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis"
},
"name": {
"type": "string",
"description": "Name of the axis"
},
"activated": {
"type": "boolean",
"description": "Axis is open to posting (true) or not (false)"
},
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the section"
},
"name": {
"type": "string",
"description": "Name of the section"
},
"closed": {
"type": "boolean",
"description": "The section is closed (true) or not (false)"
}
},
"required": [
"code",
"name",
"closed"
]
}
}
},
"required": [
"code",
"name",
"activated"
]
}
}
},
"required": [
"code",
"name",
"closed"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company does not exist in the context.List analytic settingsGET/accounting/v1/analytics
List the analytic settings.
A company can have multiple independant analyzes.
Each analysis can have up to 3 axes.
Each axis will have its own sections.
Currencies ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"currencies": [
{
"code": "EUR",
"exponent": 2
},
{
"code": "USD",
"exponent": 2
},
{
"code": "GBP",
"exponent": 2
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"currencies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "ISO code of the currency"
},
"exponent": {
"type": "number",
"description": "Number of decimals needing for the currency"
}
},
"required": [
"code"
]
}
}
}
}Headers
Content-Type: text/plainBody
The requested company does not exist in the context.List currenciesGET/accounting/v1/currencies
List the available currencies.
All listed currencies can be used while creating entries.
Payment types ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"paymentTypes": [
{
"name": "+04",
"number": "5",
"fields": [
{
"name": "Message",
"rules": "/^.{5,100}$/",
"label": "Message"
}
]
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"paymentTypes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"number": {
"type": "string",
"description": "ID of the payment type in the remote accounting system"
},
"fields": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rules": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"name",
"rules"
]
}
}
},
"required": [
"name",
"number",
"fields"
]
}
}
}
}Headers
Content-Type: application/jsonBody
The requested company does not exist in the context.Headers
Content-Type: application/jsonBody
Payment types are not available for company.List payment typesGET/accounting/v1/payment_types
List the available payment types of the company.
Documents ¶
Headers
Content-Type: multipart/form-data; boundary=--{boundary value}
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
--{boundary value}
Content-Disposition: form-data; name='document[company]';
295399
--{boundary value}
Content-Disposition: form-data; name="document[book]"
1234
--{boundary value}
Content-Disposition: form-data; name="document[bookCode]"
AC
--{boundary value}
Content-Disposition: form-data; name="document[file]"
Content-Type: application/pdf
{file content}
--{boundary value}--Headers
Content-Type: application/jsonHeaders
Content-Type: text/plainBody
Validation FailedHeaders
Content-Type: text/plainBody
The requested company does not exist in the context.Send a document to Image PostingPOST/accounting/v1/documents
Send document to Image Posting If the company has configured the Purchase module and the document is sent to a purchase book, the document will initially be available in the Purchase application.
Parameters
| Name | Example | Description |
|---|---|---|
company (string, required) |
295399 |
ID of the company |
book (number, optional) |
1234 |
Book ID, the ID must be known to the company |
bookCode (string, optional) |
AC |
Book code - the code must be known to the company |
file (object, required) |
myfile.pdf |
File to upload - only pdf format accepted |
Warning ⚠️
The user can set a book identifier in the book property or a book code in the bookCode property.
At least one of them must be defined.
Entries ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"entries": [
{
"header": "{1964B60E-95CC-458D-B69D-E469610636A4}",
"number": "4019",
"book": "VE",
"period": "04/2018",
"day": 16,
"account": "01000123",
"label": "EASYREM",
"debit": 776.76,
"credit": 0,
"letter": "B",
"link": "https://url.to.document/links/abcd12345ff",
"analytics": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 776.76,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"due_date": "2021-03-02",
"account_type": "C"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"header": {
"type": "string",
"description": "Unique id of the piece, all entries of the same piece have the same header"
},
"number": {
"type": "string",
"description": "Piece number"
},
"book": {
"type": "string",
"description": "Book code"
},
"period": {
"type": "string",
"description": "Month"
},
"day": {
"type": "number",
"description": "Day of the month"
},
"account": {
"type": "string",
"description": "Account number"
},
"label": {
"type": "string",
"description": "Entry label"
},
"debit": {
"type": "number",
"description": "Debit amount"
},
"credit": {
"type": "number",
"description": "Credit amount"
},
"letter": {
"type": "string",
"description": "Letter (link to balanced entries for the same account)"
},
"link": {
"type": "string",
"description": "Url to the attached document if it exists"
},
"analytics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "Analytics details of the line"
},
"due_date": {
"type": "string",
"description": "Due date of the entry"
},
"account_type": {
"type": [
"string",
"null"
],
"description": "type of property account"
}
},
"required": [
"header",
"number",
"book",
"period",
"day",
"account",
"label",
"debit",
"credit"
]
}
}
},
"required": [
"entries"
]
}Headers
Content-Type: text/plainBody
The requested company does not exist in the context.List EntriesGET/accounting/v1/entries{?expand[],period_start,period_end,date_start,date_end,number_start,number_end,lettered,account_type,prefix,book_start,book_end,account}
List entries.
By default entries are retrieved on current fiscal year (last) only.
To retrieve previous fiscal years entries, date or period filters have to be set, and then other filters are eventually applied.
- account_type
string(optional)Choices:
CFE- prefix
string(optional)filter to the given number prefix, override account_type if given
- period_start
string(optional)mm/yyyy- period_end
string(optional)mm/yyyy- date_start
string(optional)dd/mm/yyyy- date_end
string(optional)dd/mm/yyyy- number_start
number(optional)min number
- number_end
number(optional)max number
- book_start
string(optional)from book code
- book_end
string(optional)to book code
- account
string(optional)filter to the given account number
- lettered
boolean(optional)true- lettered entries only /false- non-lettered only / empty - both- expand[]
string(optional)Choices:
document_urlanalytics
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"infos": {
"activeDate": "01/06/2018",
"date": "01/04/2018",
"period_start": "01/01/2018",
"period_end": "31/01/2018",
"due_date": "31/03/2018",
"label": "EASYREM",
"journal_id": 76,
"book_code": "AC",
"item_id": "4020",
"piece": "Hello, world!",
"currency": "EUR",
"attachment": "JVBERi0xL...",
"comment": "complement info",
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": "Hello, world!",
"payment_status": "3",
"lines": [
{
"day": 16,
"quantity": 1.99,
"account": "01000123",
"account_type": "C",
"label": "EASYREM DETAIL",
"debit": 776.76,
"credit": 0,
"comment": "complement info",
"analytics": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 776.76,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
]
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"infos": {
"type": "object",
"properties": {
"activeDate": {
"type": "string",
"description": "Destination date (if Original is not available), \"d/m/Y\" format"
},
"date": {
"type": "string",
"description": "Original date, \"d/m/Y\" format"
},
"period_start": {
"type": "string",
"description": "If the piece applies to a period, from d/m/Y"
},
"period_end": {
"type": "string",
"description": "If the piece applies to a period, to d/m/Y"
},
"due_date": {
"type": "string",
"description": "Due date of the piece"
},
"label": {
"type": "string",
"description": "Global label of the piece"
},
"journal_id": {
"type": "number",
"description": "Book ID"
},
"book_code": {
"type": "string",
"description": "Book CODE"
},
"item_id": {
"type": "string",
"description": "Piece number"
},
"piece": {
"type": "string",
"description": "Internal reference number of the invoice"
},
"currency": {
"type": "string",
"description": "Code ISO of the original currency of the piece"
},
"attachment": {
"type": [
"string",
"null"
],
"description": "Attached PDF file in base64 format"
},
"comment": {
"type": "string",
"description": "Additional information related to the piece. It will be sent to accounting if supported"
},
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": {
"type": "string"
},
"payment_status": {
"type": "string",
"description": "An enum considered as a string. Possible values : 0 = \"none\", 1 = \"authorized\", 2 = \"blocked\", 3 = \"paid\", 4 = \"canceled\"; Supported by Production Compta accounting software only"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"day": {
"type": "number",
"description": "Specific day for the line (if different than global)"
},
"quantity": {
"type": "number",
"description": "Quantity of items"
},
"account": {
"type": "string",
"description": "Account number"
},
"account_type": {
"type": "string",
"description": "Account type (`C` - Client /`F` - Provider/`G` - General/`E` - Employee)"
},
"label": {
"type": "string",
"description": "Specific label for the line (if different than global)"
},
"debit": {
"type": "number",
"description": "Debit amount"
},
"credit": {
"type": "number",
"description": "Credit amount"
},
"comment": {
"type": "string",
"description": "Additional information related to the line. It will be sent to accounting if supported"
},
"analytics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the line"
}
},
"required": [
"account",
"debit",
"credit"
]
},
"description": "Lines details"
}
},
"required": [
"date",
"label",
"item_id",
"lines"
],
"description": "Content of the piece to add"
}
},
"required": [
"infos"
]
}Headers
Content-Type: application/jsonBody
{
"id": "0c433aa7-30ac-4085-a42b-42f9d6a2fd56"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the generated command (transaction)"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Headers
Content-Type: text/plainBody
The requested company does not exist in the context.Add entriesPOST/accounting/v1/entries
Add entries.
Adding entries is divided in two parts : first the global infos, then the lines.
Multiple entries sent at once are called a piece.
Entries are handled in asynchronous transactions, the ID of the command is returned by the POST.
Warning ⚠️
The user can set a book identifier in the journal_id parameter or a book code in the book_code parameter.
At least one of them must be defined. If both are defined, the value of journal_id will be used.
The user can set a piece value in the piece parameter.
It could be possible to set the value * and the final value will be auto-complete by the accounting software.
This field is only supported by Production FULLL accounting software.
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"date": "01/04/2018",
"label": "EXPENSE APRIL 2018",
"employee": "421DUPUIS",
"journal_id": 92,
"book_code": "EX",
"item_id": "4020",
"piece": "Hello, world!",
"currency": "EUR",
"total_inc": 776.76,
"analytics_inc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 776.76,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"total_exc": 647.3,
"total_vat": 129.46,
"attachment": "JVBERi0xL...",
"comment": "complement info",
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": "Hello, world!",
"payment_status": "3",
"lines": [
{
"label": "EXPENSE DETAIL",
"quantity": 1.99,
"account_exc": "62500000",
"amount_exc": 647.3,
"analytics_exc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 647.3,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"account_vat": "44566000",
"amount_vat": 129.46,
"comment": "complement info",
"analytics_vat": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 129.46,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
]
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Original date, \"d/m/Y\" format"
},
"label": {
"type": "string",
"description": "Global label of the expense report"
},
"employee": {
"type": "string",
"description": "Source account (employee account)"
},
"journal_id": {
"type": "number",
"description": "ID of expense report book (if null, default various operations book is used)"
},
"book_code": {
"type": "string",
"description": "Book CODE (if the code does not exist for the company, default various operations book is used)"
},
"item_id": {
"type": "string",
"description": "Number of the expense report"
},
"piece": {
"type": "string",
"description": "Internal reference number of the invoice"
},
"currency": {
"type": "string",
"description": "Code ISO of the original currency of the piece"
},
"total_inc": {
"type": "number",
"description": "Total including taxes"
},
"analytics_inc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details for amount including taxes"
},
"total_exc": {
"type": "number",
"description": "Total excluding taxes"
},
"total_vat": {
"type": "number",
"description": "Total of taxes (can be 0)"
},
"attachment": {
"type": [
"string",
"null"
],
"description": "Attached PDF file in base64 format"
},
"comment": {
"type": "string",
"description": "Additional information related to the piece. It will be sent to accounting if supported"
},
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": {
"type": "string"
},
"payment_status": {
"type": "string",
"description": "An enum considered as a string. Possible values : 0 = \"none\", 1 = \"authorized\", 2 = \"blocked\", 3 = \"paid\", 4 = \"canceled\"; Supported by Production Compta accounting software only"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Specific label for the line (if different than global)"
},
"quantity": {
"type": "number",
"description": "Quantity of items"
},
"account_exc": {
"type": "string",
"description": "Account number for excluding tax part"
},
"amount_exc": {
"type": "number",
"description": "Line amount excluding taxes"
},
"analytics_exc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount excluding taxes for this line"
},
"account_vat": {
"type": [
"string",
"null"
],
"description": "Account number for taxes part"
},
"amount_vat": {
"type": [
"number",
"null"
],
"description": "Line amount of taxes (VAT)"
},
"comment": {
"type": "string",
"description": "Additional information related to the line. It will be sent to accounting if supported"
},
"analytics_vat": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount of vat for this line"
}
},
"required": [
"account_exc",
"amount_exc"
]
},
"description": "Lines details"
}
},
"required": [
"date",
"label",
"employee",
"item_id",
"total_inc",
"total_exc",
"total_vat"
]
}Headers
Content-Type: application/jsonBody
{
"id": "7fdd6141-3a3d-45f5-bf09-f05eb9b16b24"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the generated command (transaction)"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Headers
Content-Type: text/plainBody
The requested company does not exist in the context.Add expense reportPOST/accounting/v1/expense_report
Add entries specifically for an expense report piece.
Entries are handled in asynchronous transactions, the ID of the command is returned by the POST.
Warning ⚠️
The user can set a book identifier in the journal_id parameter or a book code in the book_code parameter.
If the journal_id parameter is set, then it will be used instead of the book_code.
If the journal_id parameter is set, a restriction is applied if the identifier is unknown to the company.
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"date": "01/04/2018",
"period_start": "01/01/2018",
"period_end": "31/03/2018",
"due_date": "15/06/2018",
"label": "PURCHASE INVOICE APRIL 2018",
"provider": "9DIRECT",
"journal_id": 17,
"book_code": "AC",
"item_id": "1804-00020",
"piece": "Hello, world!",
"currency": "EUR",
"total_inc": 776.76,
"analytics_inc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 776.76,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"total_exc": 647.3,
"total_vat": 129.46,
"attachment": "JVBERi0xL...",
"comment": "complement info",
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": "Hello, world!",
"payment_status": "3",
"lines": [
{
"label": "PURCHASE DETAIL",
"quantity": 1.99,
"account_exc": "60700000",
"amount_exc": 647.3,
"analytics_exc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 647.3,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"account_vat": "44566000",
"amount_vat": 129.46,
"comment": "complement info",
"analytics_vat": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 129.46,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
]
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Original date, \"d/m/Y\" format"
},
"period_start": {
"type": "string",
"description": "If the piece applies to a period, from d/m/Y"
},
"period_end": {
"type": "string",
"description": "If the piece applies to a period, to d/m/Y"
},
"due_date": {
"type": "string",
"description": "Due date of the piece"
},
"label": {
"type": "string",
"description": "Global label of the expense report"
},
"provider": {
"type": "string",
"description": "Source account (provider account)"
},
"journal_id": {
"type": [
"number",
"null"
],
"description": "ID of purchase book (if null, default purchase book is used)"
},
"book_code": {
"type": "string",
"description": "Book CODE (if the code does not exist for the company, default purchase book is used)"
},
"item_id": {
"type": "string",
"description": "Number of the expense report"
},
"piece": {
"type": "string",
"description": "Internal reference number of the invoice"
},
"currency": {
"type": "string",
"description": "Code ISO of the original currency of the piece"
},
"total_inc": {
"type": "number",
"description": "Total including taxes"
},
"analytics_inc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details for amount including taxes"
},
"total_exc": {
"type": "number",
"description": "Total excluding taxes"
},
"total_vat": {
"type": "number",
"description": "Total of taxes (can be 0)"
},
"attachment": {
"type": [
"string",
"null"
],
"description": "Attached PDF file in base64 format"
},
"comment": {
"type": "string",
"description": "Additional information related to the piece. It will be sent to accounting if supported"
},
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": {
"type": "string"
},
"payment_status": {
"type": "string",
"description": "An enum considered as a string. Possible values : 0 = \"none\", 1 = \"authorized\", 2 = \"blocked\", 3 = \"paid\", 4 = \"canceled\"; Supported by Production Compta accounting software only"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Specific label for the line (if different than global)"
},
"quantity": {
"type": "number",
"description": "Quantity of items"
},
"account_exc": {
"type": "string",
"description": "Account number for excluding tax part"
},
"amount_exc": {
"type": "number",
"description": "Line amount excluding taxes"
},
"analytics_exc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount excluding taxes for this line"
},
"account_vat": {
"type": [
"string",
"null"
],
"description": "Account number for taxes part"
},
"amount_vat": {
"type": [
"number",
"null"
],
"description": "Line amount of taxes (VAT)"
},
"comment": {
"type": "string",
"description": "Additional information related to the line. It will be sent to accounting if supported"
},
"analytics_vat": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount of vat for this line"
}
},
"required": [
"account_exc",
"amount_exc"
]
},
"description": "Lines details"
}
},
"required": [
"date",
"label",
"provider",
"item_id",
"total_inc",
"total_exc",
"total_vat"
]
}Headers
Content-Type: application/jsonBody
{
"id": "684d6141-3a3d-45f5-bf09-f05eb9b16b24"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the generated command (transaction)"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Headers
Content-Type: text/plainBody
The requested company does not exist in the context.Add purchase invoicePOST/accounting/v1/purchase
Add entries specifically for purchase invoice piece.
Entries are handled in asynchronous transactions, the ID of the command is returned by the POST.
Warning ⚠️
The user can set a book identifier in the journal_id parameter or a book code in the book_code parameter.
If the journal_id parameter is set, then it will be used instead of the book_code.
If the journal_id parameter is set, a restriction is applied if the identifier is unknown to the company.
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"date": "01/04/2018",
"period_start": "01/01/2018",
"period_end": "31/03/2018",
"due_date": "15/06/2018",
"label": "SALES INVOICE APRIL 2018",
"customer": "0CLIENT",
"journal_id": 19,
"book_code": "VE",
"item_id": "F1804-00184",
"piece": "Hello, world!",
"currency": "EUR",
"total_inc": 776.76,
"analytics_inc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 776.76,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"total_exc": 647.3,
"total_vat": 129.46,
"attachment": "JVBERi0xL...",
"comment": "complement info",
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": "Hello, world!",
"payment_status": "3",
"lines": [
{
"label": "SALES DETAIL",
"quantity": 1.99,
"account_exc": "70700000",
"amount_exc": 647.3,
"analytics_exc": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 647.3,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
],
"account_vat": "44570000",
"amount_vat": 129.46,
"comment": "complement info",
"analytics_vat": [
{
"analysis": "DEP",
"distribution": [
{
"amount": 129.46,
"axes": [
{
"code": "axis1",
"section": "1"
}
]
}
]
}
]
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Original date, \"d/m/Y\" format"
},
"period_start": {
"type": "string",
"description": "If the piece applies to a period, from d/m/Y"
},
"period_end": {
"type": "string",
"description": "If the piece applies to a period, to d/m/Y"
},
"due_date": {
"type": "string",
"description": "Due date of the piece"
},
"label": {
"type": "string",
"description": "Global label of the expense report"
},
"customer": {
"type": "string",
"description": "Source account (customer account)"
},
"journal_id": {
"type": [
"number",
"null"
],
"description": "ID of sales book (if null, default sales book is used)"
},
"book_code": {
"type": "string",
"description": "Book CODE (if the code does not exist for the company, default sales book is used)"
},
"item_id": {
"type": "string",
"description": "Number of the expense report"
},
"piece": {
"type": "string",
"description": "Internal reference number of the invoice"
},
"currency": {
"type": "string",
"description": "Code ISO of the original currency of the piece"
},
"total_inc": {
"type": "number",
"description": "Total including taxes"
},
"analytics_inc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details for amount including taxes"
},
"total_exc": {
"type": "number",
"description": "Total excluding taxes"
},
"total_vat": {
"type": "number",
"description": "Total of taxes (can be 0)"
},
"attachment": {
"type": [
"string",
"null"
],
"description": "Attached PDF file in base64 format"
},
"comment": {
"type": "string",
"description": "Additional information related to the piece. It will be sent to accounting if supported"
},
"payment_type : `#1` (string, optional) - Gotten by interrogating the endpoint /accounting/v1/payment_types. By default, the payment type to set is the value of the field \"number\" when listing the payment types of the company with said endpoint. If the company belongs to Production Compta accounting software, cfonb codes format are supported.": {
"type": "string"
},
"payment_status": {
"type": "string",
"description": "An enum considered as a string. Possible values : 0 = \"none\", 1 = \"authorized\", 2 = \"blocked\", 3 = \"paid\", 4 = \"canceled\"; Supported by Production Compta accounting software only"
},
"lines": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Specific label for the line (if different than global)"
},
"quantity": {
"type": "number",
"description": "Quantity of items"
},
"account_exc": {
"type": "string",
"description": "Account number for excluding tax part"
},
"amount_exc": {
"type": "number",
"description": "Line amount excluding taxes"
},
"analytics_exc": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount excluding taxes for this line"
},
"account_vat": {
"type": [
"string",
"null"
],
"description": "Account number for taxes part"
},
"amount_vat": {
"type": [
"number",
"null"
],
"description": "Line amount of taxes (VAT)"
},
"comment": {
"type": "string",
"description": "Additional information related to the line. It will be sent to accounting if supported"
},
"analytics_vat": {
"type": "array",
"items": {
"type": "object",
"properties": {
"analysis": {
"type": "string",
"description": "Code of the analysis"
},
"distribution": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"description": "Amount distributed over axes (can be a part of the line amount)"
},
"axes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Code of the axis to use"
},
"section": {
"type": "string",
"description": "Code of the section to use on the axis"
}
},
"required": [
"code",
"section"
]
}
}
},
"required": [
"amount",
"axes"
]
}
}
},
"required": [
"analysis",
"distribution"
]
},
"description": "analytics details of the amount of vat for this line"
}
},
"required": [
"account_exc",
"amount_exc"
]
},
"description": "Lines details"
}
},
"required": [
"date",
"label",
"customer",
"item_id",
"total_inc",
"total_exc",
"total_vat"
]
}Headers
Content-Type: application/jsonBody
{
"id": "124d6622-3a3d-45f5-bf09-f05eb9b16b24"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ID of the generated command (transaction)"
}
},
"required": [
"id"
]
}Headers
Content-Type: text/plainBody
Some mandatory fields are missing.Headers
Content-Type: text/plainBody
The requested company does not exist in the context.Add sales invoicePOST/accounting/v1/sales
Add entries specifically for sales invoice piece.
Entries are handled in asynchronous transactions, the ID of the command is returned by the POST.
Warning ⚠️
The user can set a book identifier in the journal_id parameter or a book code in the book_code parameter.
If the journal_id parameter is set, then it will be used instead of the book_code.
If the journal_id parameter is set, a restriction is applied if the identifier is unknown to the company.
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
{
"Attributes": "Hello, world!",
"page": 1,
"limit": 100,
"total": 46,
"_links": {
"self": {
"href": "http://..."
},
"first": {
"href": "http://..."
},
"last": {
"href": "http://..."
}
},
"_embedded": {
"commands": [
{
"id": "d2f2753f-7948-42af-8240-c00e6dc11b42",
"status": "1",
"status_indicator": "Recorded",
"error_message": "null"
}
]
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Attributes": {
"type": "string"
},
"page": {
"type": "number"
},
"limit": {
"type": "number"
},
"total": {
"type": "number"
},
"_links": {
"type": "object",
"properties": {
"self": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"first": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
},
"last": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
},
"required": [
"href"
]
}
}
},
"_embedded": {
"type": "object",
"properties": {
"commands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Command ID"
},
"status": {
"type": "string",
"description": "Status of the command"
},
"status_indicator": {
"type": "string",
"description": "Status label of the command"
},
"error_message": {
"type": [
"string",
"null"
],
"description": "Error message if status is Error"
}
},
"required": [
"id",
"status",
"status_indicator"
]
}
}
}
}
},
"required": [
"page",
"limit",
"total"
]
}Headers
Content-Type: text/plainBody
The requested command(s) do(es) not exist in the context.List commandsGET/accounting/v1/commands{?ids,page,limit}
List asynchronous commands with their statuses.
Possible statuses
| status | indicator | description |
|---|---|---|
| 0 | Queued | The command has been queued and should be processed shortly |
| 1 | Recorded | The command has been processed without any error |
| 2 | Error | An error has been encountered, the error message is provided |
| 3 | Processing | The command is being processed |
- ids
array(optional)List of command IDs separated by commas
- page
number(optional) Default: 1Page number
- limit
number(optional)Maximum number of commands per page
Cred ¶
Companies ¶
Headers
Authorization: Bearer xoxb-1234-abcdefghHeaders
Content-Type: application/jsonBody
{
"links": [
{
"rel": "self",
"href": "http://..."
},
{
"rel": "next",
"href": "http://..."
},
{
"rel": "previous",
"href": "http://..."
},
{
"rel": "last",
"href": "http://..."
}
],
"metadata": {
"pagination": {
"current": 1,
"per_page": 20,
"total_objects": 89,
"total_pages": 5
}
},
"items": [
{
"id": 666,
"corporate_name": "World Company",
"file_number": "666667",
"favorite": true
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"links": {
"type": "array"
},
"metadata": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Current Page"
},
"per_page": {
"type": "number",
"description": "Items per page"
},
"total_objects": {
"type": "number"
},
"total_pages": {
"type": "number"
}
},
"description": "pagination metadata"
}
},
"description": "list metadata"
},
"items": {
"type": "array"
}
}
}List companiesGET/cred/v1/access/companies.json{?page,max_per_page,q,state,expand}
List companies that the user can access.
- state
string(optional) Example: activeFilter by company status (default:
active)Choices:
activelocked- page
number(optional) Example: 1Current page
- max_per_page
number(optional) Example: 10Number of companies by page
- q
string(optional) Example: World CompanySearched term in corporate name and file number
- expand
array(optional) Example: corporate_nameReturn the requested properties in response
Choices:
corporate_namefile_numbervipfavorite
Companies access ¶
Headers
Authorization: Bearer xoxb-1234-abcdefghHeaders
Content-Type: text/plainBody
User has no access right to the requested companies.Check companies accessGET/cred/v1/access/companies/{company_ids}.json
Check if an user has access right to the requested companies.
- company_ids
string(required) Example: 128,345,56Company ids separate by
,
Users ¶
Headers
Authorization: Bearer xoxb-1234-abcdefghHeaders
Content-Type: application/jsonBody
{
"links": [
{
"rel": "self",
"href": "http://..."
},
{
"rel": "next",
"href": "http://..."
},
{
"rel": "previous",
"href": "http://..."
},
{
"rel": "last",
"href": "http://..."
}
],
"metadata": {
"pagination": {
"current": 1,
"per_page": 20,
"total_objects": 89,
"total_pages": 5
}
},
"items": [
{
"id": 666,
"firstname": "Patrick",
"lastname": "Duffy",
"email": "p.duffy@abs",
"profile": {
"id": 3,
"type": "user.profile.type.collaborator",
"user_type": 1
}
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"links": {
"type": "array"
},
"metadata": {
"type": "object",
"properties": {
"pagination": {
"type": "object",
"properties": {
"current": {
"type": "number",
"description": "Current Page"
},
"per_page": {
"type": "number",
"description": "Items per page"
},
"total_objects": {
"type": "number"
},
"total_pages": {
"type": "number"
}
},
"description": "pagination metadata"
}
},
"description": "list metadata"
},
"items": {
"type": "array"
}
}
}List usersGET/cred/v1/access/users.json{?page,max_per_page,q,state,type,company,include_me,expand}
List other users that the user can access.
- page
number(optional) Example: 1Current page
- max_per_page
number(optional) Example: 10Number of users by page
- q
string(optional) Example: PatrickSearched term in firstname, lastname and email
- state
string(optional) Example: activeFilter by user status (default:
active)Choices:
activelocked- type
string(optional) Example: allFilter by user profile type (default:
all)Choices:
allpractitionerclient- company
string(optional) Example: 666Filter by company identifier
- include_me
bool(optional) Example: 1Force requested user to be returned in response
- expand
array(optional) Example: emailReturn the requested properties in response
Choices:
emailfirstnamelastnameprofile
Users access ¶
Headers
Authorization: Bearer xoxb-1234-abcdefghHeaders
Content-Type: text/plainBody
User has no access right to the requested users.Check users accessGET/cred/v1/access/users/{user_ids}.json
Check if an user has access right to the requested users.
- user_ids
string(required) Example: 128,345,56User ids separate by
,
Module access ¶
Headers
Authorization: Bearer xoxb-1234-abcdefghHeaders
Content-Type: text/plainBody
User has no access right to the module.Check module accessGET/cred/v1/access/modules/{module_id}.json
Check if an user is allowed to use an application.
- module_id
string(required) Example: 1Module id
Document ¶
Document creation ¶
Headers
Content-Type: multipart/form-data; boundary=--{boundary value}
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
--{boundary value}
Content-Disposition: form-data; name='file'; filename='myfile.pdf'
Content-Type: application/pdf (according to the type of the uploaded file)
{file content}
--{boundary value}
Content-Disposition: form-data; name="nodeId"
companies_295399
--{boundary value}
Content-Disposition: form-data; name="node"
companies
--{boundary value}
Content-Disposition: form-data; name="type"
123
--{boundary value}
Content-Disposition: form-data; name="documentDate"
2019-07-31
--{boundary value}
Content-Disposition: form-data; name="visibleBy[]"
client
--{boundary value}
Content-Disposition: form-data; name="visibleBy[]"
practitioner
--{boundary value}--Headers
Content-Type: application/jsonBody
{
"id": 12345,
"filename": "nice filename",
"mimetype": "application/pdf",
"size": 1234,
"version": 1,
"created_at": "2019-08-15T15:52:01+0000",
"locked": 1,
"download_link": "http://www.api",
"created_by": {
"id": 123,
"username": "johndoe",
"email": "johndoe@world.net",
"firstname": "John",
"lastname": "Doe",
"active": 1,
"group": {
"id": 123,
"label": "Group 1"
}
},
"accounting_firm": {
"id": 123,
"name": "Accounting firm name"
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "ID of the newly created document"
},
"filename": {
"type": "string",
"description": "Filename of the newly created document"
},
"mimetype": {
"type": "string",
"description": "Mime type of the newly created document"
},
"size": {
"type": "number",
"description": "Newly created document size in bytes"
},
"version": {
"type": "number",
"description": "Last version of the document"
},
"created_at": {
"type": "string",
"description": "Document's creation date formatted as ISO 8601"
},
"locked": {
"type": "number",
"description": "Document's version"
},
"download_link": {
"type": "string",
"description": "url.eu/document-link.ext` (string, required) - Document's link"
},
"created_by": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Document's creator Id"
},
"username": {
"type": "string",
"description": "Document's creator username"
},
"email": {
"type": "string",
"description": "Document's creator email"
},
"firstname": {
"type": "string",
"description": "Document's creator firstname"
},
"lastname": {
"type": "string",
"description": "Document's creator lastname"
},
"active": {
"type": "number",
"description": "Document's creator status"
},
"group": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Document's creator group Id"
},
"label": {
"type": "string",
"description": "Document's creator group label"
}
},
"required": [
"id",
"label"
],
"description": "Document's creator group"
}
},
"required": [
"id",
"username",
"email",
"firstname",
"lastname",
"active",
"group"
],
"description": "Document creator data"
},
"accounting_firm": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "AccountingFirm id"
},
"name": {
"type": "string",
"description": "AccountingFirm name"
}
},
"required": [
"id",
"name"
],
"description": "Document accounting firm"
}
},
"required": [
"id",
"filename",
"mimetype",
"size",
"version",
"locked"
]
}Headers
Content-Type: text/plainBody
form not submitted or invalidHeaders
Content-Type: text/plainBody
Other error messageDocument creationPOST/document/v1/documents.json
Upload a new document.
Parameters
| Name | Example | Description |
|---|---|---|
node (string, required) |
companies |
Master location of a document privacy between myDocuments, companies or users |
nodeId (string, required) |
companies_295399 |
Id of the user or the company, null if myDocuments (it will take the connected user) |
parent (string, optional) |
123 |
Document type ID for node companies or users. Cannot be used with parentSlug |
parentSlug (string, optional) |
payslip |
Document type slug. Cannot be used with parent |
documentId (number, optional) |
214 |
Document ID if new version of an existing document (matching to entryId field returned on the first upload of a document) |
file (object, required) |
(binary) |
File to upload |
fileName (string, optional) |
AnotherFile.pdf |
Document public filename |
comments (string, optional) |
This is an amazing file |
Comment about the document |
confidential (string, optional) |
This is an amazing file, may be. |
This comment is only visible by practitioners, only possible for a connected practitioner |
documentDate (string, optional) |
2019-07-31 |
yyyy-mm-dd, if null document’s date will be current date |
classificationDate (string, optional) |
2019-07-31 |
yyyy-mm-dd necessary if document’s path is detailed per month |
sourceApp (string, optional) |
sourceAppName |
Name of app that sent the document |
sourceId (number, optional) |
124 |
ID of the document stored in the source app |
sourceUrl (string, optional) |
https://source-app-url.eu/tasks/1234 |
URL of the document stored in the source app |
isConfidential (boolean, optional) |
true | Mark the document visible and available for practitioners only |
confidentialFor (array[number], optional) |
[123]] | Can be used only if isConfidential is true. Contains only ids of client users you want to grant access to the document |
List document types ¶
Headers
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Headers
Content-Type: application/jsonBody
[
{
"root": true,
"id": 12345,
"parentId": 123,
"name": {
"fr": "Hello, world!",
"en": "Hello, world!"
},
"slug": "my_slug"
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Headers
Content-Type: text/plainBody
Other error messageList document typesGET/document/v1/company/types.json
List all document types with the slug for a company according user accesses
List documents by type ¶
Headers
Content-Type: application/json
X-Authenticated-Userid: 4
x-company: 223366Headers
Content-Type: application/jsonBody
[
{
"id": 12345,
"filename": "nice filename",
"mimetype": "application/pdf",
"size": 1234,
"version": 1,
"created_at": "2019-08-15T15:52:01+0000",
"locked": 1,
"download_link": "http://www.api",
"created_by": {
"id": 123,
"username": "johndoe",
"email": "johndoe@world.net",
"firstname": "John",
"lastname": "Doe",
"active": 1,
"group": {
"id": 123,
"label": "Group 1"
}
},
"accounting_firm": {
"id": 123,
"name": "Accounting firm name"
}
}
]Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array"
}Headers
Content-Type: text/plainBody
Other error messageList documents by typeGET/document/v1/files/{documentTypeSlug}/list.json{?date_from,date_to,sort_by,sort_order,page,limit}
List documents the user has access to on a company based on a slug of a document type. Returns the paginated list of documents for the given slug. You can filter by classification date(date_from, date_to) and sort by listed properties below
- documentTypeSlug
string(required) Example: payslips- date_from
date(optional) Example: 2020-01-01- date_to
date(optional) Example: 2020-12-31- sort_by
enum(optional)Choices:
classification_datecreation_datedocument_date- sort_order
enum(optional)Choices:
ascdesc- page
number(optional) Example: 1- limit
number(optional) Example: 10
Datahub ¶
Description
This set of API gives access to our datahub to query data easily.
Quick and Complete Access to all data sources: After a first step of authentication, every connected application/client has immediate access to all allowed data in the system.
List of available dataTypes for now:
-
Accounting (COA/Account)
-
Indicator
-
Forecast
-
DSN
-
Fact
General
Company ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
company{
accounting{
fiscalYears(isClosed: true, sort: ASC){
start
end
closed
code
}
analytic
currency
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"company": "Hello, world!",
"accounting": {
"fiscalYears": [
{
"start": "2019-01-01T00:00:00.000Z",
"end": "2020-01-01T00:00:00.000Z",
"closed": true,
"code": "2018"
}
]
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"company": {
"type": "string"
},
"accounting": {
"type": "object",
"properties": {
"fiscalYears": {
"type": "array"
}
}
}
}
}
}
}CompanyPOST/datahub/v1/graphql
This query allows retrieving specific information regarding a company. For now only accounting metadata information are available and detailed hereafter.
Accounting information
The graphql query allows the client to retrieve accounting information such as:
-
the currency: (3 letters format e.g., “EUR”)
-
the fiscal years: a list of fiscal years defined on the company
-
analytic: whether the company has some analytic structure defined (please see Section Analysis for more information)
Query Parameters
| Name | Example | Description |
|---|---|---|
isClosed(boolean, optional) |
false |
When true or false, returns either open or closed fiscal years. When not specified, returns all of them. |
sort (Sort, optional) |
ASC |
This parameter allows the fiscal years to be sorted in a chronological order or vice versa. By default, the chronological order is used. |
DataTypes ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
dataTypes{
name
dataParts
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"dataTypes": {
"name": "COA",
"dataParts": [
"values"
]
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"dataTypes": {
"type": "object",
"properties": {
"name": {
"type": "string",
"enum": [
"COA",
"ACCOUNT",
"INDICATORS",
"DSN",
"FORECAST",
"SMART_FORECAST",
"FACT",
"COA"
]
},
"dataParts": {
"type": "array"
}
}
}
}
}
}
}List dataTypesPOST/datahub/v1/graphql
This query allows to list all data sources available (or that were once available) for a given company
AtomDefintion ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
atomDefinitions(
first: 2
after: "Mzo="
) {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
edges {
cursor
node {
dataType
positiveOpinion
name
combinable
category
id
}
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"atomDefinitions": {
"pageInfo": {
"startCursor": "MA==",
"endCursor": "MTA=",
"hasNextPage": true,
"hasPreviousPage": false
},
"totalCount": 100,
"edges": [
{
"cursor": "Mg==",
"node": {
"id": "\"atomid1\"",
"dataType": "COA",
"positiveOpinion": "UP",
"name": "\"chiffre d'affaires\"",
"combinable": false,
"category": "client",
"format": "NUMBER"
}
}
]
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"atomDefinitions": {
"type": "object",
"properties": {
"pageInfo": {
"type": "object",
"properties": {
"startCursor": {
"type": "string"
},
"endCursor": {
"type": "string"
},
"hasNextPage": {
"type": "boolean"
},
"hasPreviousPage": {
"type": "boolean"
}
}
},
"totalCount": {
"type": "number"
},
"edges": {
"type": "array"
}
}
}
}
}
}
}Atoms definitionsPOST/datahub/v1/graphql
This query list all the Atom ID available for a specific data source and give the detailed datastructure of those atoms, a filter can be added in order to do a search.
Query Parameters
| Name | Example | Description |
|---|---|---|
dataType (DataType, required) |
COA |
This is a filter to restrict the search on the COA dataType. |
filter (string, optional) |
abc |
This is a filter to search for a pattern in the name and label of the atom definition |
first (number, optional) |
2 |
The number of element we want to retrieve |
after (string, optional) |
Mdo= |
The starting base64-encoded index of the pagination |
FiscalYears ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
fiscalYears(isClosed: true, sort: ASC){
start
end
closed
code
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"company": "Hello, world!",
"accounting": {
"fiscalYears": [
{
"start": "2019-01-01T00:00:00.000Z",
"end": "2020-01-01T00:00:00.000Z",
"closed": true,
"code": "2018"
}
]
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"company": {
"type": "string"
},
"accounting": {
"type": "object",
"properties": {
"fiscalYears": {
"type": "array"
}
}
}
}
}
}
}Fiscal yearsPOST/datahub/v1/graphql
This query allows to retrieve the list of fiscal years associated with a company.
Query Parameters
| Name | Example | Description |
|---|---|---|
isClosed(boolean, optional) |
false |
When true or false returns either open or closed fiscal years. When not specified returns all of them. |
sort (Sort, optional) |
ASC |
This parameter allows the fiscal years to be sorted in a chronological order or vice versa. By default, the chronological order is used. |
Currency ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
company(){
accounting{
currency
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"company": "Hello, world!",
"accounting": {
"currency": "EUR"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"company": {
"type": "string"
},
"accounting": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"description": "currency used for the company"
}
}
}
}
}
}
}CurrencyPOST/datahub/v1/graphql
This query allows to retrieve the currency associated to a company.
Entries ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{{
entriesByCompanyId(
period: {
start: "2020-01-01",
end: "2021-01-01"
}
accountId: "8bc26052-b3b4-5a64-930c-e931a0edb6a6"
after: "Mzo="
first: 3
filter: {
analytic: {
analysis: "2eaxe"
axis1: "axis1"
sections1: {
"section1-1",
"section1-2"
}
axis2: "axis2"
sections2: {
"section2-1",
"section2-2"
}
axis3: "axis3"
sections3: {
"section3-1",
"section3-2"
}
}
entryLabel: "Falger, Garage 01,04"
amout: 58.1300
minDebit: 10
maxDebit: 200
minCredit: 350
maxCredit: 1299
attachment: true
}
sort: {
column: "debit"
sort: "ASC"
}
) {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
totalCount
edges {
cursor
node {
id
number
label
credit
debit
date
account {
id
number
label
type
}
book {
code
}
attachment
}
}
}
}Headers
Content-Type: application/jsonBody
{
"pageInfo": {
"startCursor": "MA==",
"endCursor": "MTA=",
"hasNextPage": true,
"hasPreviousPage": false
},
"totalCount": 100,
"edges": [
{
"cursor": "Mg==",
"node": {
"id": "Hello, world!",
"date": "Hello, world!",
"book": "Book!",
"account": "EntryAccount!",
"label": "Hello, world!",
"credit": 1,
"debit": 1,
"attachment": "Hello, world!",
"number": "Hello, world!"
}
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"pageInfo": {
"type": "object",
"properties": {
"startCursor": {
"type": "string"
},
"endCursor": {
"type": "string"
},
"hasNextPage": {
"type": "boolean"
},
"hasPreviousPage": {
"type": "boolean"
}
}
},
"totalCount": {
"type": "number"
},
"edges": {
"type": "array"
}
}
}EntriesPOST/graphql
This query list all the Entries for a company for a period. Filter can be added to define a more precise result, as for a specific account.
Query Parameters
| Name | Example | Description |
|---|---|---|
period(Period, required) |
2020-31-12 |
This is an object to define the date range to querying entries. The format expected is just year, month and day in this order and separated by a dash. No time required. |
accountId _(string, optional) |
e931a0edb6a6 |
This is an account id to filter on this specifically entry field |
filter _(EntriesByCompanyIdFilterInput, optional) |
abc |
This is a filter to search on different entry’s fields such as label or analytics |
sort (EntriesColumnSort, optional) |
ASC |
This is a sorting instruction that allows you choosing the column and the sort direction. By default, the sorting is anti-chronological on the date, and alphabetical on label and entry id. This logic on the last two keeps items in the same order if the date is same for some entries. |
Accounts ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"`filter` _(string, optional)_ | `abc`| This is a filter to search for a pattern in the name and label of the atom definition": "Hello, world!",
"`first` _(number, optional)_ | `2` | The number of element we want to retrieve": "Hello, world!",
"`after` _(string, optional)_ | `Mdo=` | The starting base64": "Hello, world!",
"`sort` _(AccountsColumnSort, optional)_ | ` \"column\": \"label\", \"sort\": \"ASC\"` | Define the way results are sorted": "Hello, world!"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"`filter` _(string, optional)_ | `abc`| This is a filter to search for a pattern in the name and label of the atom definition": {
"type": "string"
},
"`first` _(number, optional)_ | `2` | The number of element we want to retrieve": {
"type": "string"
},
"`after` _(string, optional)_ | `Mdo=` | The starting base64": {
"type": "string",
"description": "encoded index of the pagination"
},
"`sort` _(AccountsColumnSort, optional)_ | ` \"column\": \"label\", \"sort\": \"ASC\"` | Define the way results are sorted": {
"type": "string"
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"accounts": {
"pageInfo": {
"startCursor": "MA==",
"endCursor": "MTA=",
"hasNextPage": true,
"hasPreviousPage": false
},
"totalCount": 100,
"edges": [
{
"cursor": "Mg==",
"node": {
"id": "Hello, world!",
"number": "Hello, world!",
"label": "Hello, world!",
"type": "G",
"closed": true,
"creditFirst": true
}
}
]
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"accounts": {
"type": "object",
"properties": {
"pageInfo": {
"type": "object",
"properties": {
"startCursor": {
"type": "string"
},
"endCursor": {
"type": "string"
},
"hasNextPage": {
"type": "boolean"
},
"hasPreviousPage": {
"type": "boolean"
}
}
},
"totalCount": {
"type": "number"
},
"edges": {
"type": "array"
}
}
}
}
}
}
}AccountsPOST/graphql
Request the list of accounts available on the company (application/json)
Analytic ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
company(){
accounting{
analytic
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"company": "Hello, world!",
"accounting": {
"currency": "EUR"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"company": {
"type": "string"
},
"accounting": {
"type": "object",
"properties": {
"currency": {
"type": "string",
"description": "currency used for the company"
}
}
}
}
}
}
}AnalyticPOST/graphql
Get the analytic associated to a company This query allows to know if analytic dimensions are present for a specific company.
Analysis ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
"ids": "[]",
"activated": true,
"sort": [
"'ASC'",
"'DESC'"
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"ids": {
"type": "string",
"description": "filter out analysis, axis or sections based on the ids"
},
"activated": {
"type": "boolean",
"description": "when no value provided, returns both activated and non-activated objects."
},
"sort": {
"type": "array",
"description": "Sort analysis by code, axis by id, and sections by code"
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"analysis": "Hello, world!",
"id": 1,
"code": "\"Analysis1\"",
"name": "\"MyName\"",
"activated": true,
"axis": {
"id": 1,
"code": "\"Analysis1\"",
"name": "\"MyName\"",
"activated": true,
"sections": "Hello, world!"
}
}
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"analysis": {
"type": "string"
},
"id": {
"type": "number",
"description": "The analysis id"
},
"code": {
"type": "string",
"description": "The code of analysis"
},
"name": {
"type": "string",
"description": "The name of analysis"
},
"activated": {
"type": "boolean",
"description": "Whether the analysis is activated or not"
},
"axis": {
"type": "object",
"properties": {
"sections": {
"type": "string",
"description": "The axis sections"
},
"id": {
"type": "number",
"description": "The section id"
},
"code": {
"type": "string",
"description": "The code of section"
},
"name": {
"type": "string",
"description": "The name of section"
},
"activated": {
"type": "boolean",
"description": "Whether the section is activated or not"
}
},
"description": "The analysis axis"
}
}
}
}
}AnalysisPOST/graphql
Get the tree structure associated to a company This query allows to retrieve analysis for a specific company.
Values by DataTypes ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
valuesByDataType(
dataType: COA
atomInputs: {
id:"044acf60-2cb8-5a0e-8b28-d634fee7f5de"
dataPart:["heading_value"]
}
period: {
start:"2019-01-01"
end:"2020-03-01"
}
scale: MONTH
calculation: TRANSACTIONAL
) {
dataPart
values {
x
y
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"valuesByDataType": [
{
"dataPart": "heading_value",
"values": [
{
"x": "2019-01-01",
"y": 6129.68
},
{
"x": "2019-02-01",
"y": 4983.51
},
{
"x": "2019-03-01",
"y": 22111.53
},
{
"x": "2019-04-01",
"y": 19813.77
},
{
"x": "2019-05-01",
"y": 9130.85
},
{
"x": "2019-06-01",
"y": 18716.62
},
{
"x": "2019-07-01",
"y": 15294.89
},
{
"x": "2019-08-01",
"y": 33897.619999999995
},
{
"x": "2019-09-01",
"y": 22462.78
},
{
"x": "2019-10-01",
"y": 17202.08
},
{
"x": "2019-11-01",
"y": 18483.9
},
{
"x": "2019-12-01",
"y": 56249.47
},
{
"x": "2020-01-01",
"y": 14095.78
},
{
"x": "2020-02-01",
"y": null
}
]
}
]
}
}Headings sumsPOST/datahub/v1/graphql
Get raw or aggregated values for a list of headings sums
Query Parameters
| Name | Example | Description |
|---|---|---|
dataType (DataType, required) |
COA |
This is a filter to restrict the search on the COA dataType. Thus it should be set to COA. |
atomInputs (array[AtomInput], required) |
{ id:"044acf60"dataPart:["heading_value"]} |
This is the ID and part of the required Atom |
period (object, required) |
(startDate, endDate) |
Data period |
scale (Scale, required) |
MONTH |
Unit in the period. |
calculation (CalculationMode, required) |
TRANSACTIONAL |
Type of calculation |
first (number, optional) |
2 |
The number of element we want to retrieve |
after (string, optional) |
Mdo= |
The starting base64-encoded index of the pagination |
Raw or aggregated account sums ¶
Headers
Content-Type: application/json
Authorization: Bearer xoxb-1234-abcdefgh
X-Company: 295399Body
{
valuesByDataType(
dataType: ACCOUNT
atomInputs: {
id:"06c8fce8-59dc-5e59-8bc9-e0cc0b79ac71"
dataPart:["debit"]
}
period: {
start:"2017-12-29"
end:"2018-02-02"
}
scale: WEEK
calculation: TRANSACTIONAL
) {
dataPart
values {
x
y
}
}
}Headers
Content-Type: application/jsonBody
{
"data": {
"valuesByDataType": [
{
"dataPart": "debit",
"values": [
{
"x": "2017-12-29",
"y": null
},
{
"x": "2018-01-01",
"y": 37607.46
},
{
"x": "2018-01-08",
"y": 2088
},
{
"x": "2018-01-15",
"y": null
},
{
"x": "2018-01-22",
"y": 2160
},
{
"x": "2018-01-29",
"y": 3636
}
]
}
]
}
}Accounts sumsPOST/datahub/v1/graphql
Get raw or aggregated values for a list of accounts sums
Query Parameters
| Name | Example | Description |
|---|---|---|
dataType (DataType, required) |
ACCOUNT |
This is a filter to restrict the search on the COA dataType. Thus it should be set to COA. |
atomInputs (array[AtomInput], required) |
{id:"044acf60"dataPart:["heading_value"]} |
This is the ID and part of the required Atom |
period (object, required) |
(startDate, endDate) |
Data period |
scale (Scale, required) |
MONTH |
Unit in the period. |
calculation (CalculationMode, required) |
TRANSACTIONAL |
Type of calculation |
first (number, optional) |
2 |
The number of element we want to retrieve |
after (string, optional) |
Mdo= |
The starting base64-encoded index of the pagination |