Errors 
Every error includes a code, the HTTP status code, a short detail, and an additional meta can be used to help the YouCan support team investigate in your error quickly.
Errors Types 
| HTTP status | Description | 
|---|---|
| 402 | There is a restriction on the requested resource for closed stores | 
| 404 | The resource requested not found or deleted | 
| 405 | Method not allowed this error happened when the endpoint requested doesn't support the current request types | 
| 422 | Unprocessable entity this error happened when the request doesn't respect the validation ex: missing required field, invalid fields type | 
| 500 | 500 Internal Server Error this error is generic happened when something got wrong in the service side while processing the request | 
Examples 
Closed store 
json
{
    "status": 402,
    "error": "store is suspended"
}Not found 
json
{
    "status": 404,
    "detail": "Customer not found",
    "meta": []
}Validation error 
json
{
    "status": 422,
    "detail": "The given data was invalid.",
    "meta": {
        "fields": {
            "email": [
                "The email field is required."
            ],
            "password": [
                "The password field is required."
            ],
            "password_confirmation": [
                "The password confirmation field is required."
            ]
        }
    }
}Unsupported request type error 
json
{
    "status": 404,
    "detail": "The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, DELETE.",
    "meta": []
}Internal error 
json
{
    "status": 500,
    "detail": "internal error"
}