Getting started
Sandbox & testing
There is no separate sandbox address: the same API, called with a mk_test_… key, runs in test mode.
Sandbox vs live#
| Test key (sandbox) | Live key | |
|---|---|---|
| Catalog, prices and stock | Real | Real |
| Validation (fields, minimum price, stock, COD covers cost, duplicates) | ✓ | ✓ |
| Order is packed and shipped | — | ✓ |
| Customer confirmation call | — | ✓ |
| Wallet charged / credited | — | ✓ |
| Daily order cap and blocked phone numbers | — | ✓ |
| Status changes | You trigger them with /simulate | Happen as the courier moves |
| Webhooks | Sent, with "mode": "test" | Sent, with "mode": "live" |
| Works before your account is approved | ✓ | — |
Moving a test order#
curl -X POST "https://backend.markitmall.com/dropship/v1/orders/{id}/simulate" \
-H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX" \
-H "Content-Type: application/json" \
-d '{
"status": "DELIVERED"
}'| status | What it does | Webhook |
|---|---|---|
CONFIRMED | The customer confirmed the order | order.confirmed |
PROCESSING | Being packed | — |
SHIPPED | Adds a sample tracking number (TEST-TRK-…) | order.shipped |
DELIVERED | Margin becomes pending, with its release date | order.delivered |
CANCELLED | Cancelled | order.cancelled |
RETURNED | Refused at the door; shows the shipping charge | order.returned |
/simulate only accepts test keys. A live key gets 422 test_mode_only.A test plan before going live#
| Scenario | How |
|---|---|
| Happy path | Order → CONFIRMED → SHIPPED → DELIVERED; your store shows tracking and marks the order complete |
| Refused parcel | Order → SHIPPED → RETURNED; your store marks it returned |
| Cancellation | Cancel from your store → POST /orders/{id}/cancel |
| Price too low | Send resalePrice below minResalePrice → 422 price_below_minimum |
| Out of stock | Order more than stock → 422 out_of_stock |
| Retry safety | Send the same order twice with the same Idempotency-Key → one order |
| Webhook security | Change one byte of a delivered body → your endpoint must reject it |
| Duplicate webhook | Process the same X-MarkitMall-Event-Id twice → handled once |
Trying calls in the browser#
Every endpoint in the API reference has a Try it in the sandbox panel. Paste your test key (mk_test_…:sk_test_…) once — every panel on the page uses it — fill in the fields and send a real request to the sandbox. The id an order call returns is filled in for the next step, so you can create an order and then simulate, cancel or read it without copying ids.
Try it only accepts test keys. You can also import openapi.json into Postman.
