Where we will expose the our domain URL and port number (at our receiving side) to get incremental data from paybook for existing users?
Is it sequential JSON or all updates together from all credentials?
Example: Will it be like, under credential_create events, x number of updates in last 24 hours.
Or, under credential_update events, y number of updates. Please throw some lights.
Hi @demoprod !
Yo have to expose your domain URL making a POST to /webhooks:
curl --location --request POST 'https://api.syncfy.com/v1/webhooks' \
--header 'Authorization: api_key api_key=<your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
"api_key" : "<your_api_key",
"url" : "<your_exposed_url>",
"events" : ["credential_update"]
}'
And then you’ll get a response like this:
{
"rid": "c23aca2a-cacd-4ee4-8fcf-fcf142cf5181",
"code": 200,
"errors": null,
"status": true,
"message": null,
"response": {
"id_webhook": "5ed09dff3d43591a702f5783",
"id_user": null,
"events": [
"credential_update"
],
"url": "<your_exposed_url>",
"delay": 0,
"dt_created": 1590730239,
"dt_modified": 1594931843
}
}
The webhook notifications seems like this:
{
"endpoints": {
"credential": [
"/v1/credentials/5e793889ea4c5165d46f9811"
]
},
"event": "credential_create",
"id_credential": "5e793889ea4c5165d46f9811",
"id_external": "IXS7607092R5",
"id_job": "5e793889b783081dd61de29c",
"id_job_uuid": "5e793889b783081dd61de29b",
"id_site": "5da784f1f9de2a06483abec1",
"id_site_organization": "56cf4ff5784806152c8b4567",
"id_site_organization_type": "56cf4f5b784806cf028b4569",
"id_user": "5e751d54d0510472295413b3",
"is_executing": 1
}
You receive a notification each time a credential is created or updated.
You can see the diferent types of events here: https://syncfy.com/w/es/sync/public/app/(section:docs/mx/sync/webhooks/events)
Hope this info helps you
1 me gusta