This article deals with the HTTP synchronization which is the generic synchronization solution offers by Figgo webservice.
The HTTP synchronization allows you to send leave information to an external software in case we do not provide a dedicated connector (see available connectors).
The message will be sent like below :
- Verb: POST
- URL provided by you
- the payload
You can decide which events you want to synchronize :
- all events (pending approval leave, approved leave, deleted leave)
- approved leave only
The header contains the following fields :
Authorization, which is the authorization key you need to provide
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
X-Version : payload format version (provides by Figgo)
X-Resource-Type : object type (leave is the only object currently available)
X-Event : event type (created, approved, deleted)
You need to provide the URL to be called when an event occurs.
Leave are sent by half days, named leaves.
For a 2 days leave, the payload contains 4 leaves.
Payload example :
"Congés payés 2018"
: "Congés payés"
Payload value details :
id : unique identifier of the leave
date : leave date
isAM : half day (AM: true, PM: false)
- id : Figgo leave account ID
- name : Account name
- categoryId : Account category ID
- categoryName : Account category name
durationInHours : leave duration if the account is in hours (ex: "03:45:00")
- isConfirmed : approval state of the leave
creationDate : creation date
- isCancelled : cancellation state of the leave
cancellationDate : cancellation date
Life cycle of a leave
The following illustration give the status of a leave according to the actions performed in Figgo.
Sent events can be followed from the webervice interface in Figgo.
For each event, you can see the message details, force the synchro manually in case of error, or flag the event as "treated".
Failures are displaid in the admin "to do list" dashboard, if the admin has the right to see the webservcie interface.
In case of failure, the event is sent in a queue to be retried. First try after 5min, next one after 15min, then 1 hours and then 24h.