Manage webhooks

A-Cube uses webhooks to notify your systems in real-time when an event happens.

You can manage your webhook configurations via REST API or using the dashboard in the "Webhooks" section.

The main parts needed to configure a webhook are:

  • event : the event that triggers the call to your endpoint
  • target_url : the endpoint that will be called

Requests

All the messages sent to your endpoint are sent with a POST request.

We manage sending the messages to your endpoints with a queue: if your endpoint fails (i.e. we don't get a 2XX response) then the webhook will retry 15 times every 300 seconds with a back-off rate of 1.25 for a total of about 10 hours.

In case the response from your endpoint is a 404 we will NOT retry the request.

Redirects (3XX responses) are NOT followed.

Security

A-Cube always uses an HTTP Signature to sign the requests sent to your endpoint. You can validate the signature using the public key we provide.

Events

Event When it happens
outgoing-document a document has been sent via our Peppol AP
incoming-document an incoming document has been delivered to your account
outgoing-documentincoming-document
Copy
Copied
{
  "success": true|false,
  "document_id": "@uuid@",
  "document_type": "@string@",
  "request_at": "YYYY-MM-DDTHH:MM:SS",
  "response_at": "YYYY-MM-DDTHH:MM:SS",
  "error_code": "@string@" (only present if success is false),
  "error_message": "@string@" (only present if success is false)
}
Copy
Copied
{
  "success": true,
  "document_id": "@uuid@",
  "document_type": "@string@",
  "request_at": "YYYY-MM-DDTHH:MM:SS",
  "response_at": "YYYY-MM-DDTHH:MM:SS"
}