Skip to content

Pharma Image Download Init API

This resource may be used to retrieve pharma prescription urls, that will be accessible for fewer duration. The resource should be called if at least one item in the order require prescription

Authentication:
As explained in the Authentication section, this API requires the Authentication token as a header.

Coordinates
Staging: seller-network-testing.pincode.com
Production: shopping-network.phonepe.com

Resource: POST /tsp/order/v1/pharma/bulk/download-init

curl --request POST \
--url 'https://seller-network-testing.pincode.com/tsp/order/v1/pharma/bulk/download-init' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: O-Bearer <token>' \ 
--data ' {
   "requestContext": {
      "requestId": "OMS2402220921362644329327",     // This has to be unique for each call
      "transactionId": "OD2401121901140533863584"
   },
   "orderId": "OD2401121901140533863584"
 }
'
import requests

url = 'https://seller-network-testing.pincode.com/tsp/order/v1/pharma/bulk/download-init'
headers = {
    'Accept': 'application/json',
    'Content-Type': 'application/json',
    'Authorization': f'O-Bearer {token}'
}
data = {
    "requestContext": {
        "requestId": "OMS2402220921362644329327",     // This has to be unique for each call
        "transactionId": "OD2401121901140533863584"
    },
    "orderId": "OD2401121901140533863584"
}

response = requests.post(url, headers=headers, json=data)

Response:

{
  "response": {
    "publicUrlList": [
      {
        "url": "https://stg-docstore.phonepe.com/files/temp/RID.lxbqAYl3XgPxUSsgEpqioxX6J6X72FJhsgqdaUwPy6k9w8qivOfGLvWYfhr-kk0gJV8POkgJlXieJzA99W4mNQ",
        "extension": "JPEG"
      },
      {
        "url": "https://stg-docstore.phonepe.com/files/temp/RID.nRu3rtjkNyPcRsdoxTeVF3H3q9ISaSR1Yf84S4K9_e98Kgvj_wzDIup8P345SA75kbdNfl8QTidnPUgNuwGYiQ",
        "extension": "PDF"
      }
    ]
  }
}

Field Explanations

Field Type Description
url String Url of prescription document accesible for fewer duration
extension Enum represent document extension (JPEG/AVIF/PNG/SVG/WEBP/PDF/APNG)