Document Webhook
When a document-related event occurs, the webhook will send a POST request with one of the following JSON payloads:
Standard Document Payload
{
"code": "INV-2023-0042",
"document_type_name": "Commercial Invoice",
"issue_date": "2023-07-05",
"due_date": "2023-08-05",
"partner_code": "PRT-0042",
"customer_code": "CUST-ACME-001",
"region": "SP",
"custom_fields": {
"organization_code": "ORG-BR-001",
"negotiation_type": "30 Days"
},
"companies": ["Acme Corporation"]
}
Protocol Document Payload
{
"code": "Contract-2023-0042",
"protocol": {
"code": "PROT-2023-07-001",
"issue_date": "2023-07-15",
"due_date": "2023-12-31"
},
"document_type_name": "Service Agreement",
"issue_date": "2023-07-10",
"due_date": "2023-12-31",
"partner_code": "PRT-0042",
"customer_code": "CUST-ACME-001",
"region": "SP",
"custom_fields": {
"organization_code": "ORG-BR-001",
"negotiation_type": "Annual Contract"
},
"companies": ["Acme Corporation"]
}
Field Descriptions
code: The document's description/identifierprotocol: Object containing protocol-specific information (only in protocol documents)code: The protocol codeissue_date: Date when the protocol was issueddue_date: Date when the protocol is due
document_type_name: The type/category of the documentissue_date: Date when the document was issueddue_date: Date when the document is duepartner_code: The partner's unique identifier in the ERP systemcustomer_code: The partner's cost center coderegion: Two-letter state abbreviation from the partner's main addresscustom_fields: Object containing additional custom fieldscompanies: Array containing related company names