# Create a credit record for a retail customer Creates a credit record and assigns to the customer with the specified in the request URL. You can specify the of the credit record file as either or . If the is set to , you must collect the credit record yourself from a credit bureau and add the credit record file content Base64-encoded in the payload. Endpoint: POST /v1/persons/{person_id}/credit_records Version: 1.0 ## Path parameters: - `person_id` (string, required) The person ID of the customer for whom you are creating the credit record. ## Request fields (application/json): - `source` (string, required) The source of the credit record file. Enum: "partner", "solarisBank" - `file` (string,null) The credit record file content, Base64-encoded. Required only if is . ## Response 201 fields (application/json): - `id` (string, required) The ID of the credit record resource. Example: "fbb7d15fa4c54ba0b077592665ef04a4ccrd" - `person_id` (string, required) The person ID of the customer. Example: "dc1a6812a14f6cc338cd084208535bcdcper" - `status` (string, required) The status of the credit record. If the status is , you must create a new credit record for the customer. Enum: "available", "expired" - `created_at` (string, required) UTC timestamp from when the credit record was created. Example: "2020-20-03T18:01:48.000Z" ## Response 400 fields (application/json): - `title` (string) Example: "Failed to build pagination headers." - `status` (string) Example: "400" - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `detail` (string) Example: "Cannot connect to database." - `code` (string) Example: "build_pagination_headers_failure" ## Response 403 fields (application/json): - `title` (string) Example: "Unauthorized Action" - `status` (string) Example: "403" - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `detail` (string) Example: "Unauthorized action is not allowed." - `code` (string) Example: "unauthorized_action" ## Response 404 fields (application/json): - `title` (string) Example: "Model Not Found" - `status` (string) Example: "404" - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `detail` (string) Example: "Couldn't find 'credit record' for id 'fbb7d15fa4c54ba0b077592665ef04a4ccrd'." - `code` (string) Example: "model_not_found" ## Response 500 fields (application/json): - `title` (string) Example: "Internal server error" - `status` (string) Example: "500" - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `detail` (string) Example: "Internal server error" - `code` (string) Example: "internal_server_error" ## Response 504 fields (application/json): - `errors` (array, required) - `errors.id` (string, required) A UUID, preferably the request ID - `errors.status` (integer, required) The HTTP status - `errors.code` (string, required) some_computer_friendly_string - `errors.title` (string, required) Some short human friendly string - `errors.detail` (string, required) Some human friendly-ish detail: field is required - `errors.source` (object,null) Optional computer-friendly error source description Example: {"message":"is_required","field":"name"} - `errors.source.field` (string, required) Example: "name" - `errors.source.message` (string, required) Example: "is_required" - `errors.backtrace` (array,null) Optional array of backtrace lines