QIMA Logo

Parameter Introduction

Latest Update Time: 2026-07-02 00:00:00

The Parameter module provides QIMA's common reference data: geographic data (continents, countries, provinces, cities) and product taxonomy data (categories, families, types, sample levels). Use these APIs to populate dropdowns and to obtain valid ID values required by other modules — for example, supplierContinentID/supplierCountryID/supplierCityID when creating an Inspection or Audit order, or product line values for a supplier.

This page documents the shared setup used by every Parameter guide. Each API-specific guide links back here for authentication, headers, and environment details.

Base URL

All Parameter APIs are served from the QIMA Public API host for your environment:

https://ppapi.qima.com

For production integrations, replace the host with the QIMA API host provided for your environment.

Required Headers

Call the Auth API first (POST /auth/v2/token) before any Parameter request. See the Getting Started Guide or Get Token API for authentication setup.

HeaderLocationSourceDescription
Ai-Api-Access-TokenRequest header (all Parameter APIs)Provided by QIMARequest source identifier. Each client may have a different value per environment.
Ai-User-IdRequest header (all Parameter APIs)Auth API response userIdQIMA client user login ID of the authenticated user.
AuthorizationRequest header (all Parameter APIs)Auth API access tokenFormat: Bearer <access-token>. Use the token from the same Auth API session as the other headers.
RefererRequest header (all Parameter APIs)Fixed valuehttps://preprodmy.qima.com/

Common Authentication Errors

StatusMeaningRecommended Action
401 UnauthorizedToken or user authentication failed.Confirm the Authorization, Ai-User-Id, and Ai-Api-Access-Token headers are from the same Auth API session and environment.
403 ForbiddenThe user does not have access to the requested resource.Verify account permissions.

Common Response Shape

Every Parameter API wraps its data in the same envelope:

{
  "message": null,
  "content": "... the actual data, shape varies per API ..."
}

message is usually null on success (some endpoints return "OK" instead — treat both as success). Most geography endpoints also accept a refresh query parameter: send false (default) to use QIMA's server-side cache, or true to force a fresh lookup.

Available APIs

Geographic Data

APIMethodEndpointGuide
Get all continentsGET/parameter/v2/continentsGuide
Get countries by continentGET/parameter/v2/continent/{continentId}/countriesGuide
Get all countriesGET/parameter/v2/countriesGuide
Search countries by nameGET/parameter/v2/searchCountriesGuide
Get provinces by countryGET/parameter/v2/country/{countryId}/provincesGuide
Get cities by countryGET/parameter/v2/country/{countryId}/citiesGuide
Search cities in a country by nameGET/parameter/v2/country/{countryId}/searchCitiesGuide
Search cities in a province by nameGET/parameter/v2/province/{provinceId}/searchCitiesGuide

Product Taxonomy & Sample Levels

APIMethodEndpointGuide
Get all product categoriesGET/parameter/v2/product-categoriesGuide
Get all product familiesGET/parameter/v2/product-familiesGuide
Get all product typesGET/parameter/v2/product-typesGuide
Get full product taxonomy treeGET/parameter/v2/product-treeGuide
Get the lists of available sample levelsGET/parameter/v2/sample-levelsGuide

Integration Workflows

1. Authenticate (Required for All Flows)

POST /auth/v2/token

Extract userId, access token

Set Ai-User-Id, Authorization headers

2. Build a Location Picker (Continent → Country → Province/City)

GET /parameter/v2/continents

User picks a continent

GET /parameter/v2/continent/{continentId}/countries

User picks a country

GET /parameter/v2/country/{countryId}/provinces

GET /parameter/v2/country/{countryId}/cities

Use Search Countries, Search Cities in a Country, or Search Cities in a Province instead of the full list APIs when building an autocomplete/typeahead field.

3. Get Product Taxonomy Values for a Booking

Use these APIs to obtain valid categoryId/familyId/typeId values (and supplier/factory ProductLines) before creating an Inspection, Audit, or Supplier record.

GET /parameter/v2/product-tree

Full categories + families + types in one call

GET /parameter/v2/product-categories

GET /parameter/v2/product-families

GET /parameter/v2/product-types

/parameter/v2/product-tree returns everything in a single call; the individual category/family/type APIs are useful when you only need one level, or want to keep payloads smaller.

Choosing the Right API

Your goalRecommended APIs
Populate a continent/country/province/city dropdownThe relevant "Get ... by ..." API
Autocomplete a country or city as the user typesSearch Countries, Search Cities in a Country, Search Cities in a Province
Get valid product category/family/type IDs for a bookingProduct Tree (all at once) or the individual category/family/type APIs
Get valid sample level values for a lab testing/inspection checklistSample Levels