create_webhook
Subscribe to webhook notifications from the Approved Platform and receive POST callbacks when invoice flows matching your filters are created or updated.
Instructions
Subscribe to webhook notifications from the Approved Platform.
The AP will POST event payloads to the callback URL whenever a flow matching the specified filters (flow type, direction, processing rule, ack status) is created or updated.
HUMAN-IN-THE-LOOP: Requires user confirmation. Call without confirmation_token first, show the summary to the user, then call again with the token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth_type | No | Authentication type for the callback: BASIC or OAUTH2. | |
| flow_type | Yes | Flow type to subscribe to: CustomerInvoice, SupplierInvoice, CustomerInvoiceLC, SupplierInvoiceLC, AggregatedCustomerTransactionReport, UnitaryCustomerTransactionReport, AggregatedCustomerPaymentReport, UnitaryCustomerPaymentReport, UnitarySupplierTransactionReport, MultiFlowReport, StateInvoice, StateCustomerInvoiceLC, StateSupplierInvoiceLC. | |
| ack_status | No | Optional acknowledgement status filter: Pending, Ok, Error. | |
| auth_user_id | No | User ID for BASIC authentication on the callback URL. | |
| callback_url | Yes | URL the Approved Platform will POST notifications to. Must be HTTPS and reachable from the AP network. | |
| signature_key | No | Base64-encoded signing key for webhook payload verification. | |
| auth_client_id | No | Client ID for OAUTH2 authentication on the callback. | |
| auth_token_url | No | Token URL for OAUTH2 authentication on the callback. | |
| flow_direction | Yes | Direction filter: 'In' for incoming flows (from PDP to OD), 'Out' for outgoing flows (from OD to PDP). | |
| signature_algo | No | Signature algorithm: RS256, HS256, ECDSA, EDDSA_25519, RSA_PSS, EDDSA_448. | |
| processing_rule | No | Optional processing rule filter: B2B, B2BInt, B2C, B2G, etc. | |
| auth_client_secret | No | Client secret for OAUTH2 authentication on the callback. | |
| auth_user_password | No | Password for BASIC authentication on the callback URL. | |
| confirmation_token | No | Confirmation token from a previous call. Omit on the first call; supply on the second call to execute. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||