Vic.ai Webhook Events API

These are the `V1` events you can subscribe to. These will be sent as a `POST` to `https://yourCallbackUrl/events`. * `all` - This is a special form, that specifies that you want all events sent to your webhook. Usage is not recommended in production. * [`invoice_approved`](#invoice-approved) * [`invoice_deleted`](#invoice-deleted) * [`invoice_post`](#invoice-post) * [`invoice_posted`](#invoice-posted) * [`invoice_rejected`](#invoice-rejected) * [`invoice_restored`](#invoice-restored) * [`invoice_submitted`](#invoice-submitted) * [`invoice_transfer`](#invoice-transfer) * [`invoice_updated`](#invoice-updated) * [`payment_batch_processed`](#payment-batch-processed) * [`payment_status_updated`](#payment-status-updated) * [`credit_status_updated`](#credit-status-updated) * [`purchase_order_created`](#purchase-order-created) * [`purchase_order_deleted`](#purchase-order-deleted) * [`purchase_order_updated`](#purchase-order-updated) * [`vendor_created`](#vendor-created) * [`vendor_onboarding_form_completed`](#vendor-onboarding-form-completed) * [`vendor_updated`](#vendor-updated) The following `V0` events may be specified. They will be sent to the original callback paths where the event name was in the path. * `vendorNew` - `POST` `https://yourCallbackUrl/vendorNew` * `invoicePost` - `POST` `https://yourCallbackUrl/invoicePost` * `invoiceTransfer` - `POST` `https://yourCallbackUrl/invoiceTransfer` * `syncRequest` - `POST` `https://yourCallbackUrl/syncRequest` ### Performance Considerations Avoid using `"all"` as your subscription event type in production environment. Instead, create specific subscriptions for individual event types that your system can handle efficiently. ### Event Details The newer webhook endpoints will be sent to `https://yourCallbackUrl/events`. The receiver is expected to handle everything asynchronously via this method. We do not parse the response body and will ignore it. * All `2XX` responses will be treated as successful. * `401`, `403`, `429` responses will be treated as failures and retried with a linear backoff with jitter. Once retries have been exhausted, the event is discarded. * All other `4XX` responses will be treated as successful. If something is to be rejected, you will need to make the appropriate calls to the Vic API to complete the asynchronous handshake. Example: confirming or rejecting an invoice post. * All `5XX` responses will be treated as a failure and retried with a linear backoff with jitter. Once retries have been exhausted, the event is discarded. * Failed events will be attempted up to 5 times (1 initial attempt + up to 4 retries). > **NOTE**: The integrating system has 15 seconds to respond. After the time has > passed it will be considered a failure, and a retry will be sent for events > going to `https://yourCallbackUrl/events`. The general structure of the webhook event will be as follows. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "the_event_name", "data": { "id": "123", "something": "value" } } ``` There will be a top-level field `event` that describes what the type of event is. There will also be a `data` envelope that will contain the data for the event. ### Invoice Approved This event is emitted from the Vic system when an invoice has been approved. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_approved", "data": { "totalAmount": "3.00", "totalVatAmount": "0.00", "amountWithoutTax": "1.00", "amountTax": "1.00", "amountNet": "1.00", "amountVat": "0.00", "amountSum": "3.00", "amountFreight": "1.00", "transactionType": "INVOICE", "refNumber": "INV-1231123", "poNumber": "PO-1231123", "description": "Invoice for the month of April", "currency": "USD", "fields": [ { "label": "custom:technician", "title": "Technician", "type": "text", "value": "John Doe" } ], "language": "en", "issueDate": "2019-08-24", "glDate": "2019-08-24", "dueDate": "2019-08-24", "paymentInfo": { "bankAccountNum": "1234567890", "bankCode": "1234567890", "paymentTerm": { "count": 30, "unit": "DAYS" }, "defaultMethod": "BANKACCOUNT" }, "internalId": "123", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "externalUpdatedAt": "2019-08-24T14:15:22Z", "paymentTerm": { "count": 0, "unit": "DAYS" }, "paymentRef": "string", "vendorInternalId": "47", "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "orgNumber": "string", "countryCode": "US", "name": "string" }, "lineItems": [ { "index": 1, "amountTax": "1.00", "amountNet": "1.00", "amountSum": "1.00", "amountFreight": "1.00", "description": "string", "comment": "string", "billable": true, "invoiceLineItemInfo": { "vatCode": "string", "vatAmount": 0, "vatRate": "1.00" }, "taxCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "description": "Tax code description", "rate": "0.25" }, "costAccount": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "number": "string" }, "dimensions": [ { "name": "string", "type": "string", "typeName": "string", "typeExternalId": "string", "shortName": "string", "externalData": {}, "displayName": "string", "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154" } ], "quantityInvoiced": "string", "lineItemTotal": "1.00", "lineType": "item", "poLineNumber": 0, "poNumber": "string", "poItemsMatched": [ { "invoiceItemId": "string", "purchaseOrderItemId": "string", "productNumber": "6512-41473", "unitOfMeasure": "kg", "amountMatched": "1.0", "quantityMatched": "1.0" } ], "unitPrice": "1.00", "number": "123456", "lineFields": [ { "label": "custom:serial_number", "title": "Serial Number", "type": "text", "value": "12-34540-1235" } ] } ], "postingError": null, "documentUrl": "http://example.com/invoice.pdf", "status": "NOT_READY", "bolNumbers": [], "selfAssessedUseTaxAmount": null, "selfAssessedUseTaxAccount": null, "markedAs": "PAID", "billStatus": "PAID", "externalPaymentDate": null, "externalPaymentNumber": null, "externalPaymentStatus": null } } ``` ### Invoice Deleted This event is emitted from the Vic system when an invoice has been deleted. The payload for this event is sparse. It only contains the `internalId` and `externalId` of the invoice. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_deleted", "data": { "internalId": "123", "externalId": "I0001" } } ``` ### Invoice Post This event is emitted from the Vic system when an accountant wants to post an invoice to the ERP. This is a signal that the invoice is ready to be posted. The integrating system is expected to respond and either confirm or reject the post. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. Unlike the old `/invoicePost` event, this will not be a multipart event. You will be able to fetch the invoice pdf from the provided `documentUrl` in the payload. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc04835310", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_post", "data": { "totalAmount": "3.00", "totalVatAmount": "0.00", "amountWithoutTax": "1.00", "amountTax": "1.00", "amountNet": "1.00", "amountVat": "0.00", "amountSum": "3.00", "amountFreight": "1.00", "transactionType": "INVOICE", "refNumber": "INV-1231123", "poNumber": "PO-1231123", "description": "Invoice for the month of April", "currency": "USD", "fields": [ { "label": "custom:technician", "title": "Technician", "type": "text", "value": "John Doe" } ], "language": "en", "issueDate": "2019-08-24", "glDate": "2019-08-24", "dueDate": "2019-08-24", "paymentInfo": { "bankAccountNum": "1234567890", "bankCode": "1234567890", "paymentTerm": { "count": 30, "unit": "DAYS" }, "defaultMethod": "BANKACCOUNT" }, "internalId": "123", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "externalUpdatedAt": "2019-08-24T14:15:22Z", "paymentTerm": { "count": 0, "unit": "DAYS" }, "paymentRef": "string", "vendorInternalId": "47", "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "orgNumber": "string", "countryCode": "US", "name": "string" }, "lineItems": [ { "index": 1, "amountTax": "1.00", "amountNet": "1.00", "amountSum": "1.00", "amountFreight": "1.00", "description": "string", "comment": "string", "billable": true, "invoiceLineItemInfo": { "vatCode": "string", "vatAmount": 0, "vatRate": "1.00" }, "taxCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "description": "Tax code description", "rate": "0.25" }, "costAccount": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "number": "string" }, "dimensions": [ { "name": "string", "type": "string", "typeName": "string", "typeExternalId": "string", "shortName": "string", "externalData": {}, "displayName": "string", "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154" } ], "quantityInvoiced": "string", "lineItemTotal": "1.00", "lineType": "item", "poLineNumber": 0, "poNumber": "string", "poItemsMatched": [ { "invoiceItemId": "string", "purchaseOrderItemId": "string", "productNumber": "6512-41473", "unitOfMeasure": "kg", "amountMatched": "1.0", "quantityMatched": "1.0" } ], "unitPrice": "1.00", "number": "123456", "lineFields": [ { "label": "custom:serial_number", "title": "Serial Number", "type": "text", "value": "12-34540-1235" } ] } ], "postingError": null, "documentUrl": "http://example.com/invoice.pdf", "status": "NOT_READY", "bolNumbers": [], "selfAssessedUseTaxAmount": null, "selfAssessedUseTaxAccount": null, "markedAs": "PAID", "billStatus": "PAID", "externalPaymentDate": null, "externalPaymentNumber": null, "externalPaymentStatus": null } } ``` ### Invoice Posted This event is emitted from the Vic system when an invoice has been posted to the ERP successfully. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_posted", "data": { "totalAmount": "3.00", "totalVatAmount": "0.00", "amountWithoutTax": "1.00", "amountTax": "1.00", "amountNet": "1.00", "amountVat": "0.00", "amountSum": "3.00", "amountFreight": "1.00", "transactionType": "INVOICE", "refNumber": "INV-1231123", "poNumber": "PO-1231123", "description": "Invoice for the month of April", "currency": "USD", "fields": [ { "label": "custom:technician", "title": "Technician", "type": "text", "value": "John Doe" } ], "language": "en", "issueDate": "2019-08-24", "glDate": "2019-08-24", "dueDate": "2019-08-24", "paymentInfo": { "bankAccountNum": "1234567890", "bankCode": "1234567890", "paymentTerm": { "count": 30, "unit": "DAYS" }, "defaultMethod": "BANKACCOUNT" }, "internalId": "123", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "externalUpdatedAt": "2019-08-24T14:15:22Z", "paymentTerm": { "count": 0, "unit": "DAYS" }, "paymentRef": "string", "vendorInternalId": "47", "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "orgNumber": "string", "countryCode": "US", "name": "string" }, "lineItems": [ { "index": 1, "amountTax": "1.00", "amountNet": "1.00", "amountSum": "1.00", "amountFreight": "1.00", "description": "string", "comment": "string", "billable": true, "invoiceLineItemInfo": { "vatCode": "string", "vatAmount": 0, "vatRate": "1.00" }, "taxCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "description": "Tax code description", "rate": "0.25" }, "costAccount": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "number": "string" }, "dimensions": [ { "name": "string", "type": "string", "typeName": "string", "typeExternalId": "string", "shortName": "string", "externalData": {}, "displayName": "string", "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154" } ], "quantityInvoiced": "string", "lineItemTotal": "1.00", "lineType": "item", "poLineNumber": 0, "poNumber": "string", "poItemsMatched": [ { "invoiceItemId": "string", "purchaseOrderItemId": "string", "productNumber": "6512-41473", "unitOfMeasure": "kg", "amountMatched": "1.0", "quantityMatched": "1.0" } ], "unitPrice": "1.00", "number": "123456", "lineFields": [ { "label": "custom:serial_number", "title": "Serial Number", "type": "text", "value": "12-34540-1235" } ] } ], "postingError": null, "documentUrl": "http://example.com/invoice.pdf", "status": "NOT_READY", "bolNumbers": [], "selfAssessedUseTaxAmount": null, "selfAssessedUseTaxAccount": null, "markedAs": "PAID", "billStatus": "PAID", "externalPaymentDate": null, "externalPaymentNumber": null, "externalPaymentStatus": null } } ``` ### Invoice Rejected This event is emitted from the Vic system when an invoice has been rejected during the approval process. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. The structure is identical to `invoice_approved` — refer to that event for the full payload example. ### Invoice Restored This event is emitted from the Vic system when a previously deleted invoice has been restored. It is the counterpart to `invoice_deleted`: subscribing to both lets you distinguish an invoice that was deleted, restored, and deleted again from a genuinely duplicated delete. The payload for this event is sparse — it contains only the `internalId` and `externalId` of the invoice. ```json { "id": "b8ebf9e1-9cbb-8b4e-996f-b8fd25946829", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_restored", "data": { "internalId": "123", "externalId": "I0001" } } ``` ### Invoice Submitted This event is emitted from the Vic system when an invoice has been submitted for processing. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. The structure is identical to `invoice_approved` — refer to that event for the full payload example. ### Invoice Transfer This event is emitted from the Vic system when an accountant wants to transfer an invoice to the ERP. This is a signal that the invoice is ready to be transferred. The integrating system is expected to respond and either confirm or reject the transfer. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "invoice_transfer", "data": { "totalAmount": "3.00", "totalVatAmount": "0.00", "amountWithoutTax": "1.00", "amountTax": "1.00", "amountNet": "1.00", "amountVat": "0.00", "amountSum": "3.00", "amountFreight": "1.00", "transactionType": "INVOICE", "refNumber": "INV-1231123", "poNumber": "PO-1231123", "description": "Invoice for the month of April", "currency": "USD", "fields": [ { "label": "custom:technician", "title": "Technician", "type": "text", "value": "John Doe" } ], "language": "en", "issueDate": "2019-08-24", "glDate": "2019-08-24", "dueDate": "2019-08-24", "paymentInfo": { "bankAccountNum": "1234567890", "bankCode": "1234567890", "paymentTerm": { "count": 30, "unit": "DAYS" }, "defaultMethod": "BANKACCOUNT" }, "internalId": "123", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "externalUpdatedAt": "2019-08-24T14:15:22Z", "paymentTerm": { "count": 0, "unit": "DAYS" }, "paymentRef": "string", "vendorInternalId": "47", "vendorExternalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "orgNumber": "string", "countryCode": "US", "name": "string" }, "lineItems": [ { "index": 1, "amountTax": "1.00", "amountNet": "1.00", "amountSum": "1.00", "amountFreight": "1.00", "description": "string", "comment": "string", "billable": true, "invoiceLineItemInfo": { "vatCode": "string", "vatAmount": 0, "vatRate": "1.00" }, "taxCode": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "code": "string", "description": "Tax code description", "rate": "0.25" }, "costAccount": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "number": "string" }, "dimensions": [ { "name": "string", "type": "string", "typeName": "string", "typeExternalId": "string", "shortName": "string", "externalData": {}, "displayName": "string", "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154" } ], "quantityInvoiced": "string", "lineItemTotal": "1.00", "lineType": "item", "poLineNumber": 0, "poNumber": "string", "poItemsMatched": [ { "invoiceItemId": "string", "purchaseOrderItemId": "string", "productNumber": "6512-41473", "unitOfMeasure": "kg", "amountMatched": "1.0", "quantityMatched": "1.0" } ], "unitPrice": "1.00", "number": "123456", "lineFields": [ { "label": "custom:serial_number", "title": "Serial Number", "type": "text", "value": "12-34540-1235" } ] } ], "postingError": null, "documentUrl": "http://example.com/invoice.pdf", "status": "NOT_READY", "bolNumbers": [], "selfAssessedUseTaxAmount": null, "selfAssessedUseTaxAccount": null, "markedAs": "PAID", "billStatus": "PAID", "externalPaymentDate": null, "externalPaymentNumber": null, "externalPaymentStatus": null } } ``` ### Invoice Updated This event is emitted from the Vic system when an invoice has been updated. The payload for this event matches almost exactly what you will receive in the `getInvoice` operation. The structure is identical to `invoice_approved` — refer to that event for the full payload example. ### Purchase Order Created This event is emitted from the Vic system when a purchase order has been created. The payload for this event matches almost exactly what you will receive in the `getPurchaseOrder` operation. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "purchase_order_created", "data": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154", "name": "Acme Corporation", "email": "vendor@acme.com", "description": "They sell anvils", "phone": "555-555-5555", "addressStreet": "123 Main Street\nSuite 100", "addressCity": "Springfield", "addressState": "IL", "addressPostalCode": "62701", "countryCode": "US", "currency": "USD", "confirmedAt": "2019-08-24T14:15:22Z", "state": "CONFIRMED", "taxInfo": { "taxId": "11-1234567", "is1099vendor": false, "orgNumber": null }, "defaultPaymentInfo": null, "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "poMatchingDocumentLevel": false, "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d", "tags": [], "externalData": {}, "errors": [] }, "internalUpdatedAt": "2019-08-24T14:15:22Z", "issuedOn": "2019-08-24", "createdOn": "2019-08-24", "poNumber": "string", "deliverOn": "2019-08-24", "amount": "1.00", "currencyId": "USD", "status": "open", "matchingType": "document", "type": "blanket", "description": "string", "lineItems": [ { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "productNumber": "string", "productDescription": "string", "unitOfMeasure": "kg", "quantityAccepted": "1.0", "quantityRequested": "1.0", "quantityReceived": "1.0", "matchingType": "two_way", "unitAmount": "1.00", "lineItemTotal": "1.00", "lineNumber": 1, "dimensions": [ { "internalId": "1234", "externalId": "D0123148", "name": "project - the big one", "typeExternalId": "project" } ], "invoiceItemsMatched": [ { "invoiceItemId": "123", "purchaseOrderItemId": "6bde599d-3b7e-497c-ab91-1594a2efcdab", "unitOfMeasure": "kg", "amountMatched": "123.34", "quantityMatched": "1.0" } ], "memo": "string", "status": "open" } ], "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b" } } ``` ### Purchase Order Updated This event is emitted from the Vic system when a purchase order has been updated. The payload for this event matches almost exactly what you will receive in the `getPurchaseOrder` operation. This event is a snapshot of the purchase order at the time of the event. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "purchase_order_updated", "data": { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "vendor": { "internalId": "47", "internalUpdatedAt": "2019-08-24T14:15:22Z", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "externalUpdatedAt": "2021-06-29T17:20:53.154", "name": "Acme Corporation", "email": "vendor@acme.com", "description": "They sell anvils", "phone": "555-555-5555", "addressStreet": "123 Main Street\nSuite 100", "addressCity": "Springfield", "addressState": "IL", "addressPostalCode": "62701", "countryCode": "US", "currency": "USD", "confirmedAt": "2019-08-24T14:15:22Z", "state": "CONFIRMED", "taxInfo": { "taxId": "11-1234567", "is1099vendor": false, "orgNumber": null }, "defaultPaymentInfo": null, "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "poMatchingDocumentLevel": false, "vendorGroupId": "c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d", "tags": [], "externalData": {}, "errors": [] }, "internalUpdatedAt": "2019-08-24T14:15:22Z", "issuedOn": "2019-08-24", "createdOn": "2019-08-24", "poNumber": "string", "deliverOn": "2019-08-24", "amount": "1.00", "currencyId": "USD", "status": "open", "matchingType": "document", "type": "blanket", "description": "string", "lineItems": [ { "internalId": "string", "externalId": "21b31bc7-1267-4335-893c-d7fe4706a238", "productNumber": "string", "productDescription": "string", "unitOfMeasure": "kg", "quantityAccepted": "1.0", "quantityRequested": "1.0", "quantityReceived": "1.0", "matchingType": "two_way", "unitAmount": "1.00", "lineItemTotal": "1.00", "lineNumber": 1, "dimensions": [ { "internalId": "1234", "externalId": "D0123148", "name": "project - the big one", "typeExternalId": "project" } ], "invoiceItemsMatched": [ { "invoiceItemId": "123", "purchaseOrderItemId": "6bde599d-3b7e-497c-ab91-1594a2efcdab", "unitOfMeasure": "kg", "amountMatched": "123.34", "quantityMatched": "1.0" } ], "memo": "string", "status": "open" } ], "paymentTermId": "80b25998-53d5-4563-abd4-ea6566e3cf2b" } } ``` ### Purchase Order Deleted This event is emitted from the Vic system when a purchase order has been deleted. The payload for this event is sparse. It only contains the `internalId` and `externalId` of the purchase order. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "purchase_order_deleted", "data": { "internalId": "4c029f1b-f87f-4a05-a511-8cda223dad2a", "externalId": "12345" } } ``` ### Payment Batch Processed This event is emitted from the Vic system when a batch of payments has been sent to the payment processor and a successful response has been obtained. The payload for this event matches almost exactly what you will receive in the `getPaymentBatch` operation. Only approved credits and payments will be emitted with the event. Voided and rejected payments will not be sent. If you need these values, you should call `getPaymentBatch` in order to fetch them. Here is an example of an $200 invoice being paid in full with a $20 credit note being applied. This will bring the total batch payment to $180. The credit note applied is not subtracted from the payment in this breakdown because ERPs typically need entries of the payment being applied and the credit note being used in conjunction with that credit note. ```json { "id": "a7dae8d0-8bsa-7a3d-882f-a7fc14835719", "event": "payment_batch_processed", "occurred_at": "2025-04-04T14:34:55.123Z", "data": { "id": "f1c2384f-57d8-41fe-afa6-17caf62b2a3f", "name": "Batch 2023-10-01 001", "processedAt": "2023-10-01T19:12:00Z", "approvedAt": "2023-10-01T19:12:00Z", "rejectedAt": null, "voidedAt": null, "status": "approved", "companyId": "123", "payments": [ { "id": "edb3a624-9f12-4cd8-adb8-4d9a5ec0b48b", "amount": "200.00", "settlementAmount": "200.00", "settlementCurrencyId": "USD", "exchangeRate": "1.0", "discountAmount": "0.00", "currencyId": "USD", "status": "approved", "voidedAt": null, "rejectedAt": null, "approvedAt": "2023-10-01T19:12:00Z", "fundedAt": null, "costAccount": { "internalId": "1", "externalId": "cost-account-id-in-erp" }, "invoice": { "internalId": "876", "externalId": "invoice-id-in-erp", "refNumber": "INV-123456" }, "vendor": { "internalId": "409", "externalId": "vendor-id-in-erp" }, } ], "credits": [ { "id": "091f257a-9b6e-4797-bcb6-ccd36dda260f", "amount": "20.00", "settlementAmount": "20.00", "settlementCurrencyId": "USD", "exchangeRate": "1.0", "discountAmount": "0.00", "currencyId": "USD", "status": "approved", "voidedAt": null, "rejectedAt": null, "approvedAt": "2023-10-01T19:12:00Z", "fundedAt": null, "costAccount": { "internalId": "1", "externalId": "cost-account-id-in-erp" }, "invoice": { "internalId": "900", "externalId": "credit-note-id-in-erp", "refNumber": "CRN-123456" }, "vendor": { "internalId": "409", "externalId": "vendor-id-in-erp" }, } ] } } ``` ### Payment Status Updated This event is emitted when a payment you were previously notified about reaches a terminal outcome. For now it is sent only for negative outcomes (`failed`, `returned` and `voided`) and may be extended to other statuses later, so read `data.status` rather than assuming the outcome. Use it to keep your own system in sync without polling. Credits have their own [`credit_status_updated`](#credit-status-updated) event. * `data` is the payment itself, in the same shape the `getPaymentBatch` operation returns, flattened directly onto `data` (plus `batchId`). * `data.status` is the outcome that fired (`failed`, `returned` or `voided`). It overrides the payment's own status, so a returned payment reads `returned` here even though its underlying status may be `funded`. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "payment_status_updated", "data": { "status": "failed", "batchId": "f1c2384f-57d8-41fe-afa6-17caf62b2a3f", "id": "edb3a624-9f12-4cd8-adb8-4d9a5ec0b48b", "amount": "200.00", "currencyId": "USD", "failedAt": "2023-10-02T08:00:00Z", "failedReason": "insufficient_funds", "invoice": { "internalId": "876", "externalId": "invoice-id-in-erp", "refNumber": "INV-123456" }, "vendor": { "internalId": "409", "externalId": "vendor-id-in-erp" } } } ``` ### Credit Status Updated This event mirrors [`payment_status_updated`](#payment-status-updated) for credits. It is emitted when a credit you were previously notified about reaches a terminal outcome (currently `failed`, `returned` or `voided`). * `data` is the credit itself, in the same shape the `getPaymentBatch` operation returns, flattened directly onto `data` (plus `batchId`). * `data.status` is the outcome that fired (`failed`, `returned` or `voided`), overriding the credit's own status. ```json { "id": "b1e9c7d2-4a3f-7b1e-995a-c2fd25946832", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "credit_status_updated", "data": { "status": "voided", "batchId": "f1c2384f-57d8-41fe-afa6-17caf62b2a3f", "id": "091f257a-9b6e-4797-bcb6-ccd36dda260f", "amount": "20.00", "currencyId": "USD", "voidedAt": "2023-10-02T08:00:00Z", "invoice": { "internalId": "900", "externalId": "credit-note-id-in-erp", "refNumber": "CRN-123456" }, "vendor": { "internalId": "409", "externalId": "vendor-id-in-erp" } } } ``` ### Vendor Onboarding Form Completed This event is emitted from the Vic system when a vendor completes their onboarding form submission. The payload includes the full vendor details along with the specific completed onboarding form, its items, and all responses. This event is useful for integrations that need to capture vendor onboarding information, validate submitted data, or trigger follow-up processes in external systems when vendors complete their onboarding. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835718", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "vendor_onboarding_form_completed", "data": { "vendor": { "id": "550e8400-e29b-41d4-a716-446655440000", "legacy_id": "12345", "name": "Acme Corporation", "legal_name": "Acme Corporation Inc.", "doing_business_as": "Acme Supply Co", "email": "vendor@acme.com", "description": "Office supplies vendor", "phone": "+1-555-123-4567", "address_street_1": "123 Main Street", "address_street_2": "Suite 100", "address_city": "Springfield", "address_state": "IL", "address_postal_code": "62701", "country_code": "US", "currency": "USD", "org_number": "123456789", "tax_id": "12-3456789", "tax_id_type": "ein", "track_1099": false, "confirmed_at": "2025-04-04T14:30:00Z", "state": "pending", "remote_id": "vendor-ext-123", "remote_updated_at": "2025-04-04T14:30:00Z", "remote_data": null, "remote_errors": null, "payment_term_id": "80b25998-53d5-4563-abd4-ea6566e3cf2b", "po_matching_document_level": false, "vendor_group_id": null, "updated_at": "2025-04-04T14:30:00Z", "ofac_status": "cleared", "ofac_report": { "id": "ad158953-172d-44dd-aaf0-a61882c792d0", "high_risk_hits": 0, "medium_risk_hits": 0, "low_risk_hits": 0, "total_hits": 0, "risk_level": "low", "matches": [], "created_at": "2025-04-04T14:25:00Z" }, "banking_info": [ { "id": "7c5e8400-e29b-41d4-a716-446655440001", "kind": "ach", "account_number": "123456789", "is_primary": true } ], "tags": [ { "id": "9f3a8400-e29b-41d4-a716-446655440002", "value": "preferred-vendor" } ] }, "form": { "id": "b2c4e8d0-8baa-7a3d-885f-a7fc14835720", "status": "submitted", "template_version_id": "d5f7a2b1-9cde-4f6g-7h8i-9j0k1l2m3n4o", "inserted_at": "2025-04-01T10:00:00Z", "updated_at": "2025-04-04T14:30:00Z", "items": [ { "id": "c3d5f9e1-9cba-8b4e-996g-b8gd25946831", "type": "text", "required": true, "order": 1, "value": "Acme Corporation", "date_value": null, "question": { "id": "e6g8h0f2-0deb-9c5f-007h-c9he36057942", "label": "What is your business name?", "type": "text", "required": true, "placeholder": "Enter your business name", "max_length": 255, "validation": null, "min_selection": null, "max_selection": null, "rows": null, "available_options": [] }, "options": [] }, { "id": "d4e6g0f2-0dcb-9c5f-007h-c9he36057943", "type": "email", "required": true, "order": 2, "value": "contact@acme.com", "date_value": null, "question": { "id": "f7h9i1g3-1edc-0d6g-118i-d0if47168053", "label": "Primary contact email", "type": "email", "required": true, "placeholder": "email@example.com", "max_length": null, "validation": null, "min_selection": null, "max_selection": null, "rows": null, "available_options": [] }, "options": [] }, { "id": "e5f7h1g3-1edc-0d6g-118i-d0if47168054", "type": "date", "required": false, "order": 3, "value": null, "date_value": "2025-01-15", "question": { "id": "g8i0j2h4-2fed-1e7h-229j-e1jg58279164", "label": "When did you incorporate?", "type": "date", "required": false, "placeholder": null, "max_length": null, "validation": null, "min_selection": null, "max_selection": null, "rows": null, "available_options": [] }, "options": [] }, { "id": "f6g8i2h4-2fed-1e7h-229j-e1jg58279165", "type": "radio", "required": true, "order": 4, "value": null, "date_value": null, "question": { "id": "h9j1k3i5-3gfe-2f8i-330k-f2kh69380275", "label": "Are you a registered business?", "type": "radio", "required": true, "placeholder": null, "max_length": null, "validation": null, "min_selection": null, "max_selection": null, "rows": null, "available_options": [ { "id": "i0k2l4j6-4hgf-3g9j-441l-g3li70491386", "value": "Yes", "order": 1, "allow_custom": false }, { "id": "j1l3m5k7-5ihg-4h0k-552m-h4mj81502497", "value": "No", "order": 2, "allow_custom": false } ] }, "options": [ { "id": "g7h9j3i5-3gfe-2f8i-330k-f2kh69380276", "value": "Yes", "custom": null, "order": 1, "selected_option": { "id": "i0k2l4j6-4hgf-3g9j-441l-g3li70491386", "value": "Yes", "allow_custom": false } } ] }, { "id": "h8i0k4j6-4hgf-3g9j-441l-g3li70491387", "type": "checkbox", "required": false, "order": 5, "value": null, "date_value": null, "question": { "id": "j1l3m5k7-5ihg-4h0k-552m-h4mj81502497", "label": "Which certifications do you have?", "type": "checkbox", "required": false, "placeholder": null, "max_length": null, "validation": null, "min_selection": 1, "max_selection": null, "rows": null, "available_options": [ { "id": "k2m4n6l8-6jih-5i1l-663n-i5nk92613508", "value": "ISO 9001", "order": 1, "allow_custom": false }, { "id": "l3n5o7m9-7kji-6j2m-774o-j6ol03724619", "value": "ISO 14001", "order": 2, "allow_custom": false }, { "id": "m4o6p8n0-8lkj-7k3n-885p-k7pm14835730", "value": "ISO 27001", "order": 3, "allow_custom": false } ] }, "options": [ { "id": "i9j1l5k7-5ihg-4h0k-552m-h4mj81502498", "value": "ISO 9001", "custom": null, "order": 1, "selected_option": { "id": "k2m4n6l8-6jih-5i1l-663n-i5nk92613508", "value": "ISO 9001", "allow_custom": false } }, { "id": "j0k2m6l8-6jih-5i1l-663n-i5nk92613509", "value": "ISO 14001", "custom": null, "order": 2, "selected_option": { "id": "l3n5o7m9-7kji-6j2m-774o-j6ol03724619", "value": "ISO 14001", "allow_custom": false } } ] }, { "id": "k1l3n7m9-7kji-6j2m-774o-j6ol03724620", "type": "dropdown", "required": true, "order": 6, "value": null, "date_value": null, "question": { "id": "m4o6p8n0-8lkj-7k3n-885p-k7pm14835730", "label": "What industry are you in?", "type": "dropdown", "required": true, "placeholder": "Select an industry", "max_length": null, "validation": null, "min_selection": null, "max_selection": null, "rows": null, "available_options": [ { "id": "o6q8r0p2-0nmk-9m5p-007r-m9ro36158052", "value": "Technology", "order": 1, "allow_custom": false }, { "id": "p7r9s1q3-1onl-0n6q-118s-n0sp47269163", "value": "Manufacturing", "order": 2, "allow_custom": false }, { "id": "n5p7q9o1-9mlk-8l4o-996q-l8qn25946841", "value": "Other", "order": 3, "allow_custom": true } ] }, "options": [ { "id": "l2m4o8n0-8lkj-7k3n-885p-k7pm14835731", "value": "Other", "custom": "Custom industry type", "order": 1, "selected_option": { "id": "n5p7q9o1-9mlk-8l4o-996q-l8qn25946841", "value": "Other", "allow_custom": true } } ] } ] } } } ``` ### Vendor Created This event is emitted when a vendor is created in Vic — for example, after a user fills in the add-vendor form in the Vic UI. The payload contains the full vendor record so that an external ERP can create a matching vendor. Both the predefined ("common") fields and any per-company custom fields the company has configured for vendors flow through to this payload via the vendor's standard attributes. Values that the company has not provided are sent as `null`. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835720", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "vendor_created", "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "legacy_id": "12345", "name": "Acme Corporation", "legal_name": "Acme Corporation Inc.", "remote_id": null, "state": "pending" } } ``` ### Vendor Updated This event is emitted when an existing vendor is updated in Vic. The payload mirrors `vendor_created`. Rapid successive edits to the same vendor are debounced — only the most recent state is delivered after a short window. An update that doesn't change any vendor data — for example, re-sending identical data — does not emit this event. ```json { "id": "a7dae8d0-8baa-7a3d-885f-a7fc14835721", "occurred_at": "2025-04-04T14:34:55.123Z", "event": "vendor_updated", "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "legacy_id": "12345", "name": "Acme Corporation", "remote_id": "vendor-ext-123", "state": "active" } } ```

OpenAPI Specification

vicai-webhook-events-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: v10.40.4
  contact: {}
  title: Vic.ai Accounts Webhook Events API
  description: "## Introduction\n\nThe Vic.ai API provides a seamless connection between your Enterprise Resource\nPlanning (ERP) system and the Vic.ai product suite.\n\nThe API is designed to offer three main areas of functionality:\n\n- **Syncing master data:** This refers to the data in your ERP that Vic.ai\n  interacts with. You are required to supply and update this data in Vic.ai, and\n  you also have the option to verify the copy of the masterdata in Vic.ai.\n\n- **Syncing training data:** We need historical data to train your AI model. To\n  that end, the API provides endpoints to sync historical invoices into Vic.ai\n  and to confirm their presence.\n\n- **Subscribing to and receiving webhooks:** Webhooks enable users or automated\n  tasks to interact with your ERP through various actions in the Vic.ai product\n  suite, such as posting an invoice, payment or purchase order or requesting\n  synchronization. You will receive a notification via a webhook when these\n  actions occur.\n\n\nFor US-based integrations, please use the following base API URL:\n\n```\nhttps://api.us.vic.ai\n```\n\nFor integrations based in Norway, use the following base API URL:\n\n```\nhttps://api.no.vic.ai\n```\n\nAll paths mentioned in this documentation should use one of these URLs as the\nbase.\n\nExample:\n\n```bash\ncurl https://api.us.vic.ai/v0/healthCheck \\\n    -H \"Content-Type: application/json\" \\\n    -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\"\n```\n\n## Getting Started\n\nTo begin interacting with the Vic.ai API, you will need the following\ncredentials:\n\n* A Vic.ai client ID\n* A Vic.ai client secret.\n\nThese can be provided to you securely by a Vic.ai representative\n[upon request](https://www.vic.ai/book-a-demo).\n\n**Please note:** These credentials are essentially the keys to your ERP\nintegration. If they fall into the wrong hands, unauthorized parties could\nimpersonate you, gain access to sensitive data, and potentially perform\nmalicious actions. Therefore, it's crucial to keep these credentials safe at all\ntimes to protect your application's integrity and your clients' data.\n\n### Limitations\n\nThe Vic.ai API has the following limitations:\n\n**Rate Limiting:** The API is rate-limited to 500 requests per 10-second time\nframe. If you exceed this limit, you will receive a `429 Too Many Requests`\nresponse. The limit is per Oauth client ID. If you continue to receive `429`s,\nplease contact support with a request id from the response headers.\n"
servers:
- url: https://api.no.stage.vic.ai
  description: staging server, NO
- url: https://api.us.vic.ai
  description: production server, US
- url: https://api.no.vic.ai
  description: production server, NO
security:
- BearerAuth: []
tags:
- name: Webhook Events
  description: "These are the `V1` events you can subscribe to. These will be sent as a `POST`\nto `https://yourCallbackUrl/events`.\n\n* `all` - This is a special form, that specifies that you want all events sent\n  to your webhook. Usage is not recommended in production.\n* [`invoice_approved`](#invoice-approved)\n* [`invoice_deleted`](#invoice-deleted)\n* [`invoice_post`](#invoice-post)\n* [`invoice_posted`](#invoice-posted)\n* [`invoice_rejected`](#invoice-rejected)\n* [`invoice_restored`](#invoice-restored)\n* [`invoice_submitted`](#invoice-submitted)\n* [`invoice_transfer`](#invoice-transfer)\n* [`invoice_updated`](#invoice-updated)\n* [`payment_batch_processed`](#payment-batch-processed)\n* [`payment_status_updated`](#payment-status-updated)\n* [`credit_status_updated`](#credit-status-updated)\n* [`purchase_order_created`](#purchase-order-created)\n* [`purchase_order_deleted`](#purchase-order-deleted)\n* [`purchase_order_updated`](#purchase-order-updated)\n* [`vendor_created`](#vendor-created)\n* [`vendor_onboarding_form_completed`](#vendor-onboarding-form-completed)\n* [`vendor_updated`](#vendor-updated)\n\n\nThe following `V0` events may be specified. They will be sent to the original\ncallback paths where the event name was in the path.\n\n* `vendorNew` - `POST` `https://yourCallbackUrl/vendorNew`\n* `invoicePost` - `POST` `https://yourCallbackUrl/invoicePost`\n* `invoiceTransfer` - `POST` `https://yourCallbackUrl/invoiceTransfer`\n* `syncRequest` - `POST` `https://yourCallbackUrl/syncRequest`\n\n### Performance Considerations\n\nAvoid using `\"all\"` as your subscription event type in production environment.\nInstead, create specific subscriptions for individual event types that your\nsystem can handle efficiently.\n\n### Event Details\n\nThe newer webhook endpoints will be sent to `https://yourCallbackUrl/events`.\nThe receiver is expected to handle everything asynchronously via this method. We\ndo not parse the response body and will ignore it.\n\n* All `2XX` responses will be treated as successful.\n* `401`, `403`, `429` responses will be treated as failures and retried with\n  a linear backoff with jitter. Once retries have been exhausted, the event\n  is discarded.\n* All other `4XX` responses will be treated as successful. If something is to be\n  rejected, you will need to make the appropriate calls to the Vic API to\n  complete the asynchronous handshake. Example: confirming or rejecting an\n  invoice post.\n* All `5XX` responses will be treated as a failure and retried with a linear\n  backoff with jitter. Once retries have been exhausted, the event is discarded.\n* Failed events will be attempted up to 5 times (1 initial attempt + up to 4 retries).\n\n> **NOTE**: The integrating system has 15 seconds to respond. After the time has\n> passed it will be considered a failure, and a retry will be sent for events\n> going to `https://yourCallbackUrl/events`.\n\nThe general structure of the webhook event will be as follows.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"the_event_name\",\n  \"data\": {\n    \"id\": \"123\",\n    \"something\": \"value\"\n  }\n}\n```\n\nThere will be a top-level field `event` that describes what the type of event\nis. There will also be a `data` envelope that will contain the data for the\nevent.\n\n### Invoice Approved\n\nThis event is emitted from the Vic system when an invoice has been approved.\nThe payload for this event matches almost exactly what you will receive in the\n`getInvoice` operation.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_approved\",\n  \"data\": {\n    \"totalAmount\": \"3.00\",\n    \"totalVatAmount\": \"0.00\",\n    \"amountWithoutTax\": \"1.00\",\n    \"amountTax\": \"1.00\",\n    \"amountNet\": \"1.00\",\n    \"amountVat\": \"0.00\",\n    \"amountSum\": \"3.00\",\n    \"amountFreight\": \"1.00\",\n    \"transactionType\": \"INVOICE\",\n    \"refNumber\": \"INV-1231123\",\n    \"poNumber\": \"PO-1231123\",\n    \"description\": \"Invoice for the month of April\",\n    \"currency\": \"USD\",\n    \"fields\": [\n      {\n        \"label\": \"custom:technician\",\n        \"title\": \"Technician\",\n        \"type\": \"text\",\n        \"value\": \"John Doe\"\n      }\n    ],\n    \"language\": \"en\",\n    \"issueDate\": \"2019-08-24\",\n    \"glDate\": \"2019-08-24\",\n    \"dueDate\": \"2019-08-24\",\n    \"paymentInfo\": {\n      \"bankAccountNum\": \"1234567890\",\n      \"bankCode\": \"1234567890\",\n      \"paymentTerm\": {\n        \"count\": 30,\n        \"unit\": \"DAYS\"\n      },\n      \"defaultMethod\": \"BANKACCOUNT\"\n    },\n    \"internalId\": \"123\",\n    \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n    \"externalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"paymentTerm\": {\n      \"count\": 0,\n      \"unit\": \"DAYS\"\n    },\n    \"paymentRef\": \"string\",\n    \"vendorInternalId\": \"47\",\n    \"vendorExternalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"orgNumber\": \"string\",\n      \"countryCode\": \"US\",\n      \"name\": \"string\"\n    },\n    \"lineItems\": [\n      {\n        \"index\": 1,\n        \"amountTax\": \"1.00\",\n        \"amountNet\": \"1.00\",\n        \"amountSum\": \"1.00\",\n        \"amountFreight\": \"1.00\",\n        \"description\": \"string\",\n        \"comment\": \"string\",\n        \"billable\": true,\n        \"invoiceLineItemInfo\": {\n          \"vatCode\": \"string\",\n          \"vatAmount\": 0,\n          \"vatRate\": \"1.00\"\n        },\n        \"taxCode\": {\n          \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n          \"code\": \"string\",\n          \"description\": \"Tax code description\",\n          \"rate\": \"0.25\"\n        },\n        \"costAccount\": {\n          \"internalId\": \"string\",\n          \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n          \"number\": \"string\"\n        },\n        \"dimensions\": [\n          {\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"typeName\": \"string\",\n            \"typeExternalId\": \"string\",\n            \"shortName\": \"string\",\n            \"externalData\": {},\n            \"displayName\": \"string\",\n            \"internalId\": \"47\",\n            \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n            \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n            \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\"\n          }\n        ],\n        \"quantityInvoiced\": \"string\",\n        \"lineItemTotal\": \"1.00\",\n        \"lineType\": \"item\",\n        \"poLineNumber\": 0,\n        \"poNumber\": \"string\",\n        \"poItemsMatched\": [\n          {\n            \"invoiceItemId\": \"string\",\n            \"purchaseOrderItemId\": \"string\",\n            \"productNumber\": \"6512-41473\",\n            \"unitOfMeasure\": \"kg\",\n            \"amountMatched\": \"1.0\",\n            \"quantityMatched\": \"1.0\"\n          }\n        ],\n        \"unitPrice\": \"1.00\",\n        \"number\": \"123456\",\n        \"lineFields\": [\n          {\n            \"label\": \"custom:serial_number\",\n            \"title\": \"Serial Number\",\n            \"type\": \"text\",\n            \"value\": \"12-34540-1235\"\n          }\n        ]\n      }\n    ],\n    \"postingError\": null,\n    \"documentUrl\": \"http://example.com/invoice.pdf\",\n    \"status\": \"NOT_READY\",\n    \"bolNumbers\": [],\n    \"selfAssessedUseTaxAmount\": null,\n    \"selfAssessedUseTaxAccount\": null,\n    \"markedAs\": \"PAID\",\n    \"billStatus\": \"PAID\",\n    \"externalPaymentDate\": null,\n    \"externalPaymentNumber\": null,\n    \"externalPaymentStatus\": null\n  }\n}\n\n```\n### Invoice Deleted\n\nThis event is emitted from the Vic system when an invoice has been deleted.\nThe payload for this event is sparse. It only contains the `internalId` and\n`externalId` of the invoice.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_deleted\",\n  \"data\": {\n    \"internalId\": \"123\",\n    \"externalId\": \"I0001\"\n  }\n}\n```\n\n### Invoice Post\n\nThis event is emitted from the Vic system when an accountant wants to post an\ninvoice to the ERP. This is a signal that the invoice is ready to be posted. The\nintegrating system is expected to respond and either confirm or reject the post.\nThe payload for this event matches almost exactly what you will receive in the\n`getInvoice` operation.\n\nUnlike the old `/invoicePost` event, this will not be a multipart event. You\nwill be able to fetch the invoice pdf from the provided `documentUrl` in the\npayload.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc04835310\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_post\",\n  \"data\": {\n    \"totalAmount\": \"3.00\",\n    \"totalVatAmount\": \"0.00\",\n    \"amountWithoutTax\": \"1.00\",\n    \"amountTax\": \"1.00\",\n    \"amountNet\": \"1.00\",\n    \"amountVat\": \"0.00\",\n    \"amountSum\": \"3.00\",\n    \"amountFreight\": \"1.00\",\n    \"transactionType\": \"INVOICE\",\n    \"refNumber\": \"INV-1231123\",\n    \"poNumber\": \"PO-1231123\",\n    \"description\": \"Invoice for the month of April\",\n    \"currency\": \"USD\",\n    \"fields\": [\n      {\n        \"label\": \"custom:technician\",\n        \"title\": \"Technician\",\n        \"type\": \"text\",\n        \"value\": \"John Doe\"\n      }\n    ],\n    \"language\": \"en\",\n    \"issueDate\": \"2019-08-24\",\n    \"glDate\": \"2019-08-24\",\n    \"dueDate\": \"2019-08-24\",\n    \"paymentInfo\": {\n      \"bankAccountNum\": \"1234567890\",\n      \"bankCode\": \"1234567890\",\n      \"paymentTerm\": {\n        \"count\": 30,\n        \"unit\": \"DAYS\"\n      },\n      \"defaultMethod\": \"BANKACCOUNT\"\n    },\n    \"internalId\": \"123\",\n    \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n    \"externalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"paymentTerm\": {\n      \"count\": 0,\n      \"unit\": \"DAYS\"\n    },\n    \"paymentRef\": \"string\",\n    \"vendorInternalId\": \"47\",\n    \"vendorExternalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"orgNumber\": \"string\",\n      \"countryCode\": \"US\",\n      \"name\": \"string\"\n    },\n    \"lineItems\": [\n      {\n        \"index\": 1,\n        \"amountTax\": \"1.00\",\n        \"amountNet\": \"1.00\",\n        \"amountSum\": \"1.00\",\n        \"amountFreight\": \"1.00\",\n        \"description\": \"string\",\n        \"comment\": \"string\",\n        \"billable\": true,\n        \"invoiceLineItemInfo\": {\n          \"vatCode\": \"string\",\n          \"vatAmount\": 0,\n          \"vatRate\": \"1.00\"\n        },\n        \"taxCode\": {\n          \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n          \"code\": \"string\",\n          \"description\": \"Tax code description\",\n          \"rate\": \"0.25\"\n        },\n        \"costAccount\": {\n          \"internalId\": \"string\",\n          \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n          \"number\": \"string\"\n        },\n        \"dimensions\": [\n          {\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"typeName\": \"string\",\n            \"typeExternalId\": \"string\",\n            \"shortName\": \"string\",\n            \"externalData\": {},\n            \"displayName\": \"string\",\n            \"internalId\": \"47\",\n            \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n            \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n            \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\"\n          }\n        ],\n        \"quantityInvoiced\": \"string\",\n        \"lineItemTotal\": \"1.00\",\n        \"lineType\": \"item\",\n        \"poLineNumber\": 0,\n        \"poNumber\": \"string\",\n        \"poItemsMatched\": [\n          {\n            \"invoiceItemId\": \"string\",\n            \"purchaseOrderItemId\": \"string\",\n            \"productNumber\": \"6512-41473\",\n            \"unitOfMeasure\": \"kg\",\n            \"amountMatched\": \"1.0\",\n            \"quantityMatched\": \"1.0\"\n          }\n        ],\n        \"unitPrice\": \"1.00\",\n        \"number\": \"123456\",\n        \"lineFields\": [\n          {\n            \"label\": \"custom:serial_number\",\n            \"title\": \"Serial Number\",\n            \"type\": \"text\",\n            \"value\": \"12-34540-1235\"\n          }\n        ]\n      }\n    ],\n    \"postingError\": null,\n    \"documentUrl\": \"http://example.com/invoice.pdf\",\n    \"status\": \"NOT_READY\",\n    \"bolNumbers\": [],\n    \"selfAssessedUseTaxAmount\": null,\n    \"selfAssessedUseTaxAccount\": null,\n    \"markedAs\": \"PAID\",\n    \"billStatus\": \"PAID\",\n    \"externalPaymentDate\": null,\n    \"externalPaymentNumber\": null,\n    \"externalPaymentStatus\": null\n  }\n}\n\n```\n\n### Invoice Posted\n\nThis event is emitted from the Vic system when an invoice has been posted to the\nERP successfully. The payload for this event matches almost exactly what you\nwill receive in the `getInvoice` operation.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_posted\",\n  \"data\": {\n    \"totalAmount\": \"3.00\",\n    \"totalVatAmount\": \"0.00\",\n    \"amountWithoutTax\": \"1.00\",\n    \"amountTax\": \"1.00\",\n    \"amountNet\": \"1.00\",\n    \"amountVat\": \"0.00\",\n    \"amountSum\": \"3.00\",\n    \"amountFreight\": \"1.00\",\n    \"transactionType\": \"INVOICE\",\n    \"refNumber\": \"INV-1231123\",\n    \"poNumber\": \"PO-1231123\",\n    \"description\": \"Invoice for the month of April\",\n    \"currency\": \"USD\",\n    \"fields\": [\n      {\n        \"label\": \"custom:technician\",\n        \"title\": \"Technician\",\n        \"type\": \"text\",\n        \"value\": \"John Doe\"\n      }\n    ],\n    \"language\": \"en\",\n    \"issueDate\": \"2019-08-24\",\n    \"glDate\": \"2019-08-24\",\n    \"dueDate\": \"2019-08-24\",\n    \"paymentInfo\": {\n      \"bankAccountNum\": \"1234567890\",\n      \"bankCode\": \"1234567890\",\n      \"paymentTerm\": {\n        \"count\": 30,\n        \"unit\": \"DAYS\"\n      },\n      \"defaultMethod\": \"BANKACCOUNT\"\n    },\n    \"internalId\": \"123\",\n    \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n    \"externalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"paymentTerm\": {\n      \"count\": 0,\n      \"unit\": \"DAYS\"\n    },\n    \"paymentRef\": \"string\",\n    \"vendorInternalId\": \"47\",\n    \"vendorExternalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"orgNumber\": \"string\",\n      \"countryCode\": \"US\",\n      \"name\": \"string\"\n    },\n    \"lineItems\": [\n      {\n        \"index\": 1,\n        \"amountTax\": \"1.00\",\n        \"amountNet\": \"1.00\",\n        \"amountSum\": \"1.00\",\n        \"amountFreight\": \"1.00\",\n        \"description\": \"string\",\n        \"comment\": \"string\",\n        \"billable\": true,\n        \"invoiceLineItemInfo\": {\n          \"vatCode\": \"string\",\n          \"vatAmount\": 0,\n          \"vatRate\": \"1.00\"\n        },\n        \"taxCode\": {\n          \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n          \"code\": \"string\",\n          \"description\": \"Tax code description\",\n          \"rate\": \"0.25\"\n        },\n        \"costAccount\": {\n          \"internalId\": \"string\",\n          \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n          \"number\": \"string\"\n        },\n        \"dimensions\": [\n          {\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"typeName\": \"string\",\n            \"typeExternalId\": \"string\",\n            \"shortName\": \"string\",\n            \"externalData\": {},\n            \"displayName\": \"string\",\n            \"internalId\": \"47\",\n            \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n            \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n            \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\"\n          }\n        ],\n        \"quantityInvoiced\": \"string\",\n        \"lineItemTotal\": \"1.00\",\n        \"lineType\": \"item\",\n        \"poLineNumber\": 0,\n        \"poNumber\": \"string\",\n        \"poItemsMatched\": [\n          {\n            \"invoiceItemId\": \"string\",\n            \"purchaseOrderItemId\": \"string\",\n            \"productNumber\": \"6512-41473\",\n            \"unitOfMeasure\": \"kg\",\n            \"amountMatched\": \"1.0\",\n            \"quantityMatched\": \"1.0\"\n          }\n        ],\n        \"unitPrice\": \"1.00\",\n        \"number\": \"123456\",\n        \"lineFields\": [\n          {\n            \"label\": \"custom:serial_number\",\n            \"title\": \"Serial Number\",\n            \"type\": \"text\",\n            \"value\": \"12-34540-1235\"\n          }\n        ]\n      }\n    ],\n    \"postingError\": null,\n    \"documentUrl\": \"http://example.com/invoice.pdf\",\n    \"status\": \"NOT_READY\",\n    \"bolNumbers\": [],\n    \"selfAssessedUseTaxAmount\": null,\n    \"selfAssessedUseTaxAccount\": null,\n    \"markedAs\": \"PAID\",\n    \"billStatus\": \"PAID\",\n    \"externalPaymentDate\": null,\n    \"externalPaymentNumber\": null,\n    \"externalPaymentStatus\": null\n  }\n}\n```\n\n### Invoice Rejected\n\nThis event is emitted from the Vic system when an invoice has been rejected\nduring the approval process. The payload for this event matches almost exactly\nwhat you will receive in the `getInvoice` operation.\n\nThe structure is identical to `invoice_approved` — refer to that event for the\nfull payload example.\n\n### Invoice Restored\n\nThis event is emitted from the Vic system when a previously deleted invoice has\nbeen restored. It is the counterpart to `invoice_deleted`: subscribing to both\nlets you distinguish an invoice that was deleted, restored, and deleted again\nfrom a genuinely duplicated delete. The payload for this event is sparse — it\ncontains only the `internalId` and `externalId` of the invoice.\n\n```json\n{\n  \"id\": \"b8ebf9e1-9cbb-8b4e-996f-b8fd25946829\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_restored\",\n  \"data\": {\n    \"internalId\": \"123\",\n    \"externalId\": \"I0001\"\n  }\n}\n```\n\n### Invoice Submitted\n\nThis event is emitted from the Vic system when an invoice has been submitted\nfor processing. The payload for this event matches almost exactly what you will\nreceive in the `getInvoice` operation.\n\nThe structure is identical to `invoice_approved` — refer to that event for the\nfull payload example.\n\n### Invoice Transfer\n\nThis event is emitted from the Vic system when an accountant wants to transfer\nan invoice to the ERP. This is a signal that the invoice is ready to be\ntransferred. The integrating system is expected to respond and either confirm or\nreject the transfer. The payload for this event matches almost exactly what you\nwill receive in the `getInvoice` operation.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"invoice_transfer\",\n  \"data\": {\n    \"totalAmount\": \"3.00\",\n    \"totalVatAmount\": \"0.00\",\n    \"amountWithoutTax\": \"1.00\",\n    \"amountTax\": \"1.00\",\n    \"amountNet\": \"1.00\",\n    \"amountVat\": \"0.00\",\n    \"amountSum\": \"3.00\",\n    \"amountFreight\": \"1.00\",\n    \"transactionType\": \"INVOICE\",\n    \"refNumber\": \"INV-1231123\",\n    \"poNumber\": \"PO-1231123\",\n    \"description\": \"Invoice for the month of April\",\n    \"currency\": \"USD\",\n    \"fields\": [\n      {\n        \"label\": \"custom:technician\",\n        \"title\": \"Technician\",\n        \"type\": \"text\",\n        \"value\": \"John Doe\"\n      }\n    ],\n    \"language\": \"en\",\n    \"issueDate\": \"2019-08-24\",\n    \"glDate\": \"2019-08-24\",\n    \"dueDate\": \"2019-08-24\",\n    \"paymentInfo\": {\n      \"bankAccountNum\": \"1234567890\",\n      \"bankCode\": \"1234567890\",\n      \"paymentTerm\": {\n        \"count\": 30,\n        \"unit\": \"DAYS\"\n      },\n      \"defaultMethod\": \"BANKACCOUNT\"\n    },\n    \"internalId\": \"123\",\n    \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n    \"externalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"paymentTerm\": {\n      \"count\": 0,\n      \"unit\": \"DAYS\"\n    },\n    \"paymentRef\": \"string\",\n    \"vendorInternalId\": \"47\",\n    \"vendorExternalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"orgNumber\": \"string\",\n      \"countryCode\": \"US\",\n      \"name\": \"string\"\n    },\n    \"lineItems\": [\n      {\n        \"index\": 1,\n        \"amountTax\": \"1.00\",\n        \"amountNet\": \"1.00\",\n        \"amountSum\": \"1.00\",\n        \"amountFreight\": \"1.00\",\n        \"description\": \"string\",\n        \"comment\": \"string\",\n        \"billable\": true,\n        \"invoiceLineItemInfo\": {\n          \"vatCode\": \"string\",\n          \"vatAmount\": 0,\n          \"vatRate\": \"1.00\"\n        },\n        \"taxCode\": {\n          \"id\": \"497f6eca-6276-4993-bfeb-53cbbbba6f08\",\n          \"code\": \"string\",\n          \"description\": \"Tax code description\",\n          \"rate\": \"0.25\"\n        },\n        \"costAccount\": {\n          \"internalId\": \"string\",\n          \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n          \"number\": \"string\"\n        },\n        \"dimensions\": [\n          {\n            \"name\": \"string\",\n            \"type\": \"string\",\n            \"typeName\": \"string\",\n            \"typeExternalId\": \"string\",\n            \"shortName\": \"string\",\n            \"externalData\": {},\n            \"displayName\": \"string\",\n            \"internalId\": \"47\",\n            \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n            \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n            \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\"\n          }\n        ],\n        \"quantityInvoiced\": \"string\",\n        \"lineItemTotal\": \"1.00\",\n        \"lineType\": \"item\",\n        \"poLineNumber\": 0,\n        \"poNumber\": \"string\",\n        \"poItemsMatched\": [\n          {\n            \"invoiceItemId\": \"string\",\n            \"purchaseOrderItemId\": \"string\",\n            \"productNumber\": \"6512-41473\",\n            \"unitOfMeasure\": \"kg\",\n            \"amountMatched\": \"1.0\",\n            \"quantityMatched\": \"1.0\"\n          }\n        ],\n        \"unitPrice\": \"1.00\",\n        \"number\": \"123456\",\n        \"lineFields\": [\n          {\n            \"label\": \"custom:serial_number\",\n            \"title\": \"Serial Number\",\n            \"type\": \"text\",\n            \"value\": \"12-34540-1235\"\n          }\n        ]\n      }\n    ],\n    \"postingError\": null,\n    \"documentUrl\": \"http://example.com/invoice.pdf\",\n    \"status\": \"NOT_READY\",\n    \"bolNumbers\": [],\n    \"selfAssessedUseTaxAmount\": null,\n    \"selfAssessedUseTaxAccount\": null,\n    \"markedAs\": \"PAID\",\n    \"billStatus\": \"PAID\",\n    \"externalPaymentDate\": null,\n    \"externalPaymentNumber\": null,\n    \"externalPaymentStatus\": null\n  }\n}\n```\n\n### Invoice Updated\n\nThis event is emitted from the Vic system when an invoice has been updated.\nThe payload for this event matches almost exactly what you will receive in the\n`getInvoice` operation.\n\nThe structure is identical to `invoice_approved` — refer to that event for the\nfull payload example.\n\n### Purchase Order Created\n\nThis event is emitted from the Vic system when a purchase order has been created.\nThe payload for this event matches almost exactly what you will receive in the\n`getPurchaseOrder` operation.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"purchase_order_created\",\n  \"data\": {\n    \"internalId\": \"string\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\",\n      \"name\": \"Acme Corporation\",\n      \"email\": \"vendor@acme.com\",\n      \"description\": \"They sell anvils\",\n      \"phone\": \"555-555-5555\",\n      \"addressStreet\": \"123 Main Street\\nSuite 100\",\n      \"addressCity\": \"Springfield\",\n      \"addressState\": \"IL\",\n      \"addressPostalCode\": \"62701\",\n      \"countryCode\": \"US\",\n      \"currency\": \"USD\",\n      \"confirmedAt\": \"2019-08-24T14:15:22Z\",\n      \"state\": \"CONFIRMED\",\n      \"taxInfo\": {\n        \"taxId\": \"11-1234567\",\n        \"is1099vendor\": false,\n        \"orgNumber\": null\n      },\n      \"defaultPaymentInfo\": null,\n      \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n      \"poMatchingDocumentLevel\": false,\n      \"vendorGroupId\": \"c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d\",\n      \"tags\": [],\n      \"externalData\": {},\n      \"errors\": []\n    },\n    \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n    \"issuedOn\": \"2019-08-24\",\n    \"createdOn\": \"2019-08-24\",\n    \"poNumber\": \"string\",\n    \"deliverOn\": \"2019-08-24\",\n    \"amount\": \"1.00\",\n    \"currencyId\": \"USD\",\n    \"status\": \"open\",\n    \"matchingType\": \"document\",\n    \"type\": \"blanket\",\n    \"description\": \"string\",\n    \"lineItems\": [\n      {\n        \"internalId\": \"string\",\n        \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n        \"productNumber\": \"string\",\n        \"productDescription\": \"string\",\n        \"unitOfMeasure\": \"kg\",\n        \"quantityAccepted\": \"1.0\",\n        \"quantityRequested\": \"1.0\",\n        \"quantityReceived\": \"1.0\",\n        \"matchingType\": \"two_way\",\n        \"unitAmount\": \"1.00\",\n        \"lineItemTotal\": \"1.00\",\n        \"lineNumber\": 1,\n        \"dimensions\": [\n          {\n            \"internalId\": \"1234\",\n            \"externalId\": \"D0123148\",\n            \"name\": \"project - the big one\",\n            \"typeExternalId\": \"project\"\n          }\n        ],\n        \"invoiceItemsMatched\": [\n          {\n            \"invoiceItemId\": \"123\",\n            \"purchaseOrderItemId\": \"6bde599d-3b7e-497c-ab91-1594a2efcdab\",\n            \"unitOfMeasure\": \"kg\",\n            \"amountMatched\": \"123.34\",\n            \"quantityMatched\": \"1.0\"\n          }\n        ],\n        \"memo\": \"string\",\n        \"status\": \"open\"\n      }\n    ],\n    \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\"\n  }\n}\n```\n\n### Purchase Order Updated\n\nThis event is emitted from the Vic system when a purchase order has been updated.\nThe payload for this event matches almost exactly what you will receive in the\n`getPurchaseOrder` operation. This event is a snapshot of the purchase order at\nthe time of the event.\n\n```json\n{\n  \"id\": \"a7dae8d0-8baa-7a3d-885f-a7fc14835718\",\n  \"occurred_at\": \"2025-04-04T14:34:55.123Z\",\n  \"event\": \"purchase_order_updated\",\n  \"data\": {\n    \"internalId\": \"string\",\n    \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n    \"vendor\": {\n      \"internalId\": \"47\",\n      \"internalUpdatedAt\": \"2019-08-24T14:15:22Z\",\n      \"externalId\": \"21b31bc7-1267-4335-893c-d7fe4706a238\",\n      \"externalUpdatedAt\": \"2021-06-29T17:20:53.154\",\n      \"name\": \"Acme Corporation\",\n      \"email\": \"vendor@acme.com\",\n      \"description\": \"They sell anvils\",\n      \"phone\": \"555-555-5555\",\n      \"addressStreet\": \"123 Main Street\\nSuite 100\",\n      \"addressCity\": \"Springfield\",\n      \"addressState\": \"IL\",\n      \"addressPostalCode\": \"62701\",\n      \"countryCode\": \"US\",\n      \"currency\": \"USD\",\n      \"confirmedAt\": \"2019-08-24T14:15:22Z\",\n      \"state\": \"CONFIRMED\",\n      \"taxInfo\": {\n        \"taxId\": \"11-1234567\",\n        \"is1099vendor\": false,\n        \"orgNumber\": null\n      },\n      \"defaultPaymentInfo\": null,\n      \"paymentTermId\": \"80b25998-53d5-4563-abd4-ea6566e3cf2b\",\n      \"poMatchingDocumentLevel\": false,\n      \"vendorGroupId\": \"c4299feb-c5fa-4e0b-a7a6-51fbfbe0854d\",\n      \"tags\": [],\n      \"externalData\": {},\n      \"errors\": [

# --- truncated at 32 KB (66 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vicai/refs/heads/main/openapi/vicai-webhook-events-api-openapi.yml