Webhooks

Update a webhook subscription

Changed on

This endpoint allows you to update a webhook subscription by ID.

put/api/external/v2/webhook_subscriptions/{id}

Request

  • Base URL
    https://app.pennylane.com
  • URL
    https://app.pennylane.com/api/external/v2/webhook_subscriptions/{id}
  • Auth
    OAuth 2
    Authorization code: https://app.pennylane.com/oauth/authorize
    Token URL: https://app.pennylane.com/oauth/oauth/token

Path parameters

idinteger required

ID of the webhook subscription

Request body

callback_urlstring uri

HTTPS URL where webhook events will be sent

eventsstring[]

Array of event types to subscribe to.

  • customer_invoice.e_invoicing_status_updated: the event is triggered when a customer invoice e-invoicing status is updated.
  • dms_file.created: the event is triggered when a dms file is created.
  • supplier_invoice.e_invoicing_received: the event is triggered when a supplier e-invoice is received via the Pennylane PA (Plateforme Agrée).
enabledboolean

Indicates whether the webhook subscription is active

Example request

{
  "callback_url": "https://example.com/webhooks",
  "events": [
    "dms_file.created",
    "customer_invoice.e_invoicing_status_updated",
    "supplier_invoice.e_invoicing_received"
  ]
}

Response

Returns the updated webhook subscription

idinteger required

ID of the webhook subscription

callback_urlstring uri required

HTTPS URL where webhook events are sent

eventsstring[] required

Array of event types to subscribe to.

  • customer_invoice.e_invoicing_status_updated: the event is triggered when a customer invoice e-invoicing status is updated.
  • dms_file.created: the event is triggered when a dms file is created.
  • supplier_invoice.e_invoicing_received: the event is triggered when a supplier e-invoice is received via the Pennylane PA (Plateforme Agrée).
enabledboolean required

Indicates whether the webhook subscription is active

disabled_atstring date-time nullable required

Timestamp when the subscription was disabled

disabled_reason'permanent_error' | 'repeated_failure' | 'manual' nullable required

Reason the subscription was disabled.

  • permanent_error: disabled due to a permanent delivery error (HTTP 401, 403, 404, or 410).
  • repeated_failure: disabled after repeated delivery failures over a sustained period.
  • manual: disabled manually via the API.
last_failure_statusinteger nullable required

HTTP status code of the last failed delivery attempt

last_failure_atstring date-time nullable required

Timestamp of the last failed delivery attempt

consecutive_failuresinteger required

Number of consecutive delivery failures since the last successful delivery

created_atstring date-time required

Creation date of the webhook subscription

updated_atstring date-time required

Last update date of the webhook subscription

Example response

{
  "id": 12345,
  "callback_url": "https://example.com/webhooks",
  "events": [
    "dms_file.created",
    "customer_invoice.e_invoicing_status_updated",
    "supplier_invoice.e_invoicing_received"
  ],
  "enabled": true,
  "disabled_at": "2023-08-07T14:23:12.000Z",
  "last_failure_status": 500,
  "last_failure_at": "2023-08-07T14:23:12.000Z",
  "consecutive_failures": 3,
  "created_at": "2023-08-07T14:23:12.000Z",
  "updated_at": "2023-08-07T14:23:12.000Z"
}

Changes

    • warning

      added the new supplier_invoice.e_invoicing_received enum value to the / response property for the response status

    • info

      api tag Webhooks added

    • info

      api tag Hidden removed

    • info

      added the new supplier_invoice.e_invoicing_received enum value to the request property /