Skip to content
This is a new version of the Kivra Developer Docs. Report issues or share feedback at avsandare.support@kivra.se. The previous version can be found here.

Optional - Create chain token

POST
/dr/v1/auth/token/chain/{chainID}
curl --request POST \
--url https://sender.sandbox-api.kivra.com/dr/v1/auth/token/chain/example

Optional. A chain-scoped token only narrows what a token may access — your partner token can already manage every chain and store and send receipts for any store. Use this endpoint only for distributed integrations where you want to limit an integration point to a single chain; centralized integrations can keep using the partner token throughout.

Access scope

  • PARTNER
chainID
required
string

Chain ID

Token successfully created

Media typeapplication/json
TokenResponse
object
access_token
string
token_type
string
Allowed values: Bearer
expires_in

Expiration time in seconds

integer
Example
{
"access_token": "<JWT token>",
"token_type": "Bearer",
"expires_in": 86000
}

Bad request

Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
{
"error_code": "40000",
"short_message": "bad request",
"long_message": "body s missing required fields or has invalid fields"
}

Unauthorized

Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleunauthorized
{
"error_code": "40100",
"short_message": "unauthorized",
"long_message": "permission denied"
}

Not found

Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Examples
Exampleresource_not_found
{
"error_code": "40400",
"short_message": "not found",
"long_message": "the requested resource could not be found"
}

Internal server error

Media typeapplication/json
ErrorResponse
object
error_code
string
short_message
string
long_message
string
error_detail
Array<string>
Example
{
"error_code": "50000",
"short_message": "internal server error",
"long_message": "unknown error ocurred"
}