Skip to main content
Version: 1.0.0

The Webhook object

Webhook

A webhook allows you to automatically receive real-time information from our system. You can get notifications, invoices, or status updates instantly.

Endpoints

POST/v1/config/webhook
PUT/v1/config/webhook/:webhookId
DELETE/v1/config/webhook/:webhookId
GET/v1/config/webhook
GET/v1/config/webhook/:webhookId

Information
All sensitive data in our database are encrypted.

Attributes
webhookIdstring (uuid)

labelstring

interopDataobject

Objects

Oauth2 client credentials authentication

{
"webhookId": "My webhook configuration with client credentials auth",
"label": "My webhook configuration with client credentials auth",
"adapterCode": "standardAdapter",
"interopData": {
"endpoints": {
"status": {
"callbackUrl": "https://myenpoint.com/status"
},
"invoice": {
"callbackUrl": "https://myenpoint.com/invoice"
},
"authentication": {
"oauth2ClientCredentials": {
"callbackUrl": "https://myauthorizationServer.com/auth",
"clientId": "myClientId",
"clientSecret": "myClientSecret"
}
}
}
}
}

Oauth2 password authentication

{
"webhookId": "My webhook configuration with client credentials auth",
"label": "My webhook configuration with client credentials auth",
"adapterCode": "standardAdapter",
"interopData": {
"endpoints": {
"status": {
"callbackUrl": "https://myenpoint.com/status"
},
"invoice": {
"callbackUrl": "https://myenpoint.com/invoice"
},
"authentication": {
"oauth2password": {
"callbackUrl": "https://myauthorizationServer.com/auth",
"clientId": "myClientId",
"username": "myUsername",
"password": "myPassword"
}
}
}
}
}

Basic authentication

{
"filterStreamDirection": "OUTPUT",
"label": "My webhook configuration with basic auth",
"adapterCode": "standardAdapter",
"interopData": {
"endpoints": {
"status": {
"callbackUrl": "https://myenpoint.com/status"
},
"invoice": {
"callbackUrl": "https://myenpoint.com/invoice"
},
"authentication": {
"basic": {
"username": "test",
"password": "myStrongPassword"
}
}
}
}
}

Invoice

Invoice will be sent as multipart metadata with a property file

Status

Status will be sent in this format :

{
"invoiceId": "29d2576d-8408-4248-93b9-ca05251b4ce0",
"status": {
"code": "RECEIVED",
"value": "202",
"desc": "Reçue par la plateforme"
},
"xml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<rsm:CrossDomainAcknowledgementAndResponse xmlns:qdt=\"urn:un:unece:uncefact:data:standard:QualifiedDataType:131\" ...",
"json": {
"category": {
"code": "eInvoicing",
"value": "S1"
},
"context": {
"id": "LC_RECEIVED_STREAM",
"name": "LifeCycle - Reçue par la plateforme",
"date": "2024-07-16T20:44:12Z",
"sender": {
"name": "SERARE",
"siren": "305836033",
"siret": "30583603300160",
"roleCode": {
"code": "BUYER",
"value": "BY",
"desc": "Acheteur"
}
},
"issuer": {
"name": "SERARE",
"siren": "305836033",
"siret": "30583603300160",
"roleCode": {
"code": "BUYER",
"value": "BY",
"desc": "Acheteur"
}
},
"recipients": [
{
"name": "CENTRE DE RHUMATOLOGIE DE L'ODYSSEUM DES DOCTEURS DIDY",
"siren": "325994648",
"siret": "32599464800039",
"roleCode": {
"code": "SUPPLIER",
"value": "SU",
"desc": "Fournisseur (B2B)"
}
}
]
},
"responses": [
{
"documentReference": {
"issuerAssignedId": "F-LTKAPRIdocgmdE",
"typeCode": 380,
"receiptDate": "2024-07-16T20:43:50Z",
"issuerTradeParty": {
"name": "CENTRE DE RHUMATOLOGIE DE L'ODYSSEUM DES DOCTEURS DIDY",
"siren": "325994648",
"siret": "32599464800039",
"roleCode": {
"code": "SUPPLIER",
"value": "SU",
"desc": "Fournisseur (B2B)"
}
}
},
"documentStatus": {
"status": {
"code": "RECEIVED",
"value": "202",
"desc": "Reçue par la plateforme"
},
"details": {
"generatedDate": "2024-07-16T20:44:12Z"
}
}
}
]
}
}