Upsert a KYC document

Request

Creates or updates (upserts) a KYC document with a specified ID.

Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required

ID of the resource.

Bodyapplication/jsonrequired

KYC document resource.

fileIdsArray of stringsrequired

IDs of linked file objects.

Uploaded identity-proof files must have the following tags attached to be used for KYC purposes: ['kyc', 'id-front'], ['kyc', 'id-back'], ['kyc', 'face-proof'].

Permitted file types for identity-proof files: .jpg, .png, and .pdf.

documentTypestring(KycDocumentTypes)required

Document type submitted for validation. Only the identity-proof and address-proof types are analyzed automatically.

Enum:"identity-proof""address-proof""funds-proof""purchase-proof""credit-file-proof"
Discriminator
documentSubtypestring or null(KycDocumentSubtypes)

Document subtype submitted for validation.

Enum:"passport""id-card""driver-license""birth-certificate""utility-bill""rental-receipt""lease-agreement""copy-credit-card""credit-card-statement""bank-statement"
customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
notesstring or null

Reviewer notes.

reasonstring or null

Reason for uploading.

matchLevelinteger(KycDocumentMatchLevels)

Document verification level.

Default:2
Enum ValueDescription
1

Moderate verification requirements. This option is used for sale transactions.

2

Strict verification requirements. This option is used for credit transactions.

3

Basic verification requirements. This option is used when a high level of verification is not required.

curl -i -X PUT \
  'https://www.rebilly.com/_mock/catalog/all/kyc-documents/{id}' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "fileIds": [
      "file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N"
    ],
    "documentType": "identity-proof",
    "documentSubtype": "passport",
    "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF",
    "notes": "string",
    "reason": "string",
    "matchLevel": 1,
    "settings": {
      "weights": {
        "containsImage": 100,
        "isIdentityDocument": 100,
        "isPublishedOnline": 100,
        "firstName": 100,
        "lastName": 100,
        "expirationDate": 100,
        "dateOfBirth": 100,
        "issueDate": 100,
        "hasMinimalAge": 100,
        "hasMatchingFaceProof": 100,
        "nationality": 100,
        "documentSubtype": 100,
        "isTampered": 100,
        "isPhotocopy": 100,
        "mrzChecksum": 100
      },
      "thresholds": {
        "rejectBelow": 100,
        "acceptAbove": 100
      },
      "minimumAgeSettings": {
        "defaultMinimumAge": 18,
        "locationOverrides": [
          {
            "country": "US",
            "minimumAge": 21
          },
          {
            "country": "US",
            "state": "AL",
            "minimumAge": 19
          }
        ]
      }
    }
  }'

Responses

KYC document updated.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

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
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the KYC document.

Example:"kyc_doc_0YV7JHY705C6DA487BFTAA33V8"
fileIdsArray of stringsrequired

IDs of linked file objects.

Uploaded identity-proof files must have the following tags attached to be used for KYC purposes: ['kyc', 'id-front'], ['kyc', 'id-back'], ['kyc', 'face-proof'].

Permitted file types for identity-proof files: .jpg, .png, and .pdf.

documentTypestring(KycDocumentTypes)required

Document type submitted for validation. Only the identity-proof and address-proof types are analyzed automatically.

Enum:"identity-proof""address-proof""funds-proof""purchase-proof""credit-file-proof"
Discriminator
documentSubtypestring or null(KycDocumentSubtypes)

Document subtype submitted for validation.

Enum:"passport""id-card""driver-license""birth-certificate""utility-bill""rental-receipt""lease-agreement""copy-credit-card""credit-card-statement""bank-statement"
statusstringread-onlyrequired

Status of the validation.

Enum ValueDescription
pending

Waiting to be reviewed or analyzed.

in-progress

Being analyzed by the Rebilly AI.

accepted

Accepted by AI or a human.

rejected

Rejected by AI or a human.

archived

Archived by the Rebilly AI.

rejectionReasonobject or null(KycDocumentRejection)read-only

Reason the document is rejected.

requestIdstring or null, <= 50 charactersread-only

ID of the KYC request.

Example:"4f6cf35x-2c4y-483z-a0a9-158621f77a21"
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the resource is created. This value is set automatically when the resource is created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the resource is updated. This value is set automatically when the resource is updated.

processedTimestring or null, (date-time)read-only

Date and time when the KYC document is processed.

customerIdstring, <= 50 characters(CustomerId)required

ID of the customer resource.

Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
reviewerIdstring or null, <= 50 charactersread-only

ID of the KYC document reviewer.

Example:"44433322-2c4y-483z-a0a9-158621f77a21"
reviewerNamestring or nullread-only

First and last name of the KYC document reviewer.

reviewStartTimestring or null, (date-time)read-only

Date and time when the manual review starts.

reviewTimestring or null, (date-time)read-only

Date and time of manual review.

notesstring or null

Reviewer notes.

tagsArray of objects(Tag)read-only

List of KYC document tags.

reasonstring or null

Reason for uploading.

matchLevelinteger(KycDocumentMatchLevels)

Document verification level.

Default:2
Enum ValueDescription
1

Moderate verification requirements. This option is used for sale transactions.

2

Strict verification requirements. This option is used for credit transactions.

3

Basic verification requirements. This option is used when a high level of verification is not required.

revisionintegerread-only

Number of times the KYC document data has been modified.

Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.

documentMatchesobject or nullread-only

Proof of identity document matches.

parsedDataobject or nullread-only

Parsed data.

settingsKycSettingsIdentity (object) or nullread-only
One of:

Identity proof settings.

_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

Response
{ "id": "kyc_doc_0YV7JHY705C6DA487BFTAA33V8", "fileIds": [ "file_0YV7HZ7KDCC5WBV9Q7WRKG1H6N" ], "documentType": "identity-proof", "documentSubtype": "passport", "status": "pending", "rejectionReason": { "type": "document-unreadable", "message": "Provided document is unreadable" }, "requestId": "4f6cf35x-2c4y-483z-a0a9-158621f77a21", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "processedTime": "2019-08-24T14:15:22Z", "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "reviewerId": "44433322-2c4y-483z-a0a9-158621f77a21", "reviewerName": "string", "reviewStartTime": "2019-08-24T14:15:22Z", "reviewTime": "2019-08-24T14:15:22Z", "notes": "string", "tags": [ {} ], "reason": "string", "matchLevel": 1, "revision": 0, "documentMatches": { "version": "2.0", "score": 75, "checkList": [], "data": {} }, "parsedData": { "version": "2.0", "score": 75, "checkList": [], "data": {} }, "settings": { "weights": {}, "thresholds": {}, "minimumAgeSettings": {} }, "_links": [ {} ], "_embedded": { "customer": {}, "files": [] } }