- POST [/instances/$INSTANCES]/private/tokenfamilies#
This is used to create a token family.
Required permission:
tokenfamilies-writeRequest:
The request must be a TokenFamilyCreateRequest.
Response:
- 204 No content:
The token family was created successfully.
- 404 Not found:
The merchant backend is unaware of the instance.
Details:
interface TokenFamilyCreateRequest { // Identifier for the token family consisting of unreserved characters // according to RFC 3986. slug: string; // Human-readable name for the token family. name: string; // Human-readable description for the token family. description: string; // Optional map from IETF BCP 47 language tags to localized descriptions. description_i18n?: { [lang_tag: string]: string }; // Additional meta data, such as the trusted_domains // or expected_domains. Depends on the kind. extra_data?: object; // Start time of the token family's validity period. // If not specified, merchant backend will use the current time. valid_after?: Timestamp; // End time of the token family's validity period. valid_before: Timestamp; // Validity duration of an issued token. duration: RelativeTime; // Rounding granularity for the start validity of keys. // The desired time is rounded down to a multiple of this // granularity and then the start_offset is added to // compute the actual start time of the token keys' validity. // The end is then computed by adding the duration. // Must be 1 minute, 1 hour, 1 day, 1 week, 30 days, 90 days // or 365 days (1 year). validity_granularity: RelativeTime; // Offset to subtract from the start time rounded to validity_granularity // to compute the actual start time for a key. // Default is zero. start_offset: RelativeTime; // Kind of the token family. kind: TokenFamilyKind; }
enum TokenFamilyKind { Discount = "discount", Subscription = "subscription", }