Create an offline generic vault

Overview

This endpoint is used to create vaults that store any data that does not represent a credit card.

An offline vault can be created as a PERPETUAL, TIME_EXPIRY or LIMITED vault:

Vault Type Description How to create
PERPETUAL This is the default vault type. This allows you to read and update the vault as many times as required without restrictions Don't specify the maxUsage or expiryDate field in the vault object
TIME_EXPIRY Allows you to read or update a vault as many times as required up until the ISO 8601 specified expiry date Specify the expiryDate field in the vault object
LIMITED Allows you to read the vault maxUsage amount of times. Updates do not count as a vault usage Specify the maxUsage field in the vault object

Details on valid time expiry and limited fields::

maxUsage: Determines the maximum amount of times the vault may be read. FAQ
Type: long
Min value: 1
Presence: optional
expiryDate: Determines the period of time you may read/update this vault before it is deleted
Type: string
Format: ISO 8601 time-date
Example: "2018-09-27T06:55:23.045Z"
Presence: optional

No auto-expiry mechanism will be applied to generic vaults even if they are not used for a year or longer.
For more information about offline vaults see here.

Additionally the user may create metadata tags for their vault.

metadata {: Add metadata tags to the vault. FAQ

This JSON Object contains key/value pairs, with each pair representing a metadata tag.

Type: JSON Object
Format: <key>: <value>
Presence: optional
Max Key/Value pairs: 50
<key>: The key of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: required
Min length: 1
Max length: 32
<value>: The value of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: optional
Min length: 0
Max length: 255

Structure

{
application {: The application details
Type: JSON Object
Presence: required
apiKey: The application's api key
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
uuid: The application's uuid
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
username: The username that this vault is associated with. FAQ
Type: string
Values: alphanumeric, dashes, spaces, underscores
Min length: 1
Max length: 64
Presence: required
externalRef: Your reference to this operation for audits. FAQ
Type: string
Values: utf8
Min length: 1
Max length: 64
Presence: optional
vault {: The vault to create
Type: JSON Object
Presence: required
content: The content for the vault to store
Type: string
Value: utf8
Presence: required
maxUsage: Determines the maximum amount of times the vault may be read. FAQ
Type: long
Min value: 1
Presence: optional
expiryDate: Determines the period of time you may read/update this vault before it is deleted
Type: string
Format: ISO 8601 time-date
Example: "2018-09-27T06:55:23.045Z"
Presence: optional
name: The name of the vault
Type: string
Values: utf8
Min length: 1
Max length: 64
Presence: required
metadata {: Add metadata tags to the vault. FAQ

This JSON Object contains key/value pairs, with each pair representing a metadata tag.

Type: JSON Object
Format: <key>: <value>
Presence: optional
Max Key/Value pairs: 50
<key>: The key of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: required
Min length: 1
Max length: 32
<value>: The value of the metadata tag.
Type: string
Values: utf8 (alphanumeric, dashes, underscores, spaces)
Presence: optional
Min length: 0
Max length: 255
}
{
responseStatus {: Contains details about the response status
Type: JSON Object
Presence: required
code: The response status code
Type: optional
Values: alphanumeric, dashes
Presence: optional
detailedErrors [{: Contains error details if any error(s) occurred
Type: Array of JSON Objects
Presence: optional
errorReasons [: Contains reasons for the parent detailed error
Type: Array of string
Presence: optional
property: The JSON property in the request responsible for the parent detailed error
Type: string
Presence: optional
message: The response message
Type: string
Values: see Sanctum error messages
Presence: optional
status: The response status
Type: string
Values: ERROR, SUCCESS
Presence: required
vault {: Contains the details of the created vault
Type: JSON Object
Presence: required
credentials {: Contains the credentials required for further use of the created vault
Type: JSON Object
Presence: required
encryptedData: The vault's encryptedData
Type: string
Presence: required
payload: The vault's payload
Type: string
Presence: required
uuid: The uuid of the created vault
Type: string
Values: hexadecimal, dashes
Length: 36
Presence: required
}

Usage

API used
POST /sanctum/v1-2/vault/generic/offline