For many errors, API operations return an array of one or more error objects with code, message, and fieldId properties:

[
  {
    "code": "InvalidRecipientName",
    "message": "'First Name' is required when recipient type is 'PERSON'.",
    "fieldId": "FIRST_NAME"
  },
  {
    "code": "InvalidRecipientName",
    "message": "'Last Name' is required when recipient type is 'PERSON'.",
    "fieldId": "LAST_NAME"
  }
]
  • code is useful to Brightwell Support.
  • message is meant to be useful to the end user.
  • fieldId identifies the offending json field.

For other errors, API operations return a description property instead of fieldId property:

[
  {
    "code": "AccessDenied",
    "message": "Sorry! Access denied :(",
    "description": "Exception of type 'brightwell.readyremit.common.ErrorHandling.BrightwellException' was thrown."
  }
]

200 OK

Successful GET and PUT operations return this status code.

201 Created

Successful POST operations return this status code. Get Access Token is the exception. It returns 200.

204 No Content

Successful DELETE operations return this status code.

400 Bad Request

This status code usually means that one of the request data field values (e.g. dstCountryIso3Code) is unsupported. Here is an example from Get Recipient Fields:

[
  {
    "code": "UnsupportedCountry",
    "message": "'DestinationCountryISO3Code' must be a valid ISO 3 country.",
    "fieldId": "DestinationCountryISO3Code"
  },
  {
    "code": "UnsupportedCurrency",
    "message": "'DestinationCurrencyISO3Code' must be a valid ISO 3 country.",
    "fieldId": "DestinationCurrencyISO3Code"
  }
]

401 Unauthorized

This status code means the request has an invalid access token. Below is an example from Get Recipient Fields. Note that the response is an object rather than an array.

{
  "code": "000",
  "message": "Something went wrong!",
  "description": "Unauthorized"
}

403 Forbidden

This status code means the request has a valid access token, but the caller is not authorized to execute the operation. Here is an example from Create Recipient:

[
  {
    "code": "AccessDenied",
    "message": "Sorry! Access denied :(",
    "description": "Exception of type 'brightwell.readyremit.common.ErrorHandling.BrightwellException' was thrown."
  }
]

404 Not Found

GET, PUT, and DELETE operations that use an id to specify a particular resource (e.g. sender, receiver) return this status code when the service cannot match the id to a resource. Here is an example from Get Recipient:

[
  {
    "code": "RecipientNotFound",
    "message": "Recipient not found.",
    "description": "Recipient cannot be found."
  }
]

500 Internal Server Error

This status code means the ReadyRemit server did not handle the request properly.

[
  {
    "code": "string",
    "message": "string",
    "fieldId": "string"
  }
]