Admin — Orders
Manage orders, COD confirmation, notes, holds, exchanges, refunds, and saved views.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
items*array<>curl -X GET 'https://api.devhelp.pk/admin/v1/order-views'{ "items": [ { "id": "string", "key": "all", "name": "string", "hidden": true, "filters": { "status": "pending", "paymentStatus": "pending", "attention": "to-confirm", "sort": "newest", "discountCode": "string", "fulfillmentStatus": "unfulfilled", "placed": "today", "lastOutcome": "confirmed", "parcelStatus": "packed", "riskTier": "low", "courierName": "string", "city": "string", "cancelReasonCode": "buyer_cancelled" } } ]}The whole list, in order. Every default view must be present (hide it instead); a view the store made that is left out is removed.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
views*array<>OK
application/json- response
items*array<>curl -X PUT 'https://api.devhelp.pk/admin/v1/order-views' \ -H 'Content-Type: application/json' \ -d '{ "views": [ { "name": "string", "filters": {} } ]}'{ "items": [ { "id": "string", "key": "all", "name": "string", "hidden": true, "filters": { "status": "pending", "paymentStatus": "pending", "attention": "to-confirm", "sort": "newest", "discountCode": "string", "fulfillmentStatus": "unfulfilled", "placed": "today", "lastOutcome": "confirmed", "parcelStatus": "packed", "riskTier": "low", "courierName": "string", "city": "string", "cancelReasonCode": "buyer_cancelled" } } ]}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
limit?number24cursor?stringstatus?string"pending""confirmed""cancelled"paymentStatus?string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"attention?string"to-confirm""on-hold""to-pack""with-courier""needs-attention""delivered""returned"sort?string"newest""oldest"discountCode?stringfulfillmentStatus?string"unfulfilled""partially_fulfilled""fulfilled"placed?string"today""7d""30d"lastOutcome?string"confirmed""no_answer""call_later""wrong_number""wants_changes""prepay_only""cancelled"parcelStatus?string"packed""dispatched""delivered""returning""returned""cancelled""lost"riskTier?string"low""check""high"courierName?stringcity?stringcancelReasonCode?string"buyer_cancelled""unreachable""fake_order""out_of_stock""pricing_error""other"q?stringcustomerId?stringplacedFrom?stringplacedTo?stringOK
application/json- response
items*array<>nextCursor*string|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/orders'{ "items": [ { "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" } } } ], "nextCursor": "string"}For orders taken by phone or WhatsApp. Goes through the same placement as storefront checkout: the customer is resolved, stock is reserved, and the order starts pending. Requires an Idempotency-Key header: a retry with the same key and body returns the original order instead of placing a second one.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
lines*array<>customer*shippingAddress?|nullbillingAddress?|nullshippingRateId?string|nullnote?stringdiscountCodes?array<string>manualDiscount?requestAdvance?booleanOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders' \ -H 'Content-Type: application/json' \ -d '{ "lines": [ { "variantId": "string", "quantity": 0 } ], "customer": { "phone": "string" }}'{ "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" } }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
application/json- body
lines*array<>customer?country?string"PK""AD""AE""AF""AG""AI""AL""AM""AO""AQ""AR""AS""AT""AU""AW""AX""AZ""BA""BB""BD""BE""BF""BG""BH""BI""BJ""BL""BM""BN""BO""BQ""BR""BS""BT""BV""BW""BY""BZ""CA""CC""CD""CF""CG""CH""CI""CK""CL""CM""CN""CO""CR""CU""CV""CW""CX""CY""CZ""DE""DJ""DK""DM""DO""DZ""EC""EE""EG""EH""ER""ES""ET""FI""FJ""FK""FM""FO""FR""GA""GB""GD""GE""GF""GG""GH""GI""GL""GM""GN""GP""GQ""GR""GS""GT""GU""GW""GY""HK""HM""HN""HR""HT""HU""ID""IE""IL""IM""IN""IO""IQ""IR""IS""IT""JE""JM""JO""JP""KE""KG""KH""KI""KM""KN""KP""KR""KW""KY""KZ""LA""LB""LC""LI""LK""LR""LS""LT""LU""LV""LY""MA""MC""MD""ME""MF""MG""MH""MK""ML""MM""MN""MO""MP""MQ""MR""MS""MT""MU""MV""MW""MX""MY""MZ""NA""NC""NE""NF""NG""NI""NL""NO""NP""NR""NU""NZ""OM""PA""PE""PF""PG""PH""PK""PL""PM""PN""PR""PS""PT""PW""PY""QA""RE""RO""RS""RU""RW""SA""SB""SC""SD""SE""SG""SH""SI""SJ""SK""SL""SM""SN""SO""SR""SS""ST""SV""SX""SY""SZ""TC""TD""TF""TG""TH""TJ""TK""TL""TM""TN""TO""TR""TT""TV""TW""TZ""UA""UG""UM""US""UY""UZ""VA""VC""VE""VG""VI""VN""VU""WF""WS""YE""YT""ZA""ZM""ZW"province?string|nullcity?string|nullshippingRateId?string|nulldiscountCodes?array<string>manualDiscount?OK
application/json- response
lines*array<>discounts*array<>discountCodes*array<>sales*array<>shippingOptions*array<>shippingRateId*string|nulltotals*curl -X POST 'https://api.devhelp.pk/admin/v1/orders/quote' \ -H 'Content-Type: application/json' \ -d '{ "lines": [ { "variantId": "string", "quantity": 0 } ]}'{ "lines": [ { "variantId": "string", "quantity": 0, "unitPricePaisa": 0, "linePaisa": 0, "discountPaisa": 0, "sale": { "discountId": "string", "title": "string", "originalUnitPricePaisa": 0 } } ], "discounts": [ { "discountId": "string", "code": "string", "title": "string", "type": "product", "valueType": "percentage", "value": 0, "amountPaisa": 0 } ], "discountCodes": [ { "code": "string", "applied": true, "reason": "not_found" } ], "sales": [ { "discountId": "string", "title": "string", "amountPaisa": 0 } ], "shippingOptions": [ { "rateId": "string", "name": "string", "pricePaisa": 0, "free": true, "minDays": 0, "maxDays": 0, "customsNote": null } ], "shippingRateId": "string", "totals": { "currency": "PKR", "subtotalPaisa": 0, "shippingPaisa": 0, "discountPaisa": 0, "saleSavingsPaisa": 0, "shippingDiscountPaisa": 0, "codFeePaisa": 0, "taxPaisa": 0, "totalPaisa": 0, "taxRateBps": 0, "pricesIncludeTax": true }}Exact counts for a dashboard, without paging through lists: orders waiting for confirmation, and confirmed orders with units still to send.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
OK
application/json- response
pending*numberonHold*numberawaitingFulfilment*numberwithCourier*numbercurl -X GET 'https://api.devhelp.pk/admin/v1/orders/counts'{ "pending": 0, "onHold": 0, "awaitingFulfilment": 0, "withCourier": 0}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X GET 'https://api.devhelp.pk/admin/v1/orders/string'{ "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" } }}Assigns the next gap-free invoice number. Stock stays reserved until fulfilment.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
note?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/confirm' \ -H 'Content-Type: application/json' \ -d '{}'{ "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" } }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
kind*string"placed""confirm""dispatched""delivered""review"fulfillmentId?stringOK
application/json- response
kind*string"placed""confirm""dispatched""delivered""review"text*stringurl*stringwhatsappUrl*stringsmsUrl*stringexpiresAt*stringdate-timecurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/buyer-message' \ -H 'Content-Type: application/json' \ -d '{ "kind": "placed"}'{ "kind": "placed", "text": "string", "url": "string", "whatsappUrl": "string", "smsUrl": "string", "expiresAt": "2019-08-24T14:15:22Z"}Releases reserved stock. A confirmed order keeps its invoice number, so the invoice sequence has no gaps. An order whose cash was collected cannot be cancelled.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
reason*stringreasonCode?string"buyer_cancelled""unreachable""fake_order""out_of_stock""pricing_error""other"OK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/cancel' \ -H 'Content-Type: application/json' \ -d '{ "reason": "string"}'{ "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" } }}secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
note*stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/notes' \ -H 'Content-Type: application/json' \ -d '{ "note": "string"}'{ "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" } }}Pending orders only. confirmed releases any hold and confirms the order; cancelled cancels it as cancelled by the buyer; prepay_only puts it on hold for an advance payment. Other outcomes are recorded and leave the order waiting, optionally with a time to try again.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
channel*string"call""whatsapp""sms"outcome*string"confirmed""no_answer""call_later""wrong_number""wants_changes""prepay_only""cancelled"note?stringfollowUpAt?stringdate-timeOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/contacts' \ -H 'Content-Type: application/json' \ -d '{ "channel": "call", "outcome": "confirmed"}'{ "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" } }}Pending or confirmed orders. A held order cannot be confirmed, packed or dispatched until it is released; it can still be cancelled. Replaces an existing hold.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
reason*string"advance_payment""waiting_for_buyer""address_check""other"note?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/hold' \ -H 'Content-Type: application/json' \ -d '{ "reason": "advance_payment"}'{ "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" } }}Returns the order to the queue it was in.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
note?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/release' \ -H 'Content-Type: application/json' \ -d '{}'{ "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" } }}Within 90 days of the order, one live report per order. The report counts against the buyer at your store like a refused delivery, and (from the reason only, never the note) toward devhelp Protect's network signal. Sends order.reported.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
reason*string"fake_order""refused_no_reason""scam_or_abuse""return_abuse""wrong_details""other"note?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/report' \ -H 'Content-Type: application/json' \ -d '{ "reason": "fake_order"}'{ "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" } }}Owners and admins. Removes the report from the buyer's record and from the network on the next run. Sends order.report_withdrawn.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/report/withdraw'{ "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" } }}For an order whose devhelp Protect line looks wrong; devhelp reviews it.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
note?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/protect-mistake' \ -H 'Content-Type: application/json' \ -d '{}'{ "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" } }}Before confirmation only. Changes the order alone: its delivery fee and totals stay as placed, and the customer record is untouched. The change is recorded on the order's history with the previous details.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
phone*stringrecipientName*stringrecipientPhone*stringline1*stringline2*string|nullcity*stringprovince?string""postalCode?string""country?string"PK""AD""AE""AF""AG""AI""AL""AM""AO""AQ""AR""AS""AT""AU""AW""AX""AZ""BA""BB""BD""BE""BF""BG""BH""BI""BJ""BL""BM""BN""BO""BQ""BR""BS""BT""BV""BW""BY""BZ""CA""CC""CD""CF""CG""CH""CI""CK""CL""CM""CN""CO""CR""CU""CV""CW""CX""CY""CZ""DE""DJ""DK""DM""DO""DZ""EC""EE""EG""EH""ER""ES""ET""FI""FJ""FK""FM""FO""FR""GA""GB""GD""GE""GF""GG""GH""GI""GL""GM""GN""GP""GQ""GR""GS""GT""GU""GW""GY""HK""HM""HN""HR""HT""HU""ID""IE""IL""IM""IN""IO""IQ""IR""IS""IT""JE""JM""JO""JP""KE""KG""KH""KI""KM""KN""KP""KR""KW""KY""KZ""LA""LB""LC""LI""LK""LR""LS""LT""LU""LV""LY""MA""MC""MD""ME""MF""MG""MH""MK""ML""MM""MN""MO""MP""MQ""MR""MS""MT""MU""MV""MW""MX""MY""MZ""NA""NC""NE""NF""NG""NI""NL""NO""NP""NR""NU""NZ""OM""PA""PE""PF""PG""PH""PK""PL""PM""PN""PR""PS""PT""PW""PY""QA""RE""RO""RS""RU""RW""SA""SB""SC""SD""SE""SG""SH""SI""SJ""SK""SL""SM""SN""SO""SR""SS""ST""SV""SX""SY""SZ""TC""TD""TF""TG""TH""TJ""TK""TL""TM""TN""TO""TR""TT""TV""TW""TZ""UA""UG""UM""US""UY""UZ""VA""VC""VE""VG""VI""VN""VU""WF""WS""YE""YT""ZA""ZM""ZW"landmark*string|nullOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X PATCH 'https://api.devhelp.pk/admin/v1/orders/string/delivery' \ -H 'Content-Type: application/json' \ -d '{ "phone": "string", "recipientName": "string", "recipientPhone": "string", "line1": "string", "line2": "string", "city": "string", "landmark": "string"}'{ "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" } }}Records the returned units on this order (restocked or written off, with an optional refund) and places a linked replacement order through normal placement: stock is reserved and it gets its own number. A credit for the returned units' value is applied, so the buyer pays only the difference (delivery is free; a cash-on-delivery fee still applies). The replacement is confirmed at once. Requires an Idempotency-Key header.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
returned*array<>replacements*array<>reason*stringrefundPaisa?number0OK
application/json- response
original*exchange*curl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/exchanges' \ -H 'Content-Type: application/json' \ -d '{ "returned": [ { "orderLineItemId": "string", "quantity": 0, "restock": true } ], "replacements": [ { "variantId": "string", "quantity": 0 } ], "reason": "string"}'{ "original": { "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" } } }, "exchange": { "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" } } }}Requires an Idempotency-Key header. Refunds the order's captured online payment, fully or partly, through the provider that took it. Cash-on-delivery orders are refunded by recording a return or a cash refund instead. A provider that cannot refund is a conflict.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
attemptId?stringamountPaisa*numberreason*stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/refunds' \ -H 'Content-Type: application/json' \ -d '{ "amountPaisa": 0, "reason": "string"}'{ "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" } }}Cash-on-delivery orders only. The amount may not exceed the cash collected less earlier refunds. Records the refund on the order's history and sends refund.created. Requires an Idempotency-Key header.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
amountPaisa*numberreason*stringnote?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/cash-refunds' \ -H 'Content-Type: application/json' \ -d '{ "amountPaisa": 0, "reason": "string"}'{ "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" } }}Allocates quantities of the order's lines to a new parcel. The order must be confirmed, and no line may be allocated beyond what was ordered. Stock stays reserved until dispatch. Requires an Idempotency-Key header.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
lines*array<>deliveryServiceId?string|nulltrackingUrl?string|nullcourierName?stringtrackingNumber?stringcodAmountPaisa?numbernote?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/fulfillments' \ -H 'Content-Type: application/json' \ -d '{ "lines": [ { "orderLineItemId": "string", "quantity": 0 } ]}'{ "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" } }}No more of a line may be returned than was delivered, and the refund may not exceed the cash collected less earlier refunds. Requires an Idempotency-Key header.
secretKeyx-api-key<token>Admin secret API key (dh_sk_live_…). Keep server-side only; never expose in browser code. Also accepted as Authorization: Bearer.
id*stringapplication/json- body
lines*array<>refundPaisa*numberreason*stringnote?stringOK
application/json- response
id*stringorderNumber*numberinvoiceNumber*number|nullstatus*string"pending""confirmed""cancelled"paymentMethod*string"cod""test""safepay""stripe""alfalah""in_person""venue"paymentStatus*string"pending""collected""cancelled""partially_collected""partially_refunded""refunded"fulfillmentStatus*string"unfulfilled""partially_fulfilled""fulfilled"source*string"storefront""admin""pos"fulfilmentMethod*string"ship""in_person"email*string|nullphone*string|nullshippingAddress*|nullbillingAddress*|nullshippingRateName*string|nullshippingMinDays*number|nullshippingMaxDays*number|nulllines*array<>discounts*array<>sales*array<>totals*note*string|nullconfirmedAt*|nullcancelledAt*|nullcreatedAt*stringdate-timeupdatedAt*stringdate-timepayment*bookingPolicy*|nullcustomerId*string|nullrisk*|nullcollectedPaisa*numberrefundedPaisa*numberfulfillments*array<>returns*array<>cashRefunds*array<>events*array<>payments*array<>cancelReasonCode*|nullexchangeOfOrderId*string|nullconfirmation*inStore*|nullcurl -X POST 'https://api.devhelp.pk/admin/v1/orders/string/returns' \ -H 'Content-Type: application/json' \ -d '{ "lines": [ { "orderLineItemId": "string", "quantity": 0, "restock": true } ], "refundPaisa": 0, "reason": "string"}'{ "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" } }}