Skip to main content

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:

  1. First of all, we have a playground for you to test your queries before integrating.
  2. You need to provide a valid token as with all other APIs provided in Hii Retail.
  3. The token must be provided in the Authorization header as illustrated in the image below, and it must be of type Bearer. GraphQL Authorization
  4. 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 open http protocol. GraphQL General
  5. 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. GraphQL SchemaGraphQL Query

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

  1. Make sure to provide the correct Authorization Header

    1. You must use a Bearer TokenPostman Authorization
  2. Make sure to use the correct setup in Postman.

    1. Provide the correct URL to the API and make sure to NOT have a forward slash (/) at the end of the URL
    2. Select GraphQL as the body format
    3. Make sure the schema is properly fetched
    4. Make sure to use a POST request type Postman Authorization