post-private-pots.rst (1098B)
1 .. http:post:: [/instances/$INSTANCE]/private/pots 2 3 This is used to create a pot. 4 5 **Required permission:** ``pots-write`` 6 7 **Request:** 8 9 The request must be a `PotAddRequest`. 10 11 **Response:** 12 13 :http:statuscode:`200 OK`: 14 The backend has successfully added a new pot. Returns a `PotAddedResponse`. 15 16 :http:statuscode:`404 Not found`: 17 The merchant instance is unknown. 18 :http:statuscode:`409 Conflict`: 19 A pot with this name already exists. 20 Returned with ``TALER_EC_MERCHANT_PRIVATE_MONEY_POT_CONFLICTING_NAME``. 21 :http:statuscode:`500 Internal Server Error`: 22 The server experienced an internal failure. 23 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 24 25 **Details:** 26 27 .. ts:def:: PotAddRequest 28 29 interface PotAddRequest { 30 31 // Description of the pot. Possibly included 32 // in the pot message. 33 description: string; 34 35 // Name of the pot. Must be unique per instance. 36 pot_name: string; 37 38 } 39 40 .. ts:def:: PotAddedResponse 41 42 interface PotAddedResponse { 43 44 // Unique ID for the pot. 45 pot_serial_id: Integer; 46 47 }