Pharmacy
The endpoints here allows a Merchant to query the pharmacy within our network.
Search is done based on parameters like State, LGA and specific location. Response from this API endpoint is paginated showing 15 pharmacies per page.
get
https://sandbox.insurpass.com
/api/merchant/search_pharmacies?pharmacy_name=Jahban Pharmacy
SEARCH BY PHARMACY NAME
get
https://sandbox.insurpass.com
/api/merchant/search_pharmacies?pharmacy_code=WHP10819
SEARCH PHARMACY BY CODE
get
https://sandbox.insurpass.com
/api/merchant/search_pharmacies?state_of_premise=F.C.T
SEARCH PHARMACY BY STATE OF PREMISE
get
https://sandbox.insurpass.com
/api/merchant/search_pharmacies?lga=Abuja Municipal
SEARCH BY PHARMACY LGA
get
https://sandbox.insurpass.com
/api/merchant/search_pharmacies?pharmacy_address=Garki 2, Abuja
SEARCH BY PHARMACY ADDRESS
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/search?pharmacy_name=Jahban Pharmacy',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
echo $response;
1
var axios = require('axios');
2
3
var config = {
4
method: 'get',
5
url: 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/search?pharmacy_name=Jahban Pharmacy',
6
headers: {
7
'Authorization': 'Bearer {{SECRETKEY}}'
8
}
9
};
10
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/search_pharmacies?pharmacy_address=Garki 2, Abuja' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
get
https://sandbox.insurpass.com
/api/merchant/micro_health/pharmacy/all
This endpoint returns a list of all the Pharmacies on Insurpass
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/all',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
echo $response;
1
var axios = require('axios');
2
3
var config = {
4
method: 'get',
5
url: 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/all',
6
headers: {
7
'Authorization': 'Bearer {{SECRETKEY}}'
8
}
9
};
10
11
axios(config)
12
.then(function (response) {
13
console.log(JSON.stringify(response.data));
14
})
15
.catch(function (error) {
16
console.log(error);
17
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/all' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
get
https://sandbox.insurpass.com
/api/merchant/micro_health/pharmacy/:pharmacy_id
This endpoint returns an object containing a single pharmacy
PHP
NODE JS
CURL
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/{pharmacy_id}',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'Authorization: Bearer {{SECRETKEY}}'
16
),
17
));
18
19
$response = curl_exec($curl);
20
21
curl_close($curl);
22
echo $response;
var axios = require('axios');
var config = {
method: 'get',
url: 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/{pharmacy_id}',
headers: {
'Authorization': 'Bearer {{SECRETKEY}}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
curl --location --request GET https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/:pharmacy_id' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--data-raw ''
post
https://sandbox.insurpass.com
/api/merchant/micro_health/pharmacy/request_pharmacy
This endpoint allows a customer to request the details of a pharmacy they want to visit sent to their email or SMS.
NODE JS
PHP
CURL
1
var axios = require('axios');
2
var data = JSON.stringify({
3
"pharmacy_id": 55,
4
"policy_no": "IN98570819"
5
});
6
7
var config = {
8
method: 'post',
9
url: 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/request_pharmacy',
10
headers: {
11
'Authorization': 'Bearer {{SECRETKEY}}',
12
'Content-Type': 'application/json'
13
},
14
data: data
15
};
16
17
axios(config)
18
.then(function (response) {
19
console.log(JSON.stringify(response.data));
20
})
21
.catch(function (error) {
22
console.log(error);
23
});
1
<?php
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/request_pharmacy',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'POST',
14
CURLOPT_POSTFIELDS =>'{
15
"pharmacy_id": 55,
16
"policy_no":"IN98570819"
17
}',
18
CURLOPT_HTTPHEADER => array(
19
'Authorization: Bearer {{SECRETKEY}}',
20
'Content-Type: application/json'
21
),
22
));
23
24
$response = curl_exec($curl);
25
26
curl_close($curl);
27
echo $response;
curl --location --request POST https://sandbox.insurpass.com/api/merchant/micro_health/pharmacy/request_pharmacy' \
--header 'Authorization: Bearer {{SECRETKEY}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"pharmacy_id": 55,
"policy_no":"IN98570819"
}''
Last modified 11mo ago