Brand Portal

Brand API Docs

Navigation

Each operation below includes the exact method, path, cURL request, JSON body, and JSON response so the docs are easy to scan, copy, and parse.

AI Summary

Machine-readable reference for tools and agents

This page now exposes a stable JSON summary of auth requirements, endpoint paths, and anchor ids so agents and internal tooling can parse the docs without guessing structure.

Parsing Rules
  • Each endpoint now has a stable anchor id generated from method plus path.
  • Section links are role-scoped so future athlete, gym, and admin docs can match this structure.
  • The structured manifest stays in page source instead of taking over the layout.
Manifest Target

AI clients can read the embedded JSON manifest directly from:

script#brand-api-docs-summary[type="application/json"]

It includes auth headers, base URL, endpoint metadata, sample ids, and stable anchor ids for deep linking.

Coverage
Total Endpoints15
Canonical brand and connection state3
Product collection and item CRUD6
Coupon code collection and item CRUD6
Deep Links

Every endpoint card now has its own anchor id so people and agents can jump straight to a specific operation.

/api-docs/brand#get-api-brand-v1-profile

Use the inline `Copy Link` action on any endpoint card for a direct reference.

Inspect JSON ManifestOptional

The raw manifest is still available for debugging, but it stays collapsed by default so the docs remain readable.

{
  "auth": {
    "headers": [
      "Authorization: Bearer <API_KEY>",
      "x-burnproof-api-key: <API_KEY>"
    ],
    "publicDocs": true,
    "role": "brand"
  },
  "baseUrl": "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io",
  "docsUrl": "/api-docs/brand",
  "endpointCount": 15,
  "endpoints": [
    {
      "anchorId": "get-api-brand-v1-profile",
      "description": "Returns the current `brand` and `connection` objects for the authenticated brand account.",
      "groupId": "profile",
      "groupTitle": "Canonical brand and connection state",
      "method": "GET",
      "path": "/api/brand/v1/profile",
      "statusCode": "200 OK",
      "title": "Fetch the current brand profile"
    },
    {
      "anchorId": "put-api-brand-v1-profile",
      "description": "Send the full nested profile payload when you want to sync or replace the brand profile in one write.",
      "groupId": "profile",
      "groupTitle": "Canonical brand and connection state",
      "method": "PUT",
      "path": "/api/brand/v1/profile",
      "statusCode": "200 OK",
      "title": "Replace or sync the full profile payload"
    },
    {
      "anchorId": "patch-api-brand-v1-profile",
      "description": "Use the same shape as PUT, but only send the fields that should change on `brand` or `connection`.",
      "groupId": "profile",
      "groupTitle": "Canonical brand and connection state",
      "method": "PATCH",
      "path": "/api/brand/v1/profile",
      "statusCode": "200 OK",
      "title": "Patch specific profile fields"
    },
    {
      "anchorId": "get-api-brand-v1-products",
      "description": "Returns the product collection for the authenticated brand. Use these ids for item routes.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "GET",
      "path": "/api/brand/v1/products",
      "statusCode": "200 OK",
      "title": "List products"
    },
    {
      "anchorId": "post-api-brand-v1-products",
      "description": "Creates a new product record. Shopify-linked products can include Shopify ids, inventory, and sync metadata.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "POST",
      "path": "/api/brand/v1/products",
      "statusCode": "201 Created",
      "title": "Create a product"
    },
    {
      "anchorId": "get-api-brand-v1-products-productId",
      "description": "Returns a single product by BurnProof product id.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "GET",
      "path": "/api/brand/v1/products/:productId",
      "statusCode": "200 OK",
      "title": "Fetch one product"
    },
    {
      "anchorId": "put-api-brand-v1-products-productId",
      "description": "Sends the complete product payload to overwrite the current product representation.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "PUT",
      "path": "/api/brand/v1/products/:productId",
      "statusCode": "200 OK",
      "title": "Replace a product"
    },
    {
      "anchorId": "patch-api-brand-v1-products-productId",
      "description": "Updates only the fields you include for an existing product.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "PATCH",
      "path": "/api/brand/v1/products/:productId",
      "statusCode": "200 OK",
      "title": "Patch a product"
    },
    {
      "anchorId": "delete-api-brand-v1-products-productId",
      "description": "Deletes the specified product and returns a success payload.",
      "groupId": "products",
      "groupTitle": "Product collection and item CRUD",
      "method": "DELETE",
      "path": "/api/brand/v1/products/:productId",
      "statusCode": "200 OK",
      "title": "Delete a product"
    },
    {
      "anchorId": "get-api-brand-v1-coupon-codes",
      "description": "Returns every coupon code for the current brand account.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "GET",
      "path": "/api/brand/v1/coupon-codes",
      "statusCode": "200 OK",
      "title": "List coupon codes"
    },
    {
      "anchorId": "post-api-brand-v1-coupon-codes",
      "description": "Creates a coupon code record. Duplicate codes return a conflict error from the API.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "POST",
      "path": "/api/brand/v1/coupon-codes",
      "statusCode": "201 Created",
      "title": "Create a coupon code"
    },
    {
      "anchorId": "get-api-brand-v1-coupon-codes-codeId",
      "description": "Returns a single coupon code by BurnProof coupon code id.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "GET",
      "path": "/api/brand/v1/coupon-codes/:codeId",
      "statusCode": "200 OK",
      "title": "Fetch one coupon code"
    },
    {
      "anchorId": "put-api-brand-v1-coupon-codes-codeId",
      "description": "Sends the complete coupon code payload to overwrite the existing record.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "PUT",
      "path": "/api/brand/v1/coupon-codes/:codeId",
      "statusCode": "200 OK",
      "title": "Replace a coupon code"
    },
    {
      "anchorId": "patch-api-brand-v1-coupon-codes-codeId",
      "description": "Updates only the fields you include for an existing coupon code.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "PATCH",
      "path": "/api/brand/v1/coupon-codes/:codeId",
      "statusCode": "200 OK",
      "title": "Patch a coupon code"
    },
    {
      "anchorId": "delete-api-brand-v1-coupon-codes-codeId",
      "description": "Deletes the specified coupon code and returns a success payload.",
      "groupId": "coupon-codes",
      "groupTitle": "Coupon code collection and item CRUD",
      "method": "DELETE",
      "path": "/api/brand/v1/coupon-codes/:codeId",
      "statusCode": "200 OK",
      "title": "Delete a coupon code"
    }
  ],
  "examples": {
    "sampleCouponCodeId": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
    "sampleProductId": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102"
  }
}
Quick Start

Authenticate once, then work route by route

Authenticate with a brand API key, send JSON for write operations, and use the resource ids returned by list endpoints when calling item routes.

GET Example
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Base URL
http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io
Header Options
Authorization: Bearer <API_KEY>
x-burnproof-api-key: <API_KEY>
Accept: application/json
Content-Type: application/json
Request Rules
  • Authenticate with either `Authorization: Bearer <API_KEY>` or `x-burnproof-api-key`.
  • POST, PUT, and PATCH routes expect JSON request bodies.
  • Item route ids come from the matching collection response.
Response Rules
  • Collection routes return `products` or `couponCodes` arrays.
  • Item routes return a `product` or `couponCode` object, except DELETE.
  • DELETE returns success JSON with the deleted id.
Auth Error Example
{
  "error": "Missing API key."
}
Endpoint Index

Routes organized by resource

Use this index to jump to the right section quickly. Every operation below is documented with a concrete request example.

Brand Profile

Canonical brand and connection state

Read and update the canonical brand profile plus Shopify connection state used throughout the portal.

GET/api/brand/v1/profile200 OKCopy Link

Fetch the current brand profile

Returns the current `brand` and `connection` objects for the authenticated brand account.

  • Use this first if your integration needs the latest support, logo, or Shopify connection metadata.
Example Request
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "brand": {
    "brandName": "BurnProof Demo Brand",
    "cartMinimumCents": 3500,
    "contactName": "Alex Carter",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "customerLtvCents": 18000,
    "description": "Performance supplements and recovery gear for verified athletes.",
    "grossMarginPercent": 62,
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "updatedAt": "2026-04-13T09:30:00.000Z",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "lastDiscountsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastProductsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "shopDomain": "burnproof-demo.myshopify.com",
    "status": "CONNECTED",
    "syncEnabled": true
  }
}
PUT/api/brand/v1/profile200 OKCopy Link

Replace or sync the full profile payload

Send the full nested profile payload when you want to sync or replace the brand profile in one write.

  • Payload supports nested `brand` and `connection` objects and returns the updated profile.
Example Request
curl -X PUT "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "brand": {
    "brandName": "BurnProof Demo Brand",
    "cartMinimumCents": 3500,
    "contactName": "Alex Carter",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "customerLtvCents": 18000,
    "description": "Performance supplements and recovery gear for verified athletes.",
    "grossMarginPercent": 62,
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "updatedAt": "2026-04-13T09:30:00.000Z",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "lastDiscountsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastProductsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "shopDomain": "burnproof-demo.myshopify.com",
    "status": "CONNECTED",
    "syncEnabled": true
  }
}'
Example JSON Body
{
  "brand": {
    "brandName": "BurnProof Demo Brand",
    "cartMinimumCents": 3500,
    "contactName": "Alex Carter",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "customerLtvCents": 18000,
    "description": "Performance supplements and recovery gear for verified athletes.",
    "grossMarginPercent": 62,
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "updatedAt": "2026-04-13T09:30:00.000Z",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "lastDiscountsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastProductsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "shopDomain": "burnproof-demo.myshopify.com",
    "status": "CONNECTED",
    "syncEnabled": true
  }
}
Example Response JSON
{
  "brand": {
    "brandName": "BurnProof Demo Brand",
    "cartMinimumCents": 3500,
    "contactName": "Alex Carter",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "customerLtvCents": 18000,
    "description": "Performance supplements and recovery gear for verified athletes.",
    "grossMarginPercent": 62,
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "updatedAt": "2026-04-13T09:30:00.000Z",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "lastDiscountsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastProductsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "shopDomain": "burnproof-demo.myshopify.com",
    "status": "CONNECTED",
    "syncEnabled": true
  }
}
PATCH/api/brand/v1/profile200 OKCopy Link

Patch specific profile fields

Use the same shape as PUT, but only send the fields that should change on `brand` or `connection`.

  • PATCH supports partial nested updates for profile and connection fields.
Example Request
curl -X PATCH "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/profile" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "brand": {
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "shopDomain": "burnproof-demo.myshopify.com",
    "syncEnabled": true
  }
}'
Example JSON Body
{
  "brand": {
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "shopDomain": "burnproof-demo.myshopify.com",
    "syncEnabled": true
  }
}
Example Response JSON
{
  "brand": {
    "brandName": "BurnProof Demo Brand",
    "cartMinimumCents": 3500,
    "contactName": "Alex Carter",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "customerLtvCents": 18000,
    "description": "Performance supplements and recovery gear for verified athletes.",
    "grossMarginPercent": 62,
    "logoUrl": "https://cdn.example.com/brand/logo.png",
    "supportEmail": "[email protected]",
    "updatedAt": "2026-04-13T09:30:00.000Z",
    "website": "https://burnproof.example.com"
  },
  "connection": {
    "lastDiscountsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastProductsSyncAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "shopDomain": "burnproof-demo.myshopify.com",
    "status": "CONNECTED",
    "syncEnabled": true
  }
}
Products

Product collection and item CRUD

Collection routes create or list products, while item routes read, update, or delete one product at a time.

GET/api/brand/v1/products200 OKCopy Link

List products

Returns the product collection for the authenticated brand. Use these ids for item routes.

  • Item route ids come from the `products[].id` values returned here.
Example Request
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "products": [
    {
      "burnproofInventoryQuantity": 40,
      "burnproofListingStatus": "LIVE",
      "createdAt": "2026-04-12T09:30:00.000Z",
      "currencyCode": "USD",
      "description": "A clean-label pre-workout for verified athletes.",
      "discountPercent": 10,
      "featured": true,
      "handle": "burnproof-pre-workout",
      "id": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
      "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
      "imageUrls": [
        "https://cdn.example.com/products/pre-workout.jpg",
        "https://cdn.example.com/products/pre-workout-side.jpg"
      ],
      "lastSyncedAt": "2026-04-13T09:30:00.000Z",
      "lastSyncError": null,
      "marginPercent": 35,
      "marketplaceCategory": "SUPPLEMENTS",
      "priceCents": 4900,
      "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
      "shopifyInventoryQuantity": 64,
      "shopifyProductId": "gid://shopify/Product/1234567890",
      "shopifyStatus": "ACTIVE",
      "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
      "sku": "BURN-PRE-001",
      "source": "SHOPIFY",
      "syncStatus": "SYNCED",
      "title": "BurnProof Pre-Workout",
      "updatedAt": "2026-04-13T09:30:00.000Z"
    }
  ]
}
POST/api/brand/v1/products201 CreatedCopy Link

Create a product

Creates a new product record. Shopify-linked products can include Shopify ids, inventory, and sync metadata.

  • Successful creates return the new record under the `product` key.
Example Request
curl -X POST "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "currencyCode": "USD",
  "discountPercent": 10,
  "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
  "marginPercent": 35,
  "priceCents": 4900,
  "shopifyInventoryQuantity": 64,
  "shopifyProductId": "gid://shopify/Product/1234567890",
  "shopifyStatus": "ACTIVE",
  "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
  "sku": "BURN-PRE-001",
  "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
  "title": "BurnProof Pre-Workout"
}'
Example JSON Body
{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "currencyCode": "USD",
  "discountPercent": 10,
  "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
  "marginPercent": 35,
  "priceCents": 4900,
  "shopifyInventoryQuantity": 64,
  "shopifyProductId": "gid://shopify/Product/1234567890",
  "shopifyStatus": "ACTIVE",
  "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
  "sku": "BURN-PRE-001",
  "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
  "title": "BurnProof Pre-Workout"
}
Example Response JSON
{
  "product": {
    "burnproofInventoryQuantity": 40,
    "burnproofListingStatus": "LIVE",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "currencyCode": "USD",
    "description": "A clean-label pre-workout for verified athletes.",
    "discountPercent": 10,
    "featured": true,
    "handle": "burnproof-pre-workout",
    "id": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
    "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
    "imageUrls": [
      "https://cdn.example.com/products/pre-workout.jpg",
      "https://cdn.example.com/products/pre-workout-side.jpg"
    ],
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "marginPercent": 35,
    "marketplaceCategory": "SUPPLEMENTS",
    "priceCents": 4900,
    "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
    "shopifyInventoryQuantity": 64,
    "shopifyProductId": "gid://shopify/Product/1234567890",
    "shopifyStatus": "ACTIVE",
    "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
    "sku": "BURN-PRE-001",
    "source": "SHOPIFY",
    "syncStatus": "SYNCED",
    "title": "BurnProof Pre-Workout",
    "updatedAt": "2026-04-13T09:30:00.000Z"
  }
}
GET/api/brand/v1/products/:productId200 OKCopy Link

Fetch one product

Returns a single product by BurnProof product id.

  • Use a value returned from `GET /api/brand/v1/products`.
Example Request
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products/2f7bde4d-2df8-4415-8f02-43a6fcdb7102" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "product": {
    "burnproofInventoryQuantity": 40,
    "burnproofListingStatus": "LIVE",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "currencyCode": "USD",
    "description": "A clean-label pre-workout for verified athletes.",
    "discountPercent": 10,
    "featured": true,
    "handle": "burnproof-pre-workout",
    "id": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
    "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
    "imageUrls": [
      "https://cdn.example.com/products/pre-workout.jpg",
      "https://cdn.example.com/products/pre-workout-side.jpg"
    ],
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "marginPercent": 35,
    "marketplaceCategory": "SUPPLEMENTS",
    "priceCents": 4900,
    "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
    "shopifyInventoryQuantity": 64,
    "shopifyProductId": "gid://shopify/Product/1234567890",
    "shopifyStatus": "ACTIVE",
    "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
    "sku": "BURN-PRE-001",
    "source": "SHOPIFY",
    "syncStatus": "SYNCED",
    "title": "BurnProof Pre-Workout",
    "updatedAt": "2026-04-13T09:30:00.000Z"
  }
}
PUT/api/brand/v1/products/:productId200 OKCopy Link

Replace a product

Sends the complete product payload to overwrite the current product representation.

  • Use PUT when your sync job already has the full canonical product object.
Example Request
curl -X PUT "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products/2f7bde4d-2df8-4415-8f02-43a6fcdb7102" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "currencyCode": "USD",
  "discountPercent": 10,
  "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
  "marginPercent": 35,
  "priceCents": 4900,
  "shopifyInventoryQuantity": 64,
  "shopifyProductId": "gid://shopify/Product/1234567890",
  "shopifyStatus": "ACTIVE",
  "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
  "sku": "BURN-PRE-001",
  "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
  "title": "BurnProof Pre-Workout"
}'
Example JSON Body
{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "currencyCode": "USD",
  "discountPercent": 10,
  "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
  "marginPercent": 35,
  "priceCents": 4900,
  "shopifyInventoryQuantity": 64,
  "shopifyProductId": "gid://shopify/Product/1234567890",
  "shopifyStatus": "ACTIVE",
  "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
  "sku": "BURN-PRE-001",
  "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
  "title": "BurnProof Pre-Workout"
}
Example Response JSON
{
  "product": {
    "burnproofInventoryQuantity": 40,
    "burnproofListingStatus": "LIVE",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "currencyCode": "USD",
    "description": "A clean-label pre-workout for verified athletes.",
    "discountPercent": 10,
    "featured": true,
    "handle": "burnproof-pre-workout",
    "id": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
    "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
    "imageUrls": [
      "https://cdn.example.com/products/pre-workout.jpg",
      "https://cdn.example.com/products/pre-workout-side.jpg"
    ],
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "marginPercent": 35,
    "marketplaceCategory": "SUPPLEMENTS",
    "priceCents": 4900,
    "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
    "shopifyInventoryQuantity": 64,
    "shopifyProductId": "gid://shopify/Product/1234567890",
    "shopifyStatus": "ACTIVE",
    "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
    "sku": "BURN-PRE-001",
    "source": "SHOPIFY",
    "syncStatus": "SYNCED",
    "title": "BurnProof Pre-Workout",
    "updatedAt": "2026-04-13T09:30:00.000Z"
  }
}
PATCH/api/brand/v1/products/:productId200 OKCopy Link

Patch a product

Updates only the fields you include for an existing product.

  • PATCH is the lighter-weight option for price, inventory, or listing status updates.
Example Request
curl -X PATCH "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products/2f7bde4d-2df8-4415-8f02-43a6fcdb7102" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "discountPercent": 10,
  "priceCents": 4900
}'
Example JSON Body
{
  "burnproofInventoryQuantity": 40,
  "burnproofListingStatus": "LIVE",
  "discountPercent": 10,
  "priceCents": 4900
}
Example Response JSON
{
  "product": {
    "burnproofInventoryQuantity": 40,
    "burnproofListingStatus": "LIVE",
    "createdAt": "2026-04-12T09:30:00.000Z",
    "currencyCode": "USD",
    "description": "A clean-label pre-workout for verified athletes.",
    "discountPercent": 10,
    "featured": true,
    "handle": "burnproof-pre-workout",
    "id": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
    "imageUrl": "https://cdn.example.com/products/pre-workout.jpg",
    "imageUrls": [
      "https://cdn.example.com/products/pre-workout.jpg",
      "https://cdn.example.com/products/pre-workout-side.jpg"
    ],
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "lastSyncError": null,
    "marginPercent": 35,
    "marketplaceCategory": "SUPPLEMENTS",
    "priceCents": 4900,
    "sourceUpdatedAt": "2026-04-13T09:30:00.000Z",
    "shopifyInventoryQuantity": 64,
    "shopifyProductId": "gid://shopify/Product/1234567890",
    "shopifyStatus": "ACTIVE",
    "shopifyVariantId": "gid://shopify/ProductVariant/1234567890",
    "sku": "BURN-PRE-001",
    "source": "SHOPIFY",
    "syncStatus": "SYNCED",
    "title": "BurnProof Pre-Workout",
    "updatedAt": "2026-04-13T09:30:00.000Z"
  }
}
DELETE/api/brand/v1/products/:productId200 OKCopy Link

Delete a product

Deletes the specified product and returns a success payload.

  • DELETE does not require a request body.
Example Request
curl -X DELETE "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/products/2f7bde4d-2df8-4415-8f02-43a6fcdb7102" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "deletedProductId": "2f7bde4d-2df8-4415-8f02-43a6fcdb7102",
  "success": true
}
Coupon Codes

Coupon code collection and item CRUD

Coupon code collection routes handle listing and creation, while item routes support read, update, and delete flows.

GET/api/brand/v1/coupon-codes200 OKCopy Link

List coupon codes

Returns every coupon code for the current brand account.

  • Use returned `couponCodes[].id` values for item routes.
Example Request
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "couponCodes": [
    {
      "active": true,
      "category": "ATHLETE_DISCOUNT",
      "code": "BURN10",
      "currentUses": 12,
      "description": "Athlete ambassador offer",
      "discountPercent": 10,
      "id": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
      "lastSyncedAt": "2026-04-13T09:30:00.000Z",
      "maxUses": 500,
      "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890",
      "syncStatus": "SYNCED"
    }
  ]
}
POST/api/brand/v1/coupon-codes201 CreatedCopy Link

Create a coupon code

Creates a coupon code record. Duplicate codes return a conflict error from the API.

  • Successful creates return the new record under the `couponCode` key.
Example Request
curl -X POST "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "active": true,
  "category": "ATHLETE_DISCOUNT",
  "code": "BURN10",
  "currentUses": 12,
  "description": "Athlete ambassador offer",
  "discountPercent": 10,
  "maxUses": 500,
  "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890"
}'
Example JSON Body
{
  "active": true,
  "category": "ATHLETE_DISCOUNT",
  "code": "BURN10",
  "currentUses": 12,
  "description": "Athlete ambassador offer",
  "discountPercent": 10,
  "maxUses": 500,
  "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890"
}
Example Response JSON
{
  "couponCode": {
    "active": true,
    "category": "ATHLETE_DISCOUNT",
    "code": "BURN10",
    "currentUses": 12,
    "description": "Athlete ambassador offer",
    "discountPercent": 10,
    "id": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "maxUses": 500,
    "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890",
    "syncStatus": "SYNCED"
  }
}
GET/api/brand/v1/coupon-codes/:codeId200 OKCopy Link

Fetch one coupon code

Returns a single coupon code by BurnProof coupon code id.

  • Use a value returned from `GET /api/brand/v1/coupon-codes`.
Example Request
curl -X GET "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes/7d1d6622-5272-4473-b1c4-7482cead5f2b" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "couponCode": {
    "active": true,
    "category": "ATHLETE_DISCOUNT",
    "code": "BURN10",
    "currentUses": 12,
    "description": "Athlete ambassador offer",
    "discountPercent": 10,
    "id": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "maxUses": 500,
    "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890",
    "syncStatus": "SYNCED"
  }
}
PUT/api/brand/v1/coupon-codes/:codeId200 OKCopy Link

Replace a coupon code

Sends the complete coupon code payload to overwrite the existing record.

  • Use PUT when your client owns the full coupon definition.
Example Request
curl -X PUT "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes/7d1d6622-5272-4473-b1c4-7482cead5f2b" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "active": true,
  "category": "ATHLETE_DISCOUNT",
  "code": "BURN10",
  "currentUses": 12,
  "description": "Athlete ambassador offer",
  "discountPercent": 10,
  "maxUses": 500,
  "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890"
}'
Example JSON Body
{
  "active": true,
  "category": "ATHLETE_DISCOUNT",
  "code": "BURN10",
  "currentUses": 12,
  "description": "Athlete ambassador offer",
  "discountPercent": 10,
  "maxUses": 500,
  "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890"
}
Example Response JSON
{
  "couponCode": {
    "active": true,
    "category": "ATHLETE_DISCOUNT",
    "code": "BURN10",
    "currentUses": 12,
    "description": "Athlete ambassador offer",
    "discountPercent": 10,
    "id": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "maxUses": 500,
    "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890",
    "syncStatus": "SYNCED"
  }
}
PATCH/api/brand/v1/coupon-codes/:codeId200 OKCopy Link

Patch a coupon code

Updates only the fields you include for an existing coupon code.

  • PATCH is useful for toggling `active`, adjusting limits, or changing discount values.
Example Request
curl -X PATCH "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes/7d1d6622-5272-4473-b1c4-7482cead5f2b" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
  "active": true,
  "discountPercent": 10,
  "maxUses": 500
}'
Example JSON Body
{
  "active": true,
  "discountPercent": 10,
  "maxUses": 500
}
Example Response JSON
{
  "couponCode": {
    "active": true,
    "category": "ATHLETE_DISCOUNT",
    "code": "BURN10",
    "currentUses": 12,
    "description": "Athlete ambassador offer",
    "discountPercent": 10,
    "id": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
    "lastSyncedAt": "2026-04-13T09:30:00.000Z",
    "maxUses": 500,
    "shopifyDiscountId": "gid://shopify/DiscountCodeNode/1234567890",
    "syncStatus": "SYNCED"
  }
}
DELETE/api/brand/v1/coupon-codes/:codeId200 OKCopy Link

Delete a coupon code

Deletes the specified coupon code and returns a success payload.

  • DELETE does not require a request body.
Example Request
curl -X DELETE "http://r48g4s0w8gw8wkc4w0os4s4g.altmachina.io/api/brand/v1/coupon-codes/7d1d6622-5272-4473-b1c4-7482cead5f2b" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <API_KEY>"
Example Response JSON
{
  "deletedCouponCodeId": "7d1d6622-5272-4473-b1c4-7482cead5f2b",
  "success": true
}
Conventions

Payload and error handling rules

These shared rules apply across the profile, products, and coupon code endpoints.

Shared Rules
  • All endpoints return JSON and expect JSON bodies for write methods.
  • PATCH accepts partial bodies. PUT is better when you already have the full object.
  • Method and route names are exact. Use `/api/brand/v1/...` as shown.
Invalid JSON Example
{
  "error": "Invalid JSON payload."
}
Method Error Example
{
  "error": "Method not allowed. Use GET, POST."
}