PCE uses conventional HTTP response codes to indicate the success or failure of an API request to help you diagnose and resolve errors efficiently.
Code | Description |
---|
2xx
| 2xx range indicates success. Common codes include:
200 OK : Request completed successfully.
201 Created : Request successful. Create API's returns URL inLocation header with object ID
202 Accepted : Request accepted for processing; may not be acted upon immediately (e.g. Promise Mode)
204 No Content : Request processed successfully; no response body (used for updates and deletes)
299 Warning – Request processed, but with a warning that may affect subsequent operations
|
4xx
| 4xx range indicates an error that failed based on the information provided. Common codes include:
400 Bad Request : The request was not accepted due to a missing required parameter or a syntax error.
401 Unauthorized : Authentication failed (invalid or missing token)
404 Not Found : The requested resource does not exist
405 Method Not Allowed : HTTP method not supported for this endpoint
415 Unsupported Media Type : Request body format not supported
422 Unprocessable Entity : Well-formed request but semantic or business validation failed
429 Too Many Requests : Rate limit exceeded; “Retry-After” header may indicate when to retry
|
5xx | Server Error – Rare scenarios when Something went wrong on PCE end. |
Error Code | Description |
---|
EC-AUTH-XXXX
| Authorization errors (e.g. login, token failures).
For example: EC-AUTH-0001 - User authorization attempt failed. User needs to confirm credentials. |
EC-VA-XXXX
| Validation errors (e.g. missing or invalid parameters)
For example:
EC-VA-0001 Missing header parameter: [object]
EC-VA-0002 Invalid header parameter: [object]
EC-VA-0005 Validation failed
|
EC-BL-XXXX
| Business logic errors (entity-specific rules). These errors are documented in each resource section with resolution path. |