# Update KYC document matches

Updates the document matches of a KYC document with a specified ID.
> **Note:** Use this operation for manual overrides.

The request body schema depends on the KYC document `documentType`.
The operation rejects unknown fields.
Send `type` with one of:
`identity-proof`, `address-proof`, `purchase-proof`, or `funds-proof`.
The specified value identifies the `type` of the document match.

Endpoint: POST /kyc-documents/{id}/matches
Version: latest
Security: SecretApiKey, JWT

## Security:

  - `SecretApiKey` (unknown)
    apiKey in header REB-APIKEY

  - `JWT` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)
    ID of the resource.

## Request body:

  - `application/json` (unknown)
    KYC document matches overwrite payload.

## Request fields (application/json):

  - `type` (string, required)
    Type of KYC document matches.
This value identifies the document match type as `identity-proof`.
    Enum: "identity-proof"

  - `containsImage` (boolean)
    Specifies if the document includes an image that contains a face.
    Example: true

  - `isIdentityDocument` (boolean)
    Specifies if the document resembles an ID.
    Example: true

  - `isPublishedOnline` (boolean)
    Specifies if an exact match of the document has been found online.
    Example: false

  - `firstName` (string | null)
    First name of the customer.
This value is null if no match is found.
    Example: John

  - `lastName` (string | null)
    Last name of the customer.
This value is null if no match is found.
    Example: Doe

  - `dateOfBirth` (string | null)
    Date of birth detected on the document.
This value is null if no match is detected.

  - `expirationDate` (string | null)
    Expiration date detected on the document.
This value is null if no expiration date is detected.

  - `issueDate` (string | null)
    Issue date detected on the document.
This value is null if no issue date is detected.

  - `nationality` (string | null)
    Nationality detected on a passport or citizenship document.
This value is null if no nationality is detected.
    Example: US

  - `issuanceCountry` (string | null)
    Country that issued the document.
    Example: CA

  - `issuanceRegion` (string | null)
    Region, state, province, or territory that issued the document.
    Example: Ontario

  - `documentNumber` (string | null)
    Unique number on the identity document.
This value may contain alphanumeric characters.
    Example: 1234567890

  - `sex` (string | null)
    MRZ sex code (ICAO 9303).
`M`, `F`, or `X`.
Null if not extracted.
    Example: M

  - `documentSubtype` (string | null)
    Enum: "passport", "id-card", "driver-license", "birth-certificate", "utility-bill", "rental-receipt", "lease-agreement", "copy-credit-card", "credit-card-statement", "bank-statement", "inheritance-documentation", "tax-return", "salary-slip", "sale-of-assets", "public-health-card", "proof-of-age-card", "reverse-of-id", "public-service", "ewallet-holder-details", "ewallet-transaction-statement", "marriage-certificate", "firearms-license", "insurance-letter", "income-statement", "debtors-letter", "other", null

  - `hasMatchingFaceProof` (boolean)
    Specifies if an identity document has matching face proof.
    Example: false

  - `isTampered` (boolean)
    Specifies if an identity document has been tampered with.
    Example: false

  - `isDigitallyTampered` (boolean)
    Specifies if an identity document has been digitally tampered with (experimental).
    Example: false

  - `isPhotocopy` (boolean)
    Specifies if an identity document is detected as a photocopy.
    Example: false

  - `expiryDate` (string | null)
    Use `expirationDate` field instead.

  - `type` (string, required)
    Type of KYC document matches.
This value identifies the document match type as `address-proof`.
    Enum: "address-proof"

  - `line1` (string | null)
    Address of the customer's residence.
This value is null if no match is found.
    Example: 36 Craven St

  - `city` (string | null)
    Customer's city of residence.
This value is null if no match is found.
    Example: London

  - `region` (string | null)
    Customer's region of residence.
This value is null if no match is found.
    Example: London

  - `postalCode` (string | null)
    Postal code of the customer's residence.
This value is null if no match is found.
    Example: WC2N 5NF

  - `wordCount` (integer)
    Total number of words in the document.
    Example: 350

  - `uniqueWords` (integer)
    Total number of unique words in the document.
    Example: 175

  - `date` (string | null)
    Date detected on the document.
Use this field to determine if the document is recent.
    Example: 2021-01-01T00:00:00+00:00

  - `phone` (string | null)
    Phone number of the company or agency that issued the document.
    Example: (123) 456-7890

  - `isTampered` (boolean)
    Specifies if an address proof document has been tampered with.
    Example: false

  - `type` (string, required)
    Type of KYC document matches.
This value identifies the document match type as `purchase-proof`.
    Enum: "purchase-proof"

  - `firstName` (string | null)
    First name of the customer if it is matched.
This value is null if no match is found.
    Example: John

  - `lastName` (string | null)
    Last name of the customer if it is matched.
This value is null if no match is found.
    Example: Doe

  - `paymentInstrumentId` (string | null)
    ID of the payment instrument related to the document.
This value is null if no match is found.
    Example: inst_0YVB8KPKNXCBR9EDX7JHSED75N

  - `type` (string, required)
    Type of KYC document matches.
This value identifies the document match type as `funds-proof`.
    Enum: "funds-proof"

## Response 204:

  - `204` (unknown)
    Document matches updated.

## Response 204 headers:

  - `X-RateLimit-Limit` (integer)
    Total number of rate limit tokens for this request within a rate limit period.
For more information, see [Rate limits](#section/Rate-limits).
    Example: 3600

  - `X-RateLimit-Remaining` (integer)
    Remaining number of rate limit tokens for this request within the rate limit period. 
For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.
    Example: 3600

## Response 401:

  - `401` (unknown)
    Unauthorized access.
Invalid credentials used.

## Response 401 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

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

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 403:

  - `403` (unknown)
    Access forbidden.

## Response 403 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

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

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 404:

  - `404` (unknown)
    Resource not found.

## Response 404 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

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

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 422:

  - `422` (unknown)
    Invalid data sent.

## Response 422 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

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

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

  - `invalidFields` (array)
    Invalid field details.
    Example: [{"field":"field1","message":"field1 is invalid"},{"field":"subObject.field2","message":"field2 is invalid"},{"field":"subObject.field2","message":"another error in the field2"}]

  - `invalidFields.field` (string)
    Name of the field.
Dot notation is used for nested object field names.

  - `invalidFields.message` (string)
    Message field.

## Response 429:

  - `429` (unknown)
    Request rate limit exceeded.

## Response 429 fields (application/json):

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".
    Example: about:blank

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
    Example: Rate Limit Exceeded

  - `status` (integer)
    HTTP status code.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.
    Example: A request cannot be executed because the user has sent too many requests within a certain period of time

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 429 headers (application/json):

  - `X-RateLimit-Retry-After` (integer)
    UTC timestamp after which the rate limit resets and the request can be retried.
    Example: 1713187500

