API
Postman
Get the collection
There are two ways in. Both give you the same collection: one folder per part of the API, one request per endpoint.
- Download it. On resell.store/tools/api, choose Download collection. If you have a key, it's already filled in. In Postman, choose Import and drop the file in.
- Import the link. In Postman, choose Import and paste
https://api.resell.store/v1/postman.json. This copy has no key in it, so set yours next.
Set your key
Every request sends the collection's apiKey variable as Authorization: Bearer …, so you set it in one place. Your key is on resell.store/tools/api: choose Copy next to it. No key yet? Choose Make a key there first.
- In Postman's sidebar, open the resell.store API collection.
- Go to its Variables tab and find
apiKey. - Paste your key as its value. If Postman shows both an Initial value and a Current value, use Current value: it stays on your computer and isn't synced or shared.
- Save the collection.
The key travels with the collection
apiKey, or keep the key in an environment instead (below).Prefer environments? Make one with a variable called apiKey holding your key and select it. A variable in the selected environment wins over the collection's, so you can leave the collection's apiKey empty and keep one environment per key.
Send your first request
Open Account, then Who this key belongs to, and choose Send. It calls GET /me and answers with your name, what the key may do and your shops. If that works, everything else will.
Each request has an example response saved with it, under Examples, so you can see what comes back before you send it. The description beside each request says which permission it needs.
Filling in a request
| In Postman | What to do |
|---|---|
| Path variables | Paths like /listings/:id need the id. Fill it in under Params, in Path Variables. Ids come from list requests, like Listings, then the request that lists them. |
| Query params | Ticked ones come from the docs example. The rest are there unticked: tick the ones you want and give them a value. |
| Body | JSON, taken from the docs example, so it already has the right fields. Change the values to yours. Money is in dollars, like 185. |
| Photo uploads | The body is form data with a file field. Choose a picture from your computer for it. |
Drafts are safe to try
The variables
| Variable | What it is |
|---|---|
baseUrl | Where requests go: https://api.resell.store/v1. Every request starts with it. |
apiKey | Your secret key (rs_live_…). An agent link's token works here too, with only the permissions you gave it. |
Keeping it up to date
The collection is made from the same list as these docs, so new endpoints turn up in it straight away. To get them, import the link or a fresh download again. It's the same collection, so Postman offers to replace the one you have.
Replacing it can reset your variables. Check apiKey afterwards, or keep your key in an environment so it's never touched.
Prefer OpenAPI? openapi.json also imports into Postman. It has the same endpoints but without the key set up for you.
If something's wrong
401 unauthorized:apiKeyis empty, or it's an old key. Making a new key stops the old one, so copy the current one from resell.store/tools/api.403 forbidden: the key can't do that. Secret keys can do everything, so this usually means you're using an agent link without that permission. See Keys and permissions.not_foundorinvalid_requeston a request with:id: the path variable is empty, or it isn't one of yours.429 rate_limited: you've used this month's requests. See Errors and limits.