Skip to main content

Publish, accept or decline an offer

POST 

/v1/offers/:id/state

Moves an offer to another state. An offer goes from DRAFT to PUBLISHED, and from there to ACCEPTED or DECLINED. Requires the write:offers scope.

  • Publish (PUBLISHED): the customer can see the offer. A draft whose last valid day (validTo) is over, or whose price is zero or less, cannot be published (409 offer_not_publishable; message says which).
  • Accept (ACCEPTED): records the order, for example one the customer gave you by phone. The offer is taken as offered: on each roof the module variant marked recommended, the active battery and wallbox, the recommended emergency power, and no optional extras. Possible until the end of the validTo day, German time (409 offer_expired after that).
  • Decline (DECLINED): the customer can no longer order it.

An offer cannot go back to DRAFT (409 offer_not_draft), and a draft cannot be accepted or declined before it is published (409 offer_not_published). To change a published offer, create a new one.

Request​

Responses​

The offer in its new state.