Graphql query apis
Hii Retail Query APIs
Please note that the developer portal is not yet able to visualize GraphQL APIs so you need to contact Extenda Retail to make sure you get all the needed details.
Extenda Retail provides advanced query possibilities when you have a need to find your data. We provide Query APIs for all master data entities with free-text search capabilities, filtering and joining options according to your needs.
Our Query APIs are provided as GraphQL services, where we have individual APIs for each entity, but also advanced APIs where you can query for entire graphs of data.
Please note that for free-text search capabilities, we provide information about advanced options here.
An example might be to query for Item and Price data based on a scanned barcode. Using the GraphQL language you can specify all the data you want returned and get this as a complete graph as seen here:
"data": {
"itemIdentifier": {
"value": "7622201823085",
"itemId": "203018",
"item": {
"id": "203018",
"name": "THE NATURAL CONFECT PARTY MIX 130G",
"priceSpecifications": {
"nodes": [
"priceSpecification": {
"value": "11.99",
"priceType": "Sales",
"validFrom": "2021-10-01T07:30:23.140Z"
"validTo": null,
"minPrice": "10.00",
"maxPrice": "22.00"
},
"priceSpecification": {
"value": "9.35",
"priceType": "Purchase",
"validFrom": "2020-02-01T07:20:13.120Z"
"validTo": null
},
"priceSpecification": {
"value": "12.00",
"priceType": "Default",
"validFrom": "2020-01-01T00:00:00.000Z"
"validTo": null
}
]
}
}
}
}
Playground
To use the GraphQL query APIs there are some things to be aware of:
- First of all, we have a playground for you to test your queries before integrating.
- You need to provide a valid token as with all other APIs provided in Hii Retail.
- The token must be provided in the
Authorization
header as illustrated in the image below, and it must be of typeBearer
. - If you want to use the playground for testing you must make sure the URL is set to the encrypted
https
protocol and NOT the openhttp
protocol. - The schema and the docs are also visualized in the Playground, so all the details needed will be found there when a valid token is provided.
Postman
Postman is a very common and useful tool for developers when integrating with APIs of any kind.
We have seen that there are a few quirks to be aware of with Postman as well.
Make sure you follow these descriptions if you want to use Postman for testing queries against our GraphQL Query APIs
Make sure to provide the correct
Authorization Header
- You must use a
Bearer Token
- You must use a
Make sure to use the correct setup in Postman.
- Provide the correct URL to the API and make sure to NOT have a forward slash (
/
) at the end of the URL - Select
GraphQL
as the body format - Make sure the schema is properly fetched
- Make sure to use a
POST
request type
- Provide the correct URL to the API and make sure to NOT have a forward slash (