Repository navigation
Closed
Description
Parent
Why this reverses a recorded decision
docs/cli-spec.md §13 lists "offers and anything touching wallet, shipping or payments" as (never), and docs/spec-wallapop-cli-v1.md repeats it. The owner reversed that on 2026-09-16: offers are now in scope. Wallet, shipping and payments stay out. §13 and the ADR trail must be updated in the same PR that ships this, so the spec stops contradicting the code.
What to build
Price offers are a first-class Wallapop chat action, not a text message. Today the CLI drops them silently: Chat.Subscribe filters on u.type and keeps only text and server-message, so an offer arriving mid-conversation shows as nothing at all in chat open and chat show.
chat offer CONV AMOUNTsends a price offer on a conversationchat offer accept CONV/chat offer decline CONVrespond to the other side's offer- Offers appear in
chat show,chat listand thechat openstream with their amount, currency and state (pending, accepted, declined, expired) - Unknown future message types are surfaced rather than discarded, so the next chat feature Wallapop adds does not vanish
Acceptance criteria
- The real wire shapes are recorded live against the owner's two accounts (PubNub meta type and payload for an offer, and whatever REST endpoint the web calls to create and respond to one), and written into
docs/cli-spec.mdthe way the other recorded shapes are -
internal/fakewallapopserves those recorded shapes; tests assert on them - Sending, receiving, accepting and declining are each verified live between the two accounts, on the owner's own throwaway listing
-
Chat.Subscribeno longer discards message types it does not recognise -
docs/cli-spec.md§13 anddocs/spec-wallapop-cli-v1.mdare corrected, with an ADR recording why the decision changed - Money-adjacent actions beyond offers (wallet, shipping, payments) stay out, and the MCP server in MCP stdio server and harness install #8 does not expose offer sending
Blocked by
- Live-verify chat receive in chat open #3 (the subscribe loop's routing is being fixed there)
Metadata
Metadata
Assignees
Labels
No labels
Activity
Microck commentedon Sep 16, 2026
Note
🤖 Claude Opus 5 responding on behalf of Microck
Scope narrowed by the owner on 2026-09-16, after discovery showed the ticket's original premise was wrong.
What discovery found
Offers are not a chat message type. Read from the shipped web client (
web-static.wallapop.com/angular/es/, 2026-09-16):textandserver-message, which are the two the CLI already keeps. Offers reach chat asserver-messagethird-voice payloads:message.payload = {type, payload: "<json string>"}, the inner JSON being{text, type, actionURL, buttons:[{"loc-value", action}]}, with inner types includingdelivery,delivery_generic,delivery_transaction_claim_period_started,drop_priceandprice_drop.api/v3/delivery/..., which is Wallapop's shipping product, and accepting leads toapi/v3/payments/c2b/stripe.So "offers, but wallet, shipping and payments stay out" is not a line Wallapop's API draws. Accepting an offer commits to a real shipped sale against a real card.
Revised scope
In: send an offer, decline an offer, and display offers wherever messages are displayed.
Out for now: accepting. That is the branch that charges a card, and it is deferred to its own ticket so it gets approved on its own terms rather than riding in on this one.
Recorded live,
defaultaccount, 2026-09-16GET https://api.wallapop.com/bff/delivery/make-an-offer?item_id=vjrewv00elzkneedsAuthorization: Bearer,X-DeviceOS: 0andX-AppVersion: 0. Without the last it is a bare 400, the same quirksavedsearchhas. It answers:{"restriction":{"max_offers_per_day":10,"remaining_offers_per_day":10,"max_offer_percentage":30}, "item":{"title":"...","price":{"amount":1.00,"currency":"EUR"}}, "items_price":{"amount":1.00,"currency":"EUR"},"offer":null, "suggested_offers":[]}max_offer_percentage: 30is a floor: an offer has to be at least 70 percent of the asking price. Repeatableitem_idcovers bundles, and&offer_id=reloads an existing offer.From the bundle, not yet exercised
POST api/v3/delivery/buyer/offerswith{offer_id, offer_price_amount, offer_price_currency, item_ids}PATCH api/v3/delivery/offers/{offerId}/statuswith{status}, valuesACCEPTEDandDECLINEDPATCH api/v3/delivery/offers/{offerId}/offer-pricewith{offer_price_amount, offer_price_currency}, the counter-offerGET bff/delivery/offer-detailsfor the status cardRevised acceptance criteria
chat offer CONV AMOUNTsends an offer; the daily cap and the 70 percent floor are usage errors before anything is sent, not surprises from the APIchat offer decline CONVdeclines onechat show,chat listand thechat openstream with amount, currency and stateChat.Subscribestops discarding message types it does not recognise, so the next thing Wallapop adds does not vanishdocs/cli-spec.md§13 anddocs/spec-wallapop-cli-v1.mdare corrected, with an ADR recording the reversal and the accept carve-outchat: send and decline price offers, with live display (#27)