SiteSwapDevelopers
Principles

Errors

A stable code, a message for people, and the request id.

Every refusal answers JSON:

JSON
{ "error": { "code": "scope_missing", "message": "This key was not granted offers. Ask for a key with it on the API keys page.", "request_id": "3f9a1c0b7d2e" } }

Branch on code; message is for people and may change. field names the field when one was refused.

StatusCodesWhat to do
400invalid, invalid_json, invalid_cursor, key_in_urlFix the request. Never retry it unchanged.
401missing_key, invalid_key, invalid_token, wrong_passwordSend a valid key. A revoked key stays revoked.
403key_pendingWait for approval. The API keys page shows where it stands.
403key_declinedAsk for a new key, saying what it is for.
403scope_missing, role_cannotAsk for a key with that scope, or ask an owner or admin.
403terms_required, account_unavailable, no_companyThe person behind the key signs in on SiteSwap and does what it asks.
404not_found, marketplace_closedNothing there that you may see. Offers, saved searches and other private things of others are always 404, never 403.
405method_not_allowedCheck the method in the reference.
409listing_closed, second_offer, not_allowed, not_enough_left, listing_changed, offer_expired, duplicate, too_many_keysThe state moved on. Read it again before you try.
413too_largeBodies are at most 256 KB.
415not_jsonSend Content-Type: application/json.
422invalid, photo_refused, too_many_photosThe form's own check refused it. message says what to change.
429rate_limited, daily_quota, daily_limit, too_many_bad_keysWait the seconds in Retry-After, then try again.
500server_errorTry again later. Write to support with the request id if it keeps happening.
SiteSwap API v1Support