SmakeSmake API Docs
Endpoints

Webhooks

Smake Checkout API — Webhooks

You can configure webhook endpoints via the API to be notified about events that happen in Smake.

You can create up to 10 webhooks per event.

Available Events

Currently, these are all events you can listen to:

  • order.shipped
  • order.cancelled
  • shipping-rate.calculated
  • variant.designed
  • id-tag.updated

List

Request

GET /webhooks HTTP/1.1

Response

{
    "data": [
        {
            "id": 1,
            "is_test": true,
            "url": "https://requestb.in/xjggz4xj",
            "event_types": [
                {
                    "id": 1,
                    "name": "order.shipped"
                }
            ]
        },
        {
            "id": 2,
            "is_test": true,
            "url": "https://requestb.in/1hd29kc1",
            "event_types": [
                {
                    "id": 1,
                    "name": "order.shipped"
                }
            ]
        }
    ],
    "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,
    }
}

Get

Request

GET /webhooks/1 HTTP/1.1

Response

{
    "id": 1,
    "is_test": true,
    "url": "https://requestb.in/xjggz4xj",
    "event_types": [
        {
            "id": 1,
            "name": "order.shipped"
        }
    ]
}

Create

Attributes

FieldTypeDescriptionRequired
urlstringThe URL to listen for incoming POST notification containing event information.yes
tokenstringA token to secure your url
event_typesarrayAn array of Event-Type Objectsyes

Event-Type Object

Back to Attributes
FieldTypeDescriptionRequired
namestringnameyes

Request

POST /webhooks HTTP/1.1

{
    "url": "https://requestb.in/1hd29kc1",
    "token": "my-secret-token",
    "event_types": [
        {
            "name": "order.shipped"
        }
    ]
}

Response

{
    "id": 2,
    "is_test": true,
    "url": "https://requestb.in/1hd29kc1",
    "event_types": [
        {
            "id": 1,
            "name": "order.shipped"
        }
    ]
}

Update

Request

PUT /webhooks/1 HTTP/1.1

{
    "url": "http://example.com"
}

Response

{
    "id": 1,
    "is_test": true,
    "url": "http://example.com",
    "event_types": [
        {
            "id": 1,
            "name": "order.shipped"
        }
    ]
}

Delete

Request

DELETE /webhooks/1 HTTP/1.1

On this page