All requests should supply the
Accept: application/vnd.assignr.v2.hal+json header. POST requests must specify the
Content-Type: application/vnd.assignr.v2.hal+json header. Request and response bodies are JSON encoded.
Requests must be made over HTTPS. Any non-secure requests are met with a redirect (HTTP 302) to the HTTPS equivalent URI.
When you make a request through the assignr.com API, the server will return a response code that indicates whether your request was successful or not. Here are the response codes that we use in our API:
Indicates that your request was successful.
Indicates that a new resource has been created successfully with a POST command.
Indicates that a new resource has been created successfully with a POST command, or successfully deleted with a DELETE command.
The request uses incorrect syntax. Most often, this is caused by invalid JSON data.
Valid login credentials are required, or the credentials you provided are not correct.
The request is attempting to access information from a site that does not have an active subscription.
You have provided valid credentials but you don’t have permission to view the resource you have requested.
Couldn’t find the resource you requested.
Assignr uses optimistic locking for some data, which allows multiple users to view the same record for edits, but prevents two users from updating the record simultaneously. Optimistic locking compares the lock_version field that you provide against the record in the database before saving. If the lock_version attributes are equal, the resource has not been changed, and the update can proceed. Otherwise the transaction is cancelled and a 409 error is thrown. Only valid for PUT requests that update existing data, and that also include the
lock_version attribute where applicable.
The request was well-formed but was unable to be followed due to semantic errors. Typically this means that your request failed one or more validation checks, for example, creating a game without a date or time, or creating a new user without a first and last name. Only valid for PUT, POST, or DELETE requests.
The request exceeded the rate limits imposed by assignr.com. The
X-Ratelimit-Reset-Seconds-Remaining headers in this response will indicate when a request can be retried. See the Rate Limits section above for more information on other rate limit response headers provided by assignr.com.
This indicates that an unexpected server error occurred.
Indicates that we are temporarily unable to respond to your request. Please wait for a bit and try again.