Docs
Dashboard
On this page

    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

    GET/v1/store/support/tickets

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

    support:readrole: support:readlistTickets

    Parameters

    • view"open" | "mine" | "unassigned" | "pending" | "breached" | "solved" | "all"query
    • qstring | nullquery
    • priority"low" | "normal" | "high" | "urgent" | nullquery
    • status"open" | "pending" | "on_hold" | "solved" | "closed" | nullquery
    • assigneeIdusr_… | nullquery
    • tagstring | nullquery
    • categorystring | nullquery
    • cursorstring | nullquery
    • limitinteger | stringquery

    Response ListTicketsResponse

    • itemsTicketSummary[]required
    • nextCursorstringrequired
    • countsTicketCountsrequired
    • tagsstring[]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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Open a ticket on behalf of a buyer (emails them unless notify is off)

    POST/v1/store/support/tickets

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

    support:writerole: support:writecreateTicket

    Body

    • requesterEmailstringrequired
    • requesterNamestringrequired
    • subjectstringrequired
    • bodystringrequired
    • priority"low" | "normal" | "high" | "urgent"required
    • categorystring | nullrequired
    • orderIdord_… | nullrequired
    • notifybooleanrequired

    Response TicketDetail

    • ticketTicketSummaryrequired
    • messagesTicketMessage[]required
    • eventsTicketEvent[]required
    • customerTicketCustomerContextrequired
    • replyAddressstringrequired
    • mergedIntoobject | nullrequired
    • satisfactionCommentstringrequired
    • firstResponseAtTimestamp | nullrequired
    • resolvedAtTimestamp | nullrequired
    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Open tickets with a buyer message you have not opened or answered yet (the Support badge)

    GET/v1/store/support/unread

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

    support:readrole: support:readsupportUnread

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    One ticket: messages, notes, timeline, attachments (signed links) and the customer context

    GET/v1/store/support/tickets/{ticketId}

    Or name the store: GET /v1/stores/{storeId}/support/tickets/{ticketId}

    support:readrole: support:readgetTicket

    Parameters

    • ticketIdtkt_…pathrequired

    Response TicketDetail

    • ticketTicketSummaryrequired
    • messagesTicketMessage[]required
    • eventsTicketEvent[]required
    • customerTicketCustomerContextrequired
    • replyAddressstringrequired
    • mergedIntoobject | nullrequired
    • satisfactionCommentstringrequired
    • firstResponseAtTimestamp | nullrequired
    • resolvedAtTimestamp | nullrequired
    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Change status, priority, assignee, tags, category, subject or the linked order

    PATCH/v1/store/support/tickets/{ticketId}

    Or name the store: PATCH /v1/stores/{storeId}/support/tickets/{ticketId}

    support:writerole: support:writeupdateTicket

    Parameters

    • ticketIdtkt_…pathrequired

    Body

    • status"open" | "pending" | "on_hold" | "solved" | "closed"
    • priority"low" | "normal" | "high" | "urgent"
    • assigneeIdusr_… | null
    • tagsstring[]
    • categorystring | null
    • subjectstring
    • orderIdord_… | null

    Response TicketDetail

    • ticketTicketSummaryrequired
    • messagesTicketMessage[]required
    • eventsTicketEvent[]required
    • customerTicketCustomerContextrequired
    • replyAddressstringrequired
    • mergedIntoobject | nullrequired
    • satisfactionCommentstringrequired
    • firstResponseAtTimestamp | nullrequired
    • resolvedAtTimestamp | nullrequired
    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Reply to the buyer (emailed, threaded) or add an internal note; optionally set the status in the same step

    POST/v1/store/support/tickets/{ticketId}/messages

    Or name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/messages

    support:writerole: support:writereplyTicket

    Parameters

    • ticketIdtkt_…pathrequired

    Body

    • bodystringrequired
    • internalbooleanrequired
    • status"open" | "pending" | "on_hold" | "solved" | "closed" | nullrequired
    • attachmentIdstatt_…[]required

    Response TicketDetail

    • ticketTicketSummaryrequired
    • messagesTicketMessage[]required
    • eventsTicketEvent[]required
    • customerTicketCustomerContextrequired
    • replyAddressstringrequired
    • mergedIntoobject | nullrequired
    • satisfactionCommentstringrequired
    • firstResponseAtTimestamp | nullrequired
    • resolvedAtTimestamp | nullrequired
    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Apply one change to many tickets (close, assign, tag, prioritize)

    POST/v1/store/support/tickets/bulk

    Or name the store: POST /v1/stores/{storeId}/support/tickets/bulk

    support:writerole: support:writebulkUpdateTickets

    Body

    • idstkt_…[]required
    • patchobjectrequired
      • status"open" | "pending" | "on_hold" | "solved" | "closed"
      • priority"low" | "normal" | "high" | "urgent"
      • assigneeIdusr_… | null
      • tagsstring[]
      • categorystring | null
      • subjectstring

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Merge other tickets from the same buyer into this one (their messages move here; they close)

    POST/v1/store/support/tickets/{ticketId}/merge

    Or name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/merge

    support:writerole: support:writemergeTickets

    Parameters

    • ticketIdtkt_…pathrequired

    Body

    • sourceIdstkt_…[]required

    Response TicketDetail

    • ticketTicketSummaryrequired
    • messagesTicketMessage[]required
    • eventsTicketEvent[]required
    • customerTicketCustomerContextrequired
    • replyAddressstringrequired
    • mergedIntoobject | nullrequired
    • satisfactionCommentstringrequired
    • firstResponseAtTimestamp | nullrequired
    • resolvedAtTimestamp | nullrequired
    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    I am viewing (or typing in) this ticket; answers who else is

    POST/v1/store/support/tickets/{ticketId}/presence

    Or name the store: POST /v1/stores/{storeId}/support/tickets/{ticketId}/presence

    support:writerole: support:readticketPresence

    Parameters

    • ticketIdtkt_…pathrequired

    Body

    • typingbooleanrequired

    Response TicketPresenceResponse

    • viewersobject[]required
      • idUserIdrequired
      • namestringrequired
      • typingbooleanrequired

    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

    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 signed upload link for a reply attachment (size and type limits apply)

    POST/v1/store/support/attachments

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

    support:writerole: support:writestartAgentAttachment

    Body

    • filenamestringrequired
    • contentType"image/png" | "image/jpeg" | "image/webp" | "image/gif" | "application/pdf" | "text/plain" | "application/zip"required
    • bytesintegerrequired

    Response StartAgentAttachmentResponse

    • attachmentIdTicketAttachmentIdrequired
    • urlstringrequired
    • methodstringrequired
    • headersobjectrequired
    • expiresAtTimestamprequired
    • maxBytesintegerrequired
    • claimstringrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Check the uploaded bytes (real type, size) and make the attachment usable

    POST/v1/store/support/attachments/{attachmentId}/complete

    Or name the store: POST /v1/stores/{storeId}/support/attachments/{attachmentId}/complete

    support:writerole: support:writecompleteAgentAttachment

    Parameters

    • attachmentIdtatt_…pathrequired

    Response TicketAttachment

    • idTicketAttachmentIdrequired
    • filenamestringrequired
    • contentTypestringrequired
    • bytesintegerrequired
    • urlstringrequired
    • isImagebooleanrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Saved replies with variables

    GET/v1/store/support/canned

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

    support:readrole: support:readlistCannedReplies

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Save a reply

    POST/v1/store/support/canned

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

    support:writerole: support:writecreateCannedReply

    Body

    • namestringrequired
    • shortcutstringrequired
    • bodystringrequired
    • categorystring | nullrequired

    Response CannedReply

    • idCannedReplyIdrequired
    • namestringrequired
    • shortcutstringrequired
    • bodystringrequired
    • categorystringrequired
    • usesintegerrequired
    • updatedAtTimestamprequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Edit a saved reply

    PUT/v1/store/support/canned/{cannedId}

    Or name the store: PUT /v1/stores/{storeId}/support/canned/{cannedId}

    support:writerole: support:writeupdateCannedReply

    Parameters

    • cannedIdcrep_…pathrequired

    Body

    • namestringrequired
    • shortcutstringrequired
    • bodystringrequired
    • categorystring | nullrequired

    Response CannedReply

    • idCannedReplyIdrequired
    • namestringrequired
    • shortcutstringrequired
    • bodystringrequired
    • categorystringrequired
    • usesintegerrequired
    • updatedAtTimestamprequired

    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

    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 a saved reply

    DELETE/v1/store/support/canned/{cannedId}

    Or name the store: DELETE /v1/stores/{storeId}/support/canned/{cannedId}

    support:writerole: support:writedeleteCannedReply

    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

    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 saved reply with its variables filled for one ticket

    POST/v1/store/support/canned/{cannedId}/fill

    Or name the store: POST /v1/stores/{storeId}/support/canned/{cannedId}/fill

    support:writerole: support:readfillCannedReply

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Support settings: categories, SLA targets, widget, email replies, auto-close and satisfaction

    GET/v1/store/support/settings

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

    support:readrole: support:readgetSupportSettings

    Response GetSupportSettingsResponse

    • settingsSupportSettingsrequired
    • membersobject[]required
      • idUserIdrequired
      • namestringrequired
      • emailstringrequired
      • roleNamestringrequired
    • inboundobjectrequired
      • configuredbooleanrequired
      • domainstringrequired
      • examplestringrequired
    • 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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    Save support settings

    PUT/v1/store/support/settings

    Or name the store: PUT /v1/stores/{storeId}/support/settings

    support:writerole: support:writeupdateSupportSettings

    Body

    • enabledbooleanrequired
    • categoriesobject[]required
      • idstringrequired
      • labelstringrequired
    • firstResponseobjectrequired
      • lowintegerrequired
      • normalintegerrequired
      • highintegerrequired
      • urgentintegerrequired
    • resolutionobjectrequired
      • lowintegerrequired
      • normalintegerrequired
      • highintegerrequired
      • urgentintegerrequired
    • restrictToAssignedbooleanrequired
    • autoCloseDaysintegerrequired
    • satisfactionbooleanrequired
    • widgetobjectrequired
      • enabledboolean
      • titlestring
      • greetingstring
      • position"right" | "left"
      • floatingboolean
    • emailRepliesbooleanrequired
    • attachmentMaxMbintegerrequired
    • autoReplystringrequired

    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

    Use a test key on a development store. The key stays in this tab (sessionStorage) and is sent only to the base URL above.

    First response and resolution times, SLA, satisfaction, volume, categories and agents

    GET/v1/store/support/report

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

    support:readrole: support:readsupportReport

    Parameters

    • daysinteger | stringquery

    Response SupportReport

    • fromTimestamprequired
    • toTimestamprequired
    • createdintegerrequired
    • solvedintegerrequired
    • openintegerrequired
    • firstResponseMedianinteger | nullrequired
    • firstResponseP90integer | nullrequired
    • resolutionMedianinteger | nullrequired
    • resolutionP90integer | nullrequired
    • slaMetPctnumberrequired
    7 more fields
    • satisfactionAvgnumberrequired
    • satisfactionCountintegerrequired
    • satisfactionDistinteger[]required
    • dailyobject[]required
      • daystringrequired
      • createdintegerrequired
      • solvedintegerrequired
    • byCategoryobject[]required
      • categorystringrequired
      • labelstringrequired
      • countintegerrequired
    • byAgentobject[]required
      • userIdUserId | nullrequired
      • namestringrequired
      • solvedintegerrequired
      • repliesintegerrequired
      • firstResponseMedianinteger | nullrequired
      • satisfactionAvgnumberrequired
    • byChannelobject[]required
      • channelTicketChannelrequired
      • countintegerrequired

    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)
    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?