Skip to content

Replace a merchant's existing debt facilities

PUT/api/v1/credit/debt-facilities

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. facilities is the whole list: a facility sent again (same facility_id) is updated, one left out is removed, and an empty list attests the merchant has no debt. They land on the merchant's debt schedule, which existing_debt_facilities and debt_service_coverage_ratio read; with none attested the first reads 0 and the second uncapped cover instead of unmeasured. A daily, weekly, biweekly or semi_monthly payment counts at its yearly total (252 business days for daily).

Operation ID: put_credit_debt_facilities·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.

facilitiesarray · DebtFacilityItemrequiredDebtFacilityItem

The merchant's facilities, all of them: one left out of a push is removed. An empty list attests the merchant has none, so existing_debt_facilities reads 0 and debt_service_coverage_ratio reads as uncapped cover.

10 fields
facility_idstringrequired

Your stable id for the facility; a push updates it in place.

lenderstringrequired

Who lent it.

facility_typestringrequired

What it is. mca and revenue_based are repaid from sales; credit_card is a card balance.

One of: term_loan, line_of_credit, mca, revenue_based, sba_loan, equipment_loan, mortgage, credit_card, other

current_balance_centsintegerrequired

What is still owed today, in cents.

original_amount_centsinteger

The amount first lent (defaults to the current balance).

payment_amount_centsinteger

The scheduled payment per payment_frequency, in cents. Without it the facility adds nothing to annual debt service.

payment_frequencystring

How often payment_amount_cents is paid. daily counts 252 business days a year. Required with payment_amount_cents.

interest_rate_bpsinteger

Annual interest rate in basis points (500 = 5.00%).

started_onstring · date

When it was drawn (defaults to today).

maturity_onstring · date

When it is due to be repaid (defaults to a year after start).

Responses

200Successful Response

successboolean
messagestring
codestring
dataDebtFacilitiesResponse

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.