Kora/extensions/stores/API Reference

API Reference

The store webhook and redeem endpoints, and the API for stores, mappings, purchases and events.

The webhook and redeem endpoints are called by stores and buyers. The token in the path names the store, and each webhook is checked against the store's own signature or secret. The rest need a Kora API token with stores.view or stores.edit. Change the host variable in the playground to your own instance.

POST
/v1/stores/hooks/{token}

Path Parameters

token*string

The store's token from its webhook or redeem URL.

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/stores/hooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{}
GET
/v1/stores/redeem/{token}

Path Parameters

token*string

The store's token from its webhook or redeem URL.

Response Body

text/html

curl -X GET "https://example.com/v1/stores/redeem/string"
"string"
POST
/v1/stores/redeem/{token}

Path Parameters

token*string

The store's token from its webhook or redeem URL.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/stores/redeem/string" \  -H "Content-Type: application/json" \  -d '{    "proof": "string"  }'
{  "status": "found",  "message": "string",  "licenses": [    {      "key": "string",      "status": "string",      "expires_at": "string",      "product": "string"    }  ]}
GET
/v1/stores
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Query Parameters

provider?string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores"
{  "success": true,  "total": 0,  "stores": [    {      "id": 0,      "provider": "builtbybit",      "provider_label": "string",      "name": "string",      "enabled": true,      "own_keys": true,      "hook_url": "string",      "redeem_url": "string",      "created_at": "string"    }  ]}
POST
/v1/stores
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores" \  -H "Content-Type: application/json" \  -d '{    "property1": "string",    "property2": "string"  }'
{  "id": 0,  "provider": "builtbybit",  "provider_label": "string",  "name": "string",  "enabled": true,  "own_keys": true,  "hook_url": "string",  "redeem_url": "string",  "created_at": "string"}
GET
/v1/stores/{id}
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores/0"
{  "id": 0,  "provider": "builtbybit",  "provider_label": "string",  "name": "string",  "enabled": true,  "own_keys": true,  "hook_url": "string",  "redeem_url": "string",  "created_at": "string"}
PATCH
/v1/stores/{id}
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PATCH "https://example.com/v1/stores/0" \  -H "Content-Type: application/json" \  -d '{    "property1": "string",    "property2": "string"  }'
{  "id": 0,  "provider": "builtbybit",  "provider_label": "string",  "name": "string",  "enabled": true,  "own_keys": true,  "hook_url": "string",  "redeem_url": "string",  "created_at": "string"}
DELETE
/v1/stores/{id}
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Response Body

application/json

curl -X DELETE "https://example.com/v1/stores/0"
Empty
POST
/v1/stores/{id}/rotate
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores/0/rotate"
{  "id": 0,  "provider": "builtbybit",  "provider_label": "string",  "name": "string",  "enabled": true,  "own_keys": true,  "hook_url": "string",  "redeem_url": "string",  "created_at": "string"}
POST
/v1/stores/{id}/sync
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores/0/sync"
{  "success": true,  "resources": 0,  "issued": 0,  "revoked": 0}
GET
/v1/stores/providers
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores/providers"
{}
GET
/v1/stores/mappings
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Query Parameters

connection_id?integer

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores/mappings"
{}
POST
/v1/stores/mappings
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores/mappings" \  -H "Content-Type: application/json" \  -d '{    "connection_id": 0,    "external_id": "string",    "product_id": 0  }'
{}
DELETE
/v1/stores/mappings/{id}
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Path Parameters

id*integer

Response Body

application/json

curl -X DELETE "https://example.com/v1/stores/mappings/0"
Empty
GET
/v1/stores/purchases
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Query Parameters

connection_id?integer
status?string

Value in

  • "completed"
  • "refunded"
  • "suspended"
search?string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores/purchases"
{}
GET
/v1/stores/events
AuthorizationBearer <token>

API token created in Kora dashboard API Tokens page.

In: header

Query Parameters

connection_id?integer
outcome?string

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/stores/events"
{}