# Update a Client

Update an existing client account.

Endpoint: POST /v1/clients/{clientId}
Version: 1.0.0-beta.54
Security: ApiKeyAuth

## Security:

  - `ApiKeyAuth` (unknown)
    apiKey in header Api-Key

## Path parameters:

  - `clientId` (string, required)

## Header parameters:

  - `Client-Id` (string, required)

  - `X-Acting-As-Client-Id` (string)
    The child client this request acts on behalf of. A reseller still authenticates as itself — `Api-Key` and `Client-Id` stay the reseller's — and names the child here.
This works only from a parent to its own children. Merchants have no children, so a merchant calling as itself omits the header. Sending your own client ULID here is not the same as omitting it, and is rejected on some operations.

## Request fields (application/json):

  - `parent_id` (string, required)
    Unique identifier of the parent client account (reseller or ISO). Send the client's current parent. The gateway stores this value as the client's parent, so sending a different one moves the client under that account.

  - `dba` (string, required)
    Doing Business As (DBA) name for the client. Send the current name to keep it.

  - `type` (string)
    The type of client account.
    Enum: "reseller", "merchant"

  - `admin_contact_details` (object, required)
    Contact information supplied when updating a client. Every property is optional; send only the ones you are changing. Omitting a property leaves it as it was.

  - `admin_contact_details.first_name` (string)
    First name of the admin contact.

  - `admin_contact_details.last_name` (string)
    Last name of the admin contact.

  - `admin_contact_details.email` (string)
    Email address of the admin contact. Used as the login username.

  - `admin_contact_details.phone` (any)
    Phone number. The phone number must contain between 10 and 12 digits and can contain spaces, a leading `+` symbol (when used with a country  code), and the special characters `(`, `)`, `-`, and `.`. Alphabetical  characters are not allowed.

  - `admin_contact_details.time_zone` (string)
    The time zone of the account.
    Enum: "America/Los_Angeles", "America/Phoenix", "America/Denver", "America/Chicago", "America/New_York", "Pacific/Honolulu", "America/Anchorage"

  - `metadata` (object | null)
    Key-value pairs for storing additional information on the transaction. Send `null` to clear all metadata.
At most 50 keys. Keys may contain letters, digits, hyphens, and underscores, up to 40 characters. Values are strings up to 500 characters. Every limit below is enforced; a request that exceeds any of them is rejected.

## Response 200:

  - `200` (unknown)
    Client updated successfully

## Response 200 fields (application/json):

  - `id` (string, required)
    Unique identifier for the client.

  - `parent_id` (string, required)
    Unique identifier of the parent client account.

  - `dba` (string, required)
    Updated Doing Business As (DBA) name of the client.

  - `type` (string, required)
    The type of client account.
    Enum: "reseller", "merchant"

  - `admin_contact_details` (object, required)
    Contact information for the primary admin user of a client account, as returned on a response. The four required properties are always present and may be null, because a client created through an internal path is not held to the rules `ClientAdminContactDetailsInput` applies. A request uses `ClientAdminContactDetailsInput` to create and `ClientAdminContactDetailsUpdate` to amend.

  - `admin_contact_details.first_name` (string | null, required)
    First name of the admin contact.

  - `admin_contact_details.last_name` (string | null, required)
    Last name of the admin contact.

  - `admin_contact_details.email` (string | null, required)
    Email address of the admin contact. Used as the login username.

  - `admin_contact_details.phone` (any)
    Phone number. The phone number must contain between 10 and 12 digits and can contain spaces, a leading `+` symbol (when used with a country  code), and the special characters `(`, `)`, `-`, and `.`. Alphabetical  characters are not allowed.

  - `admin_contact_details.time_zone` (string, required)
    The time zone of the account.
    Enum: "America/Los_Angeles", "America/Phoenix", "America/Denver", "America/Chicago", "America/New_York", "Pacific/Honolulu", "America/Anchorage"

  - `metadata` (object | null)
    Key-value pairs for storing additional information on the transaction. Send `null` to clear all metadata.
At most 50 keys. Keys may contain letters, digits, hyphens, and underscores, up to 40 characters. Values are strings up to 500 characters. Every limit below is enforced; a request that exceeds any of them is rejected.

  - `correlation_id` (string)
    Identifier the gateway assigns to the request and carries across the services that handled it. Quote it when reporting a problem.

## Response 200 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 400 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 401:

  - `401` (unknown)
    Not authenticated

## Response 401 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 401 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 403 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 404 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 409 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 500 fields (application/json):

  - `error_code` (string)
    The Gateway generated error code.

  - `error_message` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `details` (object | null)
    The field in the request that caused the error. May be null  if not applicable.

  - `source` (object | null)
    Object containing host-processor-specific error information.  May be null if not applicable.

  - `source.system` (string | null)
    The host processor name.

  - `source.code` (string | null)
    The host processor code.

  - `source.message` (string | null)
    The host processor message.

## Response 500 headers (application/json):

  - `x-request-id` (string, required)
    Unique identifier assigned to the request by the API server. Returned on every response, including errors. Log this value and supply it when contacting support so that a specific request can be traced.

## Response 400 examples:

  - `Invalid field value in the request body` (unknown)

  - `A required field is absent` (unknown)

  - `The transaction's state does not allow this operation` (unknown)

  - `A single amount is outside the allowed range` (unknown)

  - `A count or dollar cap over a period is spent` (unknown)
    details names the limit: limit_type is COUNT or AMOUNT, window is DAILY or MONTHLY, and scope is ACCOUNT, one payer's bank account, or MERCHANT, everything the merchant submits. A key whose value is not known is left out. No limit figure or reset time is sent.

## Response 401 examples:

  - `Missing or invalid API key` (unknown)

## Response 403 examples:

  - `Authenticated but not authorized for this action` (unknown)

  - `The merchant is not boarded to the processor this transaction routes to` (unknown)
    A card transaction routes to TSYS and an ACH transaction to VeriCheck. Both details keys are always present. The condition lasts until the merchant is boarded, so retrying does not help.

## Response 404 examples:

  - `Resource ID does not exist` (unknown)

## Response 409 examples:

  - `The operation has already been done` (unknown)
    A 409 means the same operation was already done, or is already underway: a transaction canceled again, captured again, or refunded again in full. An operation the transaction's state blocks for any other reason is a 400 INVALID_ACTION instead.

## Response 500 examples:

  - `Unhandled server fault or downstream processor error` (unknown)

  - `The merchant's stored integration record is wrong` (unknown)
    The processor rejected an identifier that came from boarding, not from the request. Retrying does not help until the integration is corrected.

