Subscription endpoint

Activating a REST Hook

Creates a new subscription which means from this point on you'll receive notifications to the URL provided until you unsubscribe.
Required input parameters
• HTTP Authorization Header that contains your API key
• (optional) pass-template UID as part of the URL. This is the pass-template you want to receive notifications for. If you omit the pass-template UID the Hook is registered globally
• subscription_url - if a user deletes his Passcreator account we'll try to notify your server by sending a DELETE request to this URL.
• target_url - this is the URL we will use to push information. The information will always be pushed as JSON payload.
• event - the event key (e.g. pass_created) that you are subscribing for. Please see the definition of the hooks below to get the keys.
Returned values
On success HTTP status 201 (created) is returned otherwhise a appropriate status code that represents the error.

Example payload:

  1. {
  2. "subscription_url": "",
  3. "target_url": "",
  4. "event": "pass_created"
  5. }