taler-docs

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

patch-private-tokenfamilies-TOKEN_FAMILY_SLUG.rst (1625B)


      1 .. http:patch:: [/instances/$INSTANCE]/private/tokenfamilies/$TOKEN_FAMILY_SLUG
      2 
      3   This is used to update a token family.
      4 
      5   **Required permission:** ``tokenfamilies-write``
      6 
      7   **Request:**
      8 
      9   The request must be a `TokenFamilyUpdateRequest`.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`204 No Content`:
     14     The token family was successsful updated.
     15 
     16   :http:statuscode:`400 Bad Request`:
     17     The request body is malformed (e.g. valid_after >= valid_before).
     18     Returned with ``TALER_EC_GENERIC_PARAMETER_MALFORMED``.
     19 
     20   :http:statuscode:`404 Not found`:
     21     The merchant backend is unaware of the token family or instance.
     22     Returned with ``TALER_EC_MERCHANT_PATCH_TOKEN_FAMILY_NOT_FOUND``.
     23 
     24   :http:statuscode:`500 Internal Server Error`:
     25     The server experienced an internal failure.
     26     Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED`` or
     27     ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``.
     28 
     29   **Details:**
     30 
     31   .. ts:def:: TokenFamilyUpdateRequest
     32 
     33     interface TokenFamilyUpdateRequest {
     34 
     35       // Human-readable name for the token family.
     36       name: string;
     37 
     38       // Human-readable description for the token family.
     39       description: string;
     40 
     41       // Optional map from IETF BCP 47 language tags to localized descriptions.
     42       description_i18n: { [lang_tag: string]: string };
     43 
     44       // Additional meta data, such as the ``trusted_domains``
     45       // or ``expected_domains``. Depends on the ``kind``.
     46       extra_data?: object;
     47 
     48       // Start time of the token family's validity period.
     49       valid_after: Timestamp;
     50 
     51       // End time of the token family's validity period.
     52       valid_before: Timestamp;
     53 
     54    }