{"openapi":"3.1.0","info":{"title":"POST /api/v1/credit/programs/{program_id}/loans/import/parse","version":"1.0.0","description":"Upload a loan file and infer its mapping"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/programs/{program_id}/loans/import/parse":{"post":{"tags":["credit"],"summary":"Upload a loan file and infer its mapping","description":"Step one of the loan migration wizard. Upload the previous system's export as CSV or XLSX (10 MB and 20,000 rows at most). DayZero infers which column is which (header names first, then the values), or starts from `mapping_name` (a mapping saved on the program, or the built-in `brex`), with `mapping` (a JSON object of field to column) applied by hand on top. Every row is normalised to the loan import shape and staged for seven days; nothing is written to the book. Returns the columns with sample values, the mapping with a confidence and reason per field, the unit of the money, the rows grouped by line key, the keys with no line on the program, and the row problems. Operator action: an API token receives `403`.","operationId":"credit_import_parse_loans","parameters":[{"name":"program_id","in":"path","required":true,"schema":{"type":"string","title":"Program Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_credit_import_parse_loans_api_v1_credit_programs__program_id__loans_import_parse_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_ImportParseResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"error":"validation_error","message":"Validation failed: due_date: Input should be a valid date","errors":{"due_date":"Input should be a valid date"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found - Resource does not exist","content":{"application/json":{"example":{"error":"not_found","message":"Resource not found","code":"NOT_FOUND_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"credit_import_parse_loans_api_v1_credit_programs__program_id__loans_import_parse_post"}}},"components":{"schemas":{"Body_credit_import_parse_loans_api_v1_credit_programs__program_id__loans_import_parse_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The loan file: CSV or XLSX."},"mapping":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mapping","description":"JSON object of field to column, e.g. {\"principal_cents\": \"Amount\"}."},"mapping_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mapping Name","description":"A mapping saved on the program, or `brex`."},"amounts_in":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amounts In","description":"`dollars` or `cents`. Inferred when omitted."}},"type":"object","required":["file"],"title":"Body_credit_import_parse_loans_api_v1_credit_programs__program_id__loans_import_parse_post"},"ImportBatchTotals":{"properties":{"row_count":{"type":"integer","title":"Row Count","description":"Rows in the file.","default":0},"importable_count":{"type":"integer","title":"Importable Count","description":"Rows with no error.","default":0},"error_row_count":{"type":"integer","title":"Error Row Count","description":"Rows that will be rejected.","default":0},"warning_count":{"type":"integer","title":"Warning Count","description":"Warnings across every row.","default":0},"unassigned_row_count":{"type":"integer","title":"Unassigned Row Count","description":"Rows with no line key, so on no line.","default":0},"line_count":{"type":"integer","title":"Line Count","description":"Distinct line keys in the file.","default":0},"unmatched_line_count":{"type":"integer","title":"Unmatched Line Count","description":"Line keys with no line on the program.","default":0},"principal_cents":{"type":"integer","title":"Principal Cents","description":"Original principal over importable rows.","default":0},"outstanding_cents":{"type":"integer","title":"Outstanding Cents","description":"Outstanding over importable rows.","default":0}},"type":"object","title":"ImportBatchTotals","description":"What a staged file holds under its current mapping."},"ImportColumn":{"properties":{"name":{"type":"string","title":"Name","description":"The header as it appears in the file."},"samples":{"items":{"type":"string"},"type":"array","title":"Samples","description":"Up to three non-empty values from the top of the file."}},"type":"object","required":["name"],"title":"ImportColumn","description":"One column of the uploaded file, with a taste of what it holds."},"ImportExpectedTotals":{"properties":{"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"Expected row count."},"principal_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Principal Cents","description":"Expected principal."},"outstanding_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Outstanding Cents","description":"Expected outstanding."}},"type":"object","title":"ImportExpectedTotals","description":"The control totals the operator gave from the partner's book."},"ImportFieldMapping":{"properties":{"target":{"type":"string","title":"Target","description":"The loan import field (or line key) to fill."},"kind":{"type":"string","title":"Kind","description":"id, text, date, money, integer, rate, boolean or last_four."},"required":{"type":"boolean","title":"Required","description":"A row cannot load without this field."},"description":{"type":"string","title":"Description","description":"What the field means.","default":""},"source_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Column","description":"The file column it is read from; null for none."},"confidence":{"type":"number","title":"Confidence","description":"0 to 1. 1 is a column set by hand; below 0.5 deserves a look."},"reason":{"type":"string","title":"Reason","description":"Why this column, in words."},"samples":{"items":{"type":"string"},"type":"array","title":"Samples","description":"Up to three values of the source column, as they arrived."}},"type":"object","required":["target","kind","required","confidence","reason"],"title":"ImportFieldMapping","description":"Where one target field is read from, and how sure the guess is."},"ImportLineDefaults":{"properties":{"credit_limit_cents":{"type":"integer","minimum":0.0,"title":"Credit Limit Cents","description":"The new line's limit."},"term_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Term Days","description":"Defaults to the program's first term."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The signing date of the merchant's agreement."}},"additionalProperties":false,"type":"object","required":["credit_limit_cents"],"title":"ImportLineDefaults","description":"Terms for a line the import opens for a key the program does not have."},"ImportLineGroup":{"properties":{"line_key":{"type":"string","title":"Line Key","description":"The line key value the rows carry."},"credit_line_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Line Id","description":"The program's line with that key; null when none."},"exists":{"type":"boolean","title":"Exists","description":"A line with this key exists on the program."},"row_count":{"type":"integer","title":"Row Count","description":"Rows in the file for this key."},"importable_count":{"type":"integer","title":"Importable Count","description":"Rows with no error."},"principal_cents":{"type":"integer","title":"Principal Cents","description":"Original principal over importable rows."},"outstanding_cents":{"type":"integer","title":"Outstanding Cents","description":"Outstanding over importable rows, as the loans would carry it."}},"type":"object","required":["line_key","exists","row_count","importable_count","principal_cents","outstanding_cents"],"title":"ImportLineGroup","description":"The rows of the file that belong to one credit line."},"ImportLineResult":{"properties":{"line_key":{"type":"string","title":"Line Key","description":"The line key."},"credit_line_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Line Id","description":"The line; null when none could be found or opened."},"created":{"type":"boolean","title":"Created","description":"The line was opened by this import.","default":false},"imported":{"type":"integer","title":"Imported","description":"New loans.","default":0},"duplicates":{"type":"integer","title":"Duplicates","description":"Rows whose loan was already on the line.","default":0},"rejected":{"type":"integer","title":"Rejected","description":"Rows that did not load.","default":0},"principal_cents":{"type":"integer","title":"Principal Cents","description":"Original principal over rows that loaded.","default":0},"outstanding_cents":{"type":"integer","title":"Outstanding Cents","description":"Outstanding over rows that loaded.","default":0},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the whole line did not load: no such line, or opening it was refused."}},"type":"object","required":["line_key"],"title":"ImportLineResult","description":"What the import did on one line."},"ImportParseResponse":{"properties":{"staging_id":{"type":"string","title":"Staging Id","description":"The batch id. Also the report id."},"program_id":{"type":"string","title":"Program Id","description":"The program the file is for."},"filename":{"type":"string","title":"Filename","description":"The file's name as uploaded."},"sha256":{"type":"string","title":"Sha256","description":"SHA-256 of the file as uploaded."},"row_count":{"type":"integer","title":"Row Count","description":"Rows in the file, header excluded."},"status":{"type":"string","enum":["parsed","running","dry_run","applied","failed","expired"],"title":"Status","description":"parsed, running (a run is in progress), dry_run, applied, failed (control totals did not tie, or the run stopped: see `run.error`) or expired."},"amounts_in":{"type":"string","enum":["dollars","cents"],"title":"Amounts In","description":"The unit of every money column."},"line_key_field":{"anyOf":[{"type":"string","enum":["external_line_id","external_merchant_id"]},{"type":"null"}],"title":"Line Key Field","description":"Which key groups rows into lines: `external_line_id` when mapped, else `external_merchant_id`. Null when neither is mapped."},"mapping":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object","title":"Mapping","description":"Target field → source column in force."},"totals":{"$ref":"#/components/schemas/ImportBatchTotals","description":"What the file holds under the mapping in force."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the file was staged (UTC)."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"Seven days after staging. An unapplied batch is refused after it."},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At","description":"When the file was written to the book."},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Who staged the file."},"last_run":{"anyOf":[{"$ref":"#/components/schemas/ImportRunSummary"},{"type":"null"}],"description":"The last finished dry run or apply, from its report; null before the first."},"run":{"anyOf":[{"$ref":"#/components/schemas/ImportRun"},{"type":"null"}],"description":"The current or last run, with its progress: poll this while `status` is `running`. Null before the first."},"result":{"anyOf":[{"$ref":"#/components/schemas/ProgramLoanImportResponse"},{"type":"null"}],"description":"Once the last run has finished: the body the inline call returns (per-line results, totals against the control totals, `applied`, `report_id`). Null while a run is in progress, after a run that stopped, and in the list."},"columns":{"items":{"$ref":"#/components/schemas/ImportColumn"},"type":"array","title":"Columns","description":"Every column of the file."},"fields":{"items":{"$ref":"#/components/schemas/ImportFieldMapping"},"type":"array","title":"Fields","description":"Every target field with its source column and confidence."},"mapping_source":{"type":"string","title":"Mapping Source","description":"`inferred`, `given`, `saved:<name>` or `template:<name>`: where the mapping started from."},"amounts_in_reason":{"type":"string","title":"Amounts In Reason","description":"Why the money reads in this unit."},"lines":{"items":{"$ref":"#/components/schemas/ImportLineGroup"},"type":"array","title":"Lines","description":"The rows grouped by line key."},"unmatched_keys":{"items":{"type":"string"},"type":"array","title":"Unmatched Keys","description":"Line keys with no line on the program (create them at apply)."},"problems":{"items":{"$ref":"#/components/schemas/ImportRowProblem"},"type":"array","title":"Problems","description":"Row problems, the first 200; `problem_count` has them all."},"problem_count":{"type":"integer","title":"Problem Count","description":"Every row problem in the file.","default":0},"available_mappings":{"items":{"type":"string"},"type":"array","title":"Available Mappings","description":"Saved mapping names on the program, then built-in templates."}},"type":"object","required":["staging_id","program_id","filename","sha256","row_count","status","amounts_in","created_at","expires_at","mapping_source","amounts_in_reason"],"title":"ImportParseResponse","description":"A staged file, with everything needed to confirm or correct its mapping."},"ImportRowProblem":{"properties":{"row_number":{"type":"integer","title":"Row Number","description":"Position in the file, from 1, header excluded."},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field","description":"The target field at fault, when there is one."},"message":{"type":"string","title":"Message","description":"What is wrong, in words."},"severity":{"type":"string","enum":["error","warning"],"title":"Severity","description":"`error`: the row will be rejected. `warning`: it loads as described."}},"type":"object","required":["row_number","message","severity"],"title":"ImportRowProblem","description":"Something wrong with one row of the file."},"ImportRowRejection":{"properties":{"row_number":{"type":"integer","title":"Row Number","description":"Position in the file, from 1."},"line_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Key","description":"The row's line key."},"external_settlement_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Settlement Id","description":"The row's issuer transaction id, when it has one."},"reason":{"type":"string","title":"Reason","description":"Why it was rejected."}},"type":"object","required":["row_number","reason"],"title":"ImportRowRejection","description":"A row that did not load, and why."},"ImportRun":{"properties":{"id":{"type":"string","title":"Id","description":"The run. A new start gets a new id."},"kind":{"type":"string","enum":["dry_run","apply"],"title":"Kind","description":"`dry_run` or `apply`."},"mode":{"type":"string","enum":["sync","async"],"title":"Mode","description":"`sync`: ran in the request. `async`: ran as a background job."},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When it was started (UTC)."},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"When it finished or stopped; null while running."},"heartbeat_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Heartbeat At","description":"The job's last sign of life (UTC)."},"elapsed_seconds":{"type":"integer","title":"Elapsed Seconds","description":"Seconds from start to finish, or to now while it runs."},"stale":{"type":"boolean","title":"Stale","description":"Still `running`, but the job has not reported for 10 minutes: its worker stopped. Starting the batch again takes it over.","default":false},"started_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Started By","description":"Who started it."},"inputs":{"$ref":"#/components/schemas/ImportRunInputs","description":"What the run was started with: control totals, as-of date, line options."},"progress":{"$ref":"#/components/schemas/ImportRunProgress","description":"How far it got: rows and lines done of the total, and the phase."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the run stopped before finishing (a crash, a timeout, or a run taken over). Nothing was written; run it again."}},"type":"object","required":["id","kind","mode","started_at","elapsed_seconds","progress"],"title":"ImportRun","description":"A batch's current or last dry run or apply."},"ImportRunInputs":{"properties":{"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of","description":"Loan status assessed as at this date; null is today."},"expected_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Count","description":"Control count."},"expected_principal_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Principal Cents","description":"Control principal."},"expected_outstanding_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Outstanding Cents","description":"Control outstanding."},"create_missing_lines":{"type":"boolean","title":"Create Missing Lines","description":"Lines are opened for keys the program lacks.","default":false},"line_defaults":{"anyOf":[{"$ref":"#/components/schemas/ImportLineDefaults"},{"type":"null"}],"description":"Terms for the lines the run opens."},"allow_cross_line_duplicates":{"type":"boolean","title":"Allow Cross Line Duplicates","description":"Rows repeating a transaction id held on another line load.","default":false}},"type":"object","title":"ImportRunInputs","description":"What the run was asked to do: the options of the request that started it."},"ImportRunProgress":{"properties":{"phase":{"type":"string","enum":["queued","loading","importing","checking","saving","done","failed"],"title":"Phase","description":"`queued` (waiting for a worker), `loading` (reading the staged rows), `importing` (line by line), `checking` (reading the book back for the report), `saving`, then `done`, or `failed`."},"rows_done":{"type":"integer","title":"Rows Done","description":"Rows processed so far.","default":0},"rows_total":{"type":"integer","title":"Rows Total","description":"Rows in the file.","default":0},"lines_done":{"type":"integer","title":"Lines Done","description":"Lines processed so far.","default":0},"lines_total":{"type":"integer","title":"Lines Total","description":"Distinct line keys in the file.","default":0}},"type":"object","required":["phase"],"title":"ImportRunProgress","description":"How far a dry run or apply has got."},"ImportRunSummary":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"The run was a dry run."},"applied":{"type":"boolean","title":"Applied","description":"The run wrote to the book."},"run_at":{"type":"string","format":"date-time","title":"Run At","description":"When it ran (UTC)."},"run_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run By","description":"Who ran it."},"mismatches":{"items":{"type":"string"},"type":"array","title":"Mismatches","description":"Everything that did not tie: control totals, then lines. After an apply the control totals refused, a last entry says nothing was written and what to do."}},"type":"object","required":["dry_run","applied","run_at"],"title":"ImportRunSummary","description":"The last dry run or apply of a batch."},"ImportTotals":{"properties":{"count":{"type":"integer","title":"Count","description":"Rows that loaded: new plus duplicates.","default":0},"principal_cents":{"type":"integer","title":"Principal Cents","description":"Original principal.","default":0},"outstanding_cents":{"type":"integer","title":"Outstanding Cents","description":"Outstanding.","default":0}},"type":"object","title":"ImportTotals","description":"Counts and money over the rows that loaded (or would)."},"ImportWarning":{"properties":{"code":{"type":"string","title":"Code","description":"`no_interest_ceiling`: the program has no ceiling on a loan's interest, and the ceiling is frozen onto each loan when it is created, so these loans stay uncapped for good. `repeats_id_on_other_line`: the row loaded although its transaction id is already on another line."},"message":{"type":"string","title":"Message","description":"What it means and what to do, in words."},"row_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Row Number","description":"Position in the file, from 1; null for the run."},"line_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Line Key","description":"The row's line key."},"external_settlement_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Settlement Id","description":"The row's issuer transaction id."}},"type":"object","required":["code","message"],"title":"ImportWarning","description":"Something the operator should read before applying; the run did not stop."},"ProgramLoanImportResponse":{"properties":{"staging_id":{"type":"string","title":"Staging Id","description":"The batch."},"report_id":{"type":"string","title":"Report Id","description":"The import report: `GET /credit/import-batches/{id}/report`."},"dry_run":{"type":"boolean","title":"Dry Run","description":"Nothing was meant to be written."},"applied":{"type":"boolean","title":"Applied","description":"Every line was written together. False on a dry run, and when a control total did not match: then nothing was written."},"as_of":{"type":"string","format":"date","title":"As Of","description":"The date loan status was assessed as at."},"lines":{"items":{"$ref":"#/components/schemas/ImportLineResult"},"type":"array","title":"Lines","description":"What the run did on each line."},"lines_created":{"type":"integer","title":"Lines Created","description":"Lines opened by the import.","default":0},"imported":{"type":"integer","title":"Imported","description":"New loans over every line.","default":0},"duplicates":{"type":"integer","title":"Duplicates","description":"Duplicates over every line.","default":0},"rejected":{"type":"integer","title":"Rejected","description":"Rejected rows over the file.","default":0},"totals":{"$ref":"#/components/schemas/ImportTotals","description":"What loaded (or would): checked against `expected`."},"expected":{"$ref":"#/components/schemas/ImportExpectedTotals","description":"The control totals the run was given."},"mismatches":{"items":{"type":"string"},"type":"array","title":"Mismatches","description":"Each control total that did not match the file, in words. On an apply they refused, a last entry says that nothing was written and what to do: fix or leave out the rejected rows, or correct the totals, then run the dry run again."},"rejections":{"items":{"$ref":"#/components/schemas/ImportRowRejection"},"type":"array","title":"Rejections","description":"Rejected rows, the first 200; `rejected` counts them all. Every one is in the report (`GET /credit/import-batches/{id}/report`), which is available after a dry run too."},"warnings":{"items":{"$ref":"#/components/schemas/ImportWarning"},"type":"array","title":"Warnings","description":"Things to read before applying: run-level warnings first (a program with no interest ceiling), then rows. The first 200; `warning_count` has them all."},"warning_count":{"type":"integer","title":"Warning Count","description":"Every warning of the run.","default":0},"dry_run_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dry Run Token","description":"On a dry run: a digest of the batch, its mapping and this run's inputs (with `as_of` resolved). Send it on the apply as `dry_run_token` to apply exactly what this dry run checked. Null on an apply."}},"type":"object","required":["staging_id","report_id","dry_run","applied","as_of"],"title":"ProgramLoanImportResponse","description":"The outcome of a program-level dry run or apply."},"SuccessEnvelope_ImportParseResponse_":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"$ref":"#/components/schemas/ImportParseResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[ImportParseResponse]"},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}