Skip to content

Subscribe to event

Endpoint: https://api.youcan.shop/resthooks/subscribe

Method: POST

Required Scopes

  • edit-rest-hooks

Body

Param NameParam TypeDescriptionRequired
target_urlstringthe URL which you want our API to POST to when this event occurs, mandatoryyes
eventstringthe event name that you want to hold about.
supported events:
  • inventory.low
  • order.create
  • upsell.accept
yes

Responses

[200] Ok

json
{
  "id": "8e6b019b-06de-496d-a96d-c9ee69c0ccf0"
}

[429] Too Many Requests

json
{
  "status": 429,
  "detail": "This store has reached the max of subscriptions for this event.",
  "meta": []
}