Create Audit

Request
Request Body schema: application/json
userId
required
string

QIMA client user id

serviceDate
required
string

Planed inspection date, format should be in dd-MMM-yyyy

shipDate
required
string

Planed shipment date, format should be in dd-MMM-yyyy

serviceType
string

QIMA audit service type, mandatory if previousOrderNumber not provided. Here is the mapping, ma: Manufacturing Audit, ea: Ethical Audit, enva: Environmental Audit, dr: Desktop Review, ghp: Food Hygiene Audits, gmp: Food Good Manufacturing Practices Audits, gfsi: Food Certified, ctpat: C-TPAT Audit, stra: Structural Audit

Enum: "ma" "ea" "enva" "dr" "ghp" "gmp" "gfsi" "ctpat" "stra"
referenceNumber
string

Client reference number

factoryAreaSqm
required
integer <int32>

Factory area in SQM

totalNumberOfBuilding
required
string

Total number of building

announcementType
string

Audit order announcement type

Enum: "Announced" "Semi-Announced" "Un-Announced"
workersCount
required
integer <int32>

The count of workers

auditWindowFrom
string

Audit window from date, format should be in dd-MMM-yyyy

auditWindowTo
string

Audit window to date, format should be in dd-MMM-yyyy

additionalComment
string

The additional comment of audit order

supplierCode
string

Supplier's identification code in client's system, mandatory when supplier name, city id, contact not provided, and must be a valid code

supplierName
required
string

Supplier's name

supplierContactName
required
string

Supplier's contact name

supplierContactPhone
required
string

Supplier's contact phone

supplierContactEmail
required
string

Supplier's contact email

supplierContinentID
required
string

Supplier's continent id in QIMA's system, refer to /parameter/v2/continents. Mandatory when supplier code is not provided

supplierCountryID
string

Supplier's country id in QIMA's system, refer to /parameter/v2/countries, /parameter/v2/countries or /parameter/v2/continent/{continentId}/countries. Mandatory when supplier code is not provided

supplierCityID
string

Supplier's city id in QIMA's system, refer to /parameter/v2/country/{countryId}/searchCities, /parameter/v2/province/{provinceId}/searchCities or /parameter/v2/country/{countryId}/cities. Mandatory when supplier code is not provided

supplierAddress
required
string

Supplier's address

supplierPostalCode
string

Supplier's postal code

specificField
string

Audit order specific field

supplierProductLines
required
Array of strings

Supplier product lines, get it from /parameter/v2/product-families API

factoryCode
string

Factory's identification code in client's system, mandatory when auto confirm factory is needed and factory other info are not provided

factoryName
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryContactName
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryContactPhone
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryContactEmail
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryContinentID
string

Factory's continent id in QIMA's system, refer to /parameter/v2/continents. Mandatory when auto confirm factory is needed and factory code is not provided

factoryCountryID
string

Factory's country id in QIMA's system, refer to /parameter/v2/countries. Mandatory when auto confirm factory is needed and factory code is not provided

factoryProvinceID
string

Factory's province id in QIMA's system, refer to /parameter/v2/country/{countryId}/provinces. Mandatory when auto confirm factory is needed and factory code is not provided

factoryCityID
string

Factory's city id in QIMA's system, refer to /parameter/v2/country/{countryId}/searchCities. Mandatory when auto confirm factory is needed and factory code is not provided

factoryAddress
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryPostalCode
string

Mandatory when auto confirm factory is needed and factory code is not provided

factoryProductLines
Array of strings

Mandatory when auto confirm factory is needed and factory code is not provided, get product line from /parameter/v2/product-families API

supplierAlternateContactName
string

Supplier's alternative contact name

supplierAlternateContactPhone
string

Supplier's alternative contact phone

supplierAlternateContactEmail
string

Supplier's alternative contact email

factoryAlternateContactName
string

Name of the alternative factory contact

factoryAlternateContactPhone
string

Phone of the alternative factory contact

factoryAlternateContactEmail
string

Email of the alternative factory contact

Responses
200

Create audit order successfully

202

Factory not confirmed

400

ServiceDate and ShipDate cannot be null, and announceType should be legal

500

Error happened when create audit order

post/v1.0/audit
Request samples
application/json
{
  • "userId": [
    ],
  • "serviceDate": [
    ],
  • "shipDate": [
    ],
  • "serviceType": [
    ],
  • "referenceNumber": [
    ],
  • "factoryAreaSqm": 0,
  • "totalNumberOfBuilding": "string",
  • "announcementType": [
    ],
  • "workersCount": 0,
  • "auditWindowFrom": [
    ],
  • "auditWindowTo": [
    ],
  • "additionalComment": "string",
  • "supplierCode": "string",
  • "supplierName": "string",
  • "supplierContactName": "string",
  • "supplierContactPhone": "string",
  • "supplierContactEmail": "string",
  • "supplierContinentID": "string",
  • "supplierCountryID": "string",
  • "supplierCityID": "string",
  • "supplierAddress": "string",
  • "supplierPostalCode": "string",
  • "specificField": "string",
  • "supplierProductLines": [
    ],
  • "factoryCode": "string",
  • "factoryName": "string",
  • "factoryContactName": "string",
  • "factoryContactPhone": "string",
  • "factoryContactEmail": "string",
  • "factoryContinentID": "string",
  • "factoryCountryID": "string",
  • "factoryProvinceID": "string",
  • "factoryCityID": "string",
  • "factoryAddress": "string",
  • "factoryPostalCode": "string",
  • "factoryProductLines": [
    ],
  • "supplierAlternateContactName": "string",
  • "supplierAlternateContactPhone": "string",
  • "supplierAlternateContactEmail": "string",
  • "factoryAlternateContactName": "string",
  • "factoryAlternateContactPhone": "string",
  • "factoryAlternateContactEmail": "string"
}
Response samples
application/json
{
  • "invalidSupplier": true,
  • "draft": {
    },
  • "orderGeneralInfo": {
    },
  • "orderExtra": {
    },
  • "orderFactory": {
    },
  • "orderSupplier": {
    },
  • "orderAuditGeneral": {
    },
  • "orderAuditFieldsList": [
    ],
  • "auditGuidelineOtherFields": [
    ]
}