Skip to content

Push a merchant's invoices to its customers

POST/api/v1/credit/receivables

Name the merchant as on POST /credit/bank-feeds (program_id and external_merchant_id, or credit_line_id); DayZero uses its business, creating it the first time, and gives your token read access to it. Upserts invoices by invoice_id (customer, amount, issued, due and paid dates). revenue_concentration_top_customer reads them when the merchant has no DayZero invoices (evidence.source: partner_receivables): the top customer's share of the last 365 days' invoiced total, void invoices left out.

Operation ID: push_credit_receivables·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

program_idstring

Your program the merchant is applying under. Required without credit_line_id; with it, must be the line's program if sent.

external_merchant_idstring

Your id for the merchant, as on POST /credit/bank-feeds and POST /credit/lines. Required without credit_line_id.

credit_line_idstring

The merchant's open line, when there is one.

merchant_legal_namestring

Names the merchant's DayZero business when this call creates it. Ignored when the business exists.

merchant_business_idstring

The merchant's existing DayZero business, when your token can reach it. Leave it out and DayZero uses the business the merchant was linked to before, or creates one.

invoicesarray · ReceivableItemrequiredReceivableItem

Invoices to add or update. Invoices not sent are kept; send one with status: void to take it out.

9 fields
invoice_idstringrequired

Your stable id for the invoice; sending it again updates it.

customer_idstringrequired

Your stable id for the customer billed.

customer_namestring

The customer's name.

amount_centsintegerrequired

The invoice total, in cents.

currencystringrequired

ISO 4217 currency.

issued_onstring · daterequired

When it was issued.

due_onstring · date

When it falls due.

paid_onstring · date

When it was paid in full, if it has been.

statusstring

void leaves it out of revenue. Defaults to paid with paid_on, else open.

Responses

201Successful Response

successboolean
messagestring
codestring
dataReceivablesPushResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

404Not Found - Resource does not exist

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.