API reference: Offers
Counter an offer
POST
https://dev.siteswap.pro/api/v1/offers/{id}/counterAnswers an open offer of the other company with other terms, where the marketplace takes trades. The offer answered stops being open in the same step, so only one of the two can be accepted.
Needs the offers scope.
Needs an API key or sign-in token in Authorization: Bearer or X-API-Key. Authentication
Path parameters
idstringrequiredThe offer to answer
Body
kind"cash" | "trade" | "both"Left out where the listing takes cash only
quantitynumberrequiredHow much or how many, in the listing's unit
totalnumberThe total cash, in dollars
cash_from"me" | "them"With
both: who pays the cashtrade_listing_idstringOne of your listings (or theirs, when you counter as the poster)
trade_quantitynumbertrade_textstringAn item offered in trade, in words, when it is not a listing
want_textstringOn a wanted listing: what you want in return
notestringResponses
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
413too_large: the body is over 256 KB
429rate_limited or daily_quota: wait for Retry-After seconds
Response fields
idstringrequiredlisting_idstringrequiredlisting_titlestringrequiredstatus"open" | "accepted" | "declined" | "withdrawn" | "expired" | "countered" | "completed" | "cancelled"requiredWhere the offer stands
direction"sent" | "received"requiredsent when your company made itother_companyobjectrequiredother_company.slugstringrequiredThe company's address on SiteSwap,
/c/{slug}other_company.namestringrequiredother_company.kindstringrequiredWhat kind of company, for example
contractor or supplierother_company.urlstringrequiredIts public page
kind"cash" | "trade" | "both"requiredCash, a trade, or a trade with cash
quantitynumberrequiredunitstringrequiredtotal_centsintegerrequiredThe cash part, in US cents
trade_listing_idstring | nullrequiredA listing offered in trade
trade_quantitynumber | nullrequiredHow much of it
trade_textstring | nullrequiredAn item offered in trade, in words
want_textstring | nullrequiredWhat is wanted in return, in words
notestringrequiredcounter_ofstring | nullrequiredThe offer this one answers
expires_atstringrequiredAn open offer ends then. ISO 8601 in UTC
created_atstringrequiredWhen it was made. ISO 8601 in UTC
decided_atstring | nullrequiredWhen it was answered
SiteSwap API v1Support