taler-docs

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

get-private-tokenfamilies-TOKEN_FAMILY_SLUG.rst (2769B)


      1 .. http:get:: [/instances/$INSTANCE]/private/tokenfamilies/$TOKEN_FAMILY_SLUG
      2 
      3   This is used to get detailed information about a specific token family.
      4 
      5   **Required permission:** ``tokenfamilies-read``
      6 
      7   **Response:**
      8 
      9   :http:statuscode:`200 OK`:
     10     The merchant backend has successfully returned the detailed information
     11     about a specific token family. Returns a `TokenFamilyDetails`.
     12 
     13   :http:statuscode:`401 Unauthorized`:
     14     The request is unauthorized.
     15   :http:statuscode:`404 Not found`:
     16     The merchant backend is unaware of the token family or instance.
     17     Returned with ``TALER_EC_MERCHANT_GENERIC_TOKEN_FAMILY_UNKNOWN``.
     18   :http:statuscode:`500 Internal Server Error`:
     19     The server experienced an internal failure.
     20     Returned with ``TALER_EC_GENERIC_DB_FETCH_FAILED`` or
     21     ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``.
     22 
     23   **Details:**
     24 
     25   The `TokenFamilyDetails` object describes a configured token family.
     26 
     27   .. ts:def:: TokenFamilyDetails
     28 
     29     interface TokenFamilyDetails {
     30 
     31       // Identifier for the token family consisting of unreserved characters
     32       // according to RFC 3986.
     33       slug: string;
     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       // No token validities can start before this time
     50       // (but they could be sold before).
     51       valid_after: Timestamp;
     52 
     53       // End time of the token family's validity period.
     54       // No tokens will be accepted after this time.
     55       valid_before: Timestamp;
     56 
     57       // Validity duration of an issued token.
     58       duration: RelativeTime;
     59 
     60       // Rounding granularity for the start validity of keys.
     61       // The desired time is rounded down to a multiple of this
     62       // granularity and then the ``start_offset`` is added to
     63       // compute the actual start time of the token keys' validity.
     64       // The end is then computed by adding the ``duration``.
     65       validity_granularity: RelativeTime;
     66 
     67       // Offset in seconds to subtract from the start time rounded to ``validity_granularity``
     68       // to compute the actual start time for a key.
     69       start_offset: RelativeTime;
     70 
     71       // Kind of the token family.
     72       kind: TokenFamilyKind;
     73 
     74       // How many tokens have been issued for this family.
     75       issued: Integer;
     76 
     77       // How many tokens have been used for this family.
     78       used: Integer;
     79 
     80    }