Import existing loans onto a line

POST/api/v1/credit/lines/{credit_line_id}/loans/import

Launch with live cards and open loans (D-29): loads loans that already exist on the partner's previous system with their paid buckets and interest to date, keyed by the original issuer transaction id so attribution survives the migration (D-33). Idempotent on that id; one bad row is rejected without sinking the batch. Daily accrual resumes from the day after accrued_through.

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

Parameters

Path

credit_line_idstringrequired

Request body

as_ofstring · date

Status is assessed as at this date.

loansarray · LoanImportItemrequiredLoanImportItem
19 fields
external_settlement_idstringrequired

Original issuer transaction id. The idempotency key.

originated_onstring · daterequired
principal_centsintegerrequired
disbursement_fee_centsinteger

Defaults to the line's fee rate on the principal.

term_daysinteger

Defaults to the line's term.

due_datestring · date

Defaults to originated_on + term.

rate_bpsinteger
merchant_namestring
card_last_fourstring
descriptionstring
principal_paid_centsinteger
fee_paid_centsinteger
interest_paid_centsinteger
credit_applied_centsinteger
interest_accrued_centsinteger

Interest accrued to date on the old system.

accrued_throughstring · date

Date the accrued figure is good through. Accrual resumes after it.

written_offboolean
written_off_onstring · date
source_systemstring

Responses

201Successful Response

successboolean
messagestring
codestring
dataLoanImportResponse

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/invalid token 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.