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
- For Customer object validation errors, see the Customer Object Error Codes
- For Payment object validation errors, see the Payment Object Error Codes
- For Session-level errors, see the Sessions API Error Codes
Error Codes Summary
Error Code Summary
| Error Title Reference | Error Title | HTTP Status | Detail Message | Scenario | Resolution |
|---|---|---|---|---|---|
| First Name Validation | INVALID_REQUEST | 400 BAD REQUEST | agent.firstName cannot be more than 50 characters | When first name exceeds 50 characters | Ensure the agent's first name is 50 characters or less |
| Last Name Validation | INVALID_REQUEST | 400 BAD REQUEST | agent.lastName cannot be more than 50 characters | When last name exceeds 50 characters | Ensure the agent's last name is 50 characters or less |
| User ID Validation | INVALID_REQUEST | 400 BAD REQUEST | agent.userId is required | When agent user ID is missing, null or empty | Include 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.