API reference

Shipping

Quote shipping before your customer checks out.

Shipping cost for a city and items, before you place the order

post/shipping/quote

Request body

ShippingQuoteRequest

cityrequired
string
—
itemsrequired
object[]
—
items[].variantId
string
—
items[].externalVariantId
string
—
items[].quantityrequired
integer · ≥ 1
—

Example request

curl -X POST "https://backend.markitmall.com/dropship/v1/shipping/quote" \
  -H "Authorization: Bearer mk_test_XXXX:sk_test_XXXX" \
  -H "Content-Type: application/json" \
  -d '{
  "city": "Lahore",
  "items": [
    {
      "variantId": "66f0c2a1b2c3d4e5f6a7b8c9",
      "externalVariantId": "66f0c2a1b2c3d4e5f6a7b8c9",
      "quantity": 1
    }
  ]
}'

Response 200

ShippingQuote

city
string
—
shippingCost
integer
—
returnShippingCost
integer
—
rtoReserve
integer

Held on your wallet while a COD order is open

platformFeePercent
number

Platform fee, in percent of platformFeeBasis

platformFeeBasis
enum

margin (default): of your margin — what your customer pays − wholesale − shipping; sale: of your selling price for the items

marginsale

parcels
object[]
—
Example response
JSON
{
  "city": "Lahore",
  "shippingCost": 1500,
  "returnShippingCost": 1500,
  "rtoReserve": 0,
  "platformFeePercent": 0,
  "platformFeeBasis": "margin",
  "parcels": [
    {}
  ]
}

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