List webhooks
You can configure webhook endpoints via the API to be notified about events that happen in Smake (how deliveries, retries and signatures work is described in Basic Usage → Webhooks).
Warning: You can create up to 10 webhooks per event.
Available Events
Currently, these are all events you can listen to:
order.completedorder.preparedorder.failedorder.cancelledvariant.completedvariant.failedlogo.completedlogo.failedshipment.prepareddraft-order.checked— a draft order passed the automatic checksdraft-order.failed— a draft order failed the automatic checks, see itsfailure_messagemerchant-variant.designer-condition.created— the designer configuration of a variant was createdmerchant-variant.designer-condition.changed— the designer configuration of a variant changed
List
Returns a collection of your webhooks.
AuthorizationbearerAuth
Authorization
bearerAuth API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.
In: header
Query Parameters
Page number to return — see Basic Usage → Pagination.
1Number of objects per page (default 25, maximum 100) — see Basic Usage → Pagination.
value <= 10025Header Parameters
The API only responds with JSON — this header is mandatory on every request (see Setup → Headers).
"application/json"Value in
- "application/json"
Response Body
application/json
application/json
curl -X GET "https://example.com/webhooks" \ -H "Accept: application/json"{ "data": [ { "id": 1, "description": { "en": "This is webhook listens to the order completed event." }, "version": "2022-02-01", "state": "active", "url": "https://requestb.in/xjggz4xj", "events": [ { "id": 3, "name": "order.completed" } ], "created_at": "2022-02-01T00:00:00+00:00", "updated_at": "2022-02-01T00:00:00+00:00" }, { "id": 2, "description": { "en": "This is webhook listens to the order cancelled event." }, "version": "2022-02-01", "state": "inactive", "url": "https://requestb.in/1hd29kc1", "events": [ { "id": 2, "name": "order.cancelled" } ], "created_at": "2022-02-01T00:00:00+00:00", "updated_at": "2022-02-01T00:00:00+00:00" } ], "links": { "first": "https://api.smake.io/v2/webhooks?page=1", "last": "https://api.smake.io/v2/webhooks?page=1", "prev": null, "next": null }, "meta": { "current_page": 1, "from": 1, "path": "https://api.smake.io/v2/webhooks", "per_page": 25, "to": 2 }}Cancel order PUT
You can cancel an already placed order by executing the following request. > **Warning:** Depending on the cancellation setting it may be that an order can no longer be canceled. In > this case an API exception is thrown.
Create a webhook POST
Creates a webhook endpoint that listens to one or more of the [available events](/docs/checkout/2022-02-01/endpoints/webhooks/listWebhooks). > **Warning:** You can create up to 10 webhooks per event. ### Attributes | Field | Type | Description | Required | |-------------|--------|-----------------------------------------------------------------------------------------------|----------| | url | string | The URL to listen for incoming POST notification containing event information. | yes | | token | string | A token to secure your url. | | | version | string | The version in which the information should be transformed to. Default: `current api version` | | | description | json | A json object of localized description. | | | state | string | State of the endpoint (see below). Default: `inactive` | | | events | array | An array of Event Objects (see below). | yes | ### States | name | Default | |----------|---------| | inactive | yes | | active | | ### Event Object | Field | Type | Description | Required | |-------|--------|-------------------|----------| | name | string | The internal name | yes |