Contents

PATCH [/instances/$INSTANCES]/private/pots/$POT_ID#

This is used to update a pot.

Required permission: pots-write

Request:

The request body must be a PotModifyRequest.

Response:

204 No content:

The pot has successfully modified.

404 Not found:

The pot or instance is unknown to the backend.

409 Conflict:

The pot total did not match the expected total and thus resetting the pot failed.

Details:

 interface PotModifyRequest {

   // Description of the pot. Possibly included
   // in the pot message.
   description: string;

   // Name of the pot. Must be unique per instance.
   pot_name: string;

   // Expected current totals amount in the pot.
   // Should be given if new_pot_total is specified
   // as this allows checking that the pot total did
   // not change in the meantime.  However, this is
   // not enforced server-side, the client may choose
   // to not use this safety-measure.
   expected_pot_totals?: Amount[];

   // Expected new total amounts to store in the pot.
   // Does **not** have to be in the same currencies as
   // the existing amounts in the pot. Used to reset
   // the pot and/or change the amounts.
   new_pot_totals?: Amount[];
}