API reference
Webhooks
Where we send events, and their delivery log.
get
/webhooksYour webhook URL and eventsput/webhooksSet your webhook URL and eventspost/webhooks/testSend a sample order.shipped eventget/webhooks/deliveriesDelivery logYour webhook URL and events
get
/webhooksExample request
curl "https://backend.markitmall.com/dropship/v1/webhooks" \
-H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX"Response 200
integrationIdstring | — |
urlstring | null | — |
eventsstring[] | — |
hasSecretboolean | — |
secretstring | 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
/webhooksA 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
urlstring | null · uri | — |
eventsstring[] | Empty = all events |
secretstring · min 32 chars | — |
rotateSecretboolean | — |
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
integrationIdstring | — |
urlstring | null | — |
eventsstring[] | — |
hasSecretboolean | — |
secretstring | 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/testExample 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/deliveriesParameters
statusquery · enum |
|
limitquery · integer | Default 50 |
cursorquery · string |
|
Example request
curl "https://backend.markitmall.com/dropship/v1/webhooks/deliveries" \
-H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX"Response 200
datarequiredobject[] | — |
nextCursorrequiredstring | null | — |
Example response
JSON
{
"data": [
{}
],
"nextCursor": "string"
}Errors: 401 — the body is always { error: { code, message, details } }.
