Quotation¶
POST Submit a quotation to ZAGIS.
Users of PharmaPortal can submit quotations to ZAGIS from their own system via an API. This Quotation API is a REST API with a single endpoint and a single available action.
Access
Available to users of PharmaPortal.
Endpoint¶
Authentication¶
This API uses:
- IP whitelisting for security
- An API key for authentication & rate limiting
- HMAC for integrity checking
| Header | Description |
|---|---|
x-zagis-offerte-key |
The API key issued to your organisation. |
x-zagis-offerte-hmac |
Hexadecimal-encoded SHA-512 HMAC of the request body. |
Request¶
Requests are POST requests with a JSON payload.
curl -X POST https://demo.zagis.nl/api/zagis/offerte \
-H "x-zagis-offerte-key: <your-api-key>" \
-H "x-zagis-offerte-hmac: <hmac>" \
-H "Content-Type: application/json" \
-d @offerte.json
Example payload:
{
"offerteCode": "04eba051", # Unique quotation code stated in the quotation request
"readOnly": true, # When true, ZAGIS validates the quotation but does not store it
"bijlage": { # Optional when a PDF attachment is included. Max 5MB
"filename": "Begeleidend Schrijven.pdf", # Optional, defaults to 'bijlage.pdf'
"contents": "JVBERi0xLjMKJcTl8uXrp/Og0MTGCj(...)==" # BASE64 Encoded PDF
},
"antwoorden": [ // If questions are included in the quotation request
{ // General question
"vraagId": "29b7cb44-d116-4878-8ce7-a94a756cd1fd",
"antwoord": "Ja"
},{ // General question
"vraagId": "29b7cb44-d116-4878-8ce7-a94a756dd1fd",
"antwoord": "2025-01-01" // Date type, always YYYY-MM-DD
},{ // Product-specific question, product 1
"vraagId": "29b7cb44-d116-4878-8ce7-a94a756cd1fe",
"zindexNummer": 16070666,
"antwoord": "Optie 1"
},{ // Product-specific question, product 2
"vraagId": "29b7cb44-d116-4878-8ce7-a94a756cd1fe",
"zindexNummer": 16070667,
"antwoord": "Optie 2"
}
],
"artikelen": [
{
"zindexNummer": 16070666,
"opmerking": "Betreft nieuwe verpakking", # Max 255 characters
"referentie": "offerte-groep-2018-0004", # Max 255 characters
"barcodeOpKae": false, # Barcode on smallest dispensing unit, boolean
"vastOfPercentage": "vast", # "vast" or "percentage"
"volume": 1000, # Deviating available annual volume in units (counting-units). Optional, only use for a deviating annual volume
"toeslag": 1.23, # Only if the quotation request indicates a surcharge may be quoted, default 0
"prijzen": [
{
"looptijdMaanden": 12, # The permitted durations are stated in the quotation request
"route": "groothandel", # "groothandel" or "direct"
"prijs": 4200, # if vastOfPercentage = vast, required > 0
"percentage": 0 # if vastOfPercentage = percentage, required > 0
},
{
"looptijdMaanden": 24,
"route": "groothandel",
"prijs": 4100,
"percentage": 0
},
{
"looptijdMaanden": 36,
"route": "groothandel",
"prijs": 4000,
"percentage": 0
}
]
},
{
"zindexNummer": 15825663,
"opmerking": "Relatieve korting tov AIP",
"referentie": "offerte-groep-2018-0008",
"barcodeOpKae": true,
"vastOfPercentage": "percentage",
"prijzen": [
{
"looptijdMaanden": 12,
"route": "groothandel",
"prijs": 0,
"percentage": 5
},
{
"looptijdMaanden": 24,
"route": "groothandel",
"prijs": 0,
"percentage": 10
},
{
"looptijdMaanden": 36,
"route": "groothandel",
"prijs": 0,
"percentage": 15
}
]
},
{
"zindexNummer": 17010102,
"opmerking": "Staffel",
"referentie": "offerte-groep-2018-0009",
"barcodeOpKae": true,
"isStaffel": true, // Only if tiered pricing is permitted by the purchasing pharmacies in this process
"staffelPer": "verpakking", // ['verpakking', 'verpakkingOpStof', 'patienten', 'starters', 'eenheden']
"gemetenPer": "kalenderjaar", // ['kalenderjaar', 'jaar', 'contractperiode', 'kwartaal']
"verrekeningPer": "kalenderjaar", // ['kalenderjaar', 'jaar', 'contractperiode', 'kwartaal']
"vastOfPercentage": "percentage",
"staffels": [
{
"van": 1,
"tot": 10,
"prijzen": [
{
"looptijdMaanden": 36,
"route": "groothandel",
"prijs": 0,
"percentage": 15
}
]
},{
"van": 11,
"tot": 99999999,
"prijzen": [
{
"looptijdMaanden": 36,
"route": "groothandel",
"prijs": 0,
"percentage": 25
}
]
}
]
}
]
}
Response¶
| Code | Meaning |
|---|---|
200 |
Correct request. |
400 |
Missing payload. |
401 |
Invalid authentication or HMAC. |
409 |
Content error in the request (for example an invalid ZI number). |
Example of a response for a successful & correct request without attachment:
{
"result": "success",
"readOnly": true, # Taken from the request's readOnly field
"totalRows": 6, # Total number of article & price combinations
"uniqueProducts": 2, # Total number of unique ZI numbers processed
"bijlage": {
"available": false,
"correct": false,
"filename": "bijlage.pdf"
}
}
Example of a response for a successful & correct request with attachment:
{
"result": "success",
"readOnly": true, # Taken from the request's readOnly field
"totalRows": 6, # Total number of article & price combinations
"uniqueProducts": 2, # Total number of unique ZI numbers processed
"bijlage": {
"available": true,
"correct": true,
"filename": "Begeleidend schrijven.pdf"
}
}
Example of a response for a request with a content error:
Fields¶
| Field | Type | Description |
|---|---|---|
result |
string | success or error. |
readOnly |
boolean | Taken from the readOnly field of the request. |
totalRows |
integer | Total number of article & price combinations. |
uniqueProducts |
integer | Total number of unique ZI numbers processed. |
bijlage |
object | Status of the attachment (available, correct, filename). |
message |
string | Error message when result = error. |
Notes
After a quotation is submitted successfully with the readOnly flag set to
false, the quotation code is invalidated in ZAGIS; you can submit a quotation
only once per quotation code. To test whether your quotation is correct, use
readOnly = true.
Want to test your integration? Contact us in good time at info@zagis.nl. We will then prepare test data for you and provide an API key, API secret & quotation codes.