Docs
Dashboard
On this page

    Resellers

    7 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.

    Reseller accounts and applications

    GET/v1/store/resellers

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

    marketing:readlistResellers

    Parameters

    • tab"approved" | "pending" | "suspended" | "rejected" | "all"query
    • qstring | nullquery

    Response ListResellersResponse

    • itemsResellerRow[]required
    • countsResellerCountsrequired

    Example

    curl "https://api.shopfa.st/v1/store/resellers" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/resellers', {
      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/resellers",
        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/resellers", 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.

    Add an approved reseller (emailed their portal link)

    POST/v1/store/resellers

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

    marketing:writecreateReseller

    Body

    • namestringrequired
    • emailstringrequired
    • companystring
    • websitestring
    • tierIdrtr_…required

    Response ResellerRow

    • idResellerIdrequired
    • namestringrequired
    • emailEmailrequired
    • companystringrequired
    • websitestringrequired
    • messagestringrequired
    • statusResellerStatusrequired
    • tierIdResellerTierId | nullrequired
    • tierNamestringrequired
    • ordersintegerrequired
    5 more fields
    • unitsintegerrequired
    • spentMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • createdAtTimestamprequired
    • approvedAtTimestamp | nullrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/resellers" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "name": "string",
      "email": "[email protected]",
      "company": "",
      "website": "",
      "tierId": "rtr_0123456789abcdefghjk"
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/resellers', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "name": "string",
        "email": "[email protected]",
        "company": "",
        "website": "",
        "tierId": "rtr_0123456789abcdefghjk"
      }),
    });
    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/resellers",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "name": "string",
          "email": "[email protected]",
          "company": "",
          "website": "",
          "tierId": "rtr_0123456789abcdefghjk"
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers", strings.NewReader(`{
      "name": "string",
      "email": "[email protected]",
      "company": "",
      "website": "",
      "tierId": "rtr_0123456789abcdefghjk"
    }`))
    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.

    Approve, reject, suspend or reinstate a reseller

    POST/v1/store/resellers/{resellerId}/review

    Or name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/review

    marketing:writereviewReseller

    Parameters

    • resellerIdrsl_…pathrequired

    Body

    • decision"approve" | "reject" | "suspend" | "reinstate"required
    • tierIdrtr_… | null

    Response ResellerRow

    • idResellerIdrequired
    • namestringrequired
    • emailEmailrequired
    • companystringrequired
    • websitestringrequired
    • messagestringrequired
    • statusResellerStatusrequired
    • tierIdResellerTierId | nullrequired
    • tierNamestringrequired
    • ordersintegerrequired
    5 more fields
    • unitsintegerrequired
    • spentMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • createdAtTimestamprequired
    • approvedAtTimestamp | nullrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "decision": "approve",
      "tierId": null
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "decision": "approve",
        "tierId": null
      }),
    });
    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/resellers/rsl_0123456789abcdefghjk/review",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "decision": "approve",
          "tierId": None
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/review", strings.NewReader(`{
      "decision": "approve",
      "tierId": null
    }`))
    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.

    Move a reseller to another tier

    PATCH/v1/store/resellers/{resellerId}

    Or name the store: PATCH /v1/stores/{storeId}/resellers/{resellerId}

    marketing:writeupdateReseller

    Parameters

    • resellerIdrsl_…pathrequired

    Body

    • tierIdrtr_…required

    Response ResellerRow

    • idResellerIdrequired
    • namestringrequired
    • emailEmailrequired
    • companystringrequired
    • websitestringrequired
    • messagestringrequired
    • statusResellerStatusrequired
    • tierIdResellerTierId | nullrequired
    • tierNamestringrequired
    • ordersintegerrequired
    5 more fields
    • unitsintegerrequired
    • spentMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    • createdAtTimestamprequired
    • approvedAtTimestamp | nullrequired

    Example

    curl -X PATCH "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "tierId": "rtr_0123456789abcdefghjk"
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk', {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "tierId": "rtr_0123456789abcdefghjk"
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "PATCH",
        "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "tierId": "rtr_0123456789abcdefghjk"
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("PATCH", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk", strings.NewReader(`{
      "tierId": "rtr_0123456789abcdefghjk"
    }`))
    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.

    Create a bulk order at the tier price and get its pay link

    POST/v1/store/resellers/{resellerId}/orders

    Or name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/orders

    marketing:writecreateResellerOrder

    Parameters

    • resellerIdrsl_…pathrequired

    Body

    • productIdprd_…required
    • quantityintegerrequired

    Response ResellerOrder

    • idResellerOrderIdrequired
    • resellerIdResellerIdrequired
    • resellerNamestringrequired
    • productIdProductIdrequired
    • productNamestringrequired
    • quantityintegerrequired
    • unitPriceMinorMinorUnitsrequired
    • listUnitPriceMinorMinorUnitsrequired
    • totalMinorMinorUnitsrequired
    • currencyCurrencyCoderequired
    6 more fields
    • statusResellerOrderStatusrequired
    • payUrlstringrequired
    • orderIdOrderId | nullrequired
    • orderNumberstringrequired
    • keysDeliveredintegerrequired
    • createdAtTimestamprequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "productId": "prd_0123456789abcdefghjk",
      "quantity": 1
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "productId": "prd_0123456789abcdefghjk",
        "quantity": 1
      }),
    });
    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/resellers/rsl_0123456789abcdefghjk/orders",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "productId": "prd_0123456789abcdefghjk",
          "quantity": 1
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/orders", strings.NewReader(`{
      "productId": "prd_0123456789abcdefghjk",
      "quantity": 1
    }`))
    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.

    A reseller's API keys, webhook, recent calls and webhook deliveries

    GET/v1/store/resellers/{resellerId}/api

    Or name the store: GET /v1/stores/{storeId}/resellers/{resellerId}/api

    marketing:readrole: marketing:readgetResellerApi

    Parameters

    • resellerIdrsl_…pathrequired

    Response ResellerApiOverview

    • keysResellerApiKey[]required
    • webhookResellerWebhook | nullrequired
    • callsResellerApiCall[]required
    • deliveriesResellerWebhookDelivery[]required
    • calls24hintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api', {
      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/resellers/rsl_0123456789abcdefghjk/api",
        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/resellers/rsl_0123456789abcdefghjk/api", 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.

    Revoke a reseller's API key

    POST/v1/store/resellers/{resellerId}/api/keys/{keyId}/revoke

    Or name the store: POST /v1/stores/{storeId}/resellers/{resellerId}/api/keys/{keyId}/revoke

    marketing:writerole: marketing:writerevokeResellerApiKey

    Parameters

    • resellerIdrsl_…pathrequired
    • keyIdrak_…pathrequired

    Response ResellerApiOverview

    • keysResellerApiKey[]required
    • webhookResellerWebhook | nullrequired
    • callsResellerApiCall[]required
    • deliveriesResellerWebhookDelivery[]required
    • calls24hintegerrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke', {
      method: 'POST',
      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(
        "POST",
        "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resellers/rsl_0123456789abcdefghjk/api/keys/rak_0123456789abcdefghjk/revoke", 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.

    Was this page helpful?