Resources in the REST API
Learn how to naviguate the resources provided by the TextMaster API.
Last updated
Was this helpful?
Learn how to naviguate the resources provided by the TextMaster API.
Last updated
Was this helpful?
This describe the resources that make up the official TextMaster REST API. If you have any problems or requests, please contact .
The current version of our API is v1. You must explicitly request this version by appending the version number at the end of the URL.
All API access is done over HTTPS, and accessed from https://api.textmaster.com/
. All data is sent and received as JSON.
A sandbox environment is made available for tests and can be accessed from https://api.textmasterstaging.com/
. It behaves the same way as the production environment.
Many API endpoints take optional parameters. For GET
requests, any parameters not specified as a segment in the path can be passed as an HTTP query string parameter.
In this example, the 5f7dcc7d8b819239aff5af7c
value is provided for the :expertise_id
parameter in the path while :locale
is passed in the query string.
For POST
, PATCH
, PUT
and DELETE
requests, parameters not included in the URL should be encoded as JSON with a Content-Type
header set to application/json
.
There are four possible types of client errors on API calls that receive request bodies:
Sending invalid JSON will result in a 400 Bad Request
response.
Sending an unsupported HTTP verb will result in a 405 Method Not Allowed
response.
Sending or requesting an unsupported format will result in a 406 Not Acceptable
response.
Sending invalid data will result in a 422 Unprocessable Entity
response.
The API uses HTTP redirection where appropriate. Clients should assume that any request may result in a redirection. Receiving an HTTP redirection is not an error and clients should follow the redirect. Redirect responses will have a Location
header field which contains the URI of the resource to which the client should repeat the requests.
301
Permanent redirection. The URI you used to make the request has been superseded by the one specified in the Location
header field. This an all future requests to this resource should be directed to the new URI.
302, 307
Temporary redirection. The request should be repeated verbatim to the URI specified in the Location
header field but clients should continue to use the original URI for future requests.
Where possible, the API strives to use appropriate HTTP verbs for each action.
GET
Used for retrieving resources.
POST
Used for creating resources.
PUT
Used for replacing resources or collections.
DELETE
Used for deleting resources.
Requests that return multiple items will be paginated to 100 items by default. You can specify further pages with the page
parameter. For some resources, you can also set a custom page size up to 100 with the per_page
parameter. Note that for technical reasons, not all endpoints will honour this parameter.
Note that page numbering is 1-based and that omitting the page
parameter will return the first page.
All timestamps return an format:
Other HTTP status codes may be used in accordance to the .