For the complete documentation index, see llms.txt. This page is also available as Markdown.

Errors

Mews Loyalty Partner API follows RFC 9457 (Problem Details for HTTP APIs) as the standard for error responses. Your API must return errors in this format.

Custom errors

Your API can return an error which isn't specified in this document (i.e. with different type URI), however, users will see only a generic error message.

Error properties

The error response object contains the following properties:

Property
Type
Contract
Description

type

string

required

URI identifying the top-level problem type.

status

integer

required

HTTP status code.

title

string

required

Short, human-readable summary of the problem type.

detail

string

optional

Human-readable explanation specific to this occurrence of the problem.

instance

string

optional

URI identifying this specific occurrence of the problem for tracing.

errors

array of objects

optional

Field-level validation errors related to the request payload.

errors[].type

string

required when errors is present

URI identifying the field-level error type.

errors[].pointer

string

required when errors is present

JSON Pointer to the affected field in URI fragment form (e.g., #/customer/email), formatted according to the RFC 6901 fragment representation rules.

errors[].detail

string

optional

Human-readable explanation of the field-level validation error.

Top-level errors

Top-level errors describe the general nature of the problem. The type URI identifies the error type and links to documentation describing it.

core/bad-request

HTTP status: 400. The request is syntactically invalid or missing required fields.

core/unauthorized

HTTP status: 401. Authentication is missing or invalid.

core/not-found

HTTP status: 404. The requested resource was not found.

core/request-timeout

HTTP status: 408. The server timed out waiting for the request to complete.

core/unprocessable-entity

HTTP status: 422. The request is valid but cannot be processed due to business logic.

core/too-many-requests

HTTP status: 429. The client has exceeded the rate limit.

core/internal-server-error

HTTP status: 500. An unexpected server-side error occurred.

loyalty/invalid-member-search-criteria

HTTP status: 400. The search payload is syntactically valid, but the combination of fields does not meet search requirements.

Field-level errors

Field-level errors appear in the errors array of a top-level error response. They identify which specific field caused the validation failure using RFC 6901 (JSON Pointer) syntax in the pointer field.

core/field-required

The field is required but missing from the request.

core/field-invalid-format

The value has an invalid format for the expected field type.

core/field-too-short

The value is shorter than the minimum allowed length.

core/field-too-long

The value exceeds the maximum allowed length.

core/field-out-of-range

A numeric value is outside the acceptable range.

core/field-invalid-type

The field has an unexpected or invalid data type.

core/field-not-allowed-value

The value does not match the allowed enum values.

core/field-duplicate

A duplicate value was provided where uniqueness is required.

core/field-email-invalid

The email address format is invalid.

Array pointer examples

Field-level errors can reference elements within arrays using JSON Pointer notation. The array index is zero-based.

Last updated

Was this helpful?