Skip to content

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 ​

ModeSelectionBehavior
Delta synchronizationOmit filtersReturns invoices changed since the previous delta request. The first delta request starts from the configured initial synchronization date.
Date rangeSupply filters.dateRangeReturns invoices changed in the requested period. Does not change the delta synchronization state.
Invoice selectionSupply filters.invoiceIdsTargets specific invoices. Takes precedence over dateRange and does not change the delta synchronization state.
ResendSet resend to "true" and reuse correlationIdDelivers 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 pathMandatoryDescription
correlationIdYesstring
Unique identifier for the synchronization request. Use the original identifier when requesting a resend.
timestampYesstring <date-time>
Request timestamp in ISO 8601 format, for example 2026-10-12T12:00:00Z.
callbackUrlYesstring <URL>
Your endpoint for receiving the generated callback payload.
filtersNoobject
Optional synchronization filter. Omit filters for delta synchronization.
filters.invoiceIdsNoarray 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.dateRangeNoobject
Requested update period. Targeted date-range requests do not advance the delta synchronization state.
filters.dateRange.fromNostring <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.toNostring <date>
Last date of the requested range, in YYYY-MM-DD format. If omitted, defaults to the current date.
resendNostring: "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 pathMandatoryDescription
successYesboolean
Indicates the outcome of the synchronization request. Check the response body rather than relying on the HTTP status alone.
recordsfoundYesinteger
Number of invoices found for the requested synchronization conditions.
statusYesstring
"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.
timeYesstring <timestamp>
Timestamp of the request response. The example includes a timezone offset.
correlationidYesstring
Echo of the request correlationId. This field uses a lowercase id in the immediate response.
syncidYesinteger
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 pathMandatoryDescription
correlationIdYesstring
Correlation identifier from the synchronization request.
timestampYesstring <timestamp>
Timestamp of the callback payload.
syncTypeYesstring
Set to "sync".
statusYesstring
Set to "success".
dataYesarray of object
Consolidated invoice updates for the creditor assigned to the requesting account.
data[].orderIdYesstring
Invoice identifier in the delivered update.
data[].currentBalanceYesnumber
Remaining invoice principal/balance reported by the synchronization service.
data[].originalBalanceYesnumber
Original invoice principal/balance reported by the synchronization service.
data[].statusYesstring
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[].lastUpdatedAtYesstring <timestamp>
Timestamp of the invoice update.
data[].closureDateConditionalstring <date>
Date when the invoice was closed, in YYYY-MM-DD format. Included only for closed invoices; omitted when the invoice is open.
data[].recourseStatusYesstring
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"
}