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
/v1/store/domainsOr name the store: GET /v1/stores/{storeId}/domains
Response DomainsOverview
platformHoststringrequiredprimaryHoststringrequiredprimaryUrlstringrequiredcnameTargetstringrequiredprovider"cloudflare" | "simulated" | "unconfigured"requirednameserverModebooleanrequiredcustomHostnamesReadybooleanrequiredlimitintegerrequireddomainsCustomDomain[]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
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)
/v1/store/domainsOr name the store: POST /v1/stores/{storeId}/domains
Body
hostnamestringrequiredwww"none" | "redirect_to_www" | "redirect_to_apex"requiredmode"cname" | "nameservers"
Response DomainsOverview
platformHoststringrequiredprimaryHoststringrequiredprimaryUrlstringrequiredcnameTargetstringrequiredprovider"cloudflare" | "simulated" | "unconfigured"requirednameserverModebooleanrequiredcustomHostnamesReadybooleanrequiredlimitintegerrequireddomainsCustomDomain[]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
Look at DNS and ask Cloudflare for the latest status now. A root domain and its www are checked together
/v1/store/domains/{domainId}/checkOr name the store: POST /v1/stores/{storeId}/domains/{domainId}/check
Parameters
domainIddom_…pathrequired
Response CustomDomain
idDomainIdrequiredhostnameHostnamerequiredapexbooleanrequiredmodeDomainModerequirednameserversDomainNameservers | nullrequiredstatusDomainStatusrequiredsslStatusSslStatusrequiredprimarybooleanrequiredrecordsDnsRecord[]requiredissuesstring[]required
5 more fields
dnsDomainDns | nullrequiredredirectsTostringrequiredlastCheckedAtTimestamp | nullrequiredverifiedAtTimestamp | nullrequiredcreatedAtTimestamprequired
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
Choose where buyers land. Every other address redirects there (null: the shopfa.st address)
/v1/store/domains/primaryOr name the store: PUT /v1/stores/{storeId}/domains/primary
Body
domainIddom_… | nullrequired
Response DomainsOverview
platformHoststringrequiredprimaryHoststringrequiredprimaryUrlstringrequiredcnameTargetstringrequiredprovider"cloudflare" | "simulated" | "unconfigured"requirednameserverModebooleanrequiredcustomHostnamesReadybooleanrequiredlimitintegerrequireddomainsCustomDomain[]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
Disconnect a domain and release its certificate. A nameserver-mode domain loses its whole DNS zone at ShopFast
/v1/store/domains/{domainId}Or name the store: DELETE /v1/stores/{storeId}/domains/{domainId}
Parameters
domainIddom_…pathrequired
Response DomainsOverview
platformHoststringrequiredprimaryHoststringrequiredprimaryUrlstringrequiredcnameTargetstringrequiredprovider"cloudflare" | "simulated" | "unconfigured"requirednameserverModebooleanrequiredcustomHostnamesReadybooleanrequiredlimitintegerrequireddomainsCustomDomain[]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
Every record in a nameserver-mode domain's zone. ShopFast's storefront records are marked managed
/v1/store/domains/{domainId}/dns-recordsOr name the store: GET /v1/stores/{storeId}/domains/{domainId}/dns-records
Parameters
domainIddom_…pathrequired
Response ZoneDnsRecords
zonestringrequiredmanagedHostsstring[]requiredrecordsZoneDnsRecord[]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
Add an MX, TXT, CNAME, A, AAAA, SRV or CAA record (DNS only, never proxied)
/v1/store/domains/{domainId}/dns-recordsOr name the store: POST /v1/stores/{storeId}/domains/{domainId}/dns-records
Parameters
domainIddom_…pathrequired
Response ZoneDnsRecords
zonestringrequiredmanagedHostsstring[]requiredrecordsZoneDnsRecord[]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
Replace one of your records. Managed storefront records cannot be changed
/v1/store/domains/{domainId}/dns-records/{recordId}Or name the store: PUT /v1/stores/{storeId}/domains/{domainId}/dns-records/{recordId}
Parameters
domainIddom_…pathrequiredrecordIdstringpathrequired
Response ZoneDnsRecords
zonestringrequiredmanagedHostsstring[]requiredrecordsZoneDnsRecord[]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
Delete one of your records. Managed storefront records cannot be deleted
/v1/store/domains/{domainId}/dns-records/{recordId}Or name the store: DELETE /v1/stores/{storeId}/domains/{domainId}/dns-records/{recordId}
Parameters
domainIddom_…pathrequiredrecordIdstringpathrequired
Response ZoneDnsRecords
zonestringrequiredmanagedHostsstring[]requiredrecordsZoneDnsRecord[]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)