post-private-groups.rst (1088B)
1 .. http:post:: [/instances/$INSTANCE]/private/groups 2 3 This is used to create a group. 4 5 **Required permission:** ``groups-write`` 6 7 **Request:** 8 9 The request must be a `GroupAddRequest`. 10 11 **Response:** 12 13 :http:statuscode:`200 OK`: 14 The backend has successfully added a new group. Returns a `GroupAddedResponse`. 15 16 :http:statuscode:`404 Not found`: 17 The merchant instance is unknown. 18 :http:statuscode:`409 Conflict`: 19 A group with this name already exists. 20 Returned with ``TALER_EC_MERCHANT_PRIVATE_PRODUCT_GROUP_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:: GroupAddRequest 28 29 interface GroupAddRequest { 30 31 // Unique name for the group (unique per instance). 32 group_name: string; 33 34 // Description of the group. 35 description: string; 36 37 } 38 39 .. ts:def:: GroupAddedResponse 40 41 interface GroupAddedResponse { 42 43 // Unique ID for the group. 44 group_serial_id: Integer; 45 46 }