post-private-pots.rst (1292B)
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:`413 Request entity too large`: 22 The uploaded body is to long, it exceeds the size limit. 23 Returned with an error code of 24 ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``. 25 :http:statuscode:`500 Internal Server Error`: 26 The server experienced an internal failure. 27 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 28 29 **Details:** 30 31 .. ts:def:: PotAddRequest 32 33 interface PotAddRequest { 34 35 // Description of the pot. Possibly included 36 // in the pot message. 37 description: string; 38 39 // Name of the pot. Must be unique per instance. 40 pot_name: string; 41 42 } 43 44 .. ts:def:: PotAddedResponse 45 46 interface PotAddedResponse { 47 48 // Unique ID for the pot. 49 pot_serial_id: Integer; 50 51 }