- POST [/instances/$INSTANCE]/private/categories#
This is used to create a new category for the inventory. Since API version v16.
Required permission:
categories-writeRequest:
The request is a CategoryCreateRequest.
Response:
- 200 Ok:
The response is a CategoryCreatedResponse.
- 400 Bad Request:
The request body is malformed.
- 409 Conflict:
A category with this name already exists. Returned with
TALER_EC_MERCHANT_PRIVATE_POST_CATEGORIES_CONFLICT_CATEGORY_EXISTS.- 500 Internal Server Error:
The server experienced an internal failure. Returned with
TALER_EC_GENERIC_DB_START_FAILED,TALER_EC_GENERIC_DB_FETCH_FAILED,TALER_EC_GENERIC_DB_SOFT_FAILUREorTALER_EC_GENERIC_DB_COMMIT_FAILED.
Details:
interface CategoryCreateRequest { // Name of the category. name: string; // Translations of the name into various // languages. name_i18n?: { [lang_tag: string]: string }; }
interface CategoryCreatedResponse { // Number of the newly created category. category_id: Integer; }