Skip to Content
devhelp shopDocs

Storefront — Customer Portal

Passwordless customer OTP authentication, sessions, profile, saved addresses, communication preferences, and self-serve order editing.

POST
/storefront/v1/account/auth/otp/request

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
channel?string
Default"email"
Value in"email""whatsapp""sms"
identifier*string

Response Body

OK

application/json
  1. response
sent*unknown
channel*string
Value in"email""whatsapp""sms"
maskedIdentifier*string
expiresInSeconds*number
cooldownSeconds*number
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/auth/otp/request' \  -H 'Content-Type: application/json' \  -d '{  "identifier": "string"}'
Example Response
{  "sent": true,  "channel": "email",  "maskedIdentifier": "string",  "expiresInSeconds": 0,  "cooldownSeconds": 0}
POST
/storefront/v1/account/auth/otp/verify

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
channel?string
Default"email"
Value in"email""whatsapp""sms"
identifier*string
code*string

Response Body

OK

application/json
  1. response
token*string
expiresAt*string
Formatdate-time
customer*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/auth/otp/verify' \  -H 'Content-Type: application/json' \  -d '{  "identifier": "string",  "code": "string"}'
Example Response
{  "token": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "customer": {    "id": "string",    "email": "string",    "phone": "string",    "firstName": "string",    "lastName": "string",    "reviewRequestsOptedOut": true,    "createdAt": "2019-08-24T14:15:22Z"  }}
GET
/storefront/v1/account/session

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
customer*
sessionId*string
expiresAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/session'
Example Response
{  "customer": {    "id": "string",    "email": "string",    "phone": "string",    "firstName": "string",    "lastName": "string",    "reviewRequestsOptedOut": true,    "createdAt": "2019-08-24T14:15:22Z"  },  "sessionId": "string",  "expiresAt": "2019-08-24T14:15:22Z"}
POST
/storefront/v1/account/auth/logout

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
signedOut*unknown
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/auth/logout'
Example Response
{  "signedOut": true}
POST
/storefront/v1/account/auth/logout-all

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
keepCurrent?boolean
Defaultfalse

Response Body

OK

application/json
  1. response
revoked*number
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/auth/logout-all' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "revoked": 0}
GET
/storefront/v1/account/sessions

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/sessions'
Example Response
{  "items": [    {      "id": "string",      "channel": "email",      "identifier": "string",      "userAgent": "string",      "lastSeenAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "current": true    }  ]}
DELETE
/storefront/v1/account/sessions/{id}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
revoked*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/storefront/v1/account/sessions/string'
Example Response
{  "revoked": true}
GET
/storefront/v1/account/profile

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
id*string
email*string|null
phone*string|null
firstName*string|null
lastName*string|null
reviewRequestsOptedOut*boolean
createdAt*string
Formatdate-time
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/profile'
Example Response
{  "id": "string",  "email": "string",  "phone": "string",  "firstName": "string",  "lastName": "string",  "reviewRequestsOptedOut": true,  "createdAt": "2019-08-24T14:15:22Z"}
PATCH
/storefront/v1/account/profile

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
firstName?string|null
lastName?string|null

Response Body

OK

application/json
  1. response
id*string
email*string|null
phone*string|null
firstName*string|null
lastName*string|null
reviewRequestsOptedOut*boolean
createdAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/storefront/v1/account/profile' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "email": "string",  "phone": "string",  "firstName": "string",  "lastName": "string",  "reviewRequestsOptedOut": true,  "createdAt": "2019-08-24T14:15:22Z"}
POST
/storefront/v1/account/profile/contact/request-otp

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
channel?string
Default"email"
Value in"email""whatsapp""sms"
identifier*string

Response Body

OK

application/json
  1. response
sent*unknown
channel*string
Value in"email""whatsapp""sms"
maskedIdentifier*string
expiresInSeconds*number
cooldownSeconds*number
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/profile/contact/request-otp' \  -H 'Content-Type: application/json' \  -d '{  "identifier": "string"}'
Example Response
{  "sent": true,  "channel": "email",  "maskedIdentifier": "string",  "expiresInSeconds": 0,  "cooldownSeconds": 0}
POST
/storefront/v1/account/profile/contact/verify-otp

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
channel?string
Default"email"
Value in"email""whatsapp""sms"
identifier*string
code*string

Response Body

OK

application/json
  1. response
id*string
email*string|null
phone*string|null
firstName*string|null
lastName*string|null
reviewRequestsOptedOut*boolean
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/profile/contact/verify-otp' \  -H 'Content-Type: application/json' \  -d '{  "identifier": "string",  "code": "string"}'
Example Response
{  "id": "string",  "email": "string",  "phone": "string",  "firstName": "string",  "lastName": "string",  "reviewRequestsOptedOut": true,  "createdAt": "2019-08-24T14:15:22Z"}
GET
/storefront/v1/account/addresses

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/addresses'
Example Response
{  "items": [    {      "id": "string",      "line1": "string",      "line2": "string",      "city": "string",      "province": "string",      "postalCode": "string",      "landmark": "string",      "country": "AD",      "recipientName": "string",      "recipientPhone": "string",      "isDefault": true,      "createdAt": "2019-08-24T14:15:22Z"    }  ]}
POST
/storefront/v1/account/addresses

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
line1*string
line2?string|null
city*string
province?string
Default""
postalCode?string
Default""
landmark?string|null
country?string
Default"PK"
Value in"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"
recipientName*string
recipientPhone*string
isDefault?boolean
Defaultfalse

Response Body

OK

application/json
  1. response
id*string
line1*string
line2*string|null
city*string
province*string
postalCode*string
landmark*string|null
country*string
Value in"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"
recipientName*string
recipientPhone*string
isDefault*boolean
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/addresses' \  -H 'Content-Type: application/json' \  -d '{  "line1": "string",  "city": "string",  "recipientName": "string",  "recipientPhone": "string"}'
Example Response
{  "id": "string",  "line1": "string",  "line2": "string",  "city": "string",  "province": "string",  "postalCode": "string",  "landmark": "string",  "country": "AD",  "recipientName": "string",  "recipientPhone": "string",  "isDefault": true,  "createdAt": "2019-08-24T14:15:22Z"}
PATCH
/storefront/v1/account/addresses/{addressId}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

addressId*string

Request Body

application/json
  1. body
line1?string
line2?string|null
city?string
province?string
postalCode?string
landmark?string|null
country?string
Value in"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"
recipientName?string
recipientPhone?string
isDefault?boolean

Response Body

OK

application/json
  1. response
id*string
line1*string
line2*string|null
city*string
province*string
postalCode*string
landmark*string|null
country*string
Value in"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"
recipientName*string
recipientPhone*string
isDefault*boolean
createdAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.devhelp.pk/storefront/v1/account/addresses/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "line1": "string",  "line2": "string",  "city": "string",  "province": "string",  "postalCode": "string",  "landmark": "string",  "country": "AD",  "recipientName": "string",  "recipientPhone": "string",  "isDefault": true,  "createdAt": "2019-08-24T14:15:22Z"}
DELETE
/storefront/v1/account/addresses/{addressId}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

addressId*string

Response Body

OK

application/json
  1. response
deleted*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/storefront/v1/account/addresses/string'
Example Response
{  "deleted": true}
POST
/storefront/v1/account/addresses/{addressId}/default

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

addressId*string

Response Body

OK

application/json
  1. response
id*string
line1*string
line2*string|null
city*string
province*string
postalCode*string
landmark*string|null
country*string
Value in"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"
recipientName*string
recipientPhone*string
isDefault*boolean
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/addresses/string/default'
Example Response
{  "id": "string",  "line1": "string",  "line2": "string",  "city": "string",  "province": "string",  "postalCode": "string",  "landmark": "string",  "country": "AD",  "recipientName": "string",  "recipientPhone": "string",  "isDefault": true,  "createdAt": "2019-08-24T14:15:22Z"}
GET
/storefront/v1/account/preferences

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
email*
whatsapp*
sms*
reviewRequests*
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/preferences'
Example Response
{  "email": {    "address": "string",    "marketing": "never"  },  "whatsapp": {    "available": true,    "phone": "string",    "transactional": "none",    "marketing": "never"  },  "sms": {    "available": true,    "phone": "string",    "marketing": "never"  },  "reviewRequests": {    "optedOut": true  }}
PUT
/storefront/v1/account/preferences

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Request Body

application/json
  1. body
emailMarketing?boolean
whatsappTransactional?boolean
whatsappMarketing?boolean
smsMarketing?boolean
reviewRequestsOptOut?boolean

Response Body

OK

application/json
  1. response
email*
whatsapp*
sms*
reviewRequests*
Example Request
curl -X PUT 'https://api.devhelp.pk/storefront/v1/account/preferences' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "email": {    "address": "string",    "marketing": "never"  },  "whatsapp": {    "available": true,    "phone": "string",    "transactional": "none",    "marketing": "never"  },  "sms": {    "available": true,    "phone": "string",    "marketing": "never"  },  "reviewRequests": {    "optedOut": true  }}
GET
/storefront/v1/account/back-in-stock

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/back-in-stock'
Example Response
{  "items": [    {      "id": "string",      "productId": "string",      "productTitle": "string",      "productHandle": "string",      "variantId": "string",      "variantTitle": "string",      "createdAt": "2019-08-24T14:15:22Z"    }  ]}
DELETE
/storefront/v1/account/back-in-stock/{id}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

id*string

Response Body

OK

application/json
  1. response
unsubscribed*unknown
Example Request
curl -X DELETE 'https://api.devhelp.pk/storefront/v1/account/back-in-stock/string'
Example Response
{  "unsubscribed": true}
GET
/storefront/v1/account/orders

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Query Parameters

limit?number
Default24
cursor?string

Response Body

OK

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/orders'
Example Response
{  "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",            "kind": "appointment",            "startsAt": "2019-08-24T14:15:22Z",            "endsAt": "2019-08-24T14:15:22Z",            "staffName": "string",            "status": "held",            "quantity": 0,            "checkCode": "string",            "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",      "shipments": [        {          "id": "string",          "trackingUrl": "string",          "status": "packed",          "courierName": "string",          "trackingNumber": "string",          "dispatchedAt": "2019-08-24T14:15:22Z",          "deliveredAt": "2019-08-24T14:15:22Z",          "lines": [            {              "orderLineItemId": "string",              "quantity": 0            }          ]        }      ],      "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"      }    }  ],  "nextCursor": "string"}
GET
/storefront/v1/account/orders/{orderId}

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/orders/string'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/bookings/{bookingId}/cancel

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
bookingId*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/bookings/string/cancel'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/bookings/{bookingId}/reschedule

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
bookingId*string

Request Body

application/json
  1. body
startsAt*string
Formatdate-time

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/bookings/string/reschedule' \  -H 'Content-Type: application/json' \  -d '{  "startsAt": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/confirm

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/confirm'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
PATCH
/storefront/v1/account/orders/{orderId}/delivery

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
phone*string
recipientName*string
recipientPhone*string
line1*string
line2?string|null
city*string
province?string
Default""
postalCode?string
Default""
country?string
Default"PK"
Value in"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|null

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X PATCH 'https://api.devhelp.pk/storefront/v1/account/orders/string/delivery' \  -H 'Content-Type: application/json' \  -d '{  "phone": "string",  "recipientName": "string",  "recipientPhone": "string",  "line1": "string",  "city": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
PATCH
/storefront/v1/account/orders/{orderId}/note

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
note*string|null

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X PATCH 'https://api.devhelp.pk/storefront/v1/account/orders/string/note' \  -H 'Content-Type: application/json' \  -d '{  "note": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/cancel

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
reason?string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/cancel' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/reorder

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Response Body

OK

application/json
  1. response
cartId*string
token*string
addedCount*number
unavailable*array<string>
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/reorder'
Example Response
{  "cartId": "string",  "token": "string",  "addedCount": 0,  "unavailable": [    "string"  ]}
GET
/storefront/v1/account/orders/{orderId}/lines/{lineId}/swap-options

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
lineId*string

Response Body

OK

application/json
  1. response
items*array<>
Example Request
curl -X GET 'https://api.devhelp.pk/storefront/v1/account/orders/string/lines/string/swap-options'
Example Response
{  "items": [    {      "variantId": "string",      "title": "string",      "sku": "string",      "pricePaisa": 0,      "available": true    }  ]}
POST
/storefront/v1/account/orders/{orderId}/lines/{lineId}/swap-variant

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string
lineId*string

Request Body

application/json
  1. body
newVariantId*string

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/lines/string/swap-variant' \  -H 'Content-Type: application/json' \  -d '{  "newVariantId": "string"}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}
POST
/storefront/v1/account/orders/{orderId}/edit-items

Authorization

publishableKey
headerx-api-key<token>

Storefront publishable API key (dh_pk_live_…). Safe for browser requests from allowed origins. Also accepted as Authorization: Bearer.

Path Parameters

orderId*string

Request Body

application/json
  1. body
lines*array<>

Response Body

OK

application/json
  1. response
id*string
orderNumber*number
invoiceNumber*number|null
status*string
Value in"pending""confirmed""cancelled"
paymentMethod*string
Value in"cod""test""safepay""stripe""alfalah""in_person""venue"
paymentStatus*string
Value in"pending""collected""cancelled""partially_collected""partially_refunded""refunded"
fulfillmentStatus*string
Value in"unfulfilled""partially_fulfilled""fulfilled"
source*string
Value in"storefront""admin""pos"
fulfilmentMethod*string
Value in"ship""in_person"
email*string|null
phone*string
shippingAddress*|null
billingAddress*|null
shippingRateName*string|null
shippingMinDays*number|null
shippingMaxDays*number|null
lines*array<>
discounts*array<>
sales*array<>
totals*
note*string|null
shipments*array<>
confirmedAt*|null
cancelledAt*|null
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
payment*
bookingPolicy*|null
allowedActions*
Example Request
curl -X POST 'https://api.devhelp.pk/storefront/v1/account/orders/string/edit-items' \  -H 'Content-Type: application/json' \  -d '{  "lines": [    {      "variantId": "string",      "quantity": 0    }  ]}'
Example Response
{  "id": "string",  "orderNumber": 0,  "invoiceNumber": 0,  "status": "pending",  "paymentMethod": "cod",  "paymentStatus": "pending",  "fulfillmentStatus": "unfulfilled",  "source": "storefront",  "fulfilmentMethod": "ship",  "email": "string",  "phone": "string",  "shippingAddress": {    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "landmark": "string",    "country": "AD",    "recipientName": "string",    "recipientPhone": "string"  },  "billingAddress": {    "name": "string",    "line1": "string",    "line2": "string",    "city": "string",    "province": "string",    "postalCode": "string",    "country": "AD"  },  "shippingRateName": "string",  "shippingMinDays": 0,  "shippingMaxDays": 0,  "lines": [    {      "id": "string",      "variantId": "string",      "productHandle": "string",      "thumbnail": {        "url": "string",        "alt": "string"      },      "productTitle": "string",      "variantTitle": "string",      "sku": "string",      "unitPricePaisa": 0,      "quantity": 0,      "linePaisa": 0,      "discountPaisa": 0,      "sale": {        "discountId": "string",        "title": "string",        "originalUnitPricePaisa": 0      },      "booking": {        "id": "string",        "kind": "appointment",        "startsAt": "2019-08-24T14:15:22Z",        "endsAt": "2019-08-24T14:15:22Z",        "staffName": "string",        "status": "held",        "quantity": 0,        "checkCode": "string",        "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",  "shipments": [    {      "id": "string",      "trackingUrl": "string",      "status": "packed",      "courierName": "string",      "trackingNumber": "string",      "dispatchedAt": "2019-08-24T14:15:22Z",      "deliveredAt": "2019-08-24T14:15:22Z",      "lines": [        {          "orderLineItemId": "string",          "quantity": 0        }      ]    }  ],  "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"  },  "allowedActions": {    "canConfirmCod": true,    "canEditDelivery": true,    "canChangeCityProvince": true,    "canEditNote": true,    "canCancel": true,    "canSwapVariant": true,    "canEditItems": true,    "canReorder": true,    "deliveryEditUntil": "2019-08-24T14:15:22Z",    "cancelUntil": "2019-08-24T14:15:22Z",    "itemEditUntil": "2019-08-24T14:15:22Z"  }}

On this page

Send a 6-digit sign-in verification code to a customerVerify a 6-digit code and issue a store-scoped customer sessionGet the currently signed-in customer sessionSign out the current customer sessionSign out every device for this customer on this storeList active sessions for the signed-in customerRevoke one active customer sessionGet the signed-in customer's profileUpdate the signed-in customer's nameSend an OTP code to verify a new email addressConfirm a contact-change OTP code and update the customer recordList the signed-in customer's saved delivery addressesAdd a saved delivery addressUpdate a saved delivery addressRemove a saved delivery addressSet one saved address as the default delivery addressGet unified email, WhatsApp, SMS and review preferencesUpdate communication and review request preferencesList active back-in-stock alerts for the signed-in customerCancel a back-in-stock alertList orders placed by the signed-in customerGet one customer order with computed self-serve allowedActionsCancel a booking on one of the customer's ordersReschedule a booking on one of the customer's ordersSelf-confirm a pending cash-on-delivery orderEdit delivery details on an eligible unshipped orderEdit the delivery note on an unshipped orderCancel an eligible unshipped order without incrementing buyer riskCreate a new cart prefilled with available items from a past orderList same-price active variants available for swapping an order lineSwap an unshipped line item to a same-price variant of the same productEdit line items and quantities on an unconfirmed COD order