Use the FyreTrail Developer API
FyreTrail exposes an external API under /api/ext/v1. The current surface is read-only and is designed for client-secure integrations that need purchase orders, suppliers, brands, stock adjustments, stock adjustment items, transfers, and tax types.
All resources are scoped to the client encoded in the token you send with the request. The API does not switch tenants based on the Store-Name header. That header is accepted for integrations that send it automatically, but the token is the source of truth for access control.
On This Page
Authentication and API Keys
FyreTrail's external API uses a client-scoped API key. That key can be sent either as a standard Bearer token or, for clients that prefer it, as an API key using the header format Authorization: API KEY=<token>.
While signed in as a user with access to the client, go to Settings > Extensions > Developer API Access and create a named API key. FyreTrail shows the generated raw key in a one-time copy prompt, and the key is only saved after you confirm Copy. The saved key is already scoped to the client you are currently working in, and the same card lets you review or expire it later.
How to create an API key
- Sign in to FyreTrail with a user who has access to the client you want to query.
- Open Settings > Extensions.
- In the Developer API Access card, click Create API Key after naming the integration and choosing an expiration.
- In the one-time copy prompt, click Copy. This is what stores and activates the key. If you click Cancel, nothing is saved.
- Store the copied raw key securely in your integration. FyreTrail only shows the full raw value in that prompt.
- Return to the same card later to review the saved key metadata or expire a key that should stop working.
- Send that key on subsequent requests to
/api/ext/v1.
Important: API keys are created inside the signed-in settings UI. All resource routes under /api/ext/v1 reject cookie-only access and require the Authorization header.
What happens after you click Copy
Clicking Copy both copies the raw key to your clipboard and saves it in FyreTrail. The Settings page only keeps review metadata such as the key name, expiration, created time, and last used time. If you cancel the prompt instead, the key is discarded and nothing is stored.
Request Format
All currently supported endpoints are GET endpoints. There is no JSON request body. The request object consists of the URL path, any query string filters, and the required headers.
| Part of request | Requirement |
|---|---|
| Method | GET (and OPTIONS for CORS preflight) |
| Base path | https://app.fyretrail.net/api/ext/v1 |
| Authorization header | Required. Use either Bearer <token> or API KEY=<token> |
| Store-Name header | Optional. Accepted for integrations that send it automatically. It does not select the client. |
| Accept header | Recommended: application/json |
| Body | None for the current read-only endpoints |
Example HTTP request
GET /api/ext/v1/purchase_orders.json?limit=2&status=confirmed HTTP/1.1
Host: app.fyretrail.net
Authorization: API KEY=ft_your_client_token
Store-Name: my-store
Accept: application/jsonExample cURL request
curl -X GET "https://app.fyretrail.net/api/ext/v1/suppliers.json?limit=5" -H "Authorization: Bearer ft_your_client_token" \
-H "Store-Name: my-store" \
-H "Accept: application/json"Available Endpoints
The API accepts .json routes. The .json suffix is recommended, although the router also accepts the same paths without it.
| Resource | Collection endpoint | Detail endpoint |
|---|---|---|
| Purchase Orders | /purchase_orders.json | /purchase_orders/:id.json |
| Suppliers | /suppliers.json | /suppliers/:id.json |
| Brands | /brands.json | /brands/:id.json |
| Stock Adjustments | /stock_adjustments.json | /stock_adjustments/:id.json |
| Stock Adjustment Items | /stock_adjustment_items.json | /stock_adjustment_items/:id.json |
| Transfers | /transfers.json | /transfers/:id.json |
| Tax Types | /tax_types.json | /tax_types/:id.json |
FyreTrail also accepts /adjustments.json as an alias for /stock_adjustments.json and /adjustment_items.json as an alias for /stock_adjustment_items.json. Transfer integrations may likewise use /stock_transfers.json and /stock_transfers/:id.json as aliases for the transfer routes.
Supported query parameters
| Resource | Supported filters |
|---|---|
| Purchase Orders | limit, since_id, offset, confirmed_since, updated_since, status |
| Suppliers | limit, since_id, updated_since |
| Brands | limit, since_id, updated_since |
| Stock Adjustments | limit, since_id, offset, adjusted_since, updated_since |
| Stock Adjustment Items | limit, since_id, offset, adjusted_since, updated_since, status=adjusted |
| Transfers | limit, since_id, offset, transferred_since, updated_since, adjusted_since (compatibility alias for transferred_since) |
| Tax Types | limit, since_id |
Purchase order status values: FyreTrail supports draft, draft-archived, draft-unarchived, confirmed, confirmed-archived, confirmed-unarchived, archived, and unarchived.
Transfer date filters: transferred_since filters on the transfer creation timestamp. updated_since also detects later item and receipt activity, which makes it the better choice for incremental synchronization.
Rate Limits
Every authenticated request to a valid Developer API resource uses one shared, client-scoped token bucket. Collection routes, detail routes, and route aliases all consume the same quota, and all API keys for the same FyreTrail client share that quota.
Rate-limit policies are assigned server-side and may vary by account configuration. Responses expose the numeric quota state needed for safe request pacing, but never include a plan name, subscription identifier, or other billing metadata. Use the response headers as the authoritative policy.
Rate-limit response headers
| Header | Meaning |
|---|---|
RateLimit-Limit | Maximum number of tokens available for an immediate burst |
RateLimit-Remaining | Whole request tokens currently available |
RateLimit-Reset | Seconds until the burst bucket is fully replenished |
RateLimit-Policy | Active policy in requests;w=seconds;burst=capacity form |
Retry-After | Included on 429 responses; seconds to wait before retrying |
X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset | Legacy mirrors of the corresponding non-prefixed headers |
Rate-limit headers are returned on responses after successful API authentication and are exposed to browser integrations through CORS. Authentication failures and invalid resource paths can return before a rate-limit decision is made.
Successful response header pattern
Placeholder values below are replaced by the policy assigned to the client.
HTTP/1.1 200 OK
RateLimit-Limit: <burst-capacity>
RateLimit-Remaining: <remaining-tokens>
RateLimit-Reset: <seconds-to-full-refill>
RateLimit-Policy: <requests-per-window>;w=<window-seconds>;burst=<burst-capacity>429 response pattern
A request made without an available token returns 429 Too Many Requests. Wait for the number of seconds in Retry-After before retrying.
HTTP/1.1 429 Too Many Requests
RateLimit-Limit: <burst-capacity>
RateLimit-Remaining: 0
RateLimit-Reset: <seconds-to-full-refill>
RateLimit-Policy: <requests-per-window>;w=<window-seconds>;burst=<burst-capacity>
Retry-After: <seconds-before-retry>
{
"error": "API rate limit exceeded. Retry after the indicated delay."
}Response Format
Collection endpoints return a wrapper object whose property name matches the resource. Detail endpoints return a single object with no collection wrapper.
Collection response pattern
{
"purchase_orders": [
{
"id": 481,
"number": "PO-481"
}
]
}Detail response pattern
{
"id": 481,
"number": "PO-481",
"supplier_name": "Acme Wholesale"
}Purchase order response object
Purchase orders include line-item data plus invoice and image attachments sourced from the purchase-order attachment records in FyreTrail.
Each entry in purchase_items includes a numeric received_quantity field containing the cumulative number of units received for that line item. It is 0 when no units have been received and can be compared with quantity to determine the remaining quantity.
{
"id": 481,
"number": "PO-481",
"sequential_id": 481,
"invoice_number": "INV-00931",
"created_at": "2026-05-10T17:14:21.000Z",
"updated_at": "2026-05-11T12:05:09.000Z",
"generated_at": "2026-05-10T17:14:21.000Z",
"ordered_at": "2026-05-10T17:14:21.000Z",
"expected_on": "2026-05-20",
"ship_on": null,
"payment_due_on": "2026-06-09",
"archived": false,
"supplier_name": "Acme Wholesale",
"supplier_id": "17",
"currency": "USD",
"shopify_receive_location_id": 73124589,
"paid": false,
"adjustments": 12.5,
"adjustments_local": 12.5,
"shipping": 45,
"shipping_local": 45,
"shipping_tax_type": 2,
"invoice_date": "2026-05-10",
"purchase_items": [
{
"id": 9001,
"sku": "ACM-1234-BLK-M",
"inventory_item_id": null,
"product_title": "Rib Knit Tee",
"variant_title": "Black / Medium",
"asin": "",
"quantity": 12,
"received_quantity": 5,
"status": "partially delivered",
"retail_price": "42.00",
"cost_price": "18.00",
"supplier_cost_price": "17.50",
"account_code": null,
"tax_type_id": 2,
"accounting_tax_type": "GST",
"received_at": "2026-05-11",
"updated_at": "2026-05-11T12:05:09.000Z"
}
],
"invoices": [
{
"id": "3f18f9c0",
"original_filename": "invoice-481.pdf",
"content_type": "application/pdf",
"url": "/api/orders/481/attachments/3f18f9c0",
"invoice_amount": 261.5,
"invoice_date": "2026-05-10",
"invoice_number": "INV-00931",
"due_date": "2026-06-09",
"is_paid": false,
"paid_at": null,
"created_at": "2026-05-10T17:30:00.000Z",
"updated_at": "2026-05-10T17:30:00.000Z"
}
],
"images": [
{
"id": "a12bc34d",
"original_filename": "packing-slip.jpg",
"content_type": "image/jpeg",
"url": "/api/orders/481/attachments/a12bc34d",
"created_at": "2026-05-10T17:28:00.000Z",
"updated_at": "2026-05-10T17:28:00.000Z"
}
]
}Supplier response object
Suppliers return nested associated_products arrays so integrations can inspect linked products, cost signals, and inventory context without making a second call per product.
{
"id": 17,
"name": "Acme Wholesale",
"created_at": "2026-01-04T14:00:00.000Z",
"updated_at": "2026-05-11T09:15:00.000Z",
"company_name": "Acme Wholesale",
"account_number": "ACM-7821",
"contact_name": "Jamie Buyer",
"contact_email": "sales@acmewholesale.com",
"address1": "123 Market St",
"address2": null,
"city": "Chicago",
"province_code": "IL",
"country_name": "US",
"zip": "60601",
"phone": "555-0100",
"phone_toll_free": null,
"fax": null,
"is_hidden": false,
"currency": "USD",
"tax_type": "GST",
"payment_terms_days": 30,
"payment_method": "ACH",
"associated_product_count": 2,
"associated_order_count": 14,
"associated_products": [
{
"id": 803,
"product_id": 221,
"product_name": "Rib Knit Tee",
"product_code": "1234",
"brand_name": "Acme Basics",
"image_url": "https://cdn.example.com/rib-knit-tee.jpg",
"excluded": false,
"cost": 17.5,
"supplier_cost": 17.5,
"last_purchase_cost": 18,
"average_landed_cost": 18.42,
"case_quantity": 6,
"retail_price": 42,
"current_stock": 28,
"shopify_inventory_quantity": 28,
"pending_shopify_sync_quantity": 0,
"stock_uses_shopify_inventory": true,
"max_stock_level": 60,
"low_stock_threshold": 8,
"order_count": 5,
"last_ordered_date": "2026-05-10",
"total_purchased_units": 96,
"total_purchased_cost": 1768.32,
"total_sold_units": 55,
"total_sales_revenue": 2310,
"min_order_quantity": 6,
"notes": "Restock monthly",
"created_at": "2026-01-04T14:00:00.000Z",
"updated_at": "2026-05-11T09:15:00.000Z"
}
]
}Supplier records expose supplier-level purchasing metadata together with the linked product summaries.
Brand response object
Brand objects follow the same nested product shape, but also expose code and is_system at the brand level.
{
"id": 41,
"name": "Acme Basics",
"code": "ACME-BAS",
"is_system": false,
"created_at": "2026-01-04T14:00:00.000Z",
"updated_at": "2026-05-11T09:15:00.000Z",
"associated_product_count": 2,
"associated_products": [
{
"id": 803,
"product_id": 221,
"product_name": "Rib Knit Tee",
"product_code": "1234",
"brand_name": "Acme Basics",
"image_url": "https://cdn.example.com/rib-knit-tee.jpg",
"excluded": false,
"cost": 17.5,
"supplier_cost": 17.5,
"last_purchase_cost": 18,
"average_landed_cost": 18.42,
"case_quantity": 6,
"retail_price": 42,
"current_stock": 28,
"shopify_inventory_quantity": 28,
"pending_shopify_sync_quantity": 0,
"stock_uses_shopify_inventory": true,
"max_stock_level": 60,
"low_stock_threshold": 8,
"order_count": 5,
"last_ordered_date": "2026-05-10",
"total_purchased_units": 96,
"total_purchased_cost": 1768.32,
"total_sold_units": 55,
"total_sales_revenue": 2310,
"min_order_quantity": 6,
"notes": "Restock monthly",
"created_at": "2026-01-04T14:00:00.000Z",
"updated_at": "2026-05-11T09:15:00.000Z"
}
]
}Stock adjustment response object
{
"id": 912,
"sequential_id": 912,
"adjusted_at": "2026-05-11T15:42:00.000Z",
"created_at": "2026-05-11T15:42:00.000Z",
"updated_at": "2026-05-11T15:42:00.000Z",
"archived": false,
"stock_adjustment_reason": {
"id": 4,
"reason": "Annual count correction"
},
"location": {
"id": 73124589,
"shopify_id": 73124589,
"name": "Main Warehouse"
}
}Stock adjustment item response object
{
"id": 2401,
"quantity": -2,
"updated_at": "2026-05-11T15:42:00.000Z",
"status": "adjusted",
"previous_quantity": 10,
"new_quantity": 8,
"stock_adjustment_id": 912,
"adjusted_at": "2026-05-11T15:42:00.000Z",
"variant": {
"id": 8891,
"shopify_id": 43882911012,
"title": "Black / Medium",
"sku": "ACM-1234-BLK-M",
"barcode": "012345678905"
}
}Transfer response object
Transfer collections and details include their transfer_items, source and target locations, requested and received totals, and receiving lifecycle fields. Transfer status is one of created, in_transit, partially_received, or received.
{
"id": 12,
"sequential_id": 12,
"transferred_at": "2026-07-17T10:00:00.000Z",
"created_at": "2026-07-17T10:00:00.000Z",
"updated_at": "2026-07-17T11:00:00.000Z",
"archived": false,
"status": "partially_received",
"reason": "Rebalance stock",
"notes": null,
"transferred_by": "Alex",
"creation_mode": "manual",
"receive_policy": "acknowledge_or_barcode",
"receive_method": null,
"sent_on": "2026-07-17",
"received_at": null,
"received_by": null,
"stock_transfer_reason": {
"id": 3,
"reason": "Rebalance stock"
},
"source_location": {
"id": 111,
"shopify_id": 111,
"name": "Warehouse"
},
"target_location": {
"id": 222,
"shopify_id": 222,
"name": "Retail Store"
},
"item_count": 1,
"total_quantity": 5,
"received_quantity": 2,
"transfer_items": [
{
"id": 91,
"transfer_id": 12,
"quantity": 5,
"received_quantity": 2,
"created_at": "2026-07-17T10:00:00.000Z",
"updated_at": "2026-07-17T10:00:00.000Z",
"source_quantity": {
"previous": 10,
"current": 5
},
"target_quantity": {
"previous": 1,
"current": 1,
"received_previous": 1,
"received_current": 3
},
"product": {
"id": 7,
"title": "Example Product"
},
"variant": {
"id": 44,
"shopify_id": 444,
"title": "Small",
"sku": "SKU-44",
"barcode": "12345"
}
}
]
}Tax type response object
Tax types are synthesized from the supplier tax codes already stored in FyreTrail. They are read-only and currently always return purpose: "purchase" with tax_rate: null.
{
"id": 2,
"name": "GST",
"code": "GST",
"tax_rate": null,
"purpose": "purchase",
"accounting_tax_type": "GST",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-05-10T18:22:00.000Z"
}Errors
Error responses always return JSON with a single error field.
{
"error": "Invalid purchase_orders status filter"
}| Status | When it happens |
|---|---|
| 400 | Invalid numeric id, invalid date, or unsupported filter value |
| 401 | Missing, invalid, or expired Authorization token |
| 403 | Cookie-only access attempt, or the client plan does not include Developer API access |
| 404 | Unknown resource path or detail record not found |
| 429 | Shared client rate limit exceeded; retry after the delay in Retry-After |
| 500 | Unexpected server error while building the resource payload |
| 503 | The API rate limiter is temporarily unavailable |
Was this article helpful?
