# Request a credit check

You may request a credit check on a customer who hasn't previously been credit checked.
This endpoint returns no content. You'll be able to see the date you requested the credit check
(`credit_check_requested_at`) and `credit_status` updated to `pending` or, in the case of an instant decision,
`approved` or `declined` by fetching the Customer entity.
A `hold` credit status represents when a customer's credit account is overdue.
A `deactivated` credit status represents when a customer's credit account has been deactivated.
When a customer's `credit_status` is `approved` - the customer's `net_terms_status` represents the current state of a customer's enrollment in the approved net terms offer.
See #fetchCustomer for more details.
Note: Except for instant decisions, a decision should be reflected on the Customer entity within 1 business day.

Endpoint: POST /customers/{customer_id}/credit-check
Version: partners-v1
Security: bearerAuth, basicAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer JWT

  - `basicAuth` (unknown)
    http basic

## Path parameters:

  - `customer_id` (string, required)
    ID of the customer being submitted for a credit check

## Request body:

  - `application/json` (unknown)
    Request a credit check for a customer

## Request fields (application/json):

  - `amount_requested` (number, required)
    Request an amount (plus buffer) to cover your customer's purchases over their payment term. This can be increased later.
    Example: 50000

  - `business_description` (string)
    A description of your customer's business.
    Example: Put a description your customer's business here.

  - `has_purchase_history` (boolean, required)
    Indicates whether this customer has prior purchase history with the sub-merchant. When `true`, the sub-merchant has prior purchase history with this customer.
    Example: true

  - `has_purchase_terms_history` (boolean)
    Required if `has_purchase_history = true`. Indicates whether this customer has prior purchase history on net terms with the sub-merchant. When `true`, the sub-merchant has prior net terms purchase history with this customer.
    Example: false

## Response 204:

  - `204` (unknown)
    Credit check request accepted.

## Response 400:

  - `400` (unknown)
    Bad request error

## Response 400 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Validation error

  - `error.type` (string)
    A short string, describing error type
    Enum: "validation_error"

  - `error.details` (array)

  - `error.details.path` (string)
    Path to the field failed validation
    Example: path.to.field

  - `error.details.message` (string)
    Detailed description of the error
    Example: `[field]` is required

## Response 401:

  - `401` (unknown)
    Unauthorized error

## Response 401 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Invalid merchant credentials

  - `error.type` (string)
    A short string, describing error type
    Enum: "authentication_error"

## Response 404:

  - `404` (unknown)
    Not found error

## Response 404 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: [entity] not found

  - `error.type` (string)
    A short string, describing error type
    Enum: "not_found_error"

## Response 422:

  - `422` (unknown)
    Credit check already created for this customer

## Response 422 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Credit check already created for this customer.

  - `error.type` (string)
    A short string, describing error type
    Enum: "invalid_request"

## Response 429:

  - `429` (unknown)
    Rate limit error

## Response 429 fields (application/json):

  - `error` (object)

  - `error.message` (string)
    A short string, describing error details
    Example: Too many requests

  - `error.type` (string)
    A short string, describing error type
    Enum: "rate_limit_error"

