Loyalty
The loyalty program: rules, rewards, members and redemptions.
Values for the examples
Type them once and every example on this page uses them. The API key stays on this page only and is never saved.
GET/v1/loyalty/companies/{companyId}
The loyalty cards of a company’s contacts.
Read/companies/{companyId}On success: 200.Permission: Read.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
companyId | string | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/companies/{companyId}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/companies/{companyId}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/companies/{companyId}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/companies/{companyId}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/companies/{companyId}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/companies/{companyId}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/companies/{companyId}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/companies/{companyId}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/loyalty/contacts/{contactId}
A contact’s card: member or not, balance, tier, history and redemptions.
Read/contacts/{contactId}On success: 200.Permission: Read.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string | Yes |
Response
78 fields
| Field | Type | Always there |
|---|---|---|
member | object | null | Yes |
member.balance | integer | Yes |
member.cardUrl | string (uri) | Yes |
member.contactId | string (uuid) | Yes |
member.createdAt | string (date-time) | Yes |
member.currency | string | Yes |
member.id | string (uuid) | Yes |
member.lastActivityAt | string (date-time) | Yes |
member.lifetimePoints | integer | Yes |
member.nextTier | object | null | Yes |
member.nextTier.name | string | Yes |
member.nextTier.pointsToGo | integer | Yes |
member.purchases | integer | Yes |
member.spent | integer | Yes |
member.tier | object | null | Yes |
member.tier.index | integer | Yes |
member.tier.name | string | Yes |
program | object | Yes |
program.active | boolean | Yes |
program.autoEnroll | boolean | Yes |
program.currency | string | Yes |
program.eventRules | array of object | Yes |
program.eventRules[].event | string | Yes |
program.eventRules[].perDay | integer | Yes |
program.eventRules[].points | integer | Yes |
program.expirationMonths | integer | null | Yes |
program.minPurchaseAmount | integer | Yes |
program.name | string | null | Yes |
program.organizationId | string (uuid) | Yes |
program.pointsLabel | string | null | Yes |
program.pointsPerPurchase | integer | Yes |
program.pointsPerUnit | integer | Yes |
program.selfRedeem | boolean | Yes |
program.sources | object | Yes |
program.sources.invoices | boolean | Yes |
program.sources.manualPayments | boolean | Yes |
program.sources.payments | boolean | Yes |
program.terms | string | null | Yes |
program.tiers | array of object | Yes |
program.tiers[].minPoints | integer | Yes |
program.tiers[].multiplierPercent | integer | Yes |
program.tiers[].name | string | Yes |
program.unitAmount | integer | Yes |
program.updatedAt | string (date-time) | Yes |
program.welcomePoints | integer | Yes |
redemptions | array of object | Yes |
redemptions[].canceledAt | string | null (date-time) | Yes |
redemptions[].code | string | Yes |
redemptions[].createdAt | string (date-time) | Yes |
redemptions[].createdBy | null in the examples | Yes |
redemptions[].fulfilledAt | null in the examples | Yes |
redemptions[].fulfilledBy | null in the examples | Yes |
redemptions[].id | string (uuid) | Yes |
redemptions[].memberId | string (uuid) | Yes |
redemptions[].organizationId | string (uuid) | Yes |
redemptions[].points | integer | Yes |
redemptions[].reward | object | Yes |
redemptions[].reward.currency | string | Yes |
redemptions[].reward.kind | string | Yes |
redemptions[].reward.name | string | Yes |
redemptions[].reward.value | null in the examples | Yes |
redemptions[].rewardId | string (uuid) | Yes |
redemptions[].source | string | Yes |
redemptions[].status | string | Yes |
transactions | array of object | Yes |
transactions[].amount | integer | null | Yes |
transactions[].createdAt | string (date-time) | Yes |
transactions[].createdBy | string | null (uuid) | Yes |
transactions[].currency | string | null | Yes |
transactions[].id | string (uuid) | Yes |
transactions[].kind | string | Yes |
transactions[].memberId | string (uuid) | Yes |
transactions[].note | string | null | Yes |
transactions[].organizationId | string (uuid) | Yes |
transactions[].points | integer | Yes |
transactions[].reversedAt | string | null (date-time) | Yes |
transactions[].source | string | Yes |
transactions[].sourceKey | string | null | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/contacts/{contactId}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/contacts/{contactId}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/contacts/{contactId}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/contacts/{contactId}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/contacts/{contactId}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/contacts/{contactId}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/contacts/{contactId}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/contacts/{contactId}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"member": {
"balance": 1,
"cardUrl": "https://example.com",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"currency": "USD",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"lastActivityAt": "2026-11-21T14:00:00.000Z",
"lifetimePoints": 1,
"nextTier": {
"name": "Ana Lima",
"pointsToGo": 1
},
"purchases": 1,
"spent": 1,
"tier": {
"index": 1,
"name": "Ana Lima"
}
},
"program": {
"active": true,
"autoEnroll": true,
"currency": "USD",
"eventRules": [
{}
],
"expirationMonths": 1,
"minPurchaseAmount": 1,
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"pointsLabel": "…",
"pointsPerPurchase": 1,
"pointsPerUnit": 1,
"selfRedeem": true,
"sources": {
"invoices": true,
"manualPayments": true,
"payments": true
},
"terms": "…",
"tiers": [
{}
],
"unitAmount": 1,
"updatedAt": "2026-11-21T14:00:00.000Z",
"welcomePoints": 1
},
"redemptions": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"reward": {},
"points": 1,
"code": "…",
"status": "…",
"source": "…",
"createdBy": null,
"fulfilledAt": null,
"fulfilledBy": null,
"canceledAt": "2026-11-21T14:00:00.000Z",
"createdAt": "2026-11-21T14:00:00.000Z"
}
],
"transactions": [
{
"amount": 1,
"createdAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"currency": "USD",
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"kind": "…",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"note": "…",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"points": 1,
"reversedAt": "2026-11-21T14:00:00.000Z",
"source": "…",
"sourceKey": "…"
}
]
}POST/v1/loyalty/contacts/{contactId}/adjust
Adds or takes away points by hand, with the reason.
Update/contacts/{contactId}/adjustOn success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string | Yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
points | integer | Yes | min -10000000 · max 10000000 |
note | string | Yes | min length 1 · max length 500 |
Response
55 fields
| Field | Type | Always there |
|---|---|---|
member | object | Yes |
member.balance | integer | Yes |
member.cardUrl | string (uri) | Yes |
member.contactId | string (uuid) | Yes |
member.createdAt | string (date-time) | Yes |
member.currency | string | Yes |
member.id | string (uuid) | Yes |
member.lastActivityAt | string (date-time) | Yes |
member.lifetimePoints | integer | Yes |
member.nextTier | object | Yes |
member.nextTier.name | string | Yes |
member.nextTier.pointsToGo | integer | Yes |
member.purchases | integer | Yes |
member.spent | integer | Yes |
member.tier | null in the examples | Yes |
program | object | Yes |
program.active | boolean | Yes |
program.autoEnroll | boolean | Yes |
program.currency | string | Yes |
program.eventRules | array of any | Yes |
program.expirationMonths | null in the examples | Yes |
program.minPurchaseAmount | integer | Yes |
program.name | string | Yes |
program.organizationId | string (uuid) | Yes |
program.pointsLabel | string | Yes |
program.pointsPerPurchase | integer | Yes |
program.pointsPerUnit | integer | Yes |
program.selfRedeem | boolean | Yes |
program.sources | object | Yes |
program.sources.invoices | boolean | Yes |
program.sources.manualPayments | boolean | Yes |
program.sources.payments | boolean | Yes |
program.terms | string | Yes |
program.tiers | array of object | Yes |
program.tiers[].minPoints | integer | Yes |
program.tiers[].multiplierPercent | integer | Yes |
program.tiers[].name | string | Yes |
program.unitAmount | integer | Yes |
program.updatedAt | string (date-time) | Yes |
program.welcomePoints | integer | Yes |
redemptions | array of any | Yes |
transactions | array of object | Yes |
transactions[].amount | null in the examples | Yes |
transactions[].createdAt | string (date-time) | Yes |
transactions[].createdBy | string (uuid) | Yes |
transactions[].currency | null in the examples | Yes |
transactions[].id | string (uuid) | Yes |
transactions[].kind | string | Yes |
transactions[].memberId | string (uuid) | Yes |
transactions[].note | string | null | Yes |
transactions[].organizationId | string (uuid) | Yes |
transactions[].points | integer | Yes |
transactions[].reversedAt | null in the examples | Yes |
transactions[].source | string | Yes |
transactions[].sourceKey | string | null | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"points": -10000000,
"note": "…"
}'const res = await fetch("https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"points": -10000000,
"note": "…"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust",
headers={"X-Api-Key": "fmd_..."},
json={
"points": -10000000,
"note": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"points": -10000000,
"note": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"points": -10000000,
"note": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"points": -10000000,
"note": "…"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"points": -10000000,
"note": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/contacts/{contactId}/adjust");
request.Content = new StringContent(""""
{
"points": -10000000,
"note": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"program": {
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"active": true,
"name": "Ana Lima",
"pointsLabel": "…",
"currency": "USD",
"pointsPerPurchase": 1,
"pointsPerUnit": 1,
"unitAmount": 1,
"minPurchaseAmount": 1,
"welcomePoints": 1,
"expirationMonths": null,
"tiers": [
{}
],
"eventRules": [],
"sources": {
"invoices": true,
"payments": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true,
"terms": "…",
"updatedAt": "2026-11-21T14:00:00.000Z"
},
"member": {
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"balance": 1,
"lifetimePoints": 1,
"purchases": 1,
"spent": 1,
"currency": "USD",
"tier": null,
"nextTier": {
"name": "Ana Lima",
"pointsToGo": 1
},
"cardUrl": "https://example.com",
"lastActivityAt": "2026-11-21T14:00:00.000Z",
"createdAt": "2026-11-21T14:00:00.000Z"
},
"transactions": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"kind": "…",
"points": 1,
"source": "…",
"sourceKey": "…",
"amount": null,
"currency": null,
"note": "…",
"reversedAt": null,
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z"
}
],
"redemptions": []
}POST/v1/loyalty/contacts/{contactId}/enroll
Makes a contact a member, with the welcome points.
Create/contacts/{contactId}/enrollOn success: 200.Permission: Create.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll"))
.header("X-Api-Key", "fmd_...")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/contacts/{contactId}/enroll");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();POST/v1/loyalty/contacts/{contactId}/send
Emails a contact the link to their card.
Update/contacts/{contactId}/sendOn success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string | Yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
email | string (email) | No | max length 320 |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/contacts/{contactId}/send" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]"
}'const res = await fetch("https://api.firmado.app/v1/loyalty/contacts/{contactId}/send", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"email": "[email protected]"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/contacts/{contactId}/send",
headers={"X-Api-Key": "fmd_..."},
json={
"email": "[email protected]",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/contacts/{contactId}/send");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"email": "[email protected]"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/contacts/{contactId}/send")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"email": "[email protected]"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"email": "[email protected]"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/contacts/{contactId}/send", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/contacts/{contactId}/send"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"email": "[email protected]"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/contacts/{contactId}/send");
request.Content = new StringContent(""""
{
"email": "[email protected]"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/loyalty/members
Lists the members with their balance and tier.
Read/membersOn success: 200.Permission: Read.
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
q | string | No | max length 100 |
page | integer | No | min 1 · default 1 |
pageSize | integer | No | min 1 · max 100 · default 25 |
sort | "balance" | "lifetimePoints" | "lastActivityAt" | "createdAt" | No | default "balance" |
Response
4 fields
| Field | Type | Always there |
|---|---|---|
data | array of any | Yes |
page | integer | Yes |
pageSize | integer | Yes |
total | integer | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/members" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/members", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/members",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/members");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/members")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/members", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/members"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/members");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"data": [],
"page": 1,
"pageSize": 1,
"total": 1
}GET/v1/loyalty/overview
The program’s numbers: members, points given and spent, redemptions.
Read/overviewOn success: 200.Permission: Read.
Response
37 fields
| Field | Type | Always there |
|---|---|---|
last30 | object | Yes |
last30.earned | integer | Yes |
last30.expired | integer | Yes |
last30.redeemed | integer | Yes |
members | integer | Yes |
outstanding | integer | Yes |
pendingRedemptions | integer | Yes |
program | object | Yes |
program.active | boolean | Yes |
program.autoEnroll | boolean | Yes |
program.currency | string | Yes |
program.eventRules | array of any | Yes |
program.expirationMonths | null in the examples | Yes |
program.minPurchaseAmount | integer | Yes |
program.name | string | Yes |
program.organizationId | string (uuid) | Yes |
program.pointsLabel | string | Yes |
program.pointsPerPurchase | integer | Yes |
program.pointsPerUnit | integer | Yes |
program.selfRedeem | boolean | Yes |
program.sources | object | Yes |
program.sources.invoices | boolean | Yes |
program.sources.manualPayments | boolean | Yes |
program.sources.payments | boolean | Yes |
program.terms | string | Yes |
program.tiers | array of object | Yes |
program.tiers[].minPoints | integer | Yes |
program.tiers[].multiplierPercent | integer | Yes |
program.tiers[].name | string | Yes |
program.unitAmount | integer | Yes |
program.updatedAt | string (date-time) | Yes |
program.welcomePoints | integer | Yes |
spent | integer | Yes |
topRewards | array of object | Yes |
topRewards[].name | string | Yes |
topRewards[].rewardId | string (uuid) | Yes |
topRewards[].total | integer | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/overview" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/overview", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/overview",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/overview");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/overview")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/overview", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/overview"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/overview");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"program": {
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"active": true,
"name": "Ana Lima",
"pointsLabel": "…",
"currency": "USD",
"pointsPerPurchase": 1,
"pointsPerUnit": 1,
"unitAmount": 1,
"minPurchaseAmount": 1,
"welcomePoints": 1,
"expirationMonths": null,
"tiers": [
{}
],
"eventRules": [],
"sources": {
"invoices": true,
"payments": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true,
"terms": "…",
"updatedAt": "2026-11-21T14:00:00.000Z"
},
"members": 1,
"outstanding": 1,
"spent": 1,
"last30": {
"earned": 1,
"redeemed": 1,
"expired": 1
},
"pendingRedemptions": 1,
"topRewards": [
{
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"total": 1
}
]
}GET/v1/loyalty/program
The program’s rules: how purchases earn, tiers and expiration.
Read/programOn success: 200.Permission: Read.
Response
21 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
autoEnroll | boolean | Yes |
currency | string | Yes |
eventRules | array of any | Yes |
expirationMonths | null in the examples | Yes |
minPurchaseAmount | integer | Yes |
name | null in the examples | Yes |
organizationId | string (uuid) | Yes |
pointsLabel | null in the examples | Yes |
pointsPerPurchase | integer | Yes |
pointsPerUnit | integer | Yes |
selfRedeem | boolean | Yes |
sources | object | Yes |
sources.invoices | boolean | Yes |
sources.manualPayments | boolean | Yes |
sources.payments | boolean | Yes |
terms | null in the examples | Yes |
tiers | array of any | Yes |
unitAmount | integer | Yes |
updatedAt | string (date-time) | Yes |
welcomePoints | integer | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/program" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/program", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/program",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/program");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/program")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/program", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/program"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/program");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"active": true,
"name": null,
"pointsLabel": null,
"currency": "USD",
"pointsPerPurchase": 1,
"pointsPerUnit": 1,
"unitAmount": 1,
"minPurchaseAmount": 1,
"welcomePoints": 1,
"expirationMonths": null,
"tiers": [],
"eventRules": [],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true,
"terms": null,
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"updatedAt": "2026-11-21T14:00:00.000Z"
}PUT/v1/loyalty/program
Saves the program’s rules (administrators).
Update/programOn success: 200.Permission: Update.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
active | boolean | Yes | |
name | string | null | No | |
pointsLabel | string | null | No | |
currency | string | Yes | pattern ^[A-Z]{3}$ |
pointsPerPurchase | integer | Yes | min 0 · max 1000000 |
pointsPerUnit | integer | Yes | min 0 · max 1000000 |
unitAmount | integer | Yes | min 1 · max 1000000000000 |
minPurchaseAmount | integer | Yes | min 0 · max 1000000000000 |
welcomePoints | integer | Yes | min 0 · max 1000000 |
expirationMonths | integer | null | Yes | |
tiers | array of object | Yes | max items 5 |
tiers[].name | string | Yes | min length 1 · max length 40 |
tiers[].minPoints | integer | Yes | min 0 · max 1000000000 |
tiers[].multiplierPercent | integer | No | min 100 · max 1000 · default 100 |
eventRules | array of object | No | max items 10 |
eventRules[].event | string | Yes | |
eventRules[].points | integer | Yes | min 1 · max 1000000 |
eventRules[].perDay | integer | null | No | default null |
sources | object | Yes | |
sources.payments | boolean | Yes | |
sources.invoices | boolean | Yes | |
sources.manualPayments | boolean | Yes | |
autoEnroll | boolean | Yes | |
selfRedeem | boolean | Yes | |
terms | string | null | No |
Response
27 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
autoEnroll | boolean | Yes |
currency | string | Yes |
eventRules | array of object | Yes |
eventRules[].event | string | Yes |
eventRules[].perDay | integer | Yes |
eventRules[].points | integer | Yes |
expirationMonths | null in the examples | Yes |
minPurchaseAmount | integer | Yes |
name | string | null | Yes |
organizationId | string (uuid) | Yes |
pointsLabel | string | null | Yes |
pointsPerPurchase | integer | Yes |
pointsPerUnit | integer | Yes |
selfRedeem | boolean | Yes |
sources | object | Yes |
sources.invoices | boolean | Yes |
sources.manualPayments | boolean | Yes |
sources.payments | boolean | Yes |
terms | string | null | Yes |
tiers | array of object | Yes |
tiers[].minPoints | integer | Yes |
tiers[].multiplierPercent | integer | Yes |
tiers[].name | string | Yes |
unitAmount | integer | Yes |
updatedAt | string (date-time) | Yes |
welcomePoints | integer | Yes |
Example
curl -X PUT "https://api.firmado.app/v1/loyalty/program" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}'const res = await fetch("https://api.firmado.app/v1/loyalty/program", {
method: "PUT",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}),
})
const data = await res.json()import requests
res = requests.put(
"https://api.firmado.app/v1/loyalty/program",
headers={"X-Api-Key": "fmd_..."},
json={
"active": True,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100,
},
],
"sources": {
"payments": True,
"invoices": True,
"manualPayments": True,
},
"autoEnroll": True,
"selfRedeem": True,
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/program");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/program")
req = Net::HTTP::Put.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}`)
req, _ := http.NewRequest("PUT", "https://api.firmado.app/v1/loyalty/program", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/program"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PUT"), "https://api.firmado.app/v1/loyalty/program");
request.Content = new StringContent(""""
{
"active": true,
"currency": "USD",
"pointsPerPurchase": 0,
"pointsPerUnit": 0,
"unitAmount": 1,
"minPurchaseAmount": 0,
"welcomePoints": 0,
"expirationMonths": 1,
"tiers": [
{
"name": "Ana Lima",
"minPoints": 0,
"multiplierPercent": 100
}
],
"sources": {
"payments": true,
"invoices": true,
"manualPayments": true
},
"autoEnroll": true,
"selfRedeem": true
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"active": true,
"autoEnroll": true,
"currency": "USD",
"eventRules": [
{
"event": "…",
"perDay": 1,
"points": 1
}
],
"expirationMonths": null,
"minPurchaseAmount": 1,
"name": "Ana Lima",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"pointsLabel": "…",
"pointsPerPurchase": 1,
"pointsPerUnit": 1,
"selfRedeem": true,
"sources": {
"invoices": true,
"manualPayments": true,
"payments": true
},
"terms": "…",
"tiers": [
{
"name": "Ana Lima",
"minPoints": 1,
"multiplierPercent": 1
}
],
"unitAmount": 1,
"updatedAt": "2026-11-21T14:00:00.000Z",
"welcomePoints": 1
}GET/v1/loyalty/redemptions
Lists the rewards taken, by status.
Read/redemptionsOn success: 200.Permission: Read.
Query parameters
| Field | Type | Required | Notes |
|---|---|---|---|
status | "pending" | "fulfilled" | "canceled" | No | |
code | string | No | max length 20 |
contactId | string (uuid) | No | |
page | integer | No | min 1 · default 1 |
pageSize | integer | No | min 1 · max 100 · default 25 |
Response
24 fields
| Field | Type | Always there |
|---|---|---|
data | array of object | Yes |
data[].canceledAt | null in the examples | Yes |
data[].code | string | Yes |
data[].contactId | string (uuid) | Yes |
data[].createdAt | string (date-time) | Yes |
data[].createdBy | null in the examples | Yes |
data[].fulfilledAt | null in the examples | Yes |
data[].fulfilledBy | null in the examples | Yes |
data[].id | string (uuid) | Yes |
data[].memberId | string (uuid) | Yes |
data[].name | string | Yes |
data[].organizationId | string (uuid) | Yes |
data[].points | integer | Yes |
data[].reward | object | Yes |
data[].reward.currency | string | Yes |
data[].reward.kind | string | Yes |
data[].reward.name | string | Yes |
data[].reward.value | null in the examples | Yes |
data[].rewardId | string (uuid) | Yes |
data[].source | string | Yes |
data[].status | string | Yes |
page | integer | Yes |
pageSize | integer | Yes |
total | integer | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/redemptions" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/redemptions", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/redemptions",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/redemptions");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/redemptions")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/redemptions", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/redemptions"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/redemptions");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"data": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"reward": {},
"points": 1,
"code": "…",
"status": "…",
"source": "…",
"createdBy": null,
"fulfilledAt": null,
"fulfilledBy": null,
"canceledAt": null,
"createdAt": "2026-11-21T14:00:00.000Z",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima"
}
],
"page": 1,
"pageSize": 1,
"total": 1
}POST/v1/loyalty/redemptions
Takes a reward for a contact, spending their points.
Create/redemptionsOn success: 201.Permission: Create.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
contactId | string (uuid) | Yes | |
rewardId | string (uuid) | Yes |
Response
18 fields
| Field | Type | Always there |
|---|---|---|
canceledAt | null in the examples | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | string (uuid) | Yes |
fulfilledAt | null in the examples | Yes |
fulfilledBy | null in the examples | Yes |
id | string (uuid) | Yes |
memberId | string (uuid) | Yes |
organizationId | string (uuid) | Yes |
points | integer | Yes |
reward | object | Yes |
reward.currency | string | Yes |
reward.kind | string | Yes |
reward.name | string | Yes |
reward.value | null in the examples | Yes |
rewardId | string (uuid) | Yes |
source | string | Yes |
status | string | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/redemptions" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}'const res = await fetch("https://api.firmado.app/v1/loyalty/redemptions", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/redemptions",
headers={"X-Api-Key": "fmd_..."},
json={
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/redemptions");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/redemptions")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/redemptions", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/redemptions"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/redemptions");
request.Content = new StringContent(""""
{
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (201), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"reward": {
"kind": "…",
"name": "Ana Lima",
"value": null,
"currency": "USD"
},
"points": 1,
"code": "…",
"status": "…",
"source": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"fulfilledAt": null,
"fulfilledBy": null,
"canceledAt": null,
"createdAt": "2026-11-21T14:00:00.000Z"
}POST/v1/loyalty/redemptions/{id}/cancel
Cancels a reward not handed over; the points go back.
Update/redemptions/{id}/cancelOn success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Response
18 fields
| Field | Type | Always there |
|---|---|---|
canceledAt | string (date-time) | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | null in the examples | Yes |
fulfilledAt | null in the examples | Yes |
fulfilledBy | null in the examples | Yes |
id | string (uuid) | Yes |
memberId | string (uuid) | Yes |
organizationId | string (uuid) | Yes |
points | integer | Yes |
reward | object | Yes |
reward.currency | string | Yes |
reward.kind | string | Yes |
reward.name | string | Yes |
reward.value | null in the examples | Yes |
rewardId | string (uuid) | Yes |
source | string | Yes |
status | string | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel"))
.header("X-Api-Key", "fmd_...")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/redemptions/{id}/cancel");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"reward": {
"kind": "…",
"name": "Ana Lima",
"value": null,
"currency": "USD"
},
"points": 1,
"code": "…",
"status": "…",
"source": "…",
"createdBy": null,
"fulfilledAt": null,
"fulfilledBy": null,
"canceledAt": "2026-11-21T14:00:00.000Z",
"createdAt": "2026-11-21T14:00:00.000Z"
}POST/v1/loyalty/redemptions/{id}/fulfill
Marks a reward as handed over.
Update/redemptions/{id}/fulfillOn success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Response
18 fields
| Field | Type | Always there |
|---|---|---|
canceledAt | null in the examples | Yes |
code | string | Yes |
createdAt | string (date-time) | Yes |
createdBy | string (uuid) | Yes |
fulfilledAt | string (date-time) | Yes |
fulfilledBy | string (uuid) | Yes |
id | string (uuid) | Yes |
memberId | string (uuid) | Yes |
organizationId | string (uuid) | Yes |
points | integer | Yes |
reward | object | Yes |
reward.currency | string | Yes |
reward.kind | string | Yes |
reward.name | string | Yes |
reward.value | null in the examples | Yes |
rewardId | string (uuid) | Yes |
source | string | Yes |
status | string | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill", {
method: "POST",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill"))
.header("X-Api-Key", "fmd_...")
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/redemptions/{id}/fulfill");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"memberId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"rewardId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"reward": {
"kind": "…",
"name": "Ana Lima",
"value": null,
"currency": "USD"
},
"points": 1,
"code": "…",
"status": "…",
"source": "…",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"fulfilledAt": "2026-11-21T14:00:00.000Z",
"fulfilledBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"canceledAt": null,
"createdAt": "2026-11-21T14:00:00.000Z"
}GET/v1/loyalty/rewards
Lists the rewards members can take.
Read/rewardsOn success: 200.Permission: Read.
Response
14 fields
| Field | Type | Always there |
|---|---|---|
[].active | boolean | Yes |
[].cost | integer | Yes |
[].createdAt | string (date-time) | Yes |
[].description | null in the examples | Yes |
[].id | string (uuid) | Yes |
[].kind | string | Yes |
[].minTier | null in the examples | Yes |
[].name | string | Yes |
[].organizationId | string (uuid) | Yes |
[].perMember | integer | null | Yes |
[].position | integer | Yes |
[].stock | integer | null | Yes |
[].updatedAt | string (date-time) | Yes |
[].value | integer | null | Yes |
Example
curl -X GET "https://api.firmado.app/v1/loyalty/rewards" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/rewards", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/loyalty/rewards",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/rewards");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/rewards")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/loyalty/rewards", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/rewards"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/loyalty/rewards");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (200), with sample values:
[
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"description": null,
"kind": "…",
"value": 1,
"cost": 1,
"stock": 1,
"perMember": 1,
"minTier": null,
"active": true,
"position": 1,
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}
]POST/v1/loyalty/rewards
Creates a reward: an item, a discount or cashback, and its points.
Create/rewardsOn success: 201.Permission: Create.
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | min length 1 · max length 120 |
description | string | null | No | |
kind | "item" | "discount_percent" | "discount_amount" | "cashback" | Yes | |
value | integer | null | No | |
cost | integer | Yes | min 1 · max 1000000000 |
stock | integer | null | No | |
perMember | integer | null | No | |
minTier | integer | null | No | |
active | boolean | No | default true |
position | integer | No | min 0 · max 1000 · default 0 |
Response
14 fields
| Field | Type | Always there |
|---|---|---|
active | boolean | Yes |
cost | integer | Yes |
createdAt | string (date-time) | Yes |
description | null in the examples | Yes |
id | string (uuid) | Yes |
kind | string | Yes |
minTier | null in the examples | Yes |
name | string | Yes |
organizationId | string (uuid) | Yes |
perMember | integer | null | Yes |
position | integer | Yes |
stock | integer | null | Yes |
updatedAt | string (date-time) | Yes |
value | integer | null | Yes |
Example
curl -X POST "https://api.firmado.app/v1/loyalty/rewards" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}'const res = await fetch("https://api.firmado.app/v1/loyalty/rewards", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/loyalty/rewards",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/rewards");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/rewards")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/loyalty/rewards", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/rewards"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/loyalty/rewards");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Response (201), with sample values:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"name": "Ana Lima",
"description": null,
"kind": "…",
"value": 1,
"cost": 1,
"stock": 1,
"perMember": 1,
"minTier": null,
"active": true,
"position": 1,
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/loyalty/rewards/{id}
Deletes a reward; rewards already taken stay.
Delete/rewards/{id}On success: 204.Permission: Delete.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Example
curl -X DELETE "https://api.firmado.app/v1/loyalty/rewards/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/loyalty/rewards/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/loyalty/rewards/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/rewards/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/rewards/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/loyalty/rewards/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/rewards/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/loyalty/rewards/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();PUT/v1/loyalty/rewards/{id}
Changes a reward.
Update/rewards/{id}On success: 200.Permission: Update.
Path parameters
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | Yes |
Body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | min length 1 · max length 120 |
description | string | null | No | |
kind | "item" | "discount_percent" | "discount_amount" | "cashback" | Yes | |
value | integer | null | No | |
cost | integer | Yes | min 1 · max 1000000000 |
stock | integer | null | No | |
perMember | integer | null | No | |
minTier | integer | null | No | |
active | boolean | No | default true |
position | integer | No | min 0 · max 1000 · default 0 |
Example
curl -X PUT "https://api.firmado.app/v1/loyalty/rewards/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}'const res = await fetch("https://api.firmado.app/v1/loyalty/rewards/{id}", {
method: "PUT",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}),
})
const data = await res.json()import requests
res = requests.put(
"https://api.firmado.app/v1/loyalty/rewards/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/loyalty/rewards/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/loyalty/rewards/{id}")
req = Net::HTTP::Put.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}`)
req, _ := http.NewRequest("PUT", "https://api.firmado.app/v1/loyalty/rewards/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/loyalty/rewards/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PUT"), "https://api.firmado.app/v1/loyalty/rewards/{id}");
request.Content = new StringContent(""""
{
"name": "Ana Lima",
"kind": "item",
"cost": 1,
"description": "…"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Webhook events
Changes of this feature that webhooks can send.
loyalty_program.updatedUpdateloyalty_member.joinedCreateloyalty.points_changedUpdateloyalty_reward.createdCreateloyalty_reward.updatedUpdateloyalty_reward.deletedDeleteloyalty_redemption.createdCreateloyalty_redemption.updatedUpdate