Skip to Content
devhelp shopDocs

Admin — Fulfillments & Shipping

Fulfillments, courier handovers, delivery problems, claims, shipping zones, and COD remittances.

List

GET
/admin/v1/delivery-services

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
type?string
Value in"own_delivery""offline_courier"
q?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/delivery-services'
Example Response
{  "items": [    {      "name": "string",      "type": "own_delivery",      "phone": "string",      "website": "string",      "instructions": "string",      "id": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}

Create

POST
/admin/v1/delivery-services

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
name*string
type*string
Value in"own_delivery""offline_courier"
phone*string|null
website*string|null
instructions*string|null

Response Body

OK

application/json
  1. response
name*string
type*string
Value in"own_delivery""offline_courier"
phone*string|null
website*string|null
instructions*string|null
id*string
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/delivery-services' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "type": "own_delivery",  "phone": "string",  "website": "string",  "instructions": "string"}'
Example Response
{  "name": "string",  "type": "own_delivery",  "phone": "string",  "website": "string",  "instructions": "string",  "id": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}
GET
/admin/v1/delivery-services/choices

Every active delivery service's id, name and instructions, alphabetical. Bounded at 500.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/delivery-services/choices'
Example Response
{  "items": [    {      "id": "string",      "name": "string",      "instructions": "string"    }  ]}

Get

GET
/admin/v1/delivery-services/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
name*string
type*string
Value in"own_delivery""offline_courier"
phone*string|null
website*string|null
instructions*string|null
id*string
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/delivery-services/string'
Example Response
{  "name": "string",  "type": "own_delivery",  "phone": "string",  "website": "string",  "instructions": "string",  "id": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Remove

DELETE
/admin/v1/delivery-services/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
updated*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/delivery-services/string'
Example Response
{  "updated": true}

Update

PUT
/admin/v1/delivery-services/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
name*string
type*string
Value in"own_delivery""offline_courier"
phone*string|null
website*string|null
instructions*string|null

Response Body

OK

application/json
  1. response
name*string
type*string
Value in"own_delivery""offline_courier"
phone*string|null
website*string|null
instructions*string|null
id*string
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PUT 'https://api.devhelp.pk/admin/v1/delivery-services/string' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "type": "own_delivery",  "phone": "string",  "website": "string",  "instructions": "string"}'
Example Response
{  "name": "string",  "type": "own_delivery",  "phone": "string",  "website": "string",  "instructions": "string",  "id": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Balances

GET
/admin/v1/courier-payments/ledger/balances

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
[index: integer]?
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments/ledger/balances'
Example Response
[  {    "courierName": "string",    "owedPaisa": 0,    "underClaimPaisa": 0,    "settledPaisa": 0,    "shortPaisa": 0,    "payments": [      {        "id": "string",        "remainingPaisa": 0,        "underClaimPaisa": 0      }    ]  }]

Statement

GET
/admin/v1/courier-payments/ledger/statement

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

courierName*string
fulfillmentId?string
from?string
to?string

Response Body

OK

application/json
  1. response
openingPaisa*number
closingPaisa*number
entries*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments/ledger/statement?courierName=string'
Example Response
{  "openingPaisa": 0,  "closingPaisa": 0,  "entries": [    {      "id": "string",      "courierName": "string",      "kind": "string",      "fulfillmentId": "string",      "remittanceId": "string",      "claimId": "string",      "duePaisa": 0,      "receivedPaisa": 0,      "claimedPaisa": 0,      "writtenOffPaisa": 0,      "note": "string",      "createdAt": "2019-08-24T14:15:22Z",      "orderId": "string",      "orderNumber": 0,      "trackingNumber": "string",      "handoverId": "string",      "runningBalancePaisa": 0    }  ]}

What each courier owes

GET
/admin/v1/courier-payments/awaiting/summary

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
couriers*array<>
unpaidAfterDays*number
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments/awaiting/summary'
Example Response
{  "couriers": [    {      "courierName": "string",      "parcels": 0,      "cashPaisa": 0,      "overdueParcels": 0,      "overdueCashPaisa": 0    }  ],  "unpaidAfterDays": 0}
GET
/admin/v1/courier-payments/awaiting

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
courierName?string
overdue?boolean
q?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments/awaiting'
Example Response
{  "items": [    {      "id": "string",      "courierName": "string",      "deliveryServiceId": "string",      "trackingNumber": "string",      "cashPaisa": 0,      "deliveredAt": "2019-08-24T14:15:22Z",      "overdue": true,      "order": {        "id": "string",        "orderNumber": 0,        "recipientName": "string",        "city": "string",        "province": "string"      }    }  ],  "nextCursor": "string"}
GET
/admin/v1/courier-payments

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments'
Example Response
{  "items": [    {      "id": "string",      "courierName": "string",      "deliveryServiceId": "string",      "receivedOn": "string",      "reference": "string",      "amountPaisa": 0,      "deductions": [        {          "kind": "delivery_charges",          "label": "string",          "amountPaisa": 0        }      ],      "parcelCount": 0,      "parcelsCashPaisa": 0,      "differencePaisa": 0,      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "note": "string",      "actorType": "customer",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}
POST
/admin/v1/courier-payments

Lists the delivered parcels it covers, each settled once; a parcel already covered, not delivered, collecting nothing or carried by the store's own delivery service is refused. Requires an Idempotency-Key header.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
deliveryServiceId?string|null
courierName*string
receivedOn*string
reference?string
amountPaisa*number
deductions?array<>
Default[]
parcelIds*array<string>
note?string

Response Body

OK

application/json
  1. response
id*string
courierName*string
deliveryServiceId*string|null
receivedOn*string
reference*string|null
amountPaisa*number
deductions*array<>
parcelCount*number
parcelsCashPaisa*number
differencePaisa*number
claims*array<>
note*string|null
actorType*string
Value in"customer""staff""api_key""system"
createdAt*string
Formatdate-time
parcels*array<>
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/courier-payments' \  -H 'Content-Type: application/json' \  -d '{  "courierName": "string",  "receivedOn": "string",  "amountPaisa": 0,  "parcelIds": [    "string"  ]}'
Example Response
{  "id": "string",  "courierName": "string",  "deliveryServiceId": "string",  "receivedOn": "string",  "reference": "string",  "amountPaisa": 0,  "deductions": [    {      "kind": "delivery_charges",      "label": "string",      "amountPaisa": 0    }  ],  "parcelCount": 0,  "parcelsCashPaisa": 0,  "differencePaisa": 0,  "claims": [    {      "id": "string",      "kind": "lost",      "claimedPaisa": 0,      "claimBy": "2019-08-24T14:15:22Z",      "status": "open",      "paidPaisa": 0,      "note": "string",      "resolvedAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "note": "string",  "actorType": "customer",  "createdAt": "2019-08-24T14:15:22Z",  "parcels": [    {      "id": "string",      "trackingNumber": "string",      "cashPaisa": 0,      "order": {        "id": "string",        "orderNumber": 0      }    }  ]}
POST
/admin/v1/courier-payments/{id}/void

Retires the payment; its parcels wait for a courier payment again. Order money is unchanged.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/courier-payments/string/void'
Example Response
{  "id": "string"}
GET
/admin/v1/courier-payments/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
courierName*string
deliveryServiceId*string|null
receivedOn*string
reference*string|null
amountPaisa*number
deductions*array<>
parcelCount*number
parcelsCashPaisa*number
differencePaisa*number
claims*array<>
note*string|null
actorType*string
Value in"customer""staff""api_key""system"
createdAt*string
Formatdate-time
parcels*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/courier-payments/string'
Example Response
{  "id": "string",  "courierName": "string",  "deliveryServiceId": "string",  "receivedOn": "string",  "reference": "string",  "amountPaisa": 0,  "deductions": [    {      "kind": "delivery_charges",      "label": "string",      "amountPaisa": 0    }  ],  "parcelCount": 0,  "parcelsCashPaisa": 0,  "differencePaisa": 0,  "claims": [    {      "id": "string",      "kind": "lost",      "claimedPaisa": 0,      "claimBy": "2019-08-24T14:15:22Z",      "status": "open",      "paidPaisa": 0,      "note": "string",      "resolvedAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "note": "string",  "actorType": "customer",  "createdAt": "2019-08-24T14:15:22Z",  "parcels": [    {      "id": "string",      "trackingNumber": "string",      "cashPaisa": 0,      "order": {        "id": "string",        "orderNumber": 0      }    }  ]}
POST
/admin/v1/fulfillments/{id}/dispatch

Commits the parcel's reservations and takes its units off the shelf. A courier name is required.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
deliveryServiceId?string|null
trackingUrl?string|null
courierName?string
trackingNumber?string
codAmountPaisa?number

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/dispatch' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/deliver

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
collectedPaisa?number

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/deliver' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/rto

Return to origin. Nothing is restocked yet: receive the parcel to decide what goes back on the shelf. Counts against the customer's RTO record.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
reason*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/rto' \  -H 'Content-Type: application/json' \  -d '{  "reason": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/receive

For every line, restocked plus damaged must equal the quantity in the parcel.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
lines*array<>

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/receive' \  -H 'Content-Type: application/json' \  -d '{  "lines": [    {      "fulfillmentLineId": "string",      "restockedQuantity": 0,      "damagedQuantity": 0    }  ]}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/cancel

Its lines become available to pack again; stock stays reserved.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
note?string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/cancel' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}

List parcels

GET
/admin/v1/fulfillments

Parcels across orders, oldest first: packed (waiting for a courier), with-courier (dispatched), needs-attention (dispatched with no delivery or return recorded for the store's no-news days) or all.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
view?string
Default"packed"
Value in"packed""with-courier""needs-answer""needs-attention""all"
q?string
deliveryServiceId?string
courierName?string
packedFrom?string
packedTo?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/fulfillments'
Example Response
{  "items": [    {      "id": "string",      "status": "packed",      "courierName": "string",      "deliveryServiceId": "string",      "trackingNumber": "string",      "trackingUrl": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "pieces": 0,      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "handover": {        "id": "string",        "number": 0      },      "lastAttempt": {        "number": 0,        "reason": "buyer_unavailable",        "respondBy": "2019-08-24T14:15:22Z",        "answered": true      },      "order": {        "id": "string",        "orderNumber": 0,        "recipientName": "string",        "phone": "string",        "city": "string",        "province": "string",        "onHold": true      }    }  ],  "nextCursor": "string"}
GET
/admin/v1/fulfillments/counts

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
packed*number
withCourier*number
needsAttention*number
needsAnswer*number
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/fulfillments/counts'
Example Response
{  "packed": 0,  "withCourier": 0,  "needsAttention": 0,  "needsAnswer": 0}
POST
/admin/v1/fulfillments/{id}/attempts

A dispatched parcel only, and only while its last attempt has been answered. The attempt is numbered and waits for an answer (Needs answer).

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
reason*string
Value in"buyer_unavailable""refused""address_problem""phone_off""deliver_later""other"
note?string
respondBy?string
Formatdate-time

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/attempts' \  -H 'Content-Type: application/json' \  -d '{  "reason": "buyer_unavailable"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/instruction

retry records the instruction to try again, optionally with a new phone, address line or landmark kept on the attempt (the order's address is unchanged). return sends the parcel back through the same path as marking it returning. The merchant passes the instruction to the courier.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
instruction*unknown|unknown
phone?string
addressLine?string
landmark?string
note?string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/instruction' \  -H 'Content-Type: application/json' \  -d '{  "instruction": "retry"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/attempts/{number}/dispute

The buyer says nobody came. Kept with a note, for the courier's record.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string
number*number

Request Body

application/json
  1. body
note*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/attempts/0/dispute' \  -H 'Content-Type: application/json' \  -d '{  "note": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}

Record a parcel as lost

POST
/admin/v1/fulfillments/{id}/lost

From dispatched or returning. No cash is collected and nothing is restocked. By default stock is held for a replacement and the parcel's lines can be packed again; refused when there is not enough stock, in which case replace: false records the loss alone.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
note?string
replace?boolean
Defaulttrue

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/lost' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
POST
/admin/v1/fulfillments/{id}/claims

For a lost parcel, or a damaged one that was delivered or came back. A record only: the order's money is unchanged when the claim is paid.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
kind*string
Value in"lost""damaged""other"
claimedPaisa*number
claimBy?string
Formatdate-time
note?string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string|null
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
customerId*string|null
risk*|null
collectedPaisa*number
refundedPaisa*number
fulfillments*array<>
returns*array<>
cashRefunds*array<>
events*array<>
payments*array<>
cancelReasonCode*|null
exchangeOfOrderId*string|null
confirmation*
inStore*|null
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/fulfillments/string/claims' \  -H 'Content-Type: application/json' \  -d '{  "kind": "lost",  "claimedPaisa": 0}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "orderId": "string",        "lineId": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffId": "string",        "staffName": "string",        "staffRequested": true,        "resourceIds": [          "string"        ],        "status": "held",        "quantity": 0,        "arrivedQuantity": 0,        "overbooked": true,        "checkCode": "string",        "version": 0,        "changeUntil": "2019-08-24T14:15:22Z",        "requestedStaffId": "string"      },      "tax": {        "rateBps": 0,        "taxPaisa": 0      }    }  ],  "discounts": [    {      "discountId": "string",      "code": "string",      "title": "string",      "type": "product",      "valueType": "percentage",      "value": 0,      "amountPaisa": 0    }  ],  "sales": [    {      "discountId": "string",      "title": "string",      "amountPaisa": 0    }  ],  "totals": {    "currency": "PKR",    "subtotalPaisa": 0,    "shippingPaisa": 0,    "discountPaisa": 0,    "saleSavingsPaisa": 0,    "shippingDiscountPaisa": 0,    "codFeePaisa": 0,    "taxPaisa": 0,    "totalPaisa": 0,    "taxRateBps": 0,    "pricesIncludeTax": true  },  "note": "string",  "confirmedAt": "2019-08-24T14:15:22Z",  "cancelledAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "payment": {    "method": "cod",    "state": "not_required",    "testMode": true,    "dueAt": "2019-08-24T14:15:22Z",    "canRetry": true,    "canSwitchToCod": true,    "codTotalPaisa": 0,    "depositPaisa": 0,    "advance": {      "dueAt": "2019-08-24T14:15:22Z",      "received": true    }  },  "bookingPolicy": {    "text": "string",    "cancelWindowHours": 0,    "canCancel": true,    "canReschedule": true,    "advanceInstructions": "string"  },  "customerId": "string",  "risk": {    "orderCount": 0,    "deliveredCount": 0,    "rtoCount": 0,    "cancelledCount": 0,    "returnedCount": 0,    "rtoRate": 0  },  "collectedPaisa": 0,  "refundedPaisa": 0,  "fulfillments": [    {      "id": "string",      "deliveryServiceId": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "handoverId": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restockedQuantity": 0,          "damagedQuantity": 0        }      ],      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "rtoAt": "2019-08-24T14:15:22Z",      "receivedAt": "2019-08-24T14:15:22Z",      "cancelledAt": "2019-08-24T14:15:22Z",      "lostAt": "2019-08-24T14:15:22Z",      "replaced": true,      "attempts": [        {          "id": "string",          "number": 0,          "reason": "buyer_unavailable",          "note": "string",          "respondBy": "2019-08-24T14:15:22Z",          "instruction": "retry",          "instructedAt": "2019-08-24T14:15:22Z",          "retryPhone": "string",          "retryAddressLine": "string",          "retryLandmark": "string",          "disputed": true,          "disputeNote": "string",          "actorType": "customer",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "claims": [        {          "id": "string",          "kind": "lost",          "claimedPaisa": 0,          "claimBy": "2019-08-24T14:15:22Z",          "status": "open",          "paidPaisa": 0,          "note": "string",          "resolvedAt": "2019-08-24T14:15:22Z",          "createdAt": "2019-08-24T14:15:22Z"        }      ]    }  ],  "returns": [    {      "exchangeOrderId": "string",      "id": "string",      "reason": "string",      "refundPaisa": 0,      "note": "string",      "lines": [        {          "id": "string",          "orderLineItemId": "string",          "quantity": 0,          "restock": true        }      ],      "atRegister": {        "locationId": "string",        "registerId": "string",        "receiptNumber": "string",        "refunds": [          {            "kind": "cash",            "name": "string",            "amountPaisa": 0,            "reference": "string"          }        ],        "fiscal": {          "status": "pending",          "usin": "string",          "posId": "string",          "environment": "sandbox",          "fbrInvoiceNumber": "string"        }      },      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "cashRefunds": [    {      "id": "string",      "amountPaisa": 0,      "reason": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "events": [    {      "id": "string",      "type": "placed",      "fromStatus": "pending",      "toStatus": "pending",      "actorType": "customer",      "actorId": "string",      "note": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ],  "payments": [    {      "id": "string",      "provider": "cod",      "providerLabel": "string",      "mode": "test",      "providerRef": "string",      "status": "created",      "amountPaisa": 0,      "capturedPaisa": 0,      "refundedPaisa": 0,      "currency": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "failureMessage": "string",      "cardBrand": "string",      "cardLast4": "string",      "refundRequired": true,      "refunds": [        {          "id": "string",          "amountPaisa": 0,          "reason": "string",          "status": "pending",          "failureMessage": "string",          "createdAt": "2019-08-24T14:15:22Z"        }      ],      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "cancelReasonCode": "buyer_cancelled",  "exchangeOfOrderId": "string",  "confirmation": {    "hold": {      "reason": "advance_payment",      "note": "string",      "heldAt": "2019-08-24T14:15:22Z"    },    "contacts": [      {        "id": "string",        "channel": "call",        "outcome": "confirmed",        "note": "string",        "followUpAt": "2019-08-24T14:15:22Z",        "actorType": "customer",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "attempts": 0,    "unanswered": 0,    "lastOutcome": "confirmed",    "lastContactAt": "2019-08-24T14:15:22Z",    "followUpAt": "2019-08-24T14:15:22Z",    "risk": {      "tier": "low",      "reasons": [        {          "code": "past_rto",          "count": 0,          "rate": 0        }      ],      "network": {        "level": "caution",        "reason": "flagged_by_devhelp"      },      "deliveredHere": true,      "suggestedAdvancePaisa": 0    },    "report": {      "id": "string",      "reason": "fake_order",      "note": "string",      "reportedAt": "2019-08-24T14:15:22Z"    }  },  "inStore": {    "locationId": "string",    "locationName": "string",    "registerId": "string",    "registerName": "string",    "receiptNumber": "string",    "cashRoundingPaisa": 0,    "payments": [      {        "id": "string",        "kind": "cash",        "name": "string",        "amountPaisa": 0,        "tenderedPaisa": 0,        "changePaisa": 0,        "reference": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ],    "fiscal": {      "status": "pending",      "usin": "string",      "posId": "string",      "environment": "sandbox",      "fbrInvoiceNumber": "string"    }  }}
GET
/admin/v1/claims

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
status?string
Value in"open""paid""refused"
q?string
courierName?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/claims'
Example Response
{  "items": [    {      "id": "string",      "kind": "lost",      "claimedPaisa": 0,      "claimBy": "2019-08-24T14:15:22Z",      "status": "open",      "paidPaisa": 0,      "note": "string",      "resolvedAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "writtenOffPaisa": 0,      "fulfillmentId": "string",      "courierName": "string",      "trackingNumber": "string",      "order": {        "id": "string",        "orderNumber": 0      },      "carriedTo": {        "id": "string",        "status": "open"      },      "carriedFrom": {        "id": "string"      }    }  ],  "nextCursor": "string"}
PATCH
/admin/v1/claims/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
rest?string
Value in"claim""write_off"
status*string
Value in"open""paid""refused"
paidPaisa?number
note?string

Response Body

OK

application/json
  1. response
id*string
kind*string
Value in"lost""damaged""other"
claimedPaisa*number
claimBy*|null
status*string
Value in"open""paid""refused"
paidPaisa*number|null
note*string|null
resolvedAt*|null
createdAt*string
Formatdate-time
writtenOffPaisa?number
fulfillmentId*string
courierName*string|null
trackingNumber*string|null
order*
carriedTo*|null
carriedFrom*|null
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/claims/string' \  -H 'Content-Type: application/json' \  -d '{  "status": "open"}'
Example Response
{  "id": "string",  "kind": "lost",  "claimedPaisa": 0,  "claimBy": "2019-08-24T14:15:22Z",  "status": "open",  "paidPaisa": 0,  "note": "string",  "resolvedAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "writtenOffPaisa": 0,  "fulfillmentId": "string",  "courierName": "string",  "trackingNumber": "string",  "order": {    "id": "string",    "orderNumber": 0  },  "carriedTo": {    "id": "string",    "status": "open"  },  "carriedFrom": {    "id": "string"  }}
GET
/admin/v1/handovers

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
q?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/handovers'
Example Response
{  "items": [    {      "id": "string",      "number": 0,      "courierName": "string",      "deliveryServiceId": "string",      "note": "string",      "handedOverAt": "2019-08-24T14:15:22Z",      "actorType": "customer",      "parcelCount": 0,      "pieces": 0,      "codTotalPaisa": 0    }  ],  "nextCursor": "string"}
POST
/admin/v1/handovers

Dispatches each parcel through the same path as a single dispatch, with the chosen delivery service or courier name and an optional tracking number per parcel, and records them as one numbered handover for the load sheet. A parcel already dispatched on its own, with the same courier and on no handover, is recorded on this one instead (its tracking number filled in if it had none). A parcel that cannot be dispatched (not packed, its order on hold) is left out and listed in failed; if none can be, nothing is recorded. Requires an Idempotency-Key header.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
deliveryServiceId?string|null
courierName?string
note?string
parcels*array<>

Response Body

OK

application/json
  1. response
handover*
failed*array<>
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/handovers' \  -H 'Content-Type: application/json' \  -d '{  "parcels": [    {      "id": "string"    }  ]}'
Example Response
{  "handover": {    "id": "string",    "number": 0,    "courierName": "string",    "deliveryServiceId": "string",    "note": "string",    "handedOverAt": "2019-08-24T14:15:22Z",    "actorType": "customer",    "parcelCount": 0,    "pieces": 0,    "codTotalPaisa": 0,    "parcels": [      {        "id": "string",        "status": "packed",        "courierName": "string",        "deliveryServiceId": "string",        "trackingNumber": "string",        "trackingUrl": "string",        "codAmountPaisa": 0,        "collectedPaisa": 0,        "pieces": 0,        "packedAt": "2019-08-24T14:15:22Z",        "dispatchedAt": "2019-08-24T14:15:22Z",        "deliveredAt": "2019-08-24T14:15:22Z",        "handover": {          "id": "string",          "number": 0        },        "lastAttempt": {          "number": 0,          "reason": "buyer_unavailable",          "respondBy": "2019-08-24T14:15:22Z",          "answered": true        },        "order": {          "id": "string",          "orderNumber": 0,          "recipientName": "string",          "phone": "string",          "city": "string",          "province": "string",          "onHold": true        }      }    ]  },  "failed": [    {      "id": "string",      "message": "string"    }  ]}
GET
/admin/v1/handovers/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
number*number
courierName*string
deliveryServiceId*string|null
note*string|null
handedOverAt*string
Formatdate-time
actorType*string
Value in"customer""staff""api_key""system"
parcelCount*number
pieces*number
codTotalPaisa*number
parcels*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/handovers/string'
Example Response
{  "id": "string",  "number": 0,  "courierName": "string",  "deliveryServiceId": "string",  "note": "string",  "handedOverAt": "2019-08-24T14:15:22Z",  "actorType": "customer",  "parcelCount": 0,  "pieces": 0,  "codTotalPaisa": 0,  "parcels": [    {      "id": "string",      "status": "packed",      "courierName": "string",      "deliveryServiceId": "string",      "trackingNumber": "string",      "trackingUrl": "string",      "codAmountPaisa": 0,      "collectedPaisa": 0,      "pieces": 0,      "packedAt": "2019-08-24T14:15:22Z",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "handover": {        "id": "string",        "number": 0      },      "lastAttempt": {        "number": 0,        "reason": "buyer_unavailable",        "respondBy": "2019-08-24T14:15:22Z",        "answered": true      },      "order": {        "id": "string",        "orderNumber": 0,        "recipientName": "string",        "phone": "string",        "city": "string",        "province": "string",        "onHold": true      }    }  ]}

List shipping zones

GET
/admin/v1/shipping/zones

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/shipping/zones'
Example Response
{  "items": [    {      "id": "string",      "name": "string",      "locations": [        {          "id": "string",          "matchType": "country",          "mode": "include",          "countryCode": "AD",          "regionCode": "string",          "cityName": "string",          "cityNormalized": "string"        }      ],      "priority": 0,      "chargeTax": true,      "customsNote": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}

Create a shipping zone

POST
/admin/v1/shipping/zones

Defines a delivery zone with country, region, or city include/exclude rules. Overlapping zones are allowed and resolved by specificity (city > region > country) and priority.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
name*string
locations*array<>
priority?number
Default0
chargeTax?boolean
Defaulttrue
customsNote?string|null

Response Body

OK

application/json
  1. response
id*string
name*string
locations*array<>
priority*number
chargeTax*boolean
customsNote*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/shipping/zones' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "locations": [    {      "matchType": "country",      "countryCode": "AD"    }  ]}'
Example Response
{  "id": "string",  "name": "string",  "locations": [    {      "id": "string",      "matchType": "country",      "mode": "include",      "countryCode": "AD",      "regionCode": "string",      "cityName": "string",      "cityNormalized": "string"    }  ],  "priority": 0,  "chargeTax": true,  "customsNote": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a shipping zone

PATCH
/admin/v1/shipping/zones/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
locations?array<>
priority?number
chargeTax?boolean
customsNote?string|null

Response Body

OK

application/json
  1. response
id*string
name*string
locations*array<>
priority*number
chargeTax*boolean
customsNote*string|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/shipping/zones/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "name": "string",  "locations": [    {      "id": "string",      "matchType": "country",      "mode": "include",      "countryCode": "AD",      "regionCode": "string",      "cityName": "string",      "cityNormalized": "string"    }  ],  "priority": 0,  "chargeTax": true,  "customsNote": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a shipping zone

DELETE
/admin/v1/shipping/zones/{id}

Retires the zone and its rates; nothing is removed.

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/shipping/zones/string'
Example Response
{  "id": "string",  "deleted": true}

List shipping rates

GET
/admin/v1/shipping/rates

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string
zoneId?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/admin/v1/shipping/rates'
Example Response
{  "items": [    {      "id": "string",      "zoneId": "string",      "name": "string",      "pricePaisa": 0,      "freeOverPaisa": 0,      "minDays": 0,      "maxDays": 0,      "minWeightGrams": 0,      "maxWeightGrams": 0,      "position": 0,      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z"    }  ],  "nextCursor": "string"}

Create a shipping rate

POST
/admin/v1/shipping/rates

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
name*string
pricePaisa*number
freeOverPaisa?number|null
minDays?number|null
maxDays?number|null
minWeightGrams?number|null
maxWeightGrams?number|null
position?number
Default0
zoneId*string

Response Body

OK

application/json
  1. response
id*string
zoneId*string
name*string
pricePaisa*number
freeOverPaisa*number|null
minDays*number|null
maxDays*number|null
minWeightGrams*number|null
maxWeightGrams*number|null
position*number
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/admin/v1/shipping/rates' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "pricePaisa": 0,  "zoneId": "string"}'
Example Response
{  "id": "string",  "zoneId": "string",  "name": "string",  "pricePaisa": 0,  "freeOverPaisa": 0,  "minDays": 0,  "maxDays": 0,  "minWeightGrams": 0,  "maxWeightGrams": 0,  "position": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Update a shipping rate

PATCH
/admin/v1/shipping/rates/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Request Body

application/json
  1. body
name?string
pricePaisa?number
freeOverPaisa?number|null
minDays?number|null
maxDays?number|null
minWeightGrams?number|null
maxWeightGrams?number|null
position?number

Response Body

OK

application/json
  1. response
id*string
zoneId*string
name*string
pricePaisa*number
freeOverPaisa*number|null
minDays*number|null
maxDays*number|null
minWeightGrams*number|null
maxWeightGrams*number|null
position*number
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/admin/v1/shipping/rates/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "zoneId": "string",  "name": "string",  "pricePaisa": 0,  "freeOverPaisa": 0,  "minDays": 0,  "maxDays": 0,  "minWeightGrams": 0,  "maxWeightGrams": 0,  "position": 0,  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}

Delete a shipping rate

DELETE
/admin/v1/shipping/rates/{id}

Authorization

secretKey
headerx-api-key<token>

Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
id*string
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/admin/v1/shipping/rates/string'
Example Response
{  "id": "string",  "deleted": true}

On this page