GraphQL API Reference
Query exactly the data you need with our GraphQL API. Reduce over-fetching, combine multiple resources in a single request, and build faster with strongly-typed schemas.
https://api.transparentmedz.com/graphqlAuthentication
Bearer token in Authorization header
Content-Type
application/json
Rate Limit
Based on query complexity
Max Depth
10 levels
Schema Explorer
Core types available in the TransparentMedz GraphQL schema.
type Drug {
id: ID!
name: String!
din: String!
genericName: String
manufacturer: String!
dosageForm: String!
strength: String!
atcCode: String
schedule: DrugSchedule!
prices(city: String, province: String, limit: Int): [Price!]!
generics: [Drug!]!
coverage(province: Province): [Coverage!]!
history(period: Period, granularity: Granularity): PriceHistory!
}type Price {
id: ID!
drug: Drug!
pharmacy: Pharmacy!
amount: Float!
currency: Currency!
dispensingFee: Float!
totalCost: Float!
lastUpdated: DateTime!
source: PriceSource!
}type Pharmacy {
id: ID!
name: String!
chain: String
address: Address!
phone: String
hours: [OperatingHours!]!
services: [String!]!
latitude: Float!
longitude: Float!
prices(drugId: ID, limit: Int): [Price!]!
rating: Float
}type Coverage {
province: Province!
formularyStatus: FormularyStatus!
criteria: String
maxCoverage: Float
deductible: Float
copayPercent: Float
}Full Schema Available in Playground
The GraphQL Playground includes built-in schema documentation with full introspection support. Explore all types, enums, inputs, and their descriptions interactively.
Query Examples
Copy and paste these examples into the GraphQL Playground to try them out.
Query
query SearchDrugs($query: String!, $limit: Int, $offset: Int) {
drugs(query: $query, limit: $limit, offset: $offset) {
totalCount
edges {
node {
id
name
din
genericName
manufacturer
dosageForm
strength
schedule
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Variables:
# {
# "query": "metformin",
# "limit": 10,
# "offset": 0
# }Response
{
"data": {
"drugs": {
"totalCount": 24,
"edges": [
{
"node": {
"id": "drug_12345",
"name": "Metformin 500mg",
"din": "02248573",
"genericName": "metformin hydrochloride",
"manufacturer": "Apotex Inc.",
"dosageForm": "Tablet",
"strength": "500mg",
"schedule": "PRESCRIPTION"
},
"cursor": "Y3Vyc29yXzE="
}
],
"pageInfo": {
"hasNextPage": true,
"endCursor": "Y3Vyc29yXzEw"
}
}
}
}Query
query DrugPricesWithPharmacy($drugId: ID!, $city: String, $limit: Int) {
drug(id: $drugId) {
id
name
din
strength
prices(city: $city, limit: $limit) {
amount
dispensingFee
totalCost
lastUpdated
pharmacy {
id
name
chain
address {
street
city
province
postalCode
}
phone
hours {
day
open
close
}
services
latitude
longitude
rating
}
}
generics {
id
name
din
manufacturer
prices(city: $city, limit: 1) {
totalCost
pharmacy {
name
}
}
}
}
}
# Variables:
# {
# "drugId": "drug_12345",
# "city": "toronto",
# "limit": 5
# }Response
{
"data": {
"drug": {
"id": "drug_12345",
"name": "Metformin 500mg",
"din": "02248573",
"strength": "500mg",
"prices": [
{
"amount": 8.99,
"dispensingFee": 4.11,
"totalCost": 13.10,
"lastUpdated": "2026-04-05T10:00:00Z",
"pharmacy": {
"id": "pharm_001",
"name": "Costco Pharmacy - Etobicoke",
"chain": "Costco",
"address": {
"street": "50 Queen Elizabeth Blvd",
"city": "Toronto",
"province": "ON",
"postalCode": "M8Z 1M1"
},
"phone": "416-555-0101",
"hours": [
{ "day": "Monday", "open": "10:00", "close": "20:00" }
],
"services": ["flu_vaccination", "delivery"],
"latitude": 43.6232,
"longitude": -79.5141,
"rating": 4.6
}
}
],
"generics": [
{
"id": "drug_22345",
"name": "APO-Metformin 500mg",
"din": "02257734",
"manufacturer": "Apotex Inc.",
"prices": [
{
"totalCost": 11.49,
"pharmacy": { "name": "Shoppers Drug Mart #1234" }
}
]
}
]
}
}
}Query
query ComparePharmacies(
$drugIds: [ID!]!
$pharmacyIds: [ID!]
$province: Province
) {
comparePrices(
drugIds: $drugIds
pharmacyIds: $pharmacyIds
province: $province
) {
drugs {
drug {
id
name
din
}
pharmacyPrices {
pharmacy {
id
name
chain
}
amount
dispensingFee
totalCost
}
lowestPrice
highestPrice
averagePrice
savingsFromAverage
}
summary {
totalLowest
totalHighest
bestPharmacy {
id
name
}
totalSavings
}
}
}
# Variables:
# {
# "drugIds": ["drug_12345", "drug_54321", "drug_11111"],
# "province": "ON"
# }Response
{
"data": {
"comparePrices": {
"drugs": [
{
"drug": {
"id": "drug_12345",
"name": "Metformin 500mg",
"din": "02248573"
},
"pharmacyPrices": [
{
"pharmacy": {
"id": "pharm_001",
"name": "Costco Pharmacy",
"chain": "Costco"
},
"amount": 8.99,
"dispensingFee": 4.11,
"totalCost": 13.10
},
{
"pharmacy": {
"id": "pharm_002",
"name": "Shoppers Drug Mart",
"chain": "Shoppers"
},
"amount": 12.49,
"dispensingFee": 11.99,
"totalCost": 24.48
}
],
"lowestPrice": 13.10,
"highestPrice": 24.48,
"averagePrice": 18.79,
"savingsFromAverage": 5.69
}
],
"summary": {
"totalLowest": 42.30,
"totalHighest": 78.94,
"bestPharmacy": {
"id": "pharm_001",
"name": "Costco Pharmacy"
},
"totalSavings": 36.64
}
}
}
}Mutation
mutation CreatePriceAlert($input: PriceAlertInput!) {
createPriceAlert(input: $input) {
id
drug {
id
name
}
targetPrice
currentLowestPrice
status
createdAt
}
}
# Variables:
# {
# "input": {
# "drugId": "drug_12345",
# "targetPrice": 10.00,
# "province": "ON",
# "notificationMethod": "WEBHOOK"
# }
# }Response
{
"data": {
"createPriceAlert": {
"id": "alert_abc123",
"drug": {
"id": "drug_12345",
"name": "Metformin 500mg"
},
"targetPrice": 10.00,
"currentLowestPrice": 13.10,
"status": "ACTIVE",
"createdAt": "2026-04-05T14:30:00Z"
}
}
}GraphQL Features
Try It in the Playground
Our interactive GraphQL Playground includes schema documentation, auto-complete, and query history. No setup required.