QIMA Logo

Inspection Introduction

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

Inspection is one of QIMA's major business services. The Public API supports several inspection types — Pre-Shipment Inspection (PSI), During Production Inspection (DUPRO), Pre-Customs Clearance Inspection (PEO), and more — and provides APIs for creating bookings (synchronously or asynchronously), searching orders, retrieving order details, and cancelling bookings.

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

Base URL

All Inspection 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 Inspection request. See the Getting Started Guide or Get Token API for authentication setup.

You also need a QIMA customer account with permission for the target Inspection operation, and an Ai-Api-Access-Token for the target environment provided by QIMA. Each API guide lists additional operation-specific requirements.

Header / ParameterLocationSourceDescription
Ai-Api-Access-TokenRequest header (all Inspection APIs)Provided by QIMARequest source identifier. Each client may have a different value per environment.
Ai-User-IdRequest header (all Inspection APIs)Auth API response userIdQIMA client user login ID of the authenticated user.
AuthorizationRequest header (all Inspection APIs)Auth API access tokenFormat: Bearer <access-token>. Use the token from the same Auth API session as the other headers.
RefererRequest header (all Inspection 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 for the target Inspection operation.

Each API guide includes additional operation-specific error codes.

Available APIs

APIMethodEndpointGuideAPI Reference
Create an inspection bookingPOST/v1.0/inspectionInspection Booking GuideAPI Reference
Create inspection booking asynchronouslyPOST/v1.0/async-inspectionAsync Booking GuideAPI Reference
Get async booking resultGET/booking-result/{requestId}Async Booking Result GuideAPI Reference
Search inspection booking ordersGET/user/{userId}/inspection-ordersOrder Search GuideAPI Reference
Get inspection order detailsGET/user/{userId}/inspection-order/{orderId}Order Detail GuideAPI Reference
Cancel an inspection bookingDELETE/user/{userId}/inspection/{orderId}Cancel Booking GuideAPI Reference

Integration Workflows

1. Authenticate (Required for All Flows)

POST /auth/v2/token

Extract userId, access token

Set Ai-User-Id, Authorization headers

2. Create a Booking (Synchronous)

Use this flow for a simple, blocking booking call where you want the confirmation (or error) immediately.

1. POST /auth/v2/token

2. POST /v1.0/inspection

Response code

200: Order created
Store orderId, orderNumber

202: Factory not confirmed

409: Duplicate booking detected

StepGuide
Create bookingInspection Booking Guide

3. Create a Booking (Asynchronous)

Use this flow when you'd rather not block on the booking call — submit the request, get a requestId immediately, and poll for the result.

1. POST /auth/v2/token

2. POST /v1.0/async-inspection

Store requestId from content

3. GET /booking-result/{requestId}
Poll until status is no longer PENDING

status: SUCCEED
Read orderId, orderNumber

status: FAILED
Read comments for the failure reason

StepGuide
Submit async bookingAsync Booking Guide
Poll for resultAsync Booking Result Guide

4. Find, Review, and Manage an Order

1. POST /auth/v2/token

How do you identify the order?

GET /user/{userId}/inspection-orders
Search by filters

Read orderId from results

orderId already known

2. GET /user/{userId}/inspection-order/{orderId}

Need to cancel?

3. DELETE /user/{userId}/inspection/{orderId}
reason required

StepGuide
Search ordersOrder Search Guide
Get order detailsOrder Detail Guide
Cancel an orderCancel Booking Guide

Choosing the Right API

Your goalRecommended APIs
Submit a new booking and get an immediate resultCreate Booking (Synchronous)
Submit a new booking without blocking on the resultCreate Booking Asynchronously + Get Async Result
List or filter existing bookingsSearch Orders
View full order informationGet Order Details
Cancel a bookingCancel Booking