invoiceSync
Request a consolidated invoice update and receive the results at your callback endpoint. Supports delta synchronization, targeted filters and redelivery of a stored response.
Authentication and delivery
Use the Capway API authentication described under Overview when submitting the synchronization request. Authentication for delivery to your callback endpoint is separate: the specification supports Basic authentication or anonymous delivery. Callback credentials and the initial delta synchronization date are configured for the creditor; credentials are stored encrypted.
Synchronization flow
Submit a synchronization request containing a correlation ID and your callback URL. The service returns an immediate request response and separately delivers a consolidated invoice update to your endpoint. Only invoices belonging to the creditor assigned to the requesting account are included.
POST /v1/Callback/invoicesync
Use the Test or Production base URL configured under Overview.
Synchronization modes
| Mode | Selection | Behavior |
|---|---|---|
| Delta synchronization | Omit filters | Returns invoices changed since the previous delta request. The first delta request starts from the configured initial synchronization date. |
| Date range | Supply filters.dateRange | Returns invoices changed in the requested period. Does not change the delta synchronization state. |
| Invoice selection | Supply filters.invoiceIds | Targets specific invoices. Takes precedence over dateRange and does not change the delta synchronization state. |
| Resend | Set resend to "true" and reuse correlationId | Delivers the stored response to the callback URL recorded on the original request without re-querying invoice data. If no stored response exists, a new response is generated. |
Request body fields
| Field path | Mandatory | Description |
|---|---|---|
| correlationId | Yes | string Unique identifier for the synchronization request. Use the original identifier when requesting a resend. |
| timestamp | Yes | string <date-time> Request timestamp in ISO 8601 format, for example 2026-10-12T12:00:00Z. |
| callbackUrl | Yes | string <URL> Your endpoint for receiving the generated callback payload. |
| filters | No | object Optional synchronization filter. Omit filters for delta synchronization. |
| filters.invoiceIds | No | array of string Invoice identifiers to synchronize. Takes precedence when both invoiceIds and dateRange are supplied. Without this list, the request covers invoices for the assigned creditor within the applicable range. |
| filters.dateRange | No | object Requested update period. Targeted date-range requests do not advance the delta synchronization state. |
| filters.dateRange.from | No | string <date> First date of the requested range, in YYYY-MM-DD format. If omitted from a date-range request, the documented default is 2026-01-01. |
| filters.dateRange.to | No | string <date> Last date of the requested range, in YYYY-MM-DD format. If omitted, defaults to the current date. |
| resend | No | string: "true" or "false" The supplied JSON examples use strings. "true" requests redelivery for this correlationId; "false" or omission does not allow an existing response to be generated again. Acceptance of JSON boolean values is TBD. |
Request response fields
The specification describes 2xx responses when authorization and request format are valid; the exact success HTTP status is TBD. A request with missing or empty mandatory fields may return HTTP 200 with an error in the response body and does not create a synchronization record. HTTP 200 alone therefore does not confirm a successful synchronization.
| Field path | Mandatory | Description |
|---|---|---|
| success | Yes | boolean Indicates the outcome of the synchronization request. Check the response body rather than relying on the HTTP status alone. |
| recordsfound | Yes | integer Number of invoices found for the requested synchronization conditions. |
| status | Yes | string "OK" when records are returned. "Nothing to do" when no invoices have changed, no matching invoices exist or the user has no access to the specified invoices. |
| time | Yes | string <timestamp> Timestamp of the request response. The example includes a timezone offset. |
| correlationid | Yes | string Echo of the request correlationId. This field uses a lowercase id in the immediate response. |
| syncid | Yes | integer Synchronization identifier for troubleshooting. |
All request response fields are mandatory.
Callback body fields
The callback is delivered to the supplied callback URL and is associated with the original correlationId. A resend uses the callback URL recorded on the original request.
| Field path | Mandatory | Description |
|---|---|---|
| correlationId | Yes | string Correlation identifier from the synchronization request. |
| timestamp | Yes | string <timestamp> Timestamp of the callback payload. |
| syncType | Yes | string Set to "sync". |
| status | Yes | string Set to "success". |
| data | Yes | array of object Consolidated invoice updates for the creditor assigned to the requesting account. |
| data[].orderId | Yes | string Invoice identifier in the delivered update. |
| data[].currentBalance | Yes | number Remaining invoice principal/balance reported by the synchronization service. |
| data[].originalBalance | Yes | number Original invoice principal/balance reported by the synchronization service. |
| data[].status | Yes | string Returns "Active" when the invoice is open/unpaid. When the invoice is closed, returns the closure code. Closure codes: "Booked" "Credited" "Debt sold to external party" "Deleted" "Disbursed" "Loan closed" "Paid" "Paid in full" "Paid to creditor" "Rejected" |
| data[].lastUpdatedAt | Yes | string <timestamp> Timestamp of the invoice update. |
| data[].closureDate | Conditional | string <date> Date when the invoice was closed, in YYYY-MM-DD format. Included only for closed invoices; omitted when the invoice is open. |
| data[].recourseStatus | Yes | string Placeholder for future enhancements. |
Request examples
Examples use demo identifiers and a reserved example domain. Replace them with values for your integration. Dates are illustrative.
Delta synchronization
json
{
"correlationId": "00000000-0000-4000-8000-000000000003",
"timestamp": "2026-10-12T12:00:00Z",
"callbackUrl": "https://integrator.example.com/callbacks/invoice-sync",
"resend": "false"
}Invoice selection
json
{
"correlationId": "00000000-0000-4000-8000-000000000003",
"timestamp": "2026-10-12T12:00:00Z",
"callbackUrl": "https://integrator.example.com/callbacks/invoice-sync",
"filters": {
"invoiceIds": [
"DEMO-INVOICE-001",
"DEMO-INVOICE-002"
]
},
"resend": "false"
}Date range with an omitted end date
json
{
"correlationId": "00000000-0000-4000-8000-000000000003",
"timestamp": "2026-10-12T12:00:00Z",
"callbackUrl": "https://integrator.example.com/callbacks/invoice-sync",
"filters": {
"dateRange": {
"from": "2026-10-01"
}
},
"resend": "false"
}Date range with an omitted start date
json
{
"correlationId": "00000000-0000-4000-8000-000000000003",
"timestamp": "2026-10-12T12:00:00Z",
"callbackUrl": "https://integrator.example.com/callbacks/invoice-sync",
"filters": {
"dateRange": {
"to": "2026-10-11"
}
},
"resend": "false"
}Resend a stored response
json
{
"correlationId": "00000000-0000-4000-8000-000000000003",
"timestamp": "2026-10-12T12:00:00Z",
"callbackUrl": "https://integrator.example.com/callbacks/invoice-sync",
"resend": "true"
}