Skip to content
BolderBolder API
Esc
navigateopen⌘Jpreview

Subscribe

Creates a new webhook subscription. After creation the API sends a verification POST to your url containing a X-Hook-Ping header. Your endpoint must respond with a matching X-Hook-Pong header to activate the subscription.

Subscription states

Status Description
pending Created, awaiting verification
active Verified and receiving events
failed_activation Verification was rejected
failed Disabled after 3 consecutive delivery failures
disabled Manually disabled or target returned 410

Available event topics

Orders: orders, orders.created, orders.created.checkout, orders.updated, orders.updated.placed, orders.updated.closed, orders.updated.shipped, orders.updated.cancelled, orders.deleted

Products: products, products.created, products.updated, products.deleted, products.updated.variants.created, products.updated.variants.updated, products.updated.variants.deleted, products.updated.assets.created, products.updated.assets.deleted

POST/hub/{shop_id}/subscriptions
Authorization
AuthorizationBearer token (JWT) · headerrequired
OAuth 2.0 Bearer token. Obtain via `POST https://auth.onbolder.com/oauth/token`.
Path parameters
shop_idintegerrequired
Request body
requiredapplication/json
topicstringrequired
Event topic to subscribe to, e.g. `orders.updated.placed`
urlstringrequired
URL to POST event notifications to
notify_originboolean
Whether to notify the originating app
default: true
authSubscriptionAuth
Show properties
typestring
Allowed:nonebasic
usernamestring
passwordstring
Responses
201Subscription created (pending verification)
idinteger
statusstring
Allowed:pendingactivefailed_activationfaileddisabled
topicstring
urlstring
notify_originboolean
authSubscriptionAuth
Show properties
typestring
Allowed:nonebasic
usernamestring
passwordstring
error_countinteger
last_errorstring | null
created_onstring<date-time>
updated_onstring<date-time>
_linksobject
422Validation errors
_classstring[]
_embeddedobject
Show properties
errorsobject[]
Show properties
Array of object
_classstring[]
fieldstring
messagesstring[]
Request
curl -X POST "https://api.onbolder.com/v1/hub/0/subscriptions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "topic": "string",
  "url": "string",
  "notify_origin": true,
  "auth": {
    "type": "none",
    "username": "string",
    "password": "string"
  }
}'
Response
{
  "id": 0,
  "status": "pending",
  "topic": "string",
  "url": "string",
  "notify_origin": true,
  "auth": {
    "type": "none",
    "username": "string",
    "password": "string"
  },
  "error_count": 0,
  "last_error": "string",
  "created_on": "2019-08-24T14:15:22Z",
  "updated_on": "2019-08-24T14:15:22Z",
  "_links": {}
}