Introduction
Are you missing a feature? Please use our Feature Board to add a suggestion or upvote existing features. Sign up to the waitlist to get notified of future updates and releases.
Good to know
- BaseURL of the API is https://instantrestapi.com/api/
- The resource name can be anything that is accepted in a URL path (such as
invoices
orcustomers
, except in the website test playground - it is fixed toresources
). api/temporary-key
andapi/waitlist
endpoints are restricted and can only be used as described in the authentication section.- All resources created are scoped to an API key and can only be accessed using that specific key.
Creating a resource
Create a resource simply by POSTing a JSON object to the API URL followed by the name of your resource. For example: to create a new invoice, send a POST request to theapi/invoices
endpoint with a request body of the invoice object.
The following requirements must be met:
- Header
Content-Type
must beapplication/json
- Body must not be empty
- Body must be a valid JSON
- Body must contain
id
field - Body must be less than 1mb
POST & PUT are functionally the same, both will “upsert” the object for the specifid id.
Filtering & Searching
The API does not currently support filtering or searching of resources.Schema
As long as the request body contains a valid JSON object, it will be accepted.All objects must include a property with name
id
that is the unique identifier.Relationships
The API does not currently support any type of relationship between resources. Instead, you may choose one of the following 2 options. 1. Embedding related resources The easiest strategy is to embed the related resources inside the top level resource. For example, you can embed a customer object or invoice lines in the invoice object as shown below:id
if you keep track of relationsship updates client side.
For example, consider the below:
DELETE
on api/invoicelines/1
, you must also do a PUT
on api/invoices/1
and remove the invoiceline from invoiceLineIds
array.
Subresources
The API does not currently support subresources. So for example, you cannot create/get an invoice line by sending a POST/GET request toapi/invoices/1/invoicelines/1
.