Getting started
Errors
Introduction
This document describes how you can expect chift errors and list as well the errors that you can expect from our different APIs.
Chift Error
A chift error is always composed of the following elements:
- status: “error”
- message: “message explaining the error”
- error_code: “unique error code to describe the error”
- detail: “additional details explaining the error” (optional)
The errors are always returned with an HTTP error code (4XX, 5XX). Note that the combination of the message and the error_code is not always unique.
Example of an error message:
Specific errors
Even if it’s the goal to only use generic errors whenever possible, there are use case where the raised errors are specific to the connectors. In such case, those errors are described in the related connector documentation.
List of errors
Error code | HTTP Status | Description | Used by APIs |
---|---|---|---|
ERROR_CHIFT_AUTHENTICATION_ERROR | 401 | Error with the provided Chift token or combination of clientId,clientSecret en accountId | All |
ERROR_CONNECTOR_AUTHENTICATION | 401 | Error related to the authentication to the connector (wrong credentials, …) | All |
ERROR_NO_ACTIVE_CONNECTION | 400 | No active connection/integration for this API are configured | All |
ERROR_CONFIGURATION_CONNECTION | 400 | Error related to the configuration of the connection (e.g. more than one connection is active, …) | All |
ERROR_API_RESOURCE_NOT_FOUND | 400 | The route that was called does not exist. Make sure that you use the routes as specified in the documentation. | All |
ERROR_WEBHOOK_NOT_SUPPORTED | 405 | This webhook type is not supported for this integration | All |
ERROR_UNKNOWN | 400 | An unknown error occurred during the call. Please contact Chift team. | All |
ERROR_INVALID_BODY | 422 | One of the input field of the body is invalid | All |
ERROR_INVALID_QUERY_PARAMETER | 422 | One of the query parameters is invalid | All |
ERROR_INVALID_PATH_PARAMETER | 422 | One of the path parameters is invalid | All |
ERROR_INVALID_RESPONSE | 422 | The response could not be built. Our support should be contacted. | All |
ERROR_RESOURCE_NOT_SUPPORTED | 405 | The requested resource is not supported by this connector. | All |
ERROR_INTEGRATION_INVALID | 400 | The specified integration is invalid or could not be found | Connections |
ERROR_CONNECTION_INFO_EMPTY | 400 | A field in the connection is not filled in. | All |
ERROR_ORDER_NOT_FOUND | 404 | The given order could not be retrieved | POS |
ERROR_CUSTOMER_NOT_FOUND | 404 | The given customer could not be retrieved | POS |
ERROR_LOCATION_NOT_FOUND | 404 | The given location could not be found | POS |
ERROR_CONFIGURATION_LOCALAGENT | 502 | Impossible to connect to the specified local agent (e.g. not configured, …) | All |
ERROR_GATEWAY_TIMEOUT | 504 | Impossible to connect to a remote application (for local agent) | All |
ERROR_BACKEND_FORBIDDEN | 403 | Impossible to retrieve data due to a permission issue | All |
REQUEST_ALREADY_PROCESSED | 409 | Request with same client request id was already successfully processed | All |
REQUEST_IN_PROCESS | 409 | Request with same client request id is currently processed | All |
ERROR_BACKEND_NOT_FOUND | 504 | Impossible to connect to the specified backend (url, host, unique identifier,… might be incorrect or the backend is down) | POS |
ERROR_BACKEND_FORBIDDEN | 403 | Impossible to retrieve data due to a permission issue | POS |
ERROR_INVALID_PERIOD | 400 | The given period is not valid (based on date_from & date_to parameters) | POS |
ERROR_INVALID_HOST | 400 | The given host is not valid and the backend cannot be reached | POS |
ERROR_INVALID_VAT_FORMAT | 422 | The VAT number doesn’t seem to be correct. Please remove dots and whitespaces. The expected format is the following: BE0784930037 | Accounting |
ERROR_INVALID_LANGUAGE_FORMAT | 422 | The language format is not correct. Please use the ISO 639-1 codes. | Accounting |
ERROR_INVALID_CURRENCY_FORMAT | 422 | The currency format is not correct. Please use the ISO 4217 codes. | Accounting |
ERROR_INVALID_COUNTRY_FORMAT | 422 | The country format is not correct. Please use the ISO 3166-1 codes. | Accounting |
ERROR_INVALID_FINANCIAL_PERIOD_FORMAT | 422 | The forced financial period must be 6 numbers (e.g. 02 for february and 2022 => 022022). | Accounting |
ERROR_NO_INVOICE_LINE | 400 | The invoice must contain at least one invoice line. | Accounting |
ERROR_ZERO_INVOICE | 400 | You cannot create an invoice with an untaxed amount of 0. | Accounting |
ERROR_ZERO_LINE | 400 | You cannot create entries/invoices with a line equal to zero. | Accounting |
ERROR_NO_OPERATION_LINE | 400 | The miscellaneous operation must contain at least one line. | Accounting |
ERROR_INVALID_OPERATION_LINE_TYPE | 400 | A line of type ‘customer_account’ or ‘supplier_account’ must have a ‘partner_id’ filled in. | Accounting |
ERROR_OPERATION_NOT_BALANCED | 400 | The operation is not balanced. The sum of the lines must be zero. | Accounting |
ERROR_NOT_ENOUGH_MATCHING_ENTRIES | 400 | Matching is only possible with at least 2 entries. | Accounting |
ERROR_ANALYTIC_ACCOUNTING_NOT_ACTIVE | 405 | Analytic accounting is not active on this connection. | Accounting |
ERROR_ANALYTIC_ACCOUNTING_PLAN_NOT_CONFIGURED | 405 | A default analytic plan must be configured to use this endpoint. | Accounting |
ERROR_ANALYTIC_ACCOUNT_ALREADY_EXISTS | 400 | An analytic account already exists with the same code in the accounting system. | Accounting |
ERROR_ANALYTIC_ACCOUNT_NOT_FOUND | 404 | The analytic account doesn’t exist in the accounting system. | Accounting |
ERROR_ANALYTIC_PLAN_NOT_FOUND | 404 | The analytic plan doesn’t exist in the accounting system. | Accounting |
ERROR_INVALID_ANALYTIC_DISTRIBUTION | 400 | There is an error with the analytic distribution. This error can come from an anlytic plan or account being more than once in the analytic distribution; from a percentage not being between 1 and 100 or from an analytic plan not having a 100% coverage. | Accounting |
ERROR_INVALID_ANALYTIC_DISTRIBUTION_ACCOUNTS | 400 | Each analytic plan in the analytic distribution of an invoice line must contain at least one analytic account. | Accounting |
ERROR_INVALID_ANALYTIC_DISTRIBUTION_ACCOUNTS_PERCENTAGE | 400 | Analytic accounts of each analytic plan in the analytic distribution of an invoice line must cover 100% of the amount of the invoice line. | Accounting |
ERROR_INVOICE_AMOUNTS_DO_NOT_MATCH | 400 | The amounts of the invoice are not correct. | Accounting |
ERROR_LINE_AMOUNTS_DO_NOT_MATCH | 400 | The amounts in one invoice line are not correct. | Accounting |
ERROR_TAX_RATE_NOT_CORRESPONDING | 400 | The tax rate doesn’t match the tax rate linked to the tax code in the accounting system. | Accounting |
ERROR_MULTIPLE_GL_ACCOUNTS | 400 | The entries have different receivable/payable accounts. | Accounting |
ERROR_MULTIPLE_PARTNER_ACCOUNTS | 400 | A sale/purchase entry cannot be linked to multiple partner accounts. | Accounting |
ERROR_ACCOUNT_NUMBER_NOT_CONFIGURED | 400 | The account number is not configured to be used in entries. It cannot be imputed. | Accounting |
ERROR_ENTRY_HAS_INVALID_STATUS | 400 | The entry doesn’t have the correct status to be matched. | Accounting |
ERROR_ENTRY_HAS_NO_ACCOUNT_RECEIVABLE_PAYABLE | 400 | The entry doesn’t have a receivable/payable account. | Accounting |
ERROR_ENTRY_NOT_LINKED_TO_PARTNER | 400 | The entry is not linked to partner mentionnend in the matching body. | Accounting |
ERROR_ENTRY_ALREADY_RECONCILED | 400 | The entry is already reconciled in the accounting system. | Accounting |
ERROR_ENTRY_ALREADY_PARTIALLY_MATCHED | 400 | An entry is already partially matched with another entry in the accounting system. | Accounting |
ERROR_JOURNAL_NOT_GOOD_SCOPE | 400 | The journal cannot be used for this scope. | Accounting |
ERROR_JOURNAL_NOT_CONFIGURED | 400 | The journal is not configured for a used functionnality. | Accounting |
ERROR_TAX_CODE_NOT_GOOD_SCOPE | 400 | The tax code cannot be used for this type of invoices. | Accounting |
ERROR_MULTIPLE_JOURNALS | 404 | Multiple journals were found. Please indicate the wanted journal in the request. | Accounting |
ERROR_JOURNAL_NOT_FOUND_FOR_SCOPE | 404 | Please indicate the wanted journal in the request. No journal has been found for this scope. | Accounting |
ERROR_INVOICE_NUMBER_ALREADY_USED | 400 | The invoice number is already used in the accounting system. | Accounting |
ERROR_PDF_NOT_APPLICABLE_TO_DRAFT_INVOICE | 400 | You cannot upload a PDF when creating a draft invoice. | Accounting |
ERROR_TAX_CODE_NOT_FOUND | 404 | The tax code doesn’t exist in the accounting system. | Accounting |
ERROR_TAX_CODE_NOT_CONFIGURED | 400 | The tax code is not configured to be used with this type of invoice. | Accounting |
ERROR_ACCOUNT_NUMBER_NOT_FOUND | 404 | The account number doesn’t exist in the accounting system. | Accounting |
ERROR_OPERATION_NOT_FOUND | 404 | The operation doesn’t exist in the accounting system. | Accounting |
ERROR_OPERATION_NUMBER_ALREADY_USED | 400 | The operation number is already used in the accounting system. | Accounting |
ERROR_WRONG_ACCOUNT_TYPE | 400 | The account cannot be used for this type of line of a miscellaneous operation. | Accounting |
ERROR_BOOKYEAR_NOT_FOUND | 400 | The accounting system is not set up for this date. | Accounting |
ERROR_PERIOD_CLOSED | 400 | The accounting period is closed in the accounting system. | Accounting |
ERROR_JOURNAL_LOCKED | 400 | The journal is locked in the accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_BANK_ACCOUNT | 422 | The bank account/iban is not valid. | Accounting |
ERROR_INVALID_FIELD_FORMAT_ANALYTIC_ACCOUNT | 422 | The code of the analytic account doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_ANALYTIC_PLAN | 422 | The format of the field ‘analytic_plan’ doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_JOURNAL_ID | 422 | The format of the field ‘journal_id’ doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_TAX_CODE | 422 | The format of the field ‘tax_code’ doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_ENTRIES | 422 | The format of the IDs entries doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_JOURNAL_ALREADY_OPEN | 400 | The entry couldn’t be created in the accounting system. The journal is already open. | |
ERROR_INVALID_FIELD_FORMAT_ID | 422 | The format of the ID doesn’t follow the format of the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_PARTNER_ID | 422 | The format of the field ‘partner_id’ doesn’t seem to be correct for the corresponding accounting system. | Accounting |
ERROR_INVALID_FIELD_FORMAT_COMPANY_ID | 422 | The format of the field ‘company_id’ doesn’t seem to be correct for the corresponding accounting system. | Accounting |
ERROR_MISSING_FIRST_NAME | 400 | The field ‘first_name’ must be filled in when the client/supplier is an individual. | Accounting |
ERROR_MISSING_LAST_NAME | 400 | The field ‘last_name’ must be filled in when the client/supplier is an individual. | Accounting |
ERROR_PARTNER_ALREADY_EXISTS | 400 | A client/supplier already exists with the same code/id in the accounting system. | Accounting |
ERROR_JOURNAL_NOT_FOUND | 404 | The journal doesn’t exist in the accounting system. | Accounting |
ERROR_PARTNER_NOT_FOUND | 404 | The client/supplier doesn’t exist in the accounting system. | Accounting |
ERROR_ENTRY_NOT_FOUND | 404 | The entry doesn’t exist in the accounting system. | Accounting |
ERROR_DUPLICATE_ENTRIES | 400 | Entries cannot contain duplicates. | Accounting |
ERROR_INVOICE_NOT_FOUND | 404 | The invoice doesn’t exist in the accounting system. | Accounting |
ERROR_MISCELLANEOUS_OPERATION_NOT_FOUND | 404 | The miscellaneous operation doesn’t exist in the accounting system. | Accounting |
ERROR_LANGUAGE_NOT_FOUND | 404 | The specified language doesn’t exist or is not active in the accounting system. | Accounting |
ERROR_CURRENCY_NOT_FOUND | 404 | The currency doesn’t exist or is not active in the accounting system. | Accounting |
ERROR_NEGATIVE_INVOICE | 400 | An invoice must be positive. The invoice type determines the sign of the invoice. | Accounting |
ERROR_ACCOUNT_NUMBER_NOT_ACTIVE | 400 | An account number used in an invoice line is not active. | Accounting |
ERROR_PARTNER_NOT_ACTIVE | 400 | The used client/supplier is not active. | Accounting |
ERROR_ACCOUNT_NUMBER_NOT_NOT_GOOD_SCOPE | 400 | The account number cannot be used in this scope. | Accounting |
ERROR_INVALID_INVOICE_DATE | 400 | The period containing the invoice date is already locked. | Accounting |
ERROR_WRONG_ENTRY_TYPE | 400 | You can only create entries in a sale or purchase journal. | Accounting |
ERROR_MAX_DIFFERENCE_MONTHS | 400 | You can retrieve maximum 3 months of data at once. The difference between ‘date_from’ and ‘date_to’ is at maximum 3 months. | Accounting |
ERROR_ATTACHMENT_ALREADY_EXISTS | 400 | An attachment already exists for this invoice. | Accounting |
ERROR_INVALID_BASE64_STRING | 400 | The document is not a valid base64 string representing a PDF. | Accounting |
ERROR_INVALID_DUE_DATE | 422 | The due date must be after the invoice date. | Accounting |
ERROR_CHAREGE_PRODUCT_ACCOUNT_MISSING | 422 | Please provide at least one charge/product account. | Accounting |
ERROR_COLLECTIVE_ACCOUNT_MISSING | 422 | Please provide a client/supplier collective account. | Accounting |
ERROR_PARTNER_ACCOUNT_MISSING | 422 | Please provide a client/supplier account in the partner_id field. | Accounting |
ERROR_ANALYTIC_ACCOUNT_ARCHIVED | 400 | The analytic account is archived. | Accounting |
ERROR_INVALID_FIELD_FORMAT_INVOICE_NUMBER | 422 | The format of the invoice number doesn’t follow the format of the corresponding accounting system (e.g. too long) | Accounting |
ERROR_INVALID_FIELD_FORMAT_OPERATION_NUMBER | 422 | The format of the operation number doesn’t follow the format of the corresponding accounting system (e.g. too long) | Accounting |
ERROR_INVALID_FIELD_FORMAT_NUMBER | 422 | The format of the number doesn’t follow the format of the corresponding accounting system (e.g. too long) | Accounting |
ERROR_ANALYTIC_ACCOUNT_NUMBER_PLAN_NOT_ACTIVE | 400 | The account number cannot be used (is not configured) with an analytic account of the specified analytic plan | Accounting |
ERROR_CUSTOMER_NOT_FOUND | 404 | The customer doesn’t exist. | eCommerce |
ERROR_PRODUCT_NOT_FOUND | 404 | The product doesn’t exist. | eCommerce |
ERROR_VARIANT_NOT_FOUND | 404 | The variant doesn’t exist. | eCommerce |
ERROR_LOCATION_NOT_FOUND | 404 | The location doesn’t exist. | eCommerce |
ERROR_ORDER_NOT_FOUND | 404 | The order doesn’t exist. | eCommerce |
ERROR_SHOPIFY_CUSTOMER_DATA_ACCESS | 403 | The Shopify app is not configured to have access to customer data. See Shopify documentation. | eCommerce |
ERROR_PHONE_INVALID | 422 | The phone number doesnt seem to be valid. The number must begin with the country code. | eCommerce |
ERROR_PHONE_ALREADY_USED | 422 | The phone number is already used by another client. | eCommerce |
ERROR_INVALID_FIELD_FORMAT | 422 | The date format of the query parameter ‘Date From’ or ‘Date To’ is not valid. The expected format is the following: YYYY-MM-DD. | eCommerce |
ERROR_NO_ORDER_LINE | 400 | New orders must have at least one line. | eCommerce |
ERROR_INVALID_CURRENCY_FORMAT | 422 | The currency format is not correct. Please use the ISO 4217 codes. | eCommerce |
ERROR_INVALID_COUNTRY_FORMAT | 422 | The country format is not correct. Please use the ISO 3166-1 codes. | eCommerce |
ERROR_OPPORTUNITY_NOT_FOUND | 404 | The opportunity doesn’t exist. | Invoicing |
ERROR_PRODUCT_NOT_FOUND | 404 | The product doesn’t exist. | Invoicing |
ERROR_TAX_NOT_FOUND | 404 | The tax doesn’t exist. | Invoicing |
ERROR_INVOICE_NOT_FOUND | 404 | The invoice doesn’t exist. | Invoicing |
ERROR_OPPORTUNITY_NOT_CREATED | 400 | The opportunity was not created. | Invoicing |
ERROR_PRODUCT_NOT_CREATED | 400 | The product was not created. | Invoicing |
ERROR_TAX_NOT_CREATED | 400 | The tax was not created. | Invoicing |
ERROR_INVOICE_NOT_CREATED | 400 | The invoice was not created. | Invoicing |