Zonos logo
DOCS

Check for item restrictions graphql

/

Verify that items are not restricted for import or export 

The Zonos Item Restriction API enables users to verify if any items that are being shipped are restricted from export or import by the destination country. Items are restricted for import or export based on the regulations put in place by government agencies. Parties that violate these restrictions can be subject to financial penalties. Our API consumes HS Codes and country data for shipped items and will flag any prohibitions, restrictions, or observations associated with those items in the shipment.

1

Start a session and supply information about the items being sent

To start a session, you will create a mutation with the hsCode and countryOfOrigin you have for the items being shipped. Shipment origin and destination are required as this will enable us to identify EXPORT and IMPORT restrictions that may apply to the shipment. You will also pass the level of restriction that you want to see in the request. Users can select from PROHIBITION (most severe), RESTRICTION (medium severity) and OBSERVATION (least severe). Based on this selection the API will return that severity and anything above it. If no field is passed in the request, we will default to PROHIBITION.

POST https://api.zonos.com/graphql

Mutation

1
2
3
4
  mutation Mutation($input: RestrictionsApplyInput!) {
    itemRestrictionsApply(input: $input) {
    }
  }

Variables

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
   "input": {
      "items": [
         {
            "countryOfOrigin":"IT",
            "description":"Mens Leather Shoes",
            "hsCode":"61161000"
         }
      ],
      "shipFromCountry":"US",
      "shipToCountry":"CA",
      "restrictionTypeThreshold":"OBSERVATION"
   }
}
2

Interpret the response

The results returned will change if we find restrictions based on item and shipment details passed in the request . In cases where matches exist, the action field will return the type of restriction that applies as well as each of the details about the restrictions that apply to the shipment.

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
   "data":{
      "itemRestrictionsApply":[
         {
            "action":"RESTRICTIONS_APPLY",
            "id":"appliedItemRestrictions_1d9f4691-3611-40d6-a585-78ca41dae326",
            "itemHsCode":"61161000",
            "itemRestriction":{
               "endsAt":"2022-08-26T20:40:51.019Z",
               "hsCode":"61161000",
               "id":"restriction_69b7cd66-738e-4e4c-ac79-79607ab45eae",
               "note":"Italian leather shoes are not eligible for import into Canada without a license",
               "source":"Bureau of Foreign Trade",
               "startsAt":"2022-08-26T20:40:51.019Z",
               "type":"RESTRICTION"
            }
         }
      ]
   }
}

Within the itemRestrictionsApply array, the possible values for the action field are:

  • OBSERVATIONS_APPLY
  • PROHIBITIONS_APPLY
  • RESTRICTIONS_APPLY
  • NO_MATCH

Within the itemRestrictions array, the possible values for the following fields are:

  • control_type

    • IMPORT
    • EXPORT
  • type

    • OBSERVATION
    • PROHIBITION
    • RESTRICTION

In scenarios where no match is found, the itemRestrictions field will return an empty array.

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
   "data":{
      "itemRestrictionApply":{
         "items":[
            {
               "id":"applied_item_restrictions_entity_3a7f54c0-fc3d-4184-9ffd-29865c8937de",
               "action":"NO_MATCH",
               "itemRestrictions":[
                  
               ]
            }
         ]
      }
   }
}