HTTP Responses

The MoveUSD APIs behave consistently across the board, when it comes to HTTP statuses and error responses.

Successful responses

You can expect 2xx HTTP responses from APIs when a request was successfully process:

CodeSummaryDescription
200OKThe request was successfully received, understood and processed.
201CREATEDThe request was successfully received, understood, processed and a resource has been created as a result.
202ACCEPTEDThe request was successfully received, understood and will be processed asynchronously.
204NO CONTENTThe request was successfully received, understood, processed and an empty response was returned.

Successful responses are usually accompanied with a JSON payload (except for 204 responses) that describes the resource that was acted upon.

Error responses

Error responses, that require your attention or action, are typically returned with 4xx HTTP Status code.

CodeSummaryDescription
400BAD REQUESTThe request could not be parsed or understood.
401UNAUTHORIZEDThe request contains no or invalid credentials.
403FORBIDDENThe authenticated user is not authorised to perform the action.
404NOT FOUNDThe requested resource could not be found.
429TOO MANY REQUESTSThe API user has hit an API or swap rate limit and can not be processed at this time.

These errors response return a consistent JSON structure as payload:

{
  "code": "<error code>",
  "message: "<human-readable informational message>",
  ...<additional information fields>
}

The specification for each API operation enumerates the set of possible error codes that it may return. It is recommended to use code field to distinguish between the types of errors in the client code. message field is informational only and should not be used for error matching.

Some errors may provide additional fields to help diagnose the problem. These fields are also specified in the API specification for that operation.

Internal errors

There are occasions when an unexpected error occurs within the platform, likely due to a downstream error, outage, etc. These errors will return a 5xx response.

It is unlikely that this will require any action on your end. If the issue persists, please contact support.

Internal errors will return a generic JSON payload and do not expose any more information for security reasons.

{
  "code": "INTERNAL",
  "message": "An unexpected internal error has occurred"
}

Tips

Search endpoint responses

Search endpoints, normally GET /<resource name>, tend to only return HTTP 200 responses, even if no results were found. Instead, the items array in the response would be empty.

This is consistent with our conventions, as the search was successfully completed so a 200 response is applicable.

Large payload error response

The API platform protects against payloads that are considered too large for processing. This is a security feature and cannot be circumnavigated.

If you send a payload that is too large, you may receive a HTTP 403 response with the following payload:

{ "message: "Forbidden" }