taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

post-private-categories.rst (785B)


      1 .. http:post:: [/instances/$INSTANCE]/private/categories
      2 
      3   This is used to create a new category for the inventory.
      4   Since API version **v16**.
      5 
      6   **Required permission:** ``categories-write``
      7 
      8   **Request:**
      9 
     10     The request is a `CategoryCreateRequest`.
     11 
     12   **Response:**
     13 
     14   :http:statuscode:`200 Ok`:
     15     The response is a `CategoryCreatedResponse`.
     16 
     17   **Details:**
     18 
     19   .. ts:def:: CategoryCreateRequest
     20 
     21     interface CategoryCreateRequest {
     22 
     23       // Name of the category.
     24       name: string;
     25 
     26       // Translations of the name into various
     27       // languages.
     28       name_i18n?: { [lang_tag: string]: string };
     29 
     30     }
     31 
     32   .. ts:def:: CategoryCreatedResponse
     33 
     34     interface CategoryCreatedResponse {
     35 
     36       // Number of the newly created category.
     37       category_id: Integer;
     38     }