Skip to main content
Version: v2

Customer Object Error Codes

This document provides a comprehensive reference for validation errors related to the customer object in the Convenient Checkout API. These errors help identify issues with customer data in API requests and guide you in resolving them.

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
Identifier Validation
Missing Required IdentifiersINVALID_REQUEST400 BAD REQUESTcustomer should contain hsid, enterpriseId or metadataRequired customer identifiers are missingInclude at least one of hsid, enterpriseId, or metadata in the customer object
Invalid Enterprise IDINVALID_REQUEST400 BAD REQUESTinvalid enterpriseIdEnterprise ID is not all digitsEnsure enterpriseId contains only numeric digits
Invalid HSIDINVALID_REQUEST400 BAD REQUESTinvalid hsidHSID is not a valid UUIDProvide a valid UUID format for the hsid
Customer Not found for given Enterprise IdNOT_FOUND404 NOT FOUNDCustomer not found for given enterpriseIdNo customer found for the provided enterpriseIdVerify the enterpriseId is correct and exists in the system
Metadata Validation
Exceeded Metadata EntriesINVALID_REQUEST400 BAD REQUESTExceeded the max number of entries in metadata. Max 20Metadata has more than 20 entriesReduce the number of metadata entries to 20 or fewer
Metadata Key Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata key size bigger than: 40Metadata key exceeds 40 charactersEnsure all metadata keys are 40 characters or less
Metadata Value Size ExceededINVALID_REQUEST400 BAD REQUESTMetadata value size bigger than: 100Metadata value exceeds 100 charactersEnsure all metadata values are 100 characters or less
Demographics Validation
Email ValidationINVALID_REQUEST400 BAD REQUESTcustomer.email Email should be validEmail is not in valid formatProvide a valid email address format (e.g., user@example.com)
First Name Length ExceededINVALID_REQUEST400 BAD REQUESTFirst name max length is 100First name exceeds 100 charactersEnsure the first name is 100 characters or less
Last Name Length ExceededINVALID_REQUEST400 BAD REQUESTLast name max length is 100Last name exceeds 100 charactersEnsure the last name is 100 characters or less
SSN ValidationINVALID_REQUEST400 BAD REQUESTcustomer.ssnLastFour must match "^[0-9]4$"SSN last four is not 4 digitsProvide exactly 4 digits for the SSN last four
ZIP Code ValidationINVALID_REQUEST400 BAD REQUESTZip 5 must be exactly 5 digits long.ZIP code is not 5 digitsProvide exactly 5 digits for the ZIP code
Date of Birth ValidationINVALID_REQUEST400 BAD REQUESTcustomer.dateOfBirth Invalid date of birth: <value>Date of birth is not in ISO formatUse ISO 8601 format for date of birth (YYYY-MM-DD)
Country Code ValidationINVALID_REQUEST400 BAD REQUESTcustomer.phoneNumber.countryCode invalid countryCodeCountry code is not validUse a valid country code (e.g., 01, 91)
Phone Number ValidationINVALID_REQUEST400 BAD REQUESTcustomer.phoneNumber.number invalid numberPhone number is not validProvide a valid phone number format

Error Codes Details

Identifier Validation

Missing Required Identifiers

Customer identifiers such as hsid, enterpriseId, or metadata are mandatory to locate the customer.

Sample Request:

{
"customer": {
"metadata": null,
"hsid": null,
"enterpriseId": null
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer should contain hsid, enterpriseId or metadata"
}
Invalid hsid

Validates that the HSID is a properly formatted UUID.

Sample Request:

{
"email": "test@example.com",
"hsid": "invalid-hsid"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "invalid hsid"
}
Invalid enterpriseId

Validates that Enterprise ID contains only digits.

Sample Request:

{
"email": "test@example.com",
"enterpriseId": "abc123"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "invalid enterpriseId"
}
Customer Not found for given Enterprise Id

Returned when no customer is found for the provided enterpriseId.

Sample Request:

{
"enterpriseId": "9999999999"
}

Sample Response:

{
"title": "NOT_FOUND",
"status": 404,
"detail": "Customer not found for given enterpriseId"
}

Metadata Validation

Exceeded Metadata Entries

Maximum 20 entries allowed in metadata.

Sample Request:

{
"email": "test@example.com",
"metadata": {
"key1": "value1",
"key2": "value2"
// ... 19 more key-value pairs ...
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Exceeded the max number of entries in metadata. Max 20"
}
Metadata Key Size Exceeded

Maximum 40 characters for metadata key.

Sample Request:

{
"email": "test@example.com",
"metadata": {
"thisKeyIsVeryLongAndExceedsTheMaximumAllowedLengthForMetadataKeys": "value"
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Metadata key size bigger than: 40"
}
Metadata Value Size Exceeded

Maximum 100 characters for metadata value.

Sample Request:

{
"email": "test@example.com",
"metadata": {
"key": "This value is too long and exceeds the maximum allowed length for metadata values which is 100 characters according to the validation rules defined in the system."
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Metadata value size bigger than: 100"
}

Demographics Validation

Email Validation

Validates that the email is properly formatted according to email standards.

Sample Request:

{
"email": "invalid-email",
"hsid": "123e4567-e89b-12d3-a456-426614174000"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer.email Email should be valid"
}
First Name Length Exceeded

First name has a maximum length validation (100 characters).

Sample Request:

{
"firstName": "A very long first name that exceeds the maximum allowed length of 100 characters..."
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "First name max length is 100"
}
Last Name Length Exceeded

Last name has a maximum length validation (100 characters).

Sample Request:

{
"lastName": "A very long last name that exceeds the maximum allowed length of 100 characters..."
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Last name max length is 100"
}
SSN Validation

SSN last four digits must be exactly 4 numeric digits.

Sample Request:

{
"email": "test@example.com",
"ssnLastFour": "123"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer.ssnLastFour must match "^[0-9]{4}$""
}
ZIP Code Validation

ZIP code must be exactly 5 digits.

Sample Request:

{
"email": "test@example.com",
"zip5": "1234"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "Zip 5 must be exactly 5 digits long."
}
Date of Birth Validation

Date of birth must be in ISO date format (YYYY-MM-DD).

Sample Request:

{
"email": "test@example.com",
"dateOfBirth": "01-01-2000"
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer.dateOfBirth Invalid date of birth: 01-01-2000"
}
Phone Number Validation

Validates phone number components for proper formatting.

Sample Request (Invalid Country Code):

{
"email": "test@example.com",
"phoneNumber": {
"countryCode": "ABC",
"number": "1234567890"
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer.phoneNumber.countryCode invalid countryCode"
}

Sample Request (Invalid Number):

{
"email": "test@example.com",
"phoneNumber": {
"countryCode": "01",
"number": "123"
}
}

Sample Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "customer.phoneNumber.number invalid number"
}