Award XP to a customer
curl --request POST \
--url https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount": 123,
"user_id": "<string>",
"notes": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123, user_id: '<string>', notes: '<string>'})
};
fetch('https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn"
payload = {
"amount": 123,
"user_id": "<string>",
"notes": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"transaction": {
"amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": null,
"notes": "<string>",
"onchain_asset_id": "<string>",
"redemption_id": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"blockchain_transaction_links": {
"blockchain_transaction": [
{
"id": "<string>",
"chain_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"metadata": null,
"receipt_block_hash": "<string>",
"receipt_block_number": "<string>",
"receipt_block_timestamp": 123,
"receipt_gas_price": "<string>",
"receipt_gas_used": "<string>",
"receipt_status": 123,
"receipt_transaction_index": 123,
"tx_data": "<string>",
"tx_from": "<string>",
"tx_gas_limit": "<string>",
"tx_gas_price": "<string>",
"tx_hash": "<string>",
"tx_max_fee_per_gas": "<string>",
"tx_max_priority_fee_per_gas": "<string>",
"tx_nonce": 123,
"tx_to": "<string>",
"tx_type": 123,
"tx_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
},
"onchain_asset": {
"asset_address": "<string>",
"chain_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"decimals": 123,
"deploy_tx_hash": "<string>",
"deployed_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key": "<string>",
"metadata": null,
"name": "<string>",
"status": "<string>",
"symbol": "<string>",
"total_owners": 123,
"total_txns": 123,
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"reward": {
"id": "<string>",
"title": "<string>"
},
"tenant": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"user": {
"email": "<string>",
"id": "<string>",
"username": "<string>"
}
}
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}XP
Award XP to a customer
Credits XP to a customer through the Portal API.
See the Gateway API entry for the full description.
POST
/
tenant
/
{tenantId}
/
xp
/
earn
Award XP to a customer
curl --request POST \
--url https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Idempotency-Key: <x-idempotency-key>' \
--data '
{
"amount": 123,
"user_id": "<string>",
"notes": "<string>"
}
'const options = {
method: 'POST',
headers: {
'X-Idempotency-Key': '<x-idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 123, user_id: '<string>', notes: '<string>'})
};
fetch('https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.kintra.io/api/v1/tenant/{tenantId}/xp/earn"
payload = {
"amount": 123,
"user_id": "<string>",
"notes": "<string>"
}
headers = {
"X-Idempotency-Key": "<x-idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"transaction": {
"amount": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"metadata": null,
"notes": "<string>",
"onchain_asset_id": "<string>",
"redemption_id": "<string>",
"tenant_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"blockchain_transaction_links": {
"blockchain_transaction": [
{
"id": "<string>",
"chain_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"metadata": null,
"receipt_block_hash": "<string>",
"receipt_block_number": "<string>",
"receipt_block_timestamp": 123,
"receipt_gas_price": "<string>",
"receipt_gas_used": "<string>",
"receipt_status": 123,
"receipt_transaction_index": 123,
"tx_data": "<string>",
"tx_from": "<string>",
"tx_gas_limit": "<string>",
"tx_gas_price": "<string>",
"tx_hash": "<string>",
"tx_max_fee_per_gas": "<string>",
"tx_max_priority_fee_per_gas": "<string>",
"tx_nonce": 123,
"tx_to": "<string>",
"tx_type": 123,
"tx_value": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
]
},
"onchain_asset": {
"asset_address": "<string>",
"chain_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"decimals": 123,
"deploy_tx_hash": "<string>",
"deployed_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"key": "<string>",
"metadata": null,
"name": "<string>",
"status": "<string>",
"symbol": "<string>",
"total_owners": 123,
"total_txns": 123,
"type": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"reward": {
"id": "<string>",
"title": "<string>"
},
"tenant": {
"id": "<string>",
"name": "<string>",
"slug": "<string>"
},
"user": {
"email": "<string>",
"id": "<string>",
"username": "<string>"
}
}
},
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}{
"success": true,
"data": null,
"errors": [
{
"message": "<string>",
"path": "<string>"
}
],
"message": "<string>"
}Authorizations
Auth0 access token
Headers
Unique key for this write. A replay returns the stored response; the same key with a different body conflicts.
Path Parameters
⌘I

