Docs
Dashboard
On this page

    Bundles

    3 endpoints. Each needs an API key or OAuth token with the scope shown; the key already names its store, so paths start at /v1/store. Generated from the live contract; also in openapi.json.

    Bundles with what they include and the savings

    GET/v1/store/bundles

    Or name the store: GET /v1/stores/{storeId}/bundles

    catalog:readlistBundles

    Response ListBundlesResponse

    • bundlesBundleRow[]required

    Example

    curl "https://api.shopfa.st/v1/store/bundles" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/bundles', {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
      },
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "GET",
        "https://api.shopfa.st/v1/store/bundles",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("GET", "https://api.shopfa.st/v1/store/bundles", nil)
    req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
    res, err := http.DefaultClient.Do(req)
    Try it with your key

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Create a bundle product

    POST/v1/store/bundles

    Or name the store: POST /v1/stores/{storeId}/bundles

    catalog:writecreateBundle

    Body

    • namestringrequired
    • descriptionstringrequired
    • status"active" | "draft" | "archived"required
    • productIdsprd_…[]required
    • pricingobjectrequired
    • coverUploadIdupl_… | nullrequired
    • partsobject[]
      • productIdprd_…required
      • variantIdvar_… | nullrequired

    Response BundleRow

    • idProductIdrequired
    • namestringrequired
    • descriptionstringrequired
    • slugstringrequired
    • statusProductStatusrequired
    • priceMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • valueMinorMinorUnitsrequired
    • savingsMinorMinorUnitsrequired
    • savingsBpsintegerrequired
    6 more fields
    • itemsobject[]required
      • productIdProductIdrequired
      • namestringrequired
      • typeProductTyperequired
      • priceMinorMinorUnitsrequired
      • variantIdVariantId | nullrequired
      • variantNamestringrequired
    • pricingBundlePricingrequired
    • unitsSoldintegerrequired
    • revenueMinorMinorUnitsrequired
    • coverUrlstringrequired
    • updatedAtTimestamprequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/bundles" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "string",
      "description": "string",
      "status": "active",
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "pricing": {
        "kind": "fixed",
        "priceMinor": 0
      },
      "coverUploadId": "upl_0123456789abcdefghjk",
      "parts": []
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/bundles', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "name": "string",
        "description": "string",
        "status": "active",
        "productIds": [
          "prd_0123456789abcdefghjk"
        ],
        "pricing": {
          "kind": "fixed",
          "priceMinor": 0
        },
        "coverUploadId": "upl_0123456789abcdefghjk",
        "parts": []
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "POST",
        "https://api.shopfa.st/v1/store/bundles",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "name": "string",
          "description": "string",
          "status": "active",
          "productIds": [
            "prd_0123456789abcdefghjk"
          ],
          "pricing": {
            "kind": "fixed",
            "priceMinor": 0
          },
          "coverUploadId": "upl_0123456789abcdefghjk",
          "parts": []
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/bundles", strings.NewReader(`{
      "name": "string",
      "description": "string",
      "status": "active",
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "pricing": {
        "kind": "fixed",
        "priceMinor": 0
      },
      "coverUploadId": "upl_0123456789abcdefghjk",
      "parts": []
    }`))
    req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    res, err := http.DefaultClient.Do(req)
    Try it with your key

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Update a bundle product

    PUT/v1/store/bundles/{productId}

    Or name the store: PUT /v1/stores/{storeId}/bundles/{productId}

    catalog:writeupdateBundle

    Parameters

    • productIdprd_…pathrequired

    Body

    • namestringrequired
    • descriptionstringrequired
    • status"active" | "draft" | "archived"required
    • productIdsprd_…[]required
    • pricingobjectrequired
    • coverUploadIdupl_… | nullrequired
    • partsobject[]
      • productIdprd_…required
      • variantIdvar_… | nullrequired

    Response BundleRow

    • idProductIdrequired
    • namestringrequired
    • descriptionstringrequired
    • slugstringrequired
    • statusProductStatusrequired
    • priceMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • valueMinorMinorUnitsrequired
    • savingsMinorMinorUnitsrequired
    • savingsBpsintegerrequired
    6 more fields
    • itemsobject[]required
      • productIdProductIdrequired
      • namestringrequired
      • typeProductTyperequired
      • priceMinorMinorUnitsrequired
      • variantIdVariantId | nullrequired
      • variantNamestringrequired
    • pricingBundlePricingrequired
    • unitsSoldintegerrequired
    • revenueMinorMinorUnitsrequired
    • coverUrlstringrequired
    • updatedAtTimestamprequired

    Example

    curl -X PUT "https://api.shopfa.st/v1/store/bundles/prd_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "string",
      "description": "string",
      "status": "active",
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "pricing": {
        "kind": "fixed",
        "priceMinor": 0
      },
      "coverUploadId": "upl_0123456789abcdefghjk",
      "parts": []
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/bundles/prd_0123456789abcdefghjk', {
      method: 'PUT',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "name": "string",
        "description": "string",
        "status": "active",
        "productIds": [
          "prd_0123456789abcdefghjk"
        ],
        "pricing": {
          "kind": "fixed",
          "priceMinor": 0
        },
        "coverUploadId": "upl_0123456789abcdefghjk",
        "parts": []
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "PUT",
        "https://api.shopfa.st/v1/store/bundles/prd_0123456789abcdefghjk",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "name": "string",
          "description": "string",
          "status": "active",
          "productIds": [
            "prd_0123456789abcdefghjk"
          ],
          "pricing": {
            "kind": "fixed",
            "priceMinor": 0
          },
          "coverUploadId": "upl_0123456789abcdefghjk",
          "parts": []
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/bundles/prd_0123456789abcdefghjk", strings.NewReader(`{
      "name": "string",
      "description": "string",
      "status": "active",
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "pricing": {
        "kind": "fixed",
        "priceMinor": 0
      },
      "coverUploadId": "upl_0123456789abcdefghjk",
      "parts": []
    }`))
    req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    res, err := http.DefaultClient.Do(req)
    Try it with your key

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Was this page helpful?