GIP¶
POST Upload the GIP price list from the wholesaler to ZAGIS.
Users of ZAGIS can upload the GIP price list from the wholesaler via an API from their own system. This is the API variant of the "GIP toevoegen" function in ZAGIS. A GIP price list contains one price per pack, excluding VAT, for each item (Z-Index number). An upload can replace the existing list or merge into it per item. This is a REST API with a single endpoint and one possible action.
Access
Available to ZAGIS users only.
Endpoint¶
Request body¶
Requests are POST requests with the CSV content directly as the body (so no
multipart file or JSON). The CSV file contains two columns without a header row:
the Z-Index number (8 digits) and the price per pack excluding VAT. Both , and
; are recognised as separators. Example:
Authentication¶
This API uses:
- IP whitelisting for security
- An API key for authentication & rate limiting
- HMAC for integrity checking
The API key, IP whitelisting and HMAC work identically to the ZAGIS Verbruik API.
| Header | Description |
|---|---|
x-zagis-key |
The API key issued to your organisation. |
x-zagis-hmac |
Hex-encoded SHA-512 HMAC of the request body (the raw CSV). |
x-zagis-on-exist |
replace or merge (default replace). With replace, all existing GIP prices for your organisation are removed first and then the supplied list is written. With merge, the price is updated or added per ZI#; ZI# already in ZAGIS but not in the upload are not deleted. |
content-type |
text/csv |
Request¶
curl -X POST https://demo.zagis.nl/api/zagis/gip \
-H "x-zagis-key: <your-api-key>" \
-H "x-zagis-hmac: <hmac>" \
-H "x-zagis-on-exist: replace" \
-H "content-type: text/csv" \
--data-binary @gip.csv
Response¶
| Code | Meaning |
|---|---|
200 |
Correct request. |
Example of a response for a successful & correct request:
{
"result": "success", // 'success' or 'error'
"errorMessage": "", // Error message on failure
"errorCode": 0, // Error code on failure
"numRowsTotal": 4, // Number of rows processed
"numRowsError": 1, // Number of rows with an error, not imported
"numRowsWarning": 1, // Number of rows with a warning, still imported
"warnings": [ // Array of warnings that occurred
{
"line": 2,
"0": [
"Artikel is vervallen."
]
}
],
"errors": [ // Array of errors that occurred
{
"line": 4,
"0": [
"Onbekend Z-Index nummer: 14321976"
]
}
]
}
Example of a response for a request with invalid content:
{
"result": "error",
"errorMessage": "Invalid value for onExist. Allowed [replace, merge]",
"errorCode": 1
}
Notes
The HMAC must be computed over the exact CSV bytes of the request body.
Want to test your integration? Contact us in good time at info@zagis.nl for test data and an API key.