Docs
Dashboard
On this page

    Domains

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

    Custom domains with their DNS records, verification and SSL status

    GET/v1/store/domains

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

    storefront:readlistDomains

    Response DomainsOverview

    • platformHoststringrequired
    • primaryHoststringrequired
    • primaryUrlstringrequired
    • cnameTargetstringrequired
    • provider"cloudflare" | "simulated" | "unconfigured"required
    • nameserverModebooleanrequired
    • customHostnamesReadybooleanrequired
    • limitintegerrequired
    • domainsCustomDomain[]required

    Example

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

    Connect a domain (and optionally its www twin). Returns the one DNS record per hostname to add (plus one TXT record when another store connected the domain before)

    POST/v1/store/domains

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

    storefront:writeaddDomain

    Body

    • hostnamestringrequired
    • www"none" | "redirect_to_www" | "redirect_to_apex"required
    • mode"cname" | "nameservers"

    Response DomainsOverview

    • platformHoststringrequired
    • primaryHoststringrequired
    • primaryUrlstringrequired
    • cnameTargetstringrequired
    • provider"cloudflare" | "simulated" | "unconfigured"required
    • nameserverModebooleanrequired
    • customHostnamesReadybooleanrequired
    • limitintegerrequired
    • domainsCustomDomain[]required

    Example

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

    Look at DNS and ask Cloudflare for the latest status now. A root domain and its www are checked together

    POST/v1/store/domains/{domainId}/check

    Or name the store: POST /v1/stores/{storeId}/domains/{domainId}/check

    storefront:writecheckDomain

    Parameters

    • domainIddom_…pathrequired

    Response CustomDomain

    • idDomainIdrequired
    • hostnameHostnamerequired
    • apexbooleanrequired
    • modeDomainModerequired
    • nameserversDomainNameservers | nullrequired
    • statusDomainStatusrequired
    • sslStatusSslStatusrequired
    • primarybooleanrequired
    • recordsDnsRecord[]required
    • issuesstring[]required
    5 more fields
    • dnsDomainDns | nullrequired
    • redirectsTostringrequired
    • lastCheckedAtTimestamp | nullrequired
    • verifiedAtTimestamp | nullrequired
    • createdAtTimestamprequired

    Example

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

    Choose where buyers land. Every other address redirects there (null: the shopfa.st address)

    PUT/v1/store/domains/primary

    Or name the store: PUT /v1/stores/{storeId}/domains/primary

    storefront:writesetPrimaryDomain

    Body

    • domainIddom_… | nullrequired

    Response DomainsOverview

    • platformHoststringrequired
    • primaryHoststringrequired
    • primaryUrlstringrequired
    • cnameTargetstringrequired
    • provider"cloudflare" | "simulated" | "unconfigured"required
    • nameserverModebooleanrequired
    • customHostnamesReadybooleanrequired
    • limitintegerrequired
    • domainsCustomDomain[]required

    Example

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

    Disconnect a domain and release its certificate. A nameserver-mode domain loses its whole DNS zone at ShopFast

    DELETE/v1/store/domains/{domainId}

    Or name the store: DELETE /v1/stores/{storeId}/domains/{domainId}

    storefront:writeremoveDomain

    Parameters

    • domainIddom_…pathrequired

    Response DomainsOverview

    • platformHoststringrequired
    • primaryHoststringrequired
    • primaryUrlstringrequired
    • cnameTargetstringrequired
    • provider"cloudflare" | "simulated" | "unconfigured"required
    • nameserverModebooleanrequired
    • customHostnamesReadybooleanrequired
    • limitintegerrequired
    • domainsCustomDomain[]required

    Example

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

    Every record in a nameserver-mode domain's zone. ShopFast's storefront records are marked managed

    GET/v1/store/domains/{domainId}/dns-records

    Or name the store: GET /v1/stores/{storeId}/domains/{domainId}/dns-records

    storefront:readlistDomainDnsRecords

    Parameters

    • domainIddom_…pathrequired

    Response ZoneDnsRecords

    • zonestringrequired
    • managedHostsstring[]required
    • recordsZoneDnsRecord[]required

    Example

    curl "https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records', {
      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/domains/dom_0123456789abcdefghjk/dns-records",
        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/domains/dom_0123456789abcdefghjk/dns-records", 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 MX, TXT, CNAME, A, AAAA, SRV or CAA record (DNS only, never proxied)

    POST/v1/store/domains/{domainId}/dns-records

    Or name the store: POST /v1/stores/{storeId}/domains/{domainId}/dns-records

    storefront:writecreateDomainDnsRecord

    Parameters

    • domainIddom_…pathrequired

    Response ZoneDnsRecords

    • zonestringrequired
    • managedHostsstring[]required
    • recordsZoneDnsRecord[]required

    Example

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

    Replace one of your records. Managed storefront records cannot be changed

    PUT/v1/store/domains/{domainId}/dns-records/{recordId}

    Or name the store: PUT /v1/stores/{storeId}/domains/{domainId}/dns-records/{recordId}

    storefront:writeupdateDomainDnsRecord

    Parameters

    • domainIddom_…pathrequired
    • recordIdstringpathrequired

    Response ZoneDnsRecords

    • zonestringrequired
    • managedHostsstring[]required
    • recordsZoneDnsRecord[]required

    Example

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

    Delete one of your records. Managed storefront records cannot be deleted

    DELETE/v1/store/domains/{domainId}/dns-records/{recordId}

    Or name the store: DELETE /v1/stores/{storeId}/domains/{domainId}/dns-records/{recordId}

    storefront:writedeleteDomainDnsRecord

    Parameters

    • domainIddom_…pathrequired
    • recordIdstringpathrequired

    Response ZoneDnsRecords

    • zonestringrequired
    • managedHostsstring[]required
    • recordsZoneDnsRecord[]required

    Example

    curl -X DELETE "https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records/string" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records/string', {
      method: 'DELETE',
      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(
        "DELETE",
        "https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records/string",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("DELETE", "https://api.shopfa.st/v1/store/domains/dom_0123456789abcdefghjk/dns-records/string", 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?