200
OK
The request succeeded.
The meaning of 'success' depends on the HTTP method - PUT
or POST
(the resource describing the result of the action is transmitted in the message body).
201
OK
Typically returned in response to a POST request, indicating that the request has been received but not yet actioned.
This response is intended for cases where another process or server handles the request, or for batch processing.
401
Unauthorised
Although the HTTP standard specifies 'unauthorised', semantically this response means 'unauthenticated'. That is, the client must authenticate itself to get the requested response.
The token supplied may be incorrect/expired.
413
Payload too large
The payload exceeds the limit on this API server.
Our limit is 8MB.
Reduce the payload size by splitting the data and sending over multiple calls
422
Invalid
The payload is invalid.
Payload is blank
Payload does not match the entity type expected
500
Internal server error
The server has encountered an error and it is unable to continue
Patchworks API requests must be authenticated with a bearer token. To obtain a token, you need to send a login request which includes credentials that you use to access the Patchworks dashboard.
This authentication mechanism is pre-configured and ready to use in our Core API Postman collection - if you haven't seen it, we advise checking this first!
Step 1 Create a POST request for the following endpoint:
This endpoint is for the Patchworks production environment.
Step 2 In the request body, add the email and password that you use to log into the Patchworks dashboard. You should add this as JSON - for example:
Step 3 Send the request - if successful, a token is returned. For example:
Access tokens are valid for 24 hours - for example: Issued: Wednesday 20th July at 10:03:08 GMT Expires: Tuesday 21st July at 10:03:08 GMT
Step 4 Save this token ready for use in your API requests.