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
/v1/store/webhooks/endpointsOr name the store: GET /v1/stores/{storeId}/webhooks/endpoints
Response ListWebhookEndpointsResponse
itemsWebhookEndpoint[]requiredlimitintegerrequired
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
Add an endpoint. The signing secret is in the response
/v1/store/webhooks/endpointsOr name the store: POST /v1/stores/{storeId}/webhooks/endpoints
Body
urlstringrequireddescriptionstringrequiredevents"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
endpointWebhookEndpointrequiredsecretwhsec_…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
Change the URL, events or description, or turn it on or off
/v1/store/webhooks/endpoints/{endpointId}Or name the store: PATCH /v1/stores/{storeId}/webhooks/endpoints/{endpointId}
Parameters
endpointIdwe_…pathrequired
Body
urlstringdescriptionstringevents"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"[]enabledbooleantransformerPluginIdplg_… | null
Response WebhookEndpoint
idWebhookEndpointIdrequiredurlstringrequireddescriptionstringrequiredeventsWebhookEventType[]requiredstatusWebhookEndpointStatusrequireddisabledReason"manual" | "failing" | nullrequiredsecretHintstringrequiredpreviousSecretExpiresAtTimestamp | nullrequiredhealthobjectrequiredlastDeliveryAtTimestamp | nullrequiredlastResponseStatusinteger | nullrequiredsuccessRate7dnumber | nullrequireddeliveries7dintegerrequiredconsecutiveFailuresintegerrequiredfailingSinceTimestamp | nullrequired
createdAtTimestamprequiredupdatedAtTimestamprequiredtransformerPluginIdplg_… | 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
Delete an endpoint and its pending deliveries
/v1/store/webhooks/endpoints/{endpointId}Or name the store: DELETE /v1/stores/{storeId}/webhooks/endpoints/{endpointId}
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
Show the current signing secret (store owners only)
/v1/store/webhooks/endpoints/{endpointId}/secretOr name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/secret
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
Replace the signing secret. The old one keeps signing alongside the new one for the overlap
/v1/store/webhooks/endpoints/{endpointId}/rotateOr name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/rotate
Parameters
endpointIdwe_…pathrequired
Body
overlapHoursnumberrequired
Response RotateWebhookSecretResponse
endpointWebhookEndpointrequiredsecretwhsec_…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
Send a signed webhook.test event to this endpoint now
/v1/store/webhooks/endpoints/{endpointId}/testOr name the store: POST /v1/stores/{storeId}/webhooks/endpoints/{endpointId}/test
Parameters
endpointIdwe_…pathrequired
Response WebhookDelivery
idWebhookDeliveryIdrequiredendpointIdWebhookEndpointIdrequiredendpointUrlstringrequiredmessageIdWebhookMessageIdrequiredeventTypestringrequiredstatusWebhookDeliveryStatusrequiredattemptsintegerrequirednextAttemptAtTimestamp | nullrequiredlastResponseStatusinteger | nullrequiredlastDurationMsinteger | nullrequired
3 more fields
replayOfWebhookDeliveryId | nullrequiredcreatedAtTimestamprequiredfinishedAtTimestamp | 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
The delivery log, newest first (or sorted by any column)
/v1/store/webhooks/deliveriesOr name the store: GET /v1/stores/{storeId}/webhooks/deliveries
Parameters
endpointIdwe_… | nullquerystatus"pending" | "retrying" | "succeeded" | "failed" | nullqueryqstringquerycursorstring | nullquerylimitinteger | stringquerysort"time" | "event" | "endpoint" | "status" | "response" | "attempts" | "next"querydir"asc" | "desc"query
Response ListWebhookDeliveriesResponse
itemsWebhookDelivery[]requirednextCursorCursor | nullrequiredcountsobjectrequiredallintegerrequiredsucceededintegerrequiredfailedintegerrequiredpendingintegerrequired
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
One delivery: the signed request and every attempt with its response
/v1/store/webhooks/deliveries/{deliveryId}Or name the store: GET /v1/stores/{storeId}/webhooks/deliveries/{deliveryId}
Parameters
deliveryIdwhd_…pathrequired
Response WebhookDeliveryDetail
idWebhookDeliveryIdrequiredendpointIdWebhookEndpointIdrequiredendpointUrlstringrequiredmessageIdWebhookMessageIdrequiredeventTypestringrequiredstatusWebhookDeliveryStatusrequiredattemptsintegerrequirednextAttemptAtTimestamp | nullrequiredlastResponseStatusinteger | nullrequiredlastDurationMsinteger | nullrequired
5 more fields
replayOfWebhookDeliveryId | nullrequiredcreatedAtTimestamprequiredfinishedAtTimestamp | nullrequiredrequestobjectrequiredurlstringrequiredheadersany[][]requiredbodystringrequired
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
Send the same event again as a new delivery
/v1/store/webhooks/deliveries/{deliveryId}/replayOr name the store: POST /v1/stores/{storeId}/webhooks/deliveries/{deliveryId}/replay
Parameters
deliveryIdwhd_…pathrequired
Response WebhookDelivery
idWebhookDeliveryIdrequiredendpointIdWebhookEndpointIdrequiredendpointUrlstringrequiredmessageIdWebhookMessageIdrequiredeventTypestringrequiredstatusWebhookDeliveryStatusrequiredattemptsintegerrequirednextAttemptAtTimestamp | nullrequiredlastResponseStatusinteger | nullrequiredlastDurationMsinteger | nullrequired
3 more fields
replayOfWebhookDeliveryId | nullrequiredcreatedAtTimestamprequiredfinishedAtTimestamp | 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
Events sent to your endpoints, newest first (or sorted by type, deliveries or id)
/v1/store/webhooks/eventsOr name the store: GET /v1/stores/{storeId}/webhooks/events
Parameters
typestring | nullqueryafterstring | nullquerycursorstring | nullquerylimitinteger | stringqueryqstringquerydelivery"failed" | "pending" | "delivered" | nullquerysort"time" | "type" | "deliveries" | "id"querydir"asc" | "desc"query
Response ListWebhookEventsResponse
itemsExplorerEvent[]requirednextCursorCursor | nullrequiredtypesobject[]requiredtypestringrequiredcountintegerrequired
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
One event: the exact signed body and where it went
/v1/store/webhooks/events/{eventId}Or name the store: GET /v1/stores/{storeId}/webhooks/events/{eventId}
Parameters
eventIdmsg_…pathrequired
Response ExplorerEventDetail
idstringrequiredtypestringrequiredcreatedAtTimestamprequireddeliveriesintegerrequiredsucceededintegerrequiredfailedintegerrequiredsummarystringrequiredbodystringrequiredattemptsobject[]requireddeliveryIdstringrequiredendpointIdWebhookEndpointIdrequiredurlstringrequiredstatusstringrequiredlastResponseStatusinteger | nullrequiredatTimestamprequired
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
Send the event again to one endpoint, or to every endpoint subscribed to its type
/v1/store/webhooks/events/{eventId}/resendOr name the store: POST /v1/stores/{storeId}/webhooks/events/{eventId}/resend
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)