Support
19 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.
Tickets in a view (open, mine, unassigned, waiting, breached, solved, all) with search and filters
/v1/store/support/ticketsOr name the store: GET /v1/stores/{storeId}/support/tickets
Parameters
view"open" | "mine" | "unassigned" | "pending" | "breached" | "solved" | "all"queryqstring | nullquerypriority"low" | "normal" | "high" | "urgent" | nullquerystatus"open" | "pending" | "on_hold" | "solved" | "closed" | nullqueryassigneeIdusr_… | nullquerytagstring | nullquerycategorystring | nullquerycursorstring | nullquerylimitinteger | stringquery
Response ListTicketsResponse
itemsTicketSummary[]requirednextCursorstringrequiredcountsTicketCountsrequiredtagsstring[]required
Example
curl "https://api.shopfa.st/v1/store/support/tickets" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/tickets', {
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/support/tickets",
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/support/tickets", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Open a ticket on behalf of a buyer (emails them unless notify is off)
/v1/store/support/ticketsOr name the store: POST /v1/stores/{storeId}/support/tickets
Body
requesterEmailstringrequiredrequesterNamestringrequiredsubjectstringrequiredbodystringrequiredpriority"low" | "normal" | "high" | "urgent"requiredcategorystring | nullrequiredorderIdord_… | nullrequirednotifybooleanrequired
Response TicketDetail
ticketTicketSummaryrequiredmessagesTicketMessage[]requiredeventsTicketEvent[]requiredcustomerTicketCustomerContextrequiredreplyAddressstringrequiredmergedIntoobject | nullrequiredsatisfactionCommentstringrequiredfirstResponseAtTimestamp | nullrequiredresolvedAtTimestamp | nullrequiredviewersobject[]requiredidUserIdrequirednamestringrequired
discordThreadUrlstringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/tickets" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"requesterEmail": "[email protected]",
"requesterName": "string",
"subject": "string",
"body": "string",
"priority": "low",
"category": "string",
"orderId": "ord_0123456789abcdefghjk",
"notify": false
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"requesterEmail": "[email protected]",
"requesterName": "string",
"subject": "string",
"body": "string",
"priority": "low",
"category": "string",
"orderId": "ord_0123456789abcdefghjk",
"notify": false
}),
});
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/support/tickets",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"requesterEmail": "[email protected]",
"requesterName": "string",
"subject": "string",
"body": "string",
"priority": "low",
"category": "string",
"orderId": "ord_0123456789abcdefghjk",
"notify": False
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/tickets", strings.NewReader(`{
"requesterEmail": "[email protected]",
"requesterName": "string",
"subject": "string",
"body": "string",
"priority": "low",
"category": "string",
"orderId": "ord_0123456789abcdefghjk",
"notify": false
}`))
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
Open tickets with a buyer message you have not opened or answered yet (the Support badge)
/v1/store/support/unreadOr name the store: GET /v1/stores/{storeId}/support/unread
Response SupportUnreadResponse
unreadintegerrequired
Example
curl "https://api.shopfa.st/v1/store/support/unread" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/unread', {
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/support/unread",
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/support/unread", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
One ticket: messages, notes, timeline, attachments (signed links) and the customer context
/v1/store/support/tickets/{ticketId}Or name the store: GET /v1/stores/{storeId}/support/tickets/{ticketId}
Parameters
ticketIdtkt_…pathrequired
Response TicketDetail
ticketTicketSummaryrequiredmessagesTicketMessage[]requiredeventsTicketEvent[]requiredcustomerTicketCustomerContextrequiredreplyAddressstringrequiredmergedIntoobject | nullrequiredsatisfactionCommentstringrequiredfirstResponseAtTimestamp | nullrequiredresolvedAtTimestamp | nullrequiredviewersobject[]requiredidUserIdrequirednamestringrequired
discordThreadUrlstringrequired
Example
curl "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk', {
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/support/tickets/tkt_0123456789abcdefghjk",
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/support/tickets/tkt_0123456789abcdefghjk", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Change status, priority, assignee, tags, category, subject or the linked order
/v1/store/support/tickets/{ticketId}Or name the store: PATCH /v1/stores/{storeId}/support/tickets/{ticketId}
Parameters
ticketIdtkt_…pathrequired
Body
status"open" | "pending" | "on_hold" | "solved" | "closed"priority"low" | "normal" | "high" | "urgent"assigneeIdusr_… | nulltagsstring[]categorystring | nullsubjectstringorderIdord_… | null
Response TicketDetail
ticketTicketSummaryrequiredmessagesTicketMessage[]requiredeventsTicketEvent[]requiredcustomerTicketCustomerContextrequiredreplyAddressstringrequiredmergedIntoobject | nullrequiredsatisfactionCommentstringrequiredfirstResponseAtTimestamp | nullrequiredresolvedAtTimestamp | nullrequiredviewersobject[]requiredidUserIdrequirednamestringrequired
discordThreadUrlstringrequired
Example
curl -X PATCH "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "open",
"priority": "low",
"assigneeId": "usr_0123456789abcdefghjk",
"tags": [
"string"
],
"category": "string",
"subject": "string",
"orderId": "ord_0123456789abcdefghjk"
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"status": "open",
"priority": "low",
"assigneeId": "usr_0123456789abcdefghjk",
"tags": [
"string"
],
"category": "string",
"subject": "string",
"orderId": "ord_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/support/tickets/tkt_0123456789abcdefghjk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"status": "open",
"priority": "low",
"assigneeId": "usr_0123456789abcdefghjk",
"tags": [
"string"
],
"category": "string",
"subject": "string",
"orderId": "ord_0123456789abcdefghjk"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PATCH", "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk", strings.NewReader(`{
"status": "open",
"priority": "low",
"assigneeId": "usr_0123456789abcdefghjk",
"tags": [
"string"
],
"category": "string",
"subject": "string",
"orderId": "ord_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
Reply to the buyer (emailed, threaded) or add an internal note; optionally set the status in the same step
/v1/store/support/tickets/{ticketId}/messagesOr name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/messages
Parameters
ticketIdtkt_…pathrequired
Body
bodystringrequiredinternalbooleanrequiredstatus"open" | "pending" | "on_hold" | "solved" | "closed" | nullrequiredattachmentIdstatt_…[]required
Response TicketDetail
ticketTicketSummaryrequiredmessagesTicketMessage[]requiredeventsTicketEvent[]requiredcustomerTicketCustomerContextrequiredreplyAddressstringrequiredmergedIntoobject | nullrequiredsatisfactionCommentstringrequiredfirstResponseAtTimestamp | nullrequiredresolvedAtTimestamp | nullrequiredviewersobject[]requiredidUserIdrequirednamestringrequired
discordThreadUrlstringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/messages" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"body": "string",
"internal": false,
"status": "open",
"attachmentIds": [
"tatt_0123456789abcdefghjk"
]
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/messages', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"body": "string",
"internal": false,
"status": "open",
"attachmentIds": [
"tatt_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/support/tickets/tkt_0123456789abcdefghjk/messages",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"body": "string",
"internal": False,
"status": "open",
"attachmentIds": [
"tatt_0123456789abcdefghjk"
]
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/messages", strings.NewReader(`{
"body": "string",
"internal": false,
"status": "open",
"attachmentIds": [
"tatt_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
Apply one change to many tickets (close, assign, tag, prioritize)
/v1/store/support/tickets/bulkOr name the store: POST /v1/stores/{storeId}/support/tickets/bulk
Body
idstkt_…[]requiredpatchobjectrequiredstatus"open" | "pending" | "on_hold" | "solved" | "closed"priority"low" | "normal" | "high" | "urgent"assigneeIdusr_… | nulltagsstring[]categorystring | nullsubjectstring
Response BulkUpdateTicketsResponse
updatedintegerrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/tickets/bulk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"tkt_0123456789abcdefghjk"
],
"patch": {}
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/bulk', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ids": [
"tkt_0123456789abcdefghjk"
],
"patch": {}
}),
});
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/support/tickets/bulk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"ids": [
"tkt_0123456789abcdefghjk"
],
"patch": {}
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/tickets/bulk", strings.NewReader(`{
"ids": [
"tkt_0123456789abcdefghjk"
],
"patch": {}
}`))
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
Merge other tickets from the same buyer into this one (their messages move here; they close)
/v1/store/support/tickets/{ticketId}/mergeOr name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/merge
Parameters
ticketIdtkt_…pathrequired
Body
sourceIdstkt_…[]required
Response TicketDetail
ticketTicketSummaryrequiredmessagesTicketMessage[]requiredeventsTicketEvent[]requiredcustomerTicketCustomerContextrequiredreplyAddressstringrequiredmergedIntoobject | nullrequiredsatisfactionCommentstringrequiredfirstResponseAtTimestamp | nullrequiredresolvedAtTimestamp | nullrequiredviewersobject[]requiredidUserIdrequirednamestringrequired
discordThreadUrlstringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/merge" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceIds": [
"tkt_0123456789abcdefghjk"
]
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/merge', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"sourceIds": [
"tkt_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/support/tickets/tkt_0123456789abcdefghjk/merge",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"sourceIds": [
"tkt_0123456789abcdefghjk"
]
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/merge", strings.NewReader(`{
"sourceIds": [
"tkt_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
I am viewing (or typing in) this ticket; answers who else is
/v1/store/support/tickets/{ticketId}/presenceOr name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/presence
Parameters
ticketIdtkt_…pathrequired
Body
typingbooleanrequired
Response TicketPresenceResponse
viewersobject[]requiredidUserIdrequirednamestringrequiredtypingbooleanrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/presence" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"typing": false
}'const res = await fetch('https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/presence', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"typing": false
}),
});
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/support/tickets/tkt_0123456789abcdefghjk/presence",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"typing": False
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/tickets/tkt_0123456789abcdefghjk/presence", strings.NewReader(`{
"typing": false
}`))
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
A signed upload link for a reply attachment (size and type limits apply)
/v1/store/support/attachmentsOr name the store: POST /v1/stores/{storeId}/support/attachments
Body
filenamestringrequiredcontentType"image/png" | "image/jpeg" | "image/webp" | "image/gif" | "application/pdf" | "text/plain" | "application/zip"requiredbytesintegerrequired
Response StartAgentAttachmentResponse
attachmentIdTicketAttachmentIdrequiredurlstringrequiredmethodstringrequiredheadersobjectrequiredexpiresAtTimestamprequiredmaxBytesintegerrequiredclaimstringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/attachments" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "string",
"contentType": "image/png",
"bytes": 1
}'const res = await fetch('https://api.shopfa.st/v1/store/support/attachments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"filename": "string",
"contentType": "image/png",
"bytes": 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/support/attachments",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"filename": "string",
"contentType": "image/png",
"bytes": 1
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/attachments", strings.NewReader(`{
"filename": "string",
"contentType": "image/png",
"bytes": 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
Check the uploaded bytes (real type, size) and make the attachment usable
/v1/store/support/attachments/{attachmentId}/completeOr name the store: POST /v1/stores/{storeId}/support/attachments/{attachmentId}/complete
Parameters
attachmentIdtatt_…pathrequired
Response TicketAttachment
idTicketAttachmentIdrequiredfilenamestringrequiredcontentTypestringrequiredbytesintegerrequiredurlstringrequiredisImagebooleanrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/attachments/tatt_0123456789abcdefghjk/complete" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/attachments/tatt_0123456789abcdefghjk/complete', {
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/support/attachments/tatt_0123456789abcdefghjk/complete",
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/support/attachments/tatt_0123456789abcdefghjk/complete", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Saved replies with variables
/v1/store/support/cannedOr name the store: GET /v1/stores/{storeId}/support/canned
Response ListCannedRepliesResponse
itemsCannedReply[]required
Example
curl "https://api.shopfa.st/v1/store/support/canned" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/canned', {
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/support/canned",
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/support/canned", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Save a reply
/v1/store/support/cannedOr name the store: POST /v1/stores/{storeId}/support/canned
Body
namestringrequiredshortcutstringrequiredbodystringrequiredcategorystring | nullrequired
Response CannedReply
idCannedReplyIdrequirednamestringrequiredshortcutstringrequiredbodystringrequiredcategorystringrequiredusesintegerrequiredupdatedAtTimestamprequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/canned" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"shortcut": "string",
"body": "string",
"category": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/support/canned', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"shortcut": "string",
"body": "string",
"category": "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/support/canned",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"name": "string",
"shortcut": "string",
"body": "string",
"category": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/canned", strings.NewReader(`{
"name": "string",
"shortcut": "string",
"body": "string",
"category": "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
Edit a saved reply
/v1/store/support/canned/{cannedId}Or name the store: PUT /v1/stores/{storeId}/support/canned/{cannedId}
Parameters
cannedIdcrep_…pathrequired
Body
namestringrequiredshortcutstringrequiredbodystringrequiredcategorystring | nullrequired
Response CannedReply
idCannedReplyIdrequirednamestringrequiredshortcutstringrequiredbodystringrequiredcategorystringrequiredusesintegerrequiredupdatedAtTimestamprequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"shortcut": "string",
"body": "string",
"category": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"shortcut": "string",
"body": "string",
"category": "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/support/canned/crep_0123456789abcdefghjk",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"name": "string",
"shortcut": "string",
"body": "string",
"category": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk", strings.NewReader(`{
"name": "string",
"shortcut": "string",
"body": "string",
"category": "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 a saved reply
/v1/store/support/canned/{cannedId}Or name the store: DELETE /v1/stores/{storeId}/support/canned/{cannedId}
Parameters
cannedIdcrep_…pathrequired
Response Ok
okbooleanrequired
Example
curl -X DELETE "https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/canned/crep_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/support/canned/crep_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/support/canned/crep_0123456789abcdefghjk", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
A saved reply with its variables filled for one ticket
/v1/store/support/canned/{cannedId}/fillOr name the store: POST /v1/stores/{storeId}/support/canned/{cannedId}/fill
Parameters
cannedIdcrep_…pathrequired
Body
ticketIdtkt_…required
Response FillCannedReplyResponse
bodystringrequired
Example
curl -X POST "https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk/fill" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"ticketId": "tkt_0123456789abcdefghjk"
}'const res = await fetch('https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk/fill', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"ticketId": "tkt_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/support/canned/crep_0123456789abcdefghjk/fill",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"ticketId": "tkt_0123456789abcdefghjk"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/support/canned/crep_0123456789abcdefghjk/fill", strings.NewReader(`{
"ticketId": "tkt_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
Support settings: categories, SLA targets, widget, email replies, auto-close and satisfaction
/v1/store/support/settingsOr name the store: GET /v1/stores/{storeId}/support/settings
Response GetSupportSettingsResponse
settingsSupportSettingsrequiredmembersobject[]requiredidUserIdrequirednamestringrequiredemailstringrequiredroleNamestringrequired
inboundobjectrequiredconfiguredbooleanrequireddomainstringrequiredexamplestringrequired
supportUrlstringrequired
Example
curl "https://api.shopfa.st/v1/store/support/settings" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/settings', {
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/support/settings",
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/support/settings", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)Try it with your key
Save support settings
/v1/store/support/settingsOr name the store: PUT /v1/stores/{storeId}/support/settings
Body
enabledbooleanrequiredcategoriesobject[]requiredidstringrequiredlabelstringrequired
firstResponseobjectrequiredlowintegerrequirednormalintegerrequiredhighintegerrequiredurgentintegerrequired
resolutionobjectrequiredlowintegerrequirednormalintegerrequiredhighintegerrequiredurgentintegerrequired
restrictToAssignedbooleanrequiredautoCloseDaysintegerrequiredsatisfactionbooleanrequiredwidgetobjectrequiredenabledbooleantitlestringgreetingstringposition"right" | "left"floatingboolean
emailRepliesbooleanrequiredattachmentMaxMbintegerrequiredautoReplystringrequired
Response UpdateSupportSettingsResponse
settingsSupportSettingsrequired
Example
curl -X PUT "https://api.shopfa.st/v1/store/support/settings" \
-H "Authorization: Bearer $SHOPFAST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false,
"categories": [
{
"id": "string",
"label": "string"
}
],
"firstResponse": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"resolution": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"restrictToAssigned": false,
"autoCloseDays": 0,
"satisfaction": false,
"widget": {},
"emailReplies": false,
"attachmentMaxMb": 1,
"autoReply": "string"
}'const res = await fetch('https://api.shopfa.st/v1/store/support/settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"enabled": false,
"categories": [
{
"id": "string",
"label": "string"
}
],
"firstResponse": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"resolution": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"restrictToAssigned": false,
"autoCloseDays": 0,
"satisfaction": false,
"widget": {},
"emailReplies": false,
"attachmentMaxMb": 1,
"autoReply": "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/support/settings",
headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
json={
"enabled": False,
"categories": [
{
"id": "string",
"label": "string"
}
],
"firstResponse": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"resolution": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"restrictToAssigned": False,
"autoCloseDays": 0,
"satisfaction": False,
"widget": {},
"emailReplies": False,
"attachmentMaxMb": 1,
"autoReply": "string"
},
)
res.raise_for_status()
data = res.json()req, _ := http.NewRequest("PUT", "https://api.shopfa.st/v1/store/support/settings", strings.NewReader(`{
"enabled": false,
"categories": [
{
"id": "string",
"label": "string"
}
],
"firstResponse": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"resolution": {
"low": 5,
"normal": 5,
"high": 5,
"urgent": 5
},
"restrictToAssigned": false,
"autoCloseDays": 0,
"satisfaction": false,
"widget": {},
"emailReplies": false,
"attachmentMaxMb": 1,
"autoReply": "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
First response and resolution times, SLA, satisfaction, volume, categories and agents
/v1/store/support/reportOr name the store: GET /v1/stores/{storeId}/support/report
Parameters
daysinteger | stringquery
Response SupportReport
fromTimestamprequiredtoTimestamprequiredcreatedintegerrequiredsolvedintegerrequiredopenintegerrequiredfirstResponseMedianinteger | nullrequiredfirstResponseP90integer | nullrequiredresolutionMedianinteger | nullrequiredresolutionP90integer | nullrequiredslaMetPctnumberrequired
7 more fields
satisfactionAvgnumberrequiredsatisfactionCountintegerrequiredsatisfactionDistinteger[]requireddailyobject[]requireddaystringrequiredcreatedintegerrequiredsolvedintegerrequired
byCategoryobject[]requiredcategorystringrequiredlabelstringrequiredcountintegerrequired
byAgentobject[]requireduserIdUserId | nullrequirednamestringrequiredsolvedintegerrequiredrepliesintegerrequiredfirstResponseMedianinteger | nullrequiredsatisfactionAvgnumberrequired
byChannelobject[]requiredchannelTicketChannelrequiredcountintegerrequired
Example
curl "https://api.shopfa.st/v1/store/support/report" \
-H "Authorization: Bearer $SHOPFAST_API_KEY"const res = await fetch('https://api.shopfa.st/v1/store/support/report', {
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/support/report",
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/support/report", nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
res, err := http.DefaultClient.Do(req)