Preamble
APIs allow you to interface your IS with Abraxio to automate processes, retrieve data from Abraxio or integrate data into Abraxio.
API calls are secured using the OAuth2 protocol.
Presentation of the scopes
When creating your API accesses, you can choose to include in your access all or part of the scope to which your subscription gives you the right. Creating a new access therefore necessarily involves choosing associated scopes.
Here is a summary of the scopes available by subscription.
NB: the "/*" indication on an API route means "all routes that start with"
Subscription | Scope | API Routes | Description |
API reporting | dataset.finance.read | - datasets/budgets/*
- datasets/timesheets | List of budgetary exercises, budget lines, archives and orders, orders, invoices |
API reporting | dataset.portfolios.read | - datasets/projects/* | List of projects and their signage |
Transactional APIs | management.read | - collaborators/absences
- timesheets | List of planned absences and details of timesheets entered |
Transactional APIs | management.write | - collaborators/absences | Import of forecast absences for a given month |
Transactional APIs | finance.read | - orders/import | Order import progress status |
Transactional APIs | finance.write | - orders/import | Importing orders |
Creating an API Access
- Step 1 : Go to Admin > Integrations > API
- Step 2 : Click on “ + Add API access ” and enter the access label and the desired scope.
- Step 3: Click on "Save". The registration automatically generates an access token, consisting of the parameter pair (clientId, clientSecret):
- The clientId (similar to a user account) is an identifier shared between the client and Abraxio.
- The clientSecret (similar to a password) is known only to the client.
- Step 4: Copy the secret and keep it safe in a secure space. Once you leave the page, you will not be able to retrieve it.
- Step 5 : Test the API calls by clicking on " Access the test interface ". You will be redirected to a Swagger space allowing you to test the connection string, the available APIs and the associated documentation:
- Click on Authorize, copy the ClientID and Client Secret and check the desired scope(s)
- Click on API /v1/echo to check authentication validation
- Click on an API and fill in the input parameters to examine the exchanged JSON streams
- Step 6 : Implement API calls in your applications.
API Key Management
You can create multiple keys if your architectural and urban planning rules require it.
Deactivation temporarily suspends the validity of access.
Deletion permanently suspends the validity of access.
Managing reminders
- API Access Supervisor : Abraxio user in charge of supervising API access
- Other recipient : additional field in which you can enter an email address in addition to the supervisor
- Expiration reminder period : number of months before expiration from which Abraxio sends an email per week to the supervisor and the other recipient. To cancel the reminder, disable the concerned API access
An API access has a validity period limited to 12 months. At the end, you will need to generate a new access and use it in your API calls.
Management
Absences
List of expected absences
GET /v1/collaborators/absences/{year}/{month}
This API allows you to read forecast absences for a given month.
Settings:
- Year (required)
- Month (required)
- ref (optional): allows you to filter on a collaborator by their reference
- email (optional): allows you to filter a collaborator by their email
If no filter on an employee is passed as a parameter, this method returns the list of employees present during the month with for each the list of expected absences for the month.
Update of forecast absences
PUT /v1/collaborators/absences/{year}/{month}
This API allows you to update an employee's forecast absences for a month.
Settings:
- Year (required)
- Month (required)
The body of the request contains a collaborator identified by his reference or his email and his forecast absences for the month. The API expects an absence value (maximum 1 for an absence over the whole day) per day of the month.
Each day must be unique, if the body of the request contains the same day several times, the last value will be retained
This route works by "cancel and replace", that is, it expects to receive the employee's complete forecast absence situation for the month in order to replace what is currently known in Abraxio.
Timesheets
List of timesheets
GET /v1/timesheets/{year}/{month}
This API allows the retrieval of Abraxio timesheet details.
Input parameters:
- Year (required)
- Month (required)
- Status (optional): if not specified, returns all timesheets
Finance
Orders
Importing a batch of orders to integrate
POST /v1/orders/import
This API allows you to import a batch of orders to integrate.
Setting :
- allowDirectIntegration (boolean): if this parameter is true, orders whose all lines are recognized will be directly integrated into the budget
The body of the request contains a list of commands to import and returns an import batch ID.
Limitations: A query can contain a maximum of 100 orders and an order has a maximum of 10 lines
GET /v1/orders/import/{id}
This API allows you to obtain the progress status of a batch import. It takes as a parameter a batch identifier returned by the import POST request.
For each order in the batch, it returns:
- The content of the import request
- The import status of the order:
- Rejected
- To be integrated
- Integrated
- A list of error and warning messages from the import