Docs
Dashboard
On this page

    Webhooks

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

    Webhook endpoints with their health

    GET/v1/store/webhooks/endpoints

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

    webhooks:readlistWebhookEndpoints

    Response ListWebhookEndpointsResponse

    • itemsWebhookEndpoint[]required
    • limitintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/webhooks/endpoints" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/endpoints', {
      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/webhooks/endpoints",
        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/webhooks/endpoints", 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 endpoint. The signing secret is in the response

    POST/v1/store/webhooks/endpoints

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

    webhooks:writecreateWebhookEndpoint

    Body

    • urlstringrequired
    • descriptionstringrequired
    • events"order.created" | "order.paid" | "order.fulfilled" | "order.needs_attention" | "order.refunded" | "dispute.created" | "dispute.updated" | "dispute.closed" | "subscription.created" | "subscription.renewed" | "subscription.canceled" | "subscription.expired" | "product.created" | "product.updated" | "product.deleted" | "inventory.low" | "inventory.depleted" | "customer.created" | "review.created" | "discount.redeemed" | "payout.paid" | "theme.published" | "domain.verified" | "gift_card.created" | "gift_card.updated" | "gift_card.redeemed" | "discount.created" | "discount.updated" | "discount.deleted" | "team.member_joined" | "team.member_updated" | "team.member_removed" | "license.activated" | "license.device_reset" | "license.extended" | "license.expiring" | "license.expired" | "license.revoked" | "license.compensated" | "product.sales_paused" | "product.sales_resumed" | "license.replaced" | "subscription.renewal_failed" | "storefront.updated"[]required

    Response CreateWebhookEndpointResponse

    • endpointWebhookEndpointrequired
    • secretwhsec_…required

    Example

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

    Change the URL, events or description, or turn it on or off

    PATCH/v1/store/webhooks/endpoints/{endpointId}

    Or name the store: PATCH /v1/stores/{storeId}/webhooks/endpoints/{endpointId}

    webhooks:writeupdateWebhookEndpoint

    Parameters

    • endpointIdwe_…pathrequired

    Body

    • urlstring
    • descriptionstring
    • events"order.created" | "order.paid" | "order.fulfilled" | "order.needs_attention" | "order.refunded" | "dispute.created" | "dispute.updated" | "dispute.closed" | "subscription.created" | "subscription.renewed" | "subscription.canceled" | "subscription.expired" | "product.created" | "product.updated" | "product.deleted" | "inventory.low" | "inventory.depleted" | "customer.created" | "review.created" | "discount.redeemed" | "payout.paid" | "theme.published" | "domain.verified" | "gift_card.created" | "gift_card.updated" | "gift_card.redeemed" | "discount.created" | "discount.updated" | "discount.deleted" | "team.member_joined" | "team.member_updated" | "team.member_removed" | "license.activated" | "license.device_reset" | "license.extended" | "license.expiring" | "license.expired" | "license.revoked" | "license.compensated" | "product.sales_paused" | "product.sales_resumed" | "license.replaced" | "subscription.renewal_failed" | "storefront.updated"[]
    • enabledboolean
    • transformerPluginIdplg_… | null

    Response WebhookEndpoint

    • idWebhookEndpointIdrequired
    • urlstringrequired
    • descriptionstringrequired
    • eventsWebhookEventType[]required
    • statusWebhookEndpointStatusrequired
    • disabledReason"manual" | "failing" | nullrequired
    • secretHintstringrequired
    • previousSecretExpiresAtTimestamp | nullrequired
    • healthobjectrequired
      • lastDeliveryAtTimestamp | nullrequired
      • lastResponseStatusinteger | nullrequired
      • successRate7dnumber | nullrequired
      • deliveries7dintegerrequired
      • consecutiveFailuresintegerrequired
      • failingSinceTimestamp | nullrequired
    • createdAtTimestamprequired
    • updatedAtTimestamprequired
    • transformerPluginIdplg_… | nullrequired

    Example

    curl -X PATCH "https://api.shopfa.st/v1/store/webhooks/endpoints/we_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "url": "https://example.com",
      "description": "string",
      "events": [
        "order.created"
      ],
      "enabled": false,
      "transformerPluginId": "plg_0123456789abcdefghjk"
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/endpoints/we_0123456789abcdefghjk', {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "url": "https://example.com",
        "description": "string",
        "events": [
          "order.created"
        ],
        "enabled": false,
        "transformerPluginId": "plg_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/webhooks/endpoints/we_0123456789abcdefghjk",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "url": "https://example.com",
          "description": "string",
          "events": [
            "order.created"
          ],
          "enabled": False,
          "transformerPluginId": "plg_0123456789abcdefghjk"
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("PATCH", "https://api.shopfa.st/v1/store/webhooks/endpoints/we_0123456789abcdefghjk", strings.NewReader(`{
      "url": "https://example.com",
      "description": "string",
      "events": [
        "order.created"
      ],
      "enabled": false,
      "transformerPluginId": "plg_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.

    Delete an endpoint and its pending deliveries

    DELETE/v1/store/webhooks/endpoints/{endpointId}

    Or name the store: DELETE /v1/stores/{storeId}/webhooks/endpoints/{endpointId}

    webhooks:writedeleteWebhookEndpoint

    Parameters

    • endpointIdwe_…pathrequired

    Response Ok

    • okbooleanrequired

    Example

    curl -X DELETE "https://api.shopfa.st/v1/store/webhooks/endpoints/we_0123456789abcdefghjk" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/endpoints/we_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/webhooks/endpoints/we_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/webhooks/endpoints/we_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.

    Show the current signing secret (store owners only)

    POST/v1/store/webhooks/endpoints/{endpointId}/secret

    Or name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/secret

    webhooks:writerevealWebhookSecret

    Parameters

    • endpointIdwe_…pathrequired

    Response RevealWebhookSecretResponse

    • secretwhsec_…required

    Example

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

    Replace the signing secret. The old one keeps signing alongside the new one for the overlap

    POST/v1/store/webhooks/endpoints/{endpointId}/rotate

    Or name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/rotate

    webhooks:writerotateWebhookSecret

    Parameters

    • endpointIdwe_…pathrequired

    Body

    • overlapHoursnumberrequired

    Response RotateWebhookSecretResponse

    • endpointWebhookEndpointrequired
    • secretwhsec_…required

    Example

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

    Send a signed webhook.test event to this endpoint now

    POST/v1/store/webhooks/endpoints/{endpointId}/test

    Or name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/test

    webhooks:writesendWebhookTest

    Parameters

    • endpointIdwe_…pathrequired

    Response WebhookDelivery

    • idWebhookDeliveryIdrequired
    • endpointIdWebhookEndpointIdrequired
    • endpointUrlstringrequired
    • messageIdWebhookMessageIdrequired
    • eventTypestringrequired
    • statusWebhookDeliveryStatusrequired
    • attemptsintegerrequired
    • nextAttemptAtTimestamp | nullrequired
    • lastResponseStatusinteger | nullrequired
    • lastDurationMsinteger | nullrequired
    3 more fields
    • replayOfWebhookDeliveryId | nullrequired
    • createdAtTimestamprequired
    • finishedAtTimestamp | nullrequired

    Example

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

    The delivery log, newest first (or sorted by any column)

    GET/v1/store/webhooks/deliveries

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

    webhooks:readlistWebhookDeliveries

    Parameters

    • endpointIdwe_… | nullquery
    • status"pending" | "retrying" | "succeeded" | "failed" | nullquery
    • qstringquery
    • cursorstring | nullquery
    • limitinteger | stringquery
    • sort"time" | "event" | "endpoint" | "status" | "response" | "attempts" | "next"query
    • dir"asc" | "desc"query

    Response ListWebhookDeliveriesResponse

    • itemsWebhookDelivery[]required
    • nextCursorCursor | nullrequired
    • countsobjectrequired
      • allintegerrequired
      • succeededintegerrequired
      • failedintegerrequired
      • pendingintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/webhooks/deliveries" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/deliveries', {
      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/webhooks/deliveries",
        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/webhooks/deliveries", 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 delivery: the signed request and every attempt with its response

    GET/v1/store/webhooks/deliveries/{deliveryId}

    Or name the store: GET /v1/stores/{storeId}/webhooks/deliveries/{deliveryId}

    webhooks:readgetWebhookDelivery

    Parameters

    • deliveryIdwhd_…pathrequired

    Response WebhookDeliveryDetail

    • idWebhookDeliveryIdrequired
    • endpointIdWebhookEndpointIdrequired
    • endpointUrlstringrequired
    • messageIdWebhookMessageIdrequired
    • eventTypestringrequired
    • statusWebhookDeliveryStatusrequired
    • attemptsintegerrequired
    • nextAttemptAtTimestamp | nullrequired
    • lastResponseStatusinteger | nullrequired
    • lastDurationMsinteger | nullrequired
    5 more fields
    • replayOfWebhookDeliveryId | nullrequired
    • createdAtTimestamprequired
    • finishedAtTimestamp | nullrequired
    • requestobjectrequired
      • urlstringrequired
      • headersany[][]required
      • bodystringrequired
    • attemptLogWebhookAttempt[]required

    Example

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

    Send the same event again as a new delivery

    POST/v1/store/webhooks/deliveries/{deliveryId}/replay

    Or name the store: POST /v1/stores/{storeId}/webhooks/deliveries/{deliveryId}/replay

    webhooks:writereplayWebhookDelivery

    Parameters

    • deliveryIdwhd_…pathrequired

    Response WebhookDelivery

    • idWebhookDeliveryIdrequired
    • endpointIdWebhookEndpointIdrequired
    • endpointUrlstringrequired
    • messageIdWebhookMessageIdrequired
    • eventTypestringrequired
    • statusWebhookDeliveryStatusrequired
    • attemptsintegerrequired
    • nextAttemptAtTimestamp | nullrequired
    • lastResponseStatusinteger | nullrequired
    • lastDurationMsinteger | nullrequired
    3 more fields
    • replayOfWebhookDeliveryId | nullrequired
    • createdAtTimestamprequired
    • finishedAtTimestamp | nullrequired

    Example

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

    Events sent to your endpoints, newest first (or sorted by type, deliveries or id)

    GET/v1/store/webhooks/events

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

    webhooks:readrole: developers:readlistWebhookEvents

    Parameters

    • typestring | nullquery
    • afterstring | nullquery
    • cursorstring | nullquery
    • limitinteger | stringquery
    • qstringquery
    • delivery"failed" | "pending" | "delivered" | nullquery
    • sort"time" | "type" | "deliveries" | "id"query
    • dir"asc" | "desc"query

    Response ListWebhookEventsResponse

    • itemsExplorerEvent[]required
    • nextCursorCursor | nullrequired
    • typesobject[]required
      • typestringrequired
      • countintegerrequired

    Example

    curl "https://api.shopfa.st/v1/store/webhooks/events" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY"
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/events', {
      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/webhooks/events",
        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/webhooks/events", 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 event: the exact signed body and where it went

    GET/v1/store/webhooks/events/{eventId}

    Or name the store: GET /v1/stores/{storeId}/webhooks/events/{eventId}

    webhooks:readrole: developers:readgetWebhookEvent

    Parameters

    • eventIdmsg_…pathrequired

    Response ExplorerEventDetail

    • idstringrequired
    • typestringrequired
    • createdAtTimestamprequired
    • deliveriesintegerrequired
    • succeededintegerrequired
    • failedintegerrequired
    • summarystringrequired
    • bodystringrequired
    • attemptsobject[]required
      • deliveryIdstringrequired
      • endpointIdWebhookEndpointIdrequired
      • urlstringrequired
      • statusstringrequired
      • lastResponseStatusinteger | nullrequired
      • atTimestamprequired

    Example

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

    Send the event again to one endpoint, or to every endpoint subscribed to its type

    POST/v1/store/webhooks/events/{eventId}/resend

    Or name the store: POST /v1/stores/{storeId}/webhooks/events/{eventId}/resend

    webhooks:writerole: developers:writeresendWebhookEvent

    Parameters

    • eventIdmsg_…pathrequired

    Body

    • endpointIdwe_… | null

    Response ResendWebhookEventResponse

    • deliveriesintegerrequired

    Example

    curl -X POST "https://api.shopfa.st/v1/store/webhooks/events/msg_0123456789abcdefghjk/resend" \
      -H "Authorization: Bearer $SHOPFAST_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
      "endpointId": null
    }'
    const res = await fetch('https://api.shopfa.st/v1/store/webhooks/events/msg_0123456789abcdefghjk/resend', {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.SHOPFAST_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "endpointId": null
      }),
    });
    if (!res.ok) throw new Error((await res.json()).detail);
    const data = await res.json();
    import os, requests
    
    res = requests.request(
        "POST",
        "https://api.shopfa.st/v1/store/webhooks/events/msg_0123456789abcdefghjk/resend",
        headers={"Authorization": f"Bearer {os.environ['SHOPFAST_API_KEY']}"},
        json={
          "endpointId": None
        },
    )
    res.raise_for_status()
    data = res.json()
    req, _ := http.NewRequest("POST", "https://api.shopfa.st/v1/store/webhooks/events/msg_0123456789abcdefghjk/resend", strings.NewReader(`{
      "endpointId": null
    }`))
    req.Header.Set("Authorization", "Bearer "+os.Getenv("SHOPFAST_API_KEY"))
    req.Header.Set("Content-Type", "application/json")
    res, err := http.DefaultClient.Do(req)
    Try it with your key

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

    Was this page helpful?