Getting Started
Overview
The Finxa Admin API is a RESTful API that lets you programmatically manage your store's products, orders, customers, collections, discounts, shipping, and more. Build custom integrations, automate workflows, or connect your store to third-party services.
All API endpoints are available at:
https://your-domain.com/apiEvery response follows a consistent JSON envelope:
{
"success": true,
"data": { ... },
"message": "Product created"
}{
"success": false,
"error": "Product not found"
}Authentication
To use the API, you need a Custom App. Create one from your Finxa dashboard under Settings → Apps.
Step 1: Create an App
Navigate to Dashboard → Apps → Create app. Give it a name and select the API scopes you need.
Step 2: Install & Get Credentials
Click "Install app" to activate it. You'll receive two credentials:
| Parameter | Type | Description |
|---|---|---|
API Key | string | Public identifier for your app. Starts with fxk_. Safe to store in config. |
Secret Key | string | Private access token. Starts with fxat_. Treat it like a password — never commit to version control. |
Step 3: Authenticate Requests
Include your secret key in the X-Finxa-Access-Token header:
curl https://your-domain.com/api/products \
-H "X-Finxa-Access-Token: fxat_your_secret_key_here"fxk_) is your app's public identifier. The secret key (fxat_) is what you send in the header. Don't confuse them.Making Requests
All request and response bodies use JSON. Set the Content-Type header for requests that include a body:
curl -X POST https://your-domain.com/api/products \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium T-Shirt",
"status": "ACTIVE",
"variants": [
{ "title": "Default", "price": 29.99, "inventory": 100 }
]
}'Response Format
Every response is a JSON object with a success boolean. Successful responses include a data field. Error responses include an error string.
| Parameter | Type | Description |
|---|---|---|
successRequired | boolean | Whether the request succeeded. |
data | object | array | The response payload. Present on success. |
message | string | A human-readable success message. Not always present. |
error | string | Error description. Present on failure. |
Paginated Responses
List endpoints support pagination via query parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (1-indexed). Default: 1 |
limit | number | Items per page. Default: 20, max: 100 |
{
"success": true,
"data": {
"products": [ ... ],
"pagination": {
"total": 156,
"page": 1,
"limit": 20,
"totalPages": 8
}
}
}Rate Limits
The API uses rate limiting to ensure fair usage. Current limits:
| Parameter | Type | Description |
|---|---|---|
Standard | limit | 40 requests per 10-second window per app |
Burst | limit | Up to 80 requests in a burst, then throttled |
When rate limited, you'll receive a 429 Too Many Requests response. Implement exponential backoff in your integration.
Errors
The API uses standard HTTP status codes:
| Parameter | Type | Description |
|---|---|---|
200 | OK | Request succeeded. |
201 | Created | Resource created successfully. |
400 | Bad Request | Invalid request body or parameters. |
401 | Unauthorized | Missing or invalid access token. |
403 | Forbidden | Insufficient scopes for this action. |
404 | Not Found | Resource doesn't exist or doesn't belong to your store. |
409 | Conflict | Resource conflict (duplicate email, can't delete with related records). |
429 | Rate Limited | Too many requests. Retry after a short delay. |
500 | Internal Error | Something went wrong on our side. Contact support. |
{
"success": false,
"error": "Insufficient scopes. Required: write_products"
}Products
Products represent items in your store. Every product has at least one variant (even simple products). Variants hold the price, inventory, SKU, and options like size/color.
List Products
/api/productsRetrieve a paginated list of products.
read_productsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number. Default: 1 |
limit | number | Items per page (max 100). Default: 20 |
status | string | Filter by status: DRAFT, ACTIVE, or ARCHIVED |
search | string | Search by title, handle, vendor, type, variant title, SKU, or barcode |
curl "https://your-domain.com/api/products?status=ACTIVE&limit=10" \
-H "X-Finxa-Access-Token: fxat_your_secret_key"{
"success": true,
"data": {
"products": [
{
"id": "cmmm0ekmc0000ny1p7n1vdsbf",
"title": "Premium T-Shirt",
"handle": "premium-t-shirt",
"status": "ACTIVE",
"description": "A comfortable cotton t-shirt",
"vendor": "Finxa Apparel",
"productType": "Clothing",
"tags": ["summer", "cotton"],
"images": [],
"options": [
{ "name": "Size", "position": 0, "values": ["S", "M", "L"] }
],
"weight": null,
"weightUnit": "kg",
"isPhysical": true,
"seoTitle": null,
"seoDescription": null,
"publishedAt": "2026-03-10T12:00:00.000Z",
"createdAt": "2026-03-10T12:00:00.000Z",
"updatedAt": "2026-03-10T12:30:00.000Z",
"variants": [
{
"id": "clxyz123",
"title": "Small",
"sku": "TS-S",
"barcode": null,
"price": "29.990",
"costPrice": "12.000",
"compareAtPrice": null,
"inventory": 50,
"trackInventory": true,
"taxable": true,
"requiresShipping": true,
"options": { "Size": "S" },
"position": 0,
"weight": null,
"weightUnit": "kg"
}
],
"productImages": [],
"_count": { "collections": 1 }
}
],
"pagination": {
"total": 42,
"page": 1,
"limit": 10,
"totalPages": 5
}
}
}Get Product
/api/products/:productIdRetrieve a single product with all variants, images, and collection associations.
read_productscurl "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf" \
-H "X-Finxa-Access-Token: fxat_your_secret_key"Create Product
/api/productsCreate a new product with at least one variant.
write_productsRequest Body
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Product title (1-255 chars) |
description | string | Plain text description |
descriptionHtml | string | Rich HTML description |
handle | string | URL slug (auto-generated from title if omitted). Lowercase, numbers, and hyphens only. |
status | string | DRAFT (default), ACTIVE, or ARCHIVED |
vendor | string | Product vendor/brand name |
productType | string | Product type/category |
tags | string[] | Array of tag strings |
images | string[] | Array of image URLs |
options | object[] | Product options, e.g. [{ "name": "Size", "values": ["S","M","L"] }] |
weight | number | Product weight |
weightUnit | string | Weight unit: kg (default), g, lb, oz |
isPhysical | boolean | Whether product requires shipping. Default: true |
seoTitle | string | SEO title (max 70 chars) |
seoDescription | string | SEO description (max 320 chars) |
variantsRequired | object[] | At least one variant (see Variant Object below) |
Variant Object
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Variant title, e.g. "Small" or "Red / Large" |
priceRequired | number | Price (≥ 0) |
sku | string | Stock keeping unit |
barcode | string | Barcode (UPC, EAN, etc.) |
costPrice | number | Cost of goods for profit tracking |
compareAtPrice | number | Original price for sale display |
inventory | number | Stock quantity. Default: 0 |
trackInventory | boolean | Track stock levels. Default: true |
taxable | boolean | Charge tax on this variant. Default: true |
requiresShipping | boolean | Requires shipping. Default: true |
options | object | Key-value pairs, e.g. { "Size": "S", "Color": "Red" } |
image | string | Variant-specific image URL |
position | number | Sort position. Default: 0 |
weight | number | Per-variant weight (overrides product weight) |
weightUnit | string | Weight unit override |
curl -X POST "https://your-domain.com/api/products" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Classic Polo Shirt",
"description": "A timeless polo in premium cotton.",
"status": "ACTIVE",
"vendor": "Finxa Apparel",
"productType": "Clothing",
"tags": ["polo", "cotton", "casual"],
"options": [
{ "name": "Size", "position": 0, "values": ["S", "M", "L", "XL"] }
],
"variants": [
{ "title": "Small", "price": 35.00, "sku": "POLO-S", "inventory": 25, "options": { "Size": "S" } },
{ "title": "Medium", "price": 35.00, "sku": "POLO-M", "inventory": 40, "options": { "Size": "M" } },
{ "title": "Large", "price": 35.00, "sku": "POLO-L", "inventory": 30, "options": { "Size": "L" } },
{ "title": "XL", "price": 37.50, "sku": "POLO-XL", "inventory": 15, "options": { "Size": "XL" } }
]
}'Update Product
/api/products/:productIdUpdate product fields. Only send the fields you want to change.
write_productscurl -X PATCH "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium Polo Shirt — Updated",
"tags": ["polo", "premium", "new-arrival"]
}'Delete Product
/api/products/:productIdPermanently delete a product and all its variants. Products with existing orders cannot be deleted — archive them instead.
write_productscurl -X DELETE "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf" \
-H "X-Finxa-Access-Token: fxat_your_secret_key"409 Conflict. Use PATCH with {"status": "ARCHIVED"} instead.Add Variant
/api/products/:productId/variantsAdd a new variant to an existing product.
write_productscurl -X POST "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf/variants" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "XXL",
"price": 39.99,
"sku": "POLO-XXL",
"inventory": 10,
"options": { "Size": "XXL" }
}'Update Variant
/api/products/:productId/variants/:variantIdUpdate an existing variant. Only send the fields you want to change.
write_productscurl -X PATCH "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf/variants/clxyz123" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"price": 32.50,
"inventory": 75,
"costPrice": 14.00
}'Delete Variant
/api/products/:productId/variants/:variantIdDelete a variant. A product must always have at least one variant.
write_products400 Bad Request if you try.Bulk Sync Variants
/api/products/:productId/variants/syncSync all variants in one call. Send the complete desired state — the API will create new variants, update existing ones, and delete any that aren't in your list.
write_productsThis is an idempotent replace operation. Include an id on variants you want to update; omit it for new ones. Variants not in the list will be deleted.
curl -X PUT "https://your-domain.com/api/products/cmmm0ekmc0000ny1p7n1vdsbf/variants/sync" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"variants": [
{ "id": "existing_id_1", "title": "Small", "price": 29.99, "inventory": 50 },
{ "id": "existing_id_2", "title": "Medium", "price": 29.99, "inventory": 40 },
{ "title": "Large", "price": 29.99, "inventory": 30 },
{ "title": "XL", "price": 34.99, "inventory": 20 }
]
}'Collections
Collections group products together. They can be manual (hand-picked products) or smart (auto-populated based on rules like tag, vendor, or price).
List Collections
/api/collectionsRetrieve all collections for your store.
read_collectionscurl "https://your-domain.com/api/collections" \
-H "X-Finxa-Access-Token: fxat_your_secret_key"Get Collection
/api/collections/:collectionIdRetrieve a single collection with its products.
read_collectionsCreate Collection
/api/collectionsCreate a new collection.
write_collectionsRequest Body
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Collection title |
handle | string | URL slug (auto-generated if omitted) |
description | string | Plain text description |
descriptionHtml | string | Rich HTML description |
image | string | Collection image URL |
collectionType | string | MANUAL (default) or SMART |
sortOrder | string | MANUAL, BEST_SELLING, ALPHA_ASC, ALPHA_DESC, PRICE_ASC, PRICE_DESC, CREATED_ASC, CREATED_DESC |
seoTitle | string | SEO title |
seoDescription | string | SEO description |
curl -X POST "https://your-domain.com/api/collections" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Summer Collection 2026",
"description": "Lightweight essentials for the summer season.",
"collectionType": "MANUAL",
"sortOrder": "MANUAL"
}'Update Collection
/api/collections/:collectionIdUpdate collection fields.
write_collectionsDelete Collection
/api/collections/:collectionIdDelete a collection. Products in the collection are not deleted.
write_collectionsAdd Product to Collection
/api/collections/:collectionId/productsAdd one or more products to a manual collection.
write_collectionscurl -X POST "https://your-domain.com/api/collections/col_abc123/products" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"productIds": ["prod_id_1", "prod_id_2"]
}'Remove Product from Collection
/api/collections/:collectionId/products/:productIdRemove a product from a collection.
write_collectionsOrders
Orders represent customer purchases. Each order has line items, a status, payment information, and shipping details.
Order Statuses
| Parameter | Type | Description |
|---|---|---|
DRAFT | status | Draft order, not yet placed |
PENDING | status | Order placed, awaiting payment |
PAID | status | Payment received |
PROCESSING | status | Being prepared for shipment |
FULFILLED | status | Shipped to customer |
COMPLETED | status | Delivered and finalized |
CANCELLED | status | Order cancelled |
REFUNDED | status | Full refund issued |
PARTIALLY_REFUNDED | status | Partial refund issued |
List Orders
/api/ordersRetrieve a paginated list of orders.
read_ordersQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number. Default: 1 |
limit | number | Items per page. Default: 20 |
status | string | Filter by order status |
curl "https://your-domain.com/api/orders?status=PAID&limit=10" \
-H "X-Finxa-Access-Token: fxat_your_secret_key"Get Order
/api/orders/:idRetrieve a single order with all details.
read_ordersCreate Draft Order
/api/orders/draftCreate a draft order with line items.
write_orderscurl -X POST "https://your-domain.com/api/orders/draft" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_abc123",
"items": [
{ "variantId": "var_xyz789", "quantity": 2 }
],
"shippingAddress": {
"line1": "123 Main St",
"city": "Manama",
"country": "BH"
}
}'Update Order Status
/api/orders/:id/statusTransition an order to a new status.
write_orderscurl -X PATCH "https://your-domain.com/api/orders/order_abc123/status" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{ "status": "FULFILLED" }'COMPLETED back to DRAFT.Complete Order
/api/orders/:id/completeMark a fulfilled order as completed.
write_ordersUpdate Order Items
/api/orders/:id/itemsReplace or adjust line items (exchange); inventory and totals update on save.
write_ordersUpdate Order Notes
/api/orders/:id/notesAdd or update internal notes on an order.
write_orderscurl -X PATCH "https://your-domain.com/api/orders/order_abc123/notes" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{ "notes": "Customer requested gift wrapping" }'Update Order Shipping
/api/orders/:id/shippingAdd or update tracking information.
write_orderscurl -X PATCH "https://your-domain.com/api/orders/order_abc123/shipping" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"trackingNumber": "1Z999AA10123456784",
"trackingUrl": "https://track.example.com/1Z999AA10123456784",
"trackingCarrier": "Aramex"
}'Customers
Customers represent people who have purchased from your store or that you've added manually. Each customer has a unique email per store.
List Customers
/api/customersRetrieve a paginated list of customers with order counts and total spent.
read_customersQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number. Default: 1 |
limit | number | Items per page (max 100). Default: 20 |
search | string | Search by email, first name, last name, or phone |
Get Customer
/api/customers/:idRetrieve a customer with their order history and total spent.
read_customersCreate Customer
/api/customersCreate a new customer.
write_customersRequest Body
| Parameter | Type | Description |
|---|---|---|
emailRequired | string | Customer email address (unique per store) |
firstName | string | First name |
lastName | string | Last name |
phone | string | Phone number |
notes | string | Internal notes |
address | object | Address: { line1, line2?, city, state?, country, postalCode? } |
curl -X POST "https://your-domain.com/api/customers" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"firstName": "Ahmed",
"lastName": "Al-Khalifa",
"phone": "+97312345678",
"address": {
"line1": "Building 42, Road 3601",
"city": "Manama",
"country": "BH",
"postalCode": "0360"
}
}'Update Customer
/api/customers/:idUpdate customer fields. Only send the fields you want to change.
write_customersDelete Customer
/api/customers/:idDelete a customer permanently.
write_customerscustomerId: null.Discounts
Create discount codes (percentage or fixed amount) that customers can apply at checkout. Discounts support usage limits, date ranges, minimum order amounts, and can be targeted to specific products or collections.
List Discounts
/api/discountsRetrieve all discount codes.
read_discountsGet Discount
/api/discounts/:idRetrieve a single discount with product/collection associations.
read_discountsCreate Discount
/api/discountsCreate a new discount code.
write_discountsRequest Body
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Internal title for the discount |
codeRequired | string | Discount code customers will enter (unique per store) |
typeRequired | string | PERCENTAGE or FIXED_AMOUNT |
valueRequired | number | Discount value (e.g. 10 for 10% or 5.000 for 5 BHD) |
trigger | string | CODE (default) or AUTOMATIC |
appliesTo | string | ORDER (default), PRODUCT, or COLLECTION |
minimumOrderAmount | number | Minimum order total to apply. Default: 0 |
usageLimit | number | Max total uses (null = unlimited) |
onePerCustomer | boolean | Limit one use per customer. Default: false |
startsAt | string | ISO 8601 start date |
endsAt | string | ISO 8601 end date |
productIds | string[] | Product IDs for product-level discounts |
collectionIds | string[] | Collection IDs for collection-level discounts |
curl -X POST "https://your-domain.com/api/discounts" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "Summer Sale",
"code": "SUMMER15",
"type": "PERCENTAGE",
"value": 15,
"minimumOrderAmount": 20,
"startsAt": "2026-06-01T00:00:00Z",
"endsAt": "2026-08-31T23:59:59Z"
}'Update Discount
/api/discounts/:idUpdate a discount. Only send the fields you want to change.
write_discountsDelete Discount
/api/discounts/:idDelete a discount code.
write_discountsShipping
Manage shipping zones and rates. A shipping zone defines which countries/regions are eligible and what rates to charge.
List Shipping Zones
/api/shipping/zonesRetrieve all shipping zones with their rates.
read_shippingGet Shipping Zone
/api/shipping/zones/:idRetrieve a single shipping zone.
read_shippingCreate Shipping Zone
/api/shipping/zonesCreate a new shipping zone with rates.
write_shippingcurl -X POST "https://your-domain.com/api/shipping/zones" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Bahrain Domestic",
"countries": ["BH"],
"rates": [
{ "name": "Standard Shipping", "price": 1.500, "minOrderAmount": 0 },
{ "name": "Free Shipping", "price": 0, "minOrderAmount": 25 }
]
}'Update Shipping Zone
/api/shipping/zones/:idUpdate a shipping zone and its rates.
write_shippingDelete Shipping Zone
/api/shipping/zones/:idDelete a shipping zone.
write_shippingPages (CMS)
Create and manage static pages for your storefront — About Us, Contact, FAQ, Shipping Policy, etc. Pages support rich HTML content.
List Pages
/api/pages/:storeIdRetrieve all pages for your store.
read_contentGet Page
/api/pages/:storeId/:pageIdRetrieve a single page.
read_contentCreate Page
/api/pages/:storeIdCreate a new page.
write_contentRequest Body
| Parameter | Type | Description |
|---|---|---|
titleRequired | string | Page title |
handle | string | URL slug (auto-generated from title if omitted) |
body | string | Rich HTML content |
published | boolean | Whether the page is published. Default: false |
seoTitle | string | SEO title |
seoDescription | string | SEO description |
curl -X POST "https://your-domain.com/api/pages/YOUR_STORE_ID" \
-H "X-Finxa-Access-Token: fxat_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"title": "About Us",
"body": "<h2>Our Story</h2><p>We started in 2024 with a mission to...</p>",
"published": true
}'Update Page
/api/pages/:storeId/:pageIdUpdate a page.
write_contentDelete Page
/api/pages/:storeId/:pageIdDelete a page permanently.
write_contentScopes Reference
When creating a Custom App, you select which scopes it needs. Scopes control what resources the app can access. A write_ scope always includes the corresponding read_ scope.
| Scope | Access | Description |
|---|---|---|
read_products | Read | View products, variants, images, and inventory levels |
write_products | Read + Write | Create, update, and delete products, variants, and images |
read_collections | Read | View collections and their products |
write_collections | Read + Write | Create, update, and delete collections |
read_orders | Read | View orders, line items, and fulfillment status |
write_orders | Read + Write | Update order status, add tracking, manage fulfillment |
read_customers | Read | View customer profiles and addresses |
write_customers | Read + Write | Create, update, and delete customers |
read_discounts | Read | View discount codes and rules |
write_discounts | Read + Write | Create, update, and delete discounts |
read_shipping | Read | View shipping zones, rates, and rules |
write_shipping | Read + Write | Create, update, and delete shipping zones and rates |
read_content | Read | View pages and CMS content |
write_content | Read + Write | Create, update, and delete pages |
read_store | Read | View store configuration, tax rates, and payment methods |
write_store | Read + Write | Update store settings, tax rates, and payment methods |
read_markets | Read | View markets, price lists, and localization settings |
write_markets | Read + Write | Create, update, and delete markets and price lists |
read_analytics | Read | View storefront sessions, page views, and traffic data |
read_webhooks | Read | View webhook subscriptions |
write_webhooks | Read + Write | Create, update, and delete webhook subscriptions |
Quick Start Guide
Get up and running in 5 minutes. This example creates a product, then lists all products using Node.js.
const API_URL = "https://your-domain.com/api";
const TOKEN = "fxat_your_secret_key_here";
const headers = {
"X-Finxa-Access-Token": TOKEN,
"Content-Type": "application/json",
};
// 1. Create a product
async function createProduct() {
const res = await fetch(`${API_URL}/products`, {
method: "POST",
headers,
body: JSON.stringify({
title: "My First Product",
status: "ACTIVE",
variants: [
{ title: "Default", price: 19.99, inventory: 50 }
],
}),
});
const data = await res.json();
console.log("Created:", data.data.id);
return data.data;
}
// 2. List all products
async function listProducts() {
const res = await fetch(`${API_URL}/products`, { headers });
const data = await res.json();
console.log(`Found ${data.data.pagination.total} products`);
return data.data.products;
}
// 3. Update a product
async function updateProduct(productId) {
const res = await fetch(`${API_URL}/products/${productId}`, {
method: "PATCH",
headers,
body: JSON.stringify({
description: "Updated via the API!",
tags: ["api-managed"],
}),
});
const data = await res.json();
console.log("Updated:", data.data.title);
}
// Run it
const product = await createProduct();
await updateProduct(product.id);
await listProducts();import requests
API_URL = "https://your-domain.com/api"
HEADERS = {
"X-Finxa-Access-Token": "fxat_your_secret_key_here",
"Content-Type": "application/json",
}
# Create a product
res = requests.post(f"{API_URL}/products", headers=HEADERS, json={
"title": "My First Product",
"status": "ACTIVE",
"variants": [
{"title": "Default", "price": 19.99, "inventory": 50}
],
})
product = res.json()["data"]
print(f"Created: {product['id']}")
# List all products
res = requests.get(f"{API_URL}/products", headers=HEADERS)
data = res.json()["data"]
print(f"Found {data['pagination']['total']} products")
# Update a product
res = requests.patch(f"{API_URL}/products/{product['id']}", headers=HEADERS, json={
"description": "Updated via the API!",
"tags": ["api-managed"],
})
print(f"Updated: {res.json()['data']['title']}")Build powerful integrations with the Finxa Commerce API.