API reference

Webhooks

Where we send events, and their delivery log.

Your webhook URL and events

get/webhooks

Example request

curl "https://backend.markitmall.com/dropship/v1/webhooks" \
  -H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX"

Response 200

WebhookConfig

integrationId
string
—
url
string | null
—
events
string[]
—
hasSecret
boolean
—
secret
string

Only when just generated

Example response
JSON
{
  "integrationId": "66f0c2a1b2c3d4e5f6a7b8c9",
  "url": "https://example.com/markitmall/webhook",
  "events": [
    "string"
  ],
  "hasSecret": true,
  "secret": "string"
}

Errors: 401 — the body is always { error: { code, message, details } }.

Set your webhook URL and events

put/webhooks

A signing secret is generated the first time a URL is set (or with rotateSecret: true) and returned once as secret. You may supply your own (32+ characters) instead.

Request body

url
string | null · uri
—
events
string[]

Empty = all events

secret
string · min 32 chars
—
rotateSecret
boolean
—

Example request

curl -X PUT "https://backend.markitmall.com/dropship/v1/webhooks" \
  -H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com",
  "events": [
    "string"
  ],
  "secret": "string",
  "rotateSecret": true
}'

Response 200

WebhookConfig

integrationId
string
—
url
string | null
—
events
string[]
—
hasSecret
boolean
—
secret
string

Only when just generated

Example response
JSON
{
  "integrationId": "66f0c2a1b2c3d4e5f6a7b8c9",
  "url": "https://example.com/markitmall/webhook",
  "events": [
    "string"
  ],
  "hasSecret": true,
  "secret": "string"
}

Errors: 400, 401, 422 — the body is always { error: { code, message, details } }.

Send a sample order.shipped event

post/webhooks/test

Example request

curl -X POST "https://backend.markitmall.com/dropship/v1/webhooks/test" \
  -H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX"

Response 200

An object; its fields are not fixed.

Example response
JSON
{}

Errors: 401, 422 — the body is always { error: { code, message, details } }.

Delivery log

get/webhooks/deliveries

Parameters

status
query · enum

pendingdeliveredfailed

limit
query · integer

Default 50

cursor
query · string

nextCursor from the previous page

Example request

curl "https://backend.markitmall.com/dropship/v1/webhooks/deliveries" \
  -H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX"

Response 200

datarequired
object[]
—
nextCursorrequired
string | null
—
Example response
JSON
{
  "data": [
    {}
  ],
  "nextCursor": "string"
}

Errors: 401 — the body is always { error: { code, message, details } }.