Documents
Inspection Booking Guide
Latest Update Time: 2026-07-02 00:00:00
Use the inspection booking API to create an inspection order after you have obtained an access token from the login API.
See the Inspection Introduction for base URL, authentication, and required headers.
Endpoint
POST https://ppapi.qima.com/v1.0/inspection
For production integrations, replace the host with the QIMA API host provided for your environment.
Prerequisites
Before booking an inspection, make sure you have:
- A QIMA customer account with permission to create inspection orders
- An
Ai-Api-Access-Tokenfor the target environment - A login API response containing:
userId- access token for the
Authorizationheader
- Product category, family, type, and geographic parameter values accepted by QIMA
Required Headers
| Header | Description |
|---|---|
Ai-Api-Access-Token | Request source identifier provided by QIMA. Each client can have a different value for each environment. |
Ai-User-Id | QIMA user ID returned by the login API. |
Authorization | Login API access token in the format Bearer <access-token>. |
Referer | Fixed value: https://preprodmy.qima.com/. |
Request Example
Replace all placeholder values before sending the request. Do not reuse access tokens across environments.
curl --location 'https://ppapi.qima.com/v1.0/inspection' \
--header 'Ai-Api-Access-Token: {your api access token}' \
--header 'Ai-User-Id: {your user ID}' \
--header 'Authorization: Bearer {your token}' \
--header 'Referer: https://preprodmy.qima.com/' \
--data-raw '{
"userId": "<qima-user-id>",
"serviceDate": "18-DEC-2030",
"shipDate": "18-DEC-2030",
"serviceType": "1",
"bookingType": "General",
"previousOrderNumber": null,
"referenceNumber": "3996 + 3997",
"supplierId": null,
"supplierCode": null,
"supplierName": "supplierA",
"supplierContactName": "Manager A",
"supplierContactPhone": "13145777777",
"supplierContactEmail": "supplier.contact@example.com",
"supplierContinentID": "Asia",
"supplierCountryID": "China",
"supplierProvinceID": "Guangdong",
"supplierCityID": "Shenzhen",
"supplierAddress": "Street 2 No. 3",
"supplierProductLines": [
"bigCat3_s1"
],
"supplierAlternateContactName": null,
"supplierAlternateContactPhone": null,
"supplierAlternateContactEmail": null,
"products": [
{
"name": "P1 ",
"categoryId": "bigCat3",
"familyId": "bigCat3_s1",
"typeId": "bigCat3_s1_t200",
"prodReference": null,
"prodDivision": null,
"poNumber": null,
"prodQuantity": null,
"expectedFinishedPct": null,
"expectedPackedPct": null,
"unitPacking": null,
"outerPacking": null,
"sampleReferenceClientComments": null,
"customField1": null,
"customField2": null,
"customField3": null,
"refs": [
{
"poNumber": "IOR25452",
"skuCode": "3996 + 3997",
"qty": 50112,
"brand": null,
"customField1": null,
"customField2": null,
"customField3": null,
"customField4": null,
"customField5": null,
"customField6": null,
"customField7": null,
"customField8": null,
"customField9": null,
"customField10": null,
"customField11": null,
"customField12": null
}
],
"checkList": null
}
],
"customField1": "ABC01",
"customField2": "FBD02",
"customField3": "",
"performInQimaone": null,
"allowChangeInspectionDate": true
}'
Request Field Notes
| Field | Notes |
|---|---|
userId | Must match the QIMA user ID sent in the Ai-User-Id header. |
serviceDate | Planned inspection date. Use dd-MMM-yyyy, for example 18-DEC-2030. |
shipDate | Planned shipment date. Use dd-MMM-yyyy. |
serviceType | Inspection service type. 1 is PSI (Pre-Shipment Inspection). |
bookingType | Inspection booking type, such as General, Textile, or Fabric. |
supplierCode | Use a valid supplier code when the supplier already exists in QIMA. If omitted, provide the supplier name, contact, location, address, and product lines. |
products | At least one product is required. Use product category, family, and type values from QIMA parameter APIs. |
refs | Product reference details such as PO number, SKU code, and quantity. |
allowChangeInspectionDate | Set to true when QIMA is allowed to change the inspection date during validation. |
Successful Response
HTTP 202 Accepted means the booking request was accepted and the order was created. A common 202 response is returned when no factory is provided, so factory confirmation is skipped.
{
"message": "Factory not provided ,factory confirm skipped",
"content": {
"draft": {
"draftId": "B4E360CEFF104739A1D8FCCB80785069",
"isAnOrderNotADraft": true,
"draftSteps": null
},
"orderGeneralInfo": {
"orderId": "BDB0809251734AF8A7CEA85D4D4B55F5",
"orderPlacer": "API.26.03.30.04",
"status": "20",
"statusText": "WAITING_FOR_VALIDATION",
"serviceType": "1",
"serviceTypeText": "PSI",
"bookingDate": "20-May-2026",
"orderNumber": "Q2600250721-PP",
"userId": "<qima-user-id>",
"allowChangeInspectionDate": true,
"clientRefNb": "3996 + 3997",
"expectedInspectionDate": "18-Dec-2030",
"actualInspectionDate": "18-Dec-2030",
"expectedShipDate": "18-Dec-2030",
"customField1": "ABC01",
"customField2": "FBD02",
"customField3": "",
"confirmed": false
},
"orderExtra": {
"orderId": "BDB0809251734AF8A7CEA85D4D4B55F5",
"cancelable": false,
"editable": false,
"isReInspection": false,
"nbOfInspectors": 1,
"quickBooking": false,
"multiSupplierOrder": false
},
"orderFactory": null,
"orderSupplier": {
"orderId": "BDB0809251734AF8A7CEA85D4D4B55F5",
"supplierName": "supplierA",
"supplierMGRName": "Manager A",
"supplierMGRNumber": "13145777777",
"supplierMGREmail": [
"supplier.contact@example.com"
],
"supplierAddress": "Street 2 No. 3",
"supplierCity": "Shenzhen",
"supplierCountry": "China",
"supplierProductLines": [
"bigCat3_s1"
]
},
"products": [
{
"draftProductId": "323B9F402BE74DA79059F927B5DAA145",
"productBean": {
"orderId": "BDB0809251734AF8A7CEA85D4D4B55F5",
"productId": "2E336C5EE0AE44DBBA5DCB5329695B77",
"prodCategoryClient": "bigCat3",
"prodFamilyClient": "bigCat3_s1",
"prodType": "bigCat3_s1_t200",
"prodName": "P1 ",
"prodReference": "3996 + 3997",
"prodQuantity": 50112,
"prodQuantityUnit": "Pcs",
"poNumber": "IOR25452",
"bookingtype": "General"
},
"completed": true
}
]
}
}
The exact response can include more fields. Store the returned orderId or orderNumber if you need to search, retrieve, or cancel the inspection order later.
Common Errors
See common authentication errors for 401 and 403 responses.
| Status | Meaning | Recommended Action |
|---|---|---|
400 Bad Request | Request data failed validation. | Check the field named in the error response, especially dates, supplier data, and product parameter values. |
409 Conflict | Duplicate booking request found. | Check whether the order was already created before retrying. |
500 Internal Server Error | Booking creation failed on the server, for example "supplier info is not found by supplierCode [SF-TL90]". | Confirm supplierCode refers to an existing supplier in the target environment, or provide full supplier details instead. |
Next Steps
- Use the returned order ID to retrieve inspection booking details.
- Search inspection booking orders to confirm the order status.
- Cancel the booking only if the order status allows cancellation.
