Delete a product
curl --request DELETE \
--url https://api.fyatu.com/api/v3.20/products/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3.20/products/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fyatu.com/api/v3.20/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fyatu.com/api/v3.20/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fyatu.com/api/v3.20/products/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.fyatu.com/api/v3.20/products/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3.20/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Product deleted",
"data": {
"action": "deleted"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T11:30:00Z"
}
}
Products
Delete Product
Delete a card product. Permanently removes it if no active cards exist, or archives it automatically if cards are still in use. DELETE /products/. Requires accounts:write scope.
DELETE
/
products
/
{id}
Delete a product
curl --request DELETE \
--url https://api.fyatu.com/api/v3.20/products/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fyatu.com/api/v3.20/products/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fyatu.com/api/v3.20/products/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fyatu.com/api/v3.20/products/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.fyatu.com/api/v3.20/products/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.fyatu.com/api/v3.20/products/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fyatu.com/api/v3.20/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"status": 200,
"message": "Product deleted",
"data": {
"action": "deleted"
},
"meta": {
"requestId": "req_a1b2c3d4e5f6a7b8c9d0e1f2",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T11:30:00Z"
}
}
Overview
Smart delete: a singleDELETE call handles both cases automatically.
| Condition | What happens | data.action |
|---|---|---|
| Product has no active cards | Permanently deleted — cannot be recovered | "deleted" |
| Product has active cards | Archived — no new cards can be issued, existing cards unaffected | "archived" |
data.action in the response to know what was done. Archived products can be restored with POST /products/{id}/activate.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The product ID (prefix prd_) |
Example
curl -X DELETE https://api.fyatu.com/api/v3.20/products/prd_01HXYZ1111ABCDEF0002 \
-H "Authorization: Bearer $FYATU_API_KEY"
const resp = await fetch(
'https://api.fyatu.com/api/v3.20/products/prd_01HXYZ1111ABCDEF0002',
{
method: 'DELETE',
headers: { 'Authorization': `Bearer ${process.env.FYATU_API_KEY}` }
}
);
const body = await resp.json();
if (body.data.action === 'deleted') {
console.log('Product permanently deleted');
} else {
console.log('Product archived — had active cards');
}
import os, requests
resp = requests.delete(
'https://api.fyatu.com/api/v3.20/products/prd_01HXYZ1111ABCDEF0002',
headers={'Authorization': f'Bearer {os.environ["FYATU_API_KEY"]}'}
)
body = resp.json()
print(body['data']['action']) # "deleted" or "archived"
Success Response (200) — Permanently Deleted
{
"success": true,
"status": 200,
"message": "Product deleted",
"data": { "action": "deleted" },
"meta": {
"requestId": "req_01HXY123456ABCDEF",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T11:30:00Z"
}
}
Success Response (200) — Archived (Has Active Cards)
{
"success": true,
"status": 200,
"message": "Product archived — has active cards",
"data": { "action": "archived" },
"meta": {
"requestId": "req_01HXY123456ABCDEF",
"platform": "Fyatu CaaS",
"timestamp": "2026-05-26T11:30:00Z"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
PRODUCT_NOT_FOUND | 404 | Product does not exist or belongs to another business |
INSUFFICIENT_SCOPE | 403 | Key lacks accounts:write scope |
INTERNAL_ERROR | 500 | Server error |
Authorizations
API key from the FYATU CaaS portal. Pass as Authorization: Bearer <key>.
Path Parameters
Product ID (prefix prd_)
⌘I

