DOCS

Check compliance requirements

Check compliance requirements

Discover which compliance programs apply to an item, and read the questionnaire you will need to answer.

GraphQL

The complianceRequirements query is the entry point to Zonos Clarify. Given an item's HS code and route, it returns the compliance programs that are triggered, and lets you traverse each program's full questionnaire structure — questions, options, and branching logic. Use it to decide whether a shipment needs compliance answers and to render your own questionnaire UI.

Scope required

This query requires the COMPLIANCE_READ scope. See OAuth for authenticating API requests.

Discover applicable programs 

Pass an item's hsCode and shipToCountry to find which programs apply. The result is a paginated connection of ComplianceRequirement nodes, each pointing at the ComplianceProgram it triggers.

1query ComplianceRequirements($filter: ComplianceRequirementFilter!) {
2 complianceRequirements(filter: $filter, first: 10) {
3 totalCount
4 pageInfo {
5 hasNextPage
6 endCursor
7 }
8 edges {
9 cursor
10 node {
11 id
12 hsCode
13 shipToCountry
14 shipFromCountry
15 program {
16 id
17 code
18 name
19 programType
20 authority
21 jurisdiction
22 status
23 strictness
24 currentVersion {
25 id
26 version
27 status
28 }
29 }
30 }
31 }
32 }
33}

A shipFromCountry of null on a requirement means the program applies regardless of origin. When you supply shipFromCountry in the filter, both origin-specific rows and "any origin" rows are matched.

Filtering and pagination 

complianceRequirements accepts a ComplianceRequirementFilter plus standard cursor pagination arguments (first / after for forward paging, last / before for backward paging).

Filter fieldTypeNotes
hsCodeStringExact HS code match. Mutually exclusive with hsCodePrefix.
hsCodePrefixStringPrefix match (digits and dots only, max 12 chars). Mutually exclusive with hsCode.
shipToCountryCountryCodeDestination country.
shipFromCountryCountryCodeOrigin country. Rows with a null origin ("any origin") also match.
programTypes[ComplianceProgramType!]Match only these program types. Empty list = no filter.

For example, list every PGA requirement for cosmetics chapter 3304:

1query PgaRequirements($filter: ComplianceRequirementFilter!) {
2 complianceRequirements(filter: $filter, first: 25) {
3 totalCount
4 edges {
5 node {
6 hsCode
7 shipToCountry
8 program {
9 code
10 name
11 }
12 }
13 }
14 }
15}

Read a program's questionnaire 

Each ComplianceProgram exposes its currentVersion — the ACTIVE questionnaire — and that version's questions in display order. Every question declares its answerType, whether it is required, its options (for select types), and an optional displayCondition that branches the questionnaire. Read this structure to render your own UI or to understand exactly what an importer must provide.

1query QuestionnaireStructure($filter: ComplianceRequirementFilter!) {
2 complianceRequirements(filter: $filter, first: 1) {
3 edges {
4 node {
5 program {
6 code
7 name
8 currentVersion {
9 version
10 status
11 questions {
12 code
13 prompt
14 helpText
15 answerType
16 required
17 section
18 displayOrder
19 effectTarget
20 effectKey
21 optionsSource
22 options {
23 value
24 label
25 displayOrder
26 }
27 displayCondition {
28 questionCode
29 operator
30 values
31 }
32 }
33 }
34 }
35 }
36 }
37 }
38}

In the example above, contains_color_additives is only shown when intended_use equals cosmetic — that is the displayCondition at work. For the full branching model, dynamic (optionsSource) options, and what effectTarget / effectKey do at finalization, see How it works.

Next steps 

GraphQL API ReferenceTypes, inputs, and operations used in this guide
Book a demo

Was this page helpful?