Gift Cards PRO
A gift card is store credit tied to an avatar. There is no object to lose or copy: the balance lives in Fasty.
List gift cards
GET
/gift-cardsQuery
| Name | Type | Required | Description |
|---|---|---|---|
owner_key | string | No | Avatar UUID (key). |
state | string | No | Only this state. One of active, used, expired, canceled. |
cursor | string | No | The next_cursor of the previous page. |
limit | integer | No | Page size (default 50, max 200). |
Example
bash
curl "https://api.fastyvendor.com/api/v1/gift-cards?owner_key=a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d&limit=1" \
-H "Authorization: Bearer $FASTY_KEY"js
const res = await fetch('https://api.fastyvendor.com/api/v1/gift-cards?owner_key=a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d&limit=1', {
headers: {
Authorization: `Bearer ${process.env.FASTY_KEY}`,
},
})
const data = await res.json()python
import os, requests
res = requests.get(
"https://api.fastyvendor.com/api/v1/gift-cards?owner_key=a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d&limit=1",
headers={"Authorization": f"Bearer {os.environ['FASTY_KEY']}"},
)
data = res.json()lsl
llHTTPRequest(API + "/gift-cards?owner_key=a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d&limit=1",
[HTTP_CUSTOM_HEADER, "Authorization", "Bearer " + KEY,
HTTP_BODY_MAXLENGTH, 16384],
"");Response: 200 OK
json
{
"items": [
{
"id": "84bf0dc5-5b47-4da6-9142-aeb2e66add19",
"owner": {
"key": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Luna Caelum"
},
"value": 250,
"balance": 250,
"state": "active",
"expires_at": "2027-02-02T18:27:03.848Z",
"scope": {
"mode": "all",
"products": [],
"groups": []
},
"source": "panel",
"note": "Contest prize",
"created_at": "2026-11-04T18:27:03.844Z"
}
],
"next_cursor": "1793816823844508~84bf0dc5-5b47-4da6-9142-aeb2e66add19"
}Get a gift card
GET
/gift-cards/{id}Path
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id. |
Example
bash
curl "https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19" \
-H "Authorization: Bearer $FASTY_KEY"js
const res = await fetch('https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19', {
headers: {
Authorization: `Bearer ${process.env.FASTY_KEY}`,
},
})
const data = await res.json()python
import os, requests
res = requests.get(
"https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19",
headers={"Authorization": f"Bearer {os.environ['FASTY_KEY']}"},
)
data = res.json()lsl
llHTTPRequest(API + "/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19",
[HTTP_CUSTOM_HEADER, "Authorization", "Bearer " + KEY,
HTTP_BODY_MAXLENGTH, 16384],
"");Response: 200 OK
json
{
"id": "84bf0dc5-5b47-4da6-9142-aeb2e66add19",
"owner": {
"key": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Luna Caelum"
},
"value": 250,
"balance": 250,
"state": "active",
"expires_at": "2027-02-02T18:27:03.848Z",
"scope": {
"mode": "all",
"products": [],
"groups": []
},
"source": "panel",
"note": "Contest prize",
"created_at": "2026-11-04T18:27:03.844Z"
}Give a gift card
POST
/gift-cardsStore credit for an avatar; they get an IM in Second Life.
The avatar gets an IM in Second Life. Use days for a balance that expires, and scope to limit where it works.
Body
| Name | Type | Required | Description |
|---|---|---|---|
owner_key | string | Yes | Avatar UUID (key). |
value | integer | Yes | Balance in L$. From 1 to 1,000,000. |
days | integer or null | No | Days until the balance expires (null = never). From 1 to 3,650. |
scope | object | No | Where it is valid. |
scope.mode | string | Yes | all = everything · except = all but the lists · only = just the lists. One of all, except, only. |
scope.products | array of strings | No | Product ids. |
scope.groups | array of strings | No | Group ids. |
note | string | No | A note, kept in the history. Up to 200 characters. |
Example
bash
curl -X POST "https://api.fastyvendor.com/api/v1/gift-cards" \
-H "Authorization: Bearer $FASTY_KEY" \
-H "Idempotency-Key: my-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"owner_key":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","value":250,"days":90,"note":"Contest prize"}'js
const res = await fetch('https://api.fastyvendor.com/api/v1/gift-cards', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.FASTY_KEY}`,
'Idempotency-Key': 'my-unique-id-123',
'Content-Type': 'application/json',
},
body: JSON.stringify({"owner_key":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","value":250,"days":90,"note":"Contest prize"}),
})
const data = await res.json()python
import os, requests
res = requests.post(
"https://api.fastyvendor.com/api/v1/gift-cards",
headers={"Authorization": f"Bearer {os.environ['FASTY_KEY']}", "Idempotency-Key": "my-unique-id-123"},
json={"owner_key":"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d","value":250,"days":90,"note":"Contest prize"},
)
data = res.json()lsl
llHTTPRequest(API + "/gift-cards",
[HTTP_METHOD, "POST",
HTTP_MIMETYPE, "application/json",
HTTP_CUSTOM_HEADER, "Authorization", "Bearer " + KEY,
HTTP_CUSTOM_HEADER, "Idempotency-Key", "my-unique-id-123"],
"{\"owner_key\":\"a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d\",\"value\":250,\"days\":90,\"note\":\"Contest prize\"}");Response: 201 Created
json
{
"id": "84bf0dc5-5b47-4da6-9142-aeb2e66add19",
"owner": {
"key": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Luna Caelum"
},
"value": 250,
"balance": 250,
"state": "active",
"expires_at": "2027-02-02T18:27:03.848Z",
"scope": {
"mode": "all",
"products": [],
"groups": []
},
"source": "panel",
"note": "Contest prize",
"created_at": "2026-11-04T18:27:03.844Z"
}Add or remove balance
POST
/gift-cards/{id}/adjustPath
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
delta | integer | Yes | How much it changes: positive adds, negative takes. From -1,000,000 to 1,000,000. |
note | string | No | A note, kept in the history. Up to 120 characters. |
Example
bash
curl -X POST "https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/adjust" \
-H "Authorization: Bearer $FASTY_KEY" \
-H "Idempotency-Key: my-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"delta":50,"note":"Sorry for the delay"}'js
const res = await fetch('https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/adjust', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.FASTY_KEY}`,
'Idempotency-Key': 'my-unique-id-123',
'Content-Type': 'application/json',
},
body: JSON.stringify({"delta":50,"note":"Sorry for the delay"}),
})
const data = await res.json()python
import os, requests
res = requests.post(
"https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/adjust",
headers={"Authorization": f"Bearer {os.environ['FASTY_KEY']}", "Idempotency-Key": "my-unique-id-123"},
json={"delta":50,"note":"Sorry for the delay"},
)
data = res.json()lsl
llHTTPRequest(API + "/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/adjust",
[HTTP_METHOD, "POST",
HTTP_MIMETYPE, "application/json",
HTTP_CUSTOM_HEADER, "Authorization", "Bearer " + KEY,
HTTP_CUSTOM_HEADER, "Idempotency-Key", "my-unique-id-123"],
"{\"delta\":50,\"note\":\"Sorry for the delay\"}");Response: 200 OK
json
{
"id": "84bf0dc5-5b47-4da6-9142-aeb2e66add19",
"owner": {
"key": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Luna Caelum"
},
"value": 250,
"balance": 300,
"state": "active",
"expires_at": "2027-02-02T18:27:03.848Z",
"scope": {
"mode": "all",
"products": [],
"groups": []
},
"source": "panel",
"note": "Contest prize",
"created_at": "2026-11-04T18:27:03.844Z"
}Cancel a gift card
POST
/gift-cards/{id}/cancelThe balance left can no longer be used.
Path
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The id. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
note | string | No | A note, kept in the history. Up to 120 characters. |
Example
bash
curl -X POST "https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/cancel" \
-H "Authorization: Bearer $FASTY_KEY" \
-H "Idempotency-Key: my-unique-id-123" \
-H "Content-Type: application/json" \
-d '{"note":"Created by mistake"}'js
const res = await fetch('https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/cancel', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.FASTY_KEY}`,
'Idempotency-Key': 'my-unique-id-123',
'Content-Type': 'application/json',
},
body: JSON.stringify({"note":"Created by mistake"}),
})
const data = await res.json()python
import os, requests
res = requests.post(
"https://api.fastyvendor.com/api/v1/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/cancel",
headers={"Authorization": f"Bearer {os.environ['FASTY_KEY']}", "Idempotency-Key": "my-unique-id-123"},
json={"note":"Created by mistake"},
)
data = res.json()lsl
llHTTPRequest(API + "/gift-cards/84bf0dc5-5b47-4da6-9142-aeb2e66add19/cancel",
[HTTP_METHOD, "POST",
HTTP_MIMETYPE, "application/json",
HTTP_CUSTOM_HEADER, "Authorization", "Bearer " + KEY,
HTTP_CUSTOM_HEADER, "Idempotency-Key", "my-unique-id-123"],
"{\"note\":\"Created by mistake\"}");Response: 200 OK
json
{
"id": "84bf0dc5-5b47-4da6-9142-aeb2e66add19",
"owner": {
"key": "a1b2c3d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"name": "Luna Caelum"
},
"value": 250,
"balance": 0,
"state": "canceled",
"expires_at": "2027-02-02T18:27:03.848Z",
"scope": {
"mode": "all",
"products": [],
"groups": []
},
"source": "panel",
"note": "Contest prize",
"created_at": "2026-11-04T18:27:03.844Z"
}The gift card object
| Field | Type | Description |
|---|---|---|
id | string | The id. |
owner | object | Who owns it. |
owner.key | string | Avatar UUID (key). |
owner.name | string | Username ("" when the store has never seen it). |
value | integer | The original value, in L$. From -9,007,199,254,740,991 to 9,007,199,254,740,991. |
balance | integer | The balance now. From -9,007,199,254,740,991 to 9,007,199,254,740,991. |
state | string | The current state. One of active, used, expired, canceled. |
expires_at | string or null | ISO 8601 date and time (UTC), or null. |
scope | object | Where it is valid: all products, all except the lists, or only the lists. |
scope.mode | string | all = everything · except = all but the lists · only = just the lists. One of all, except, only. |
scope.products | array of strings | Product ids. |
scope.groups | array of strings | Group ids. |
source | string | sale, given, import… |
note | string | A note, kept in the history. |
created_at | string | ISO 8601 date and time (UTC). |