Skip to main content
Version: v2

Agent Object Error Codes

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

Quick Reference to Related Error Codes

Error Codes Summary

Error Code Summary
Error Title ReferenceError TitleHTTP StatusDetail MessageScenarioResolution
First Name ValidationINVALID_REQUEST400 BAD REQUESTagent.firstName cannot be more than 50 charactersWhen first name exceeds 50 charactersEnsure the agent's first name is 50 characters or less
Last Name ValidationINVALID_REQUEST400 BAD REQUESTagent.lastName cannot be more than 50 charactersWhen last name exceeds 50 charactersEnsure the agent's last name is 50 characters or less
User ID ValidationINVALID_REQUEST400 BAD REQUESTagent.userId is requiredWhen agent user ID is missing, null or emptyInclude a valid agent.userId in the request

Error Codes Details

First Name Validation

Character Limit Exceeded

Scenario: The agent's first name cannot exceed 50 characters.

Sample Request:

{
"agent": {
"firstName": "ThisFirstNameExceedsFiftyCharactersAndWillTriggerAnError",
"lastName": "Smith",
"userId": "msid123"
}
}

Sample Error Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.firstName cannot be more than 50 characters"
}

Last Name Validation

Character Limit Exceeded

Scenario: The agent's last name cannot exceed 50 characters.

Sample Request:

{
"agent": {
"firstName": "John",
"lastName": "ThisLastNameExceedsFiftyCharactersAndWillTriggerAnError",
"userId": "msid123"
}
}

Sample Error Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.lastName cannot be more than 50 characters"
}

User ID Validation

User ID Required

Scenario: The agent's user ID is required if the agent object is included in any API request.

Sample Request:

{
"agent": {
"firstName": "John",
"lastName": "Smith"
// userId is missing
}
}

Sample Error Response:

{
"title": "INVALID_REQUEST",
"status": 400,
"detail": "agent.userId is required"
}

Additional Notes

  • The agent object is optional for most APIs, but if included, all required fields must be valid.
  • Refer to the specific API reference documentation for details on when the agent object is required.