Skip to content
Last updated

API Basics

To ensure a successful integration, this documentation covers all necessary guidelines, rules, formats, and environment configurations you’ll need. Follow the instructions carefully to develop and go live with Mozrest smoothly.

Happy coding!

Authentication

Provide your API key to authenticate all requests. Keep it secret! No password is required.

Important:

  • Only HTTPS requests are accepted.
  • Your API key will be provided by the Mozrest team.

Example Request

curl "https://api-sandbox.mozrest.com/v1/bc" -H "Authorization: Bearer {api_key}"

Errors

Mozrest uses standard HTTP response codes to indicate request success or failure.

HTTP Status Code Summary

CodeStateDescription
200OKEverything worked as expected
400Bad requestMissing a required parameter
401UnauthorizedAPI key not valid
402Request FailedParameters were valid but request failed
403ForbiddenAccess forbidden
404Not FoundThe requested item does not exist
5xxServer errorsSomething went wrong on Mozrest's server

Versioning

Mozrest releases new API versions when making breaking changes. The current version is v1.

Translations

Mozrest allows translation on certain entities. To request a translatable object on a specific language, include the header x-locale.

If the requested translation is not available. The default one set by the venue will be returned.

Pagination

Mozrest utilizes offset-limit pagination, using the parameter offset and limit.

KeyConstraintsDefaultDescription
offset0 to ...0The first requested element
limit0 to 5010The requested number of elements

Environments

Production:
https://api.mozrest.com/

Sandbox:
https://api-sandbox.mozrest.com/