Docs
Dashboard
On this page

    Resell partners

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

    Store-to-store resell requests you received or sent, with units supplied and money moved

    GET/v1/store/resell-partners

    Or name the store: GET /v1/stores/{storeId}/resell-partners

    marketing:readrole: marketing:readlistResellPartnerships

    Parameters

    • side"received" | "sent"query

    Response ListResellPartnershipsResponse

    • itemsResellPartnership[]required
    • countsResellCountsrequired

    Example

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

    Ask another store to let you resell its products at a discount

    POST/v1/store/resell-partners

    Or name the store: POST /v1/stores/{storeId}/resell-partners

    marketing:writerole: marketing:writecreateResellRequest

    Body

    • handlestringrequired
    • discountBpsintegerrequired
    • productIdsprd_…[]required
    • messagestring

    Response ResellPartnership

    • idResellPartnershipIdrequired
    • sideResellSiderequired
    • statusResellPartnershipStatusrequired
    • partnerResellStorerequired
    • discountBpsResellDiscountBpsrequired
    • currencyCurrencyCoderequired
    • messagestringrequired
    • productsResellPartnershipProduct[]required
    • unitsSuppliedintegerrequired
    • paidMinorMinorUnitsrequired
    6 more fields
    • owedMinorMinorUnitsrequired
    • settlementResellSettlementrequired
    • createdAtTimestamprequired
    • decidedAtTimestamp | nullrequired
    • endedAtTimestamp | nullrequired
    • endedByResellParty | nullrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/resell-partners" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "handle": "string",
      "discountBps": 100,
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "message": ""
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/resell-partners', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "handle": "string",
        "discountBps": 100,
        "productIds": [
          "prd_0123456789abcdefghjk"
        ],
        "message": ""
      }),
    });
    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/resell-partners",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "handle": "string",
          "discountBps": 100,
          "productIds": [
            "prd_0123456789abcdefghjk"
          ],
          "message": ""
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/resell-partners", strings.NewReader(`{
      "handle": "string",
      "discountBps": 100,
      "productIds": [
        "prd_0123456789abcdefghjk"
      ],
      "message": ""
    }`))
    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 store by its address and the key and serial products it can supply

    GET/v1/store/resell-partners/supplier

    Or name the store: GET /v1/stores/{storeId}/resell-partners/supplier

    marketing:readrole: marketing:readfindResellSupplier

    Parameters

    • handlestringqueryrequired

    Response FindResellSupplierResponse

    • storeResellStorerequired
    • currencyCurrencyCoderequired
    • productsResellableProduct[]required

    Example

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

    Accept or reject a request (supplier), cancel it (reseller), or end a partnership (either side)

    POST/v1/store/resell-partners/{partnershipId}/decision

    Or name the store: POST /v1/stores/{storeId}/resell-partners/{partnershipId}/decision

    marketing:writerole: marketing:writedecideResellPartnership

    Parameters

    • partnershipIdrsp_…pathrequired

    Body

    • decision"accept" | "reject" | "cancel" | "end"required

    Response ResellPartnership

    • idResellPartnershipIdrequired
    • sideResellSiderequired
    • statusResellPartnershipStatusrequired
    • partnerResellStorerequired
    • discountBpsResellDiscountBpsrequired
    • currencyCurrencyCoderequired
    • messagestringrequired
    • productsResellPartnershipProduct[]required
    • unitsSuppliedintegerrequired
    • paidMinorMinorUnitsrequired
    6 more fields
    • owedMinorMinorUnitsrequired
    • settlementResellSettlementrequired
    • createdAtTimestamprequired
    • decidedAtTimestamp | nullrequired
    • endedAtTimestamp | nullrequired
    • endedByResellParty | nullrequired

    Example

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

    List a supplier's product in your store at your price (keys come from the supplier)

    POST/v1/store/resell-partners/{partnershipId}/listings

    Or name the store: POST /v1/stores/{storeId}/resell-partners/{partnershipId}/listings

    marketing:writerole: catalog:writecreateResellListing

    Parameters

    • partnershipIdrsp_…pathrequired

    Body

    • supplierProductIdprd_…required
    • priceMinorintegerrequired
    • namestring | null

    Response ResellPartnership

    • idResellPartnershipIdrequired
    • sideResellSiderequired
    • statusResellPartnershipStatusrequired
    • partnerResellStorerequired
    • discountBpsResellDiscountBpsrequired
    • currencyCurrencyCoderequired
    • messagestringrequired
    • productsResellPartnershipProduct[]required
    • unitsSuppliedintegerrequired
    • paidMinorMinorUnitsrequired
    6 more fields
    • owedMinorMinorUnitsrequired
    • settlementResellSettlementrequired
    • createdAtTimestamprequired
    • decidedAtTimestamp | nullrequired
    • endedAtTimestamp | nullrequired
    • endedByResellParty | nullrequired

    Example

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

    Was this page helpful?