Update Reward Store Offer

Updates, or edits, an existing reward store offer, using a specific offer ID to identify the offer. The task features a two-step retrieval process by which reward stores and then their offers are obtained before making the necessary modifications.

Sequence Diagram

See the overall flow for this task below.

DEVELOPER DEVELOPER CLIENT MIDDLEWARE CLIENT MIDDLEWARE SESSIONM SESSIONM UPDATE REWARD STORE OFFER Determine reward store offer must be updated Get reward stores Return reward stores Get reward store offers Return reward store offers Add or edit reward store offer Return edited (updated) offer

API Endpoints & Constraints

POST /api/2.0/offers/rewardstores/add_or_edit_offer

Since the root_offer_id needs to be specified in order to edit the offer, whoever is implementing this function needs to keep track of the IDs of any offers created previously so they can be obtained later.

Alternative Path

The sequence diagram above contains a call to get the reward store offers. This call, however, can be omitted if the developer already knows the root offer ID.