API

Postman

Every request in the API, ready to send from Postman. Import it, set your key once, and try anything.

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.

  1. 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.
  2. 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.

  1. In Postman's sidebar, open the resell.store API collection.
  2. Go to its Variables tab and find apiKey.
  3. 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.
  4. Save the collection.

The key travels with the collection

A downloaded collection has your key in it, and so does any collection where you put it in the initial value. Before you share the collection or move it to a team workspace, clear 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 PostmanWhat to do
Path variablesPaths 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 paramsTicked ones come from the docs example. The rest are there unticked: tick the ones you want and give them a value.
BodyJSON, taken from the docs example, so it already has the right fields. Change the values to yours. Money is in dollars, like 185.
Photo uploadsThe body is form data with a file field. Choose a picture from your computer for it.

Drafts are safe to try

Making a listing gives you a draft. Nobody sees it until you publish it, and you can delete it afterwards.

The variables

VariableWhat it is
baseUrlWhere requests go: https://api.resell.store/v1. Every request starts with it.
apiKeyYour 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: apiKey is 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_found or invalid_request on 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.