SiteSwapDevelopers
API reference: Offers

Send an offer

POSThttps://dev.siteswap.pro/api/v1/offers

Sends an offer on a listing of another company, where its marketplace takes offers: cash, a trade or both, as the listing allows. Accepting it later sets the quantity aside.

Needs the offers scope.

Needs an API key or sign-in token in Authorization: Bearer or X-API-Key. Authentication

Body

kind"cash" | "trade" | "both"
Left out where the listing takes cash only
quantitynumberrequired
How much or how many, in the listing's unit
totalnumber
The total cash, in dollars
cash_from"me" | "them"
With both: who pays the cash
trade_listing_idstring
One of your listings (or theirs, when you counter as the poster)
trade_quantitynumber
trade_textstring
An item offered in trade, in words, when it is not a listing
want_textstring
On a wanted listing: what you want in return
notestring
listing_idstringrequired
The listing

Responses

201Created
400bad_request, key_in_url or invalid_json: the request could not be read
401missing_key or invalid_key: no key, or a key that is not valid or was revoked
403key_pending, key_declined, scope_missing, terms_required or account_unavailable: see Errors
404not_found: nothing here that you may see
409second_offer: you have an open offer on this listing already; listing_closed
413too_large: the body is over 256 KB
422invalid: the offer was refused; message says why
429rate_limited or daily_quota: wait for Retry-After seconds

Response fields

idstringrequired
listing_idstringrequired
listing_titlestringrequired
status"open" | "accepted" | "declined" | "withdrawn" | "expired" | "countered" | "completed" | "cancelled"required
Where the offer stands
direction"sent" | "received"required
sent when your company made it
other_companyobjectrequired
other_company.slugstringrequired
The company's address on SiteSwap, /c/{slug}
other_company.namestringrequired
other_company.kindstringrequired
What kind of company, for example contractor or supplier
other_company.urlstringrequired
Its public page
kind"cash" | "trade" | "both"required
Cash, a trade, or a trade with cash
quantitynumberrequired
unitstringrequired
total_centsintegerrequired
The cash part, in US cents
trade_listing_idstring | nullrequired
A listing offered in trade
trade_quantitynumber | nullrequired
How much of it
trade_textstring | nullrequired
An item offered in trade, in words
want_textstring | nullrequired
What is wanted in return, in words
notestringrequired
counter_ofstring | nullrequired
The offer this one answers
expires_atstringrequired
An open offer ends then. ISO 8601 in UTC
created_atstringrequired
When it was made. ISO 8601 in UTC
decided_atstring | nullrequired
When it was answered
SiteSwap API v1Support