Stay up-to-date
Subscribe to our status page to get informed about short term issues with the API. Subscribe to our API developer newsletter to get the latest news and updates around our API platform.
The bexio API uses HTTPS methods and RESTful endpoints to create, edit, and manage documents in the bexio system. JSON is used as the data interchange format.
In order to use the bexio API, you need to follow the following steps in order:
contact_show
in the authorization code flow)curl -X GET \
https://api.bexio.com/2.0/contact \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Make sure to replace
{access-token}
with the token you received in Step 6.
If you've encountered a bug, we're here to help. Before you begin, ensure you can reproduce the issue using a tool for testing APIs, such as Postman. To report the problem, please use the form provided below. Be sure to include detailed steps allowing us to reproduce the issue. However, do not include any credentials in your report.
Please do note that the API is provided as is based on this very documentation, there is no guided implementation or code support available.
We will list any changes to the current version of the API here.
Date | Details of changes |
---|---|
2024-10-01 |
|
2024-08-06 |
|
2024-07-15 |
|
2024-07-15 |
|
2024-06-14 |
|
2024-05-29 |
|
2024-02-14 |
|
2023-12-11 |
|
2023-10-25 |
|
2023-10-09 |
|
2023-08-28 |
|
2023-08-02 |
|
2023-05-16 |
|
2023-04-25 |
|
2023-04-13 |
|
2023-01-31 |
|
2022-10-10 |
|
2022-09-21 |
|
2022-08-26 |
|
2022-04-19 |
|
2022-03-22 |
|
2022-03-08 | |
2021-12-02 |
|
2021-10-18 |
|
2021-07-23 |
|
2021-01-08 |
|
2020-12-16 |
|
2020-12-08 |
|
2020-11-02 |
|
2020-09-24 |
|
2020-09-21 |
|
2020-09-09 |
|
2020-07-07 |
|
2020-07-07 |
|
2020-06-30 |
|
2020-06-25 |
|
2020-06-10 |
|
2020-06-04 |
|
2020-05-28 |
|
2020-04-20 |
|
2020-04-16 |
|
2020-03-31 |
|
2020-02-20 |
|
2020-02-05 |
|
2019-12-16 | First version published |
OpenID Connect 1.0 is a simple identity layer on top of the OAuth 2.0 protocol. It allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner.
Key | Value |
---|---|
Issuer | https://auth.bexio.com/realms/bexio |
OpenID Configuration URL | https://auth.bexio.com/realms/bexio/.well-known/openid-configuration |
Authorization endpoint | https://auth.bexio.com/realms/bexio/protocol/openid-connect/auth |
Token endpoint | https://auth.bexio.com/realms/bexio/protocol/openid-connect/token |
Userinfo endpoint | https://auth.bexio.com/realms/bexio/protocol/openid-connect/userinfo |
JWK endpoint | https://auth.bexio.com/realms/bexio/protocol/openid-connect/certs |
Please only request the scopes that you need for your application. You are allowed to request multiple scopes per request.
Multiple scopes have to be separated by a whitespace. As an example, write access to quotes and invoices can be requested
with the following scopes: kb_offer_edit kb_invoice_edit
.
Read access is granted automatically when a write scope is requested for a resource.
This means that by requesting the scope contact_edit
the scope contact_show
is not needed in order to get read access to contacts.
Scope | Description |
---|---|
accounting |
Write access to accounting data |
article_show |
Read access to items / products |
article_edit |
Write access to items / products |
bank_account_show |
Show bank accounts |
bank_payment_show |
Show bank payments |
bank_payment_edit |
Show and edit bank payments |
contact_show |
Read access to contacts |
contact_edit |
Write access to contacts |
file |
Read and write access to the inbox (file upload) |
kb_invoice_show |
Read access to invoices |
kb_invoice_edit |
Write access to invoices |
kb_offer_show |
Read access to quotes |
kb_offer_edit |
Write access to quotes |
kb_order_show |
Read access to orders |
kb_order_edit |
Write access to orders |
kb_delivery_show |
Read access to deliveries |
kb_delivery_edit |
Write access to deliveries |
monitoring_show |
Read access to timesheets |
monitoring_edit |
Write access to timesheets |
note_show |
Read access to contact notes |
note_edit |
Write access to contact notes |
kb_article_order_show |
Read access to purchase orders |
kb_article_order_edit |
Write access to purchase orders |
project_show |
Read access to projects |
project_edit |
Write access to projects |
stock_edit |
Write access to item stock |
task_show |
Read access to tasks |
task_edit |
Write access to tasks |
kb_bill_show |
Read access to supplier bills |
kb_expense_show |
Read access to Purchase Expenses |
Scope | Description |
---|---|
company_profile |
Adds company specific claims to the id token like company_id and company_name describing the company the user is signed in to. |
email |
Adds claims containing email address of the signed in user. |
offline_access |
Ensures that tokens can be refreshed also after the current user session has been closed. |
openid |
Standard OpenID Connect (OIDC) scope. Required to indicate that the application intends to use OIDC to verify the user's identity. If requested, an ID token is provided within the token response. |
profile |
Adds user specific claims to the id token like given_name , family_name , locale and gender . |
bexio supports the "Authorization Code Grant" as defined in OAuth 2.0 RFC 6749, section 4.1 to obtain an Access Token. Your app must be server-side because during this exchange, you must also pass along your application's Client Secret, which must always be kept secure, and you will have to store it in your client.
/authorize
endpoint of the bexio OpenID Connect service./token
endpoint) along with the application's Client ID and Client Secret.The following example showcases the usage of OpenID Connect (PHP example uses the OpenID-Connect-PHP library). The library uses OpenID Connect Discovery to automatically configure the application.
<?php
require __DIR__ . '/vendor/autoload.php';
use Jumbojett\OpenIDConnectClient;
$oidc = new OpenIDConnectClient("https://auth.bexio.com/realms/bexio", "client_id", "client_secret");
$oidc->setRedirectURL("https://www.example.com/oidc_callback");
$oidc->addScope(array("openid", "profile", "contact_show", "offline_access"));
$oidc->authenticate();
echo $oidc->getAccessToken();
The consent screen shown to the user will look like this:
The scope offline_access
is required to obtain a refresh token to keep the api connection alive.
Redirect URLs are a critical part of the OAuth flow. After a user successfully authorizes an application, the authorization server will redirect the user back to the application with either an authorization code or access token in the URL. Because the redirect URL will contain sensitive information, it is critical that the service doesn’t redirect the user to arbitrary locations.
The best way to ensure the user will only be directed to appropriate locations is to require the developer to register one or more redirect URLs when they create the application.
The new bexio API platform requires to define redirect URLs during the app registration in the developer portal. Unknown URLs will not be accepted during the Authorization and the user will receive an error message.
Up to 10 different redirect URLs can be defined for an app, e.g. to support multiple test environments and mobile apps with custom schemes
In its compact form, JSON Web Tokens consist of three parts separated by dots (.), which are:
Therefore, a JWT typically looks like the following: xxxxx.yyyyy.zzzzz
A typical access token (JWT) looks like the following:
{
"sub": "620603d3-4221-46e5-a109-47b492e691b8", #this is a unique user identifier (format UUID)
"login_id": "620603d3-4221-46e5-a109-47b492e691b8", #this is a unique user identifier (format UUID)
"company_id": "4ubk32lc2ss0", #this is a unique company identifier
"azp": "8ad0e25d-1e8d-47c1-8613-8a28a9bee452", #this is the client ID of the app (format UUID)
"scope": "openid contact_edit offline_access", #the requested scope
"iss": "https://auth.bexio.com/realms/bexio", #the issuer of the token
"exp": 1574882663, #the expiration date of the token
"iat": 1574868263, #the date on which the token was issued
"user_id": 7295, #legacy user id, please use the uuid in the field "login_id"
"company_user_id": 1, #legacy user id, please use the uuid in the field "login_id"
"jti": "5ffe7bfc-cdd0-4c19-8e28-361891546045" #unique identifier for the JWT
}
As a user can be part of multiple companies (bexio accounts), using the login_id to identify the user is not enough.
A combination of the fields company_id
and login_id
can be used to uniquely identify a user that belongs to a bexio account.
As an example, the user Peter Smith (login_id 620603d3-4221-46e5-a109-47b492e691b8) belongs to the companies "Peter Smith Photography" (company_id 4ubk32lc2ss0
) and "Peter Smith Video Productions" (company_id zk34nc55bc4f
).
API Tokens are a simplified method of acquiring an access token, for those use cases where the OAuth flow will not work. Good examples of those are scripts running periodically in the background or development phase of any integration with bexio API.
Using an API Token is the easiest way to gain access to your own bexio data or that of a client of yours. The token is a unique code that grants access to the data and you need to manage these integrations on an individual basis. Personal API Tokens can be created by super admin users directly in bexio by visiting https://office.bexio.com/index.php/admin/apiTokens. The scope of access of the token is determined by the scope of the super admin’s access that creates the token. The token is valid almost indefinitely with a set validity period of 50 years.
To use a Personal API Token to authorise a request, it must be added to the Authorization header of every request:
Authorization: Bearer eyJraWQiOiI2ZGM2YmJlOC1iMjZjLTExZTgtOGUwZC0w...
Each API endpoint is available on our API host https://api.bexio.com
.
Endpoints are usually defined with a relative path, as seen in the following example:
Each relative path must be combined with the API platform URL. For the example this would result in the endpoint https://api.bexio.com/2.0/contact
Where possible, bexio tries to use the appropriate HTTP verb for its operations
Verb | Description |
---|---|
GET |
Used for retrieving resources |
POST |
Used for creating resources |
PATCH |
Used for updating resources with partial data |
PUT |
Used for updating resources with full data |
DELETE |
Used for deleting resources. Please note that delete actions permanently delete resources. It cannot be undone. |
HTTP headers let the client and the server pass additional information with an HTTP request or response. An HTTP header consists of its case-insensitive name followed by a colon (:), then by its value.
The following headers must be used for every request:
Accept: application/json
Authorization: Bearer <token>
Additionally, the header Content-Length: <length>
must be specified for requests with a payload.
The API will always indicate the return type with a Content-Type
header.
Normally the header value is set to application/json
, but can vary (e.g. for PDF exports).
Response Codes Actions and errors yield different HTTP response codes. Please have a look at the expected response codes in the following list:
Code | Description |
---|---|
200 | Request OK |
201 | New resource created |
304 | The resource has not been changed |
400 | The request parameters are invalid |
401 | The bearer token or the provided api key is invalid |
403 | You do not possess the required rights to access this resource |
404 | The resource could not be found / is unknown |
411 | Length Required |
415 | The data could not be processed or the accept header is invalid |
422 | Could not save the entity |
429 | Too many requests |
500 | An unexpected condition was encountered |
503 | The server is not available (maintenance work) |
Error responses contain an HTTP status code and a JSON response body that is structured as follows:
{
"error_code": 404,
"message": "Page not found"
}
Some older endpoints implement search methods. Searching for these endpoint works by sending a POST request to the resource (e.g.: POST /contact/search
or POST /country/search
).
The search parameters must be provided in the body of the POST request.
Please have a look at the resource documentation to see a list of available search parameters.
You can use different criterias for the search. The criteria “like” will be used by default if you do not define a criteria.
Criteria | Description |
---|---|
= |
Exact match |
equal |
Exact match (synonyme for =) |
!= |
Not equal |
not_equal |
Not equal (synonyme for !=) |
> |
Greather than |
greater_than |
Greather than (synonyme for >) |
< |
Less than |
less_than |
Less than (synonyme for <) |
>= |
Greater or equal then |
greater_equal |
Greater or equal then (synonyme for >=) |
<= |
Lesser or equal then |
less_equal |
Lesser or equal then (synonyme for <=) |
like |
Partial match |
not_like |
Does not partial match |
is_null |
Value is NULL |
not_null |
Value is not NULL |
in |
Having multiple results which matche, value must be an array e.g. [1, 2] |
not_in |
Having multiple results which do not match, value must be an array e.g. [1, 2] |
The following example shows how the search for the contacts API can be used. The last name of the contact must be “Meyer” and the contact number must be greater than 10.
Define the search array
$data = array(
array(
'field' => 'name_1',
'value' => 'Meyer',
'criteria' => '=',
),
array(
'field' => 'nr',
'value' => 10,
'criteria' => '>',
),
);
Transform the array to JSON
json_encode($data);
POST-Body for the search
[
{
"field" : "name_1",
"value" : "Meyer",
"criteria" : "="
},
{
"field" : "nr",
"value" : 10,
"criteria" : ">"
}
]
The bexio API enforces a rate limit that limits the number of requests a company can make per minute.
If this limit is reached, the API will return a 429 status code to the client.
The table below describes the relevant headers regarding the API rate-limit.
Header | Description |
---|---|
RateLimit-Limit | The current limit for this time period. |
RateLimit-Remaining | The remaining amount of requests allowed for this time period. |
RateLimit-Reset | The remaining time until the next time period starts (seconds). |
No, we currently do not provide an OpenAPI definition but we have plans to put it online.
We are continously working on a product that makes our customers more successful. Unfortunately we are not able to support every use case via API yet.
No, currently Credit Notes are not available but we have plans to put it online.
This action fetches a list of all contacts
order_by | string Default: "id" Enum: "id" "nr" "name_1" "updated_at" Example: order_by=name_1 Defines the order of the results. Multiple sort parameters can be combined by using a comma separator. |
limit | integer <int32> Default: 500 Example: limit=20 Limit the number of results (max is 2000) |
offset | integer <int32> Default: 0 Example: offset=0 Skip over a number of elements by specifying an offset value for the query |
show_archived | boolean Default: false Example: show_archived=true Show archived elements only |
Accept required | string Example: application/json |
curl -X GET \ https://api.bexio.com/2.0/contact \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
[- {
- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32"
}
]
This action creates a new contact
Accept required | string Example: application/json |
nr | string or null If set to null, the number will be assigned automatically. Must be a number, can also be used as integer |
contact_type_id required | integer Please use the value |
name_1 required | string This field is used as the company name if the field |
name_2 | string or null This field is used as the company addition if the field |
salutation_id | integer or null References a salutation object |
salutation_form | integer or null |
titel_id | integer or null References a title object |
birthday | string or null <date> |
address | string or null |
postcode | string or null |
city | string or null |
country_id | integer or null References a country object |
string or null <email> | |
mail_second | string or null <email> |
phone_fixed | string or null |
phone_fixed_second | string or null |
phone_mobile | string or null |
fax | string or null |
url | string or null |
skype_name | string or null |
remarks | string or null |
language_id | integer or null References a language object |
contact_group_ids | string or null References one ore multiple contact group objects |
contact_branch_ids | string or null References one ore multiple contact sector objects |
user_id required | integer References a user object |
owner_id required | integer |
{- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "titel_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1
}
{- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32",
- "profile_image": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="
}
Search contacts via query. Please refer to the Search section for detailed instructions.
The following search fields are supported:
id
name_1
name_2
nr
address
mail
mail_second
postcode
city
country_id
contact_group_ids
contact_type_id
updated_at
user_id
phone_fixed
phone_mobile
fax
order_by | string Default: "id" Enum: "id" "nr" "name_1" "updated_at" Example: order_by=name_1 Defines the order of the results. Multiple sort parameters can be combined by using a comma separator. |
limit | integer <int32> Default: 500 Example: limit=20 Limit the number of results (max is 2000) |
offset | integer <int32> Default: 0 Example: offset=0 Skip over a number of elements by specifying an offset value for the query |
show_archived | boolean Default: false Example: show_archived=true Show archived elements only |
Accept required | string Example: application/json |
field required | string <= 255 characters Field which should be search over |
value required | string <= 255 characters Value to search for |
criteria | string (v2SearchCriteria) Default: "like" Enum: "=" "equal" "!=" "not_equal" ">" "greater_than" ">=" "greater_equal" "<" "less_than" "<=" "less_equal" "like" "not_like" "is_null" "not_null" "in" "not_in" |
[- {
- "field": "search_field",
- "value": "search term",
- "criteria": "="
}
]
[- {
- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32"
}
]
This action fetches a single contact
contact_id required | integer <int32> Example: 1 the id of the contact |
show_archived | boolean Default: false Example: show_archived=true Show archived elements only |
Accept required | string Example: application/json |
curl -X GET \ https://api.bexio.com/2.0/contact/{contact_id} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
{- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32",
- "profile_image": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="
}
This action edits a single contact
contact_id required | integer <int32> Example: 1 the id of the contact |
Accept required | string Example: application/json |
nr | string or null If set to null, the number will be assigned automatically. Must be a number, can also be used as integer |
contact_type_id required | integer Please use the value |
name_1 required | string This field is used as the company name if the field |
name_2 | string or null This field is used as the company addition if the field |
salutation_id | integer or null References a salutation object |
salutation_form | integer or null |
titel_id | integer or null References a title object |
birthday | string or null <date> |
address | string or null |
postcode | string or null |
city | string or null |
country_id | integer or null References a country object |
string or null <email> | |
mail_second | string or null <email> |
phone_fixed | string or null |
phone_fixed_second | string or null |
phone_mobile | string or null |
fax | string or null |
url | string or null |
skype_name | string or null |
remarks | string or null |
language_id | integer or null References a language object |
contact_group_ids | string or null References one ore multiple contact group objects |
contact_branch_ids | string or null References one ore multiple contact sector objects |
user_id required | integer References a user object |
owner_id required | integer |
{- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "titel_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1
}
{- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32",
- "profile_image": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="
}
This action deletes a contact. Please note that a contact is marked as deleted and can still be accessed by using the "show deleted contacts" filter.
contact_id required | integer <int32> Example: 1 the id of the contact |
Accept required | string Example: application/json |
curl -X DELETE \ https://api.bexio.com/2.0/contact/{contact_id} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
{- "success": true
}
This action creates multiple contacts in one request
Accept required | string Example: application/json |
nr | string or null If set to null, the number will be assigned automatically. Must be a number, can also be used as integer |
contact_type_id required | integer Please use the value |
name_1 required | string This field is used as the company name if the field |
name_2 | string or null This field is used as the company addition if the field |
salutation_id | integer or null References a salutation object |
salutation_form | integer or null |
titel_id | integer or null References a title object |
birthday | string or null <date> |
address | string or null |
postcode | string or null |
city | string or null |
country_id | integer or null References a country object |
string or null <email> | |
mail_second | string or null <email> |
phone_fixed | string or null |
phone_fixed_second | string or null |
phone_mobile | string or null |
fax | string or null |
url | string or null |
skype_name | string or null |
remarks | string or null |
language_id | integer or null References a language object |
contact_group_ids | string or null References one ore multiple contact group objects |
contact_branch_ids | string or null References one ore multiple contact sector objects |
user_id required | integer References a user object |
owner_id required | integer |
[- {
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "titel_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1
}
]
[- {
- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32"
}
]
This action restores an archived contact.
contact_id required | integer <int32> Example: 1 the id of the contact |
Accept required | string Example: application/json |
curl -X PATCH \ https://api.bexio.com/2.0/contact/{contact_id}/restore \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
{- "success": true
}
This action fetches a list of all contact relations
order_by | string Default: "id" Enum: "id" "contact_id" "contact_sub_id" "updated_at" Example: order_by=contact_id Defines the order of the results. Multiple sort parameters can be combined by using a comma separator. |
limit | integer <int32> Default: 500 Example: limit=20 Limit the number of results (max is 2000) |
offset | integer <int32> Default: 0 Example: offset=0 Skip over a number of elements by specifying an offset value for the query |
Accept required | string Example: application/json |
curl -X GET \ https://api.bexio.com/2.0/contact_relation \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
[- {
- "id": 1,
- "contact_id": 2,
- "contact_sub_id": 3,
- "description": "",
- "updated_at": "2019-04-08 13:17:32"
}
]
This action creates a new contact relation
Accept required | string Example: application/json |
contact_id required | integer or null References a contact object |
contact_sub_id required | integer or null References a contact object |
description | string or null |
{- "contact_id": 2,
- "contact_sub_id": 3,
- "description": ""
}
{- "id": 4,
- "nr": null,
- "contact_type_id": 1,
- "name_1": "Example Company",
- "name_2": null,
- "salutation_id": 2,
- "salutation_form": null,
- "title_id": null,
- "birthday": null,
- "address": "Smith Street 22",
- "postcode": 8004,
- "city": "Zurich",
- "country_id": 1,
- "mail": "contact@example.org",
- "mail_second": "",
- "phone_fixed": "",
- "phone_fixed_second": "",
- "phone_mobile": "",
- "fax": "",
- "url": "",
- "skype_name": "",
- "remarks": "",
- "language_id": null,
- "is_lead": false,
- "contact_group_ids": "1,2",
- "contact_branch_ids": null,
- "user_id": 1,
- "owner_id": 1,
- "updated_at": "2019-04-08 13:17:32",
- "profile_image": "R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="
}
Search contact relations via query. Please refer to the Search section for detailed instructions.
The following search fields are supported:
contact_id
contact_sub_id
updated_at
order_by | string Default: "id" Enum: "id" "contact_id" "contact_sub_id" "updated_at" Example: order_by=contact_id Defines the order of the results. Multiple sort parameters can be combined by using a comma separator. |
limit | integer <int32> Default: 500 Example: limit=20 Limit the number of results (max is 2000) |
offset | integer <int32> Default: 0 Example: offset=0 Skip over a number of elements by specifying an offset value for the query |
Accept required | string Example: application/json |
field required | string <= 255 characters Field which should be search over |
value required | string <= 255 characters Value to search for |
criteria | string (v2SearchCriteria) Default: "like" Enum: "=" "equal" "!=" "not_equal" ">" "greater_than" ">=" "greater_equal" "<" "less_than" "<=" "less_equal" "like" "not_like" "is_null" "not_null" "in" "not_in" |
[- {
- "field": "search_field",
- "value": "search term",
- "criteria": "="
}
]
[- {
- "id": 1,
- "contact_id": 2,
- "contact_sub_id": 3,
- "description": "",
- "updated_at": "2019-04-08 13:17:32"
}
]
This action fetches a single contact relation
contact_relation_id required | integer <int32> Example: 1 the id of the contact relation |
Accept required | string Example: application/json |
curl -X GET \ https://api.bexio.com/2.0/contact_relation/{contact_relation_id} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
{- "id": 1,
- "contact_id": 2,
- "contact_sub_id": 3,
- "description": "",
- "updated_at": "2019-04-08 13:17:32"
}
This action edits a single contact relation
contact_relation_id required | integer <int32> Example: 1 the id of the contact relation |
Accept required | string Example: application/json |
contact_id required | integer or null References a contact object |
contact_sub_id required | integer or null References a contact object |
description | string or null |
{- "contact_id": 2,
- "contact_sub_id": 3,
- "description": ""
}
{- "id": 1,
- "contact_id": 2,
- "contact_sub_id": 3,
- "description": "",
- "updated_at": "2019-04-08 13:17:32"
}
This action permanently deletes a contact relation. It cannot be undone.
contact_relation_id required | integer <int32> Example: 1 the id of the contact relation |
Accept required | string Example: application/json |
curl -X DELETE \ https://api.bexio.com/2.0/contact_relation/{contact_relation_id} \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
{- "success": true
}
This action fetches a list of all contact groups
order_by | string Default: "id" Enum: "id" "name" Example: order_by=name Defines the order of the results. Multiple sort parameters can be combined by using a comma separator. |
limit | integer <int32> Default: 500 Example: limit=20 Limit the number of results (max is 2000) |
offset | integer <int32> Default: 0 Example: offset=0 Skip over a number of elements by specifying an offset value for the query |
Accept required | string Example: application/json |
curl -X GET \ https://api.bexio.com/2.0/contact_group \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {access-token}'
[- {
- "id": 1,
- "name": "Suppliers"
}
]
This action creates a new contact group
Accept required | string Example: application/json |
name required | string |
{- "name": "Suppliers"
}
{- "id": 1,
- "name": "Suppliers"
}
Search contact groups via query. Please refer to the Search section for detailed instructions.
The following search fields are supported:
name
order_by | string Default: "id" Enum: "id" "name" Example: order_by=name |