Lookup Tariff Codes

(0 reviews)

Postman Collection


Download and Install Postman

Step 1: Go to https://www.getpostman.com/downloads/ to download the latest version.

resources/image-9765bc00-d3c1-4c56-98ee-dde534063168.png

Step 2: Install by right clicking the setup exe (Postman-win64-x.y.z-Setup.exe) as administrator.

Step 3: Open the postman application by right clicking and Run as administrator.

resources/image-16d502e5-38b2-4ca2-98c3-25223237c31e.png

Step 4: After opening Postman, go to File menu – Import.

resources/image-3c450cbe-cbb1-40df-9c39-2f01a50286f3.png

Step 5: Choose “Import From Link”- Copy and paste the fallowing Collection JSON, and click Import.

Collection JSON

{
    "info": {
        "_postman_id": "615c7e0d-8a56-4b2b-99e8-2daa50be1a05",
        "name": "lookup-tariff-codes API Test Suite Copy",
        "description": "**Step 1:** Import the Postman collection.  \n**Step 2:** Import Environment Variables under Environments and refer them to the collection while sending requests to the API.  \n**Step 3:** Update Environment Variables with your own credentials for testing.  \n**Step 4:** Update Environment Variables - URL with the appropriate URL that you want to test.  \nProd URL: [https://api.nzpost.co.nz/lookup-tariff-codes/v1](https://api.nzpost.co.nz/lookup-tariff-codes/v1)  \nUAT URL: [https://api.uat.nzpost.co.nz/lookup-tariff-codes/v1](https://api.uat.nzpost.co.nz/lookup-tariff-codes/v1)",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "_exporter_id": "19530689",
        "_collection_link": "https://blue-zodiac-749263.postman.co/workspace/My-Workspace~f84e14c7-afb9-4973-8750-8f0cc2f17537/collection/19530689-615c7e0d-8a56-4b2b-99e8-2daa50be1a05?action=share&source=collection_link&creator=19530689"
    },
    "item": [
        {
            "name": "Authentication",
            "item": [
                {
                    "name": "OAuthTokenGet",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "exec": [
                                    "var jsonData = JSON.parse(responseBody);\r",
                                    "pm.environment.set(\"bearer_token\", \"Bearer \" + jsonData.access_token);\r",
                                    ""
                                ],
                                "type": "text/javascript",
                                "packages": {}
                            }
                        }
                    ],
                    "request": {
                        "auth": {
                            "type": "oauth2",
                            "oauth2": [
                                {
                                    "key": "addTokenTo",
                                    "value": "header",
                                    "type": "string"
                                }
                            ]
                        },
                        "method": "POST",
                        "header": [],
                        "body": {
                            "mode": "urlencoded",
                            "urlencoded": [
                                {
                                    "key": "grant_type",
                                    "value": "client_credentials",
                                    "type": "text"
                                },
                                {
                                    "key": "client_id",
                                    "value": "{{client_id}}",
                                    "type": "text"
                                },
                                {
                                    "key": "client_secret",
                                    "value": "{{client_secret}}",
                                    "type": "text"
                                }
                            ]
                        },
                        "url": {
                            "raw": "https://oauth.nzpost.co.nz/as/token.oauth2",
                            "protocol": "https",
                            "host": [
                                "oauth",
                                "nzpost",
                                "co",
                                "nz"
                            ],
                            "path": [
                                "as",
                                "token.oauth2"
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Flows",
            "item": [
                {
                    "name": "Health Check",
                    "item": [
                        {
                            "name": "Health",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "url": {
                                    "raw": "{{url}}/health",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "health"
                                    ]
                                }
                            },
                            "response": []
                        }
                    ]
                },
                {
                    "name": "EADPrecom-PoratlUser",
                    "item": [
                        {
                            "name": "EAD Portal Support_(records=first)_(destination=Null)",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/first?destination_country=null",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "first"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "null"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "EAD Portal Support_(records=first)_(destination=GB)",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/first?destination_country=GB",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "first"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "GB"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "EAD Portal Support_(records=first)_(destination=IE)",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/first?destination_country=IE",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "first"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "IE"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "EAD Portal Support_(records=all)_(destination=Null)",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/all?destination_country=null",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "all"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "null"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "EAD Portal Support_(records=all)_(destination=GB)",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/all?destination_country=GB",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "all"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "GB"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "EAD Portal Support_(records=all)_(destination=IE",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"consignmentId\": \"T8RF9S\",\r\n    \"sourceCountry\": \"NZ\", \r\n    \"products\": [\r\n       {\r\n      \"description\": \"bags\",\r\n      \"originatingCountry\": \"GB\"\r\n    },\r\n    {\r\n      \"description\": \"CHILD'S BOOK\",\r\n      \"originatingCountry\": \"NZ\"\r\n    }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/fetch-codes/ead/all?destination_country=IE",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "fetch-codes",
                                        "ead",
                                        "all"
                                    ],
                                    "query": [
                                        {
                                            "key": "destination_country",
                                            "value": "IE"
                                        }
                                    ]
                                }
                            },
                            "response": []
                        }
                    ]
                },
                {
                    "name": "Classify",
                    "item": [
                        {
                            "name": "ClassifyItems",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n  \"request_id\": \"ABC12345XYZ\",\r\n  \"inputs\": [\r\n    {\r\n      \"categories\": \"women's clothing\",\r\n      \"name\": \"women's dress\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"KR\"\r\n      }\r\n    },\r\n    {\r\n      \"name\": \"Laptop Model 9X\",\r\n      \"categories\": \"Laptop\",\r\n      \"countryOfOrigin\": \"IN\",\r\n      \"productId\": \"123\",\r\n      \"description\": \"Laptop Model 9X\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"GB\",\r\n        \"sku\": \"ABC-12345-S-BL\"\r\n      }\r\n    }\r\n  ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/ClassifyItems",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "ClassifyItems"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "BulkClasiffications",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n  \"request_id\": \"ABC12345XYZ\",\r\n  \"inputs\": [\r\n    {\r\n      \"categories\": \"women's clothing\",\r\n      \"name\": \"women's dress\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"KR\"\r\n      }\r\n    },\r\n    {\r\n      \"name\": \"Laptop Model 9X\",\r\n      \"categories\": \"Laptop\",\r\n      \"countryOfOrigin\": \"IN\",\r\n      \"productId\": \"123\",\r\n      \"description\": \"Laptop Model 9X\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"GB\",\r\n        \"sku\": \"ABC-12345-S-BL\"\r\n      }\r\n    }\r\n  ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/BulkClasiffications",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "BulkClasiffications"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "ClassifyAlternates",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n  \"request_id\": \"ABC12345XYZ\",\r\n  \"inputs\": [\r\n    {\r\n      \"categories\": \"women's clothing\",\r\n      \"name\": \"women's dress\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"IN\"\r\n      }\r\n    },\r\n    {\r\n      \"name\": \"Laptop Model 9X\",\r\n      \"categories\": \"Laptop\",\r\n      \"countryOfOrigin\": \"IN\",\r\n      \"productId\": \"123\",\r\n      \"description\": \"Laptop Model 9X\",\r\n      \"configuration\": {\r\n        \"shipToCountries\": \"US\",\r\n        \"sku\": \"ABC-12345-S-BL\"\r\n      }\r\n    }\r\n  ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/ClassifyAlternates",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "ClassifyAlternates"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "ValidateAndClassify",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"request_id\": \"ABC12345XYZ\",\r\n    \"inputs\": [\r\n        {\r\n            \"name\": \"Laptop Model 9X\",\r\n            \"categories\": \"Laptop\",\r\n            \"countryOfOrigin\": \"IN\",\r\n            \"productId\": \"123\",\r\n            \"description\": \"Laptop Model 9X\",\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"GB\",\r\n                \"sku\": \"ABC-12345-S-BL\",\r\n                \"hsCodeProvided\": \"8517.62.0000\"\r\n            }\r\n        },\r\n        {\r\n            \"name\": \"Cozy Design Women's Knitted Gloves with Roll Up Cuffs for Winter\",\r\n            \"categories\": \"women's clothing\",\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"IN\",\r\n                \"hsCodeProvided\": \"6116.99.0009\"\r\n            }\r\n        }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/ValidateAndClassify",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "ValidateAndClassify"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "CheckCoherenceAndClassify",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"request_id\": \"ABC12345XYZ\",\r\n    \"inputs\": [\r\n        {\r\n            \"name\": \"Laptop Model 9X\",\r\n            \"categories\": \"Laptop\",\r\n            \"countryOfOrigin\": \"IN\",\r\n            \"productId\": \"123\",\r\n            \"description\": \"Laptop Model 9X\",\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"GB\",\r\n                \"sku\": \"ABC-12345-S-BL\",\r\n                \"hsCodeProvided\": \"8517.62.0000\"\r\n            }\r\n        },\r\n        {\r\n            \"name\": \"Cozy Design Women's Knitted Gloves with Roll Up Cuffs for Winter\",\r\n            \"categories\": \"women's clothing\",\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"IN\",\r\n                \"hsCodeProvided\": \"6116.99.0009\"\r\n            }\r\n        }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/CheckCoherenceAndClassify",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "CheckCoherenceAndClassify"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "ValidateOnly",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n    \"request_id\": \"ABC12345XYZ\",\r\n    \"inputs\": [\r\n        {\r\n            \"configuration\": {\r\n                \"hsCodeProvided\": \"8517.63.0090\"\r\n            }\r\n        },\r\n        {\r\n            \"configuration\": {\r\n                \"shipToCountries\": null,\r\n                \"hsCodeProvided\": \"8517.63.0000\"\r\n            }\r\n        },\r\n        {\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"GB\",\r\n                \"hsCodeProvided\": \"8517.63\"\r\n            }\r\n        },\r\n        {\r\n            \"configuration\": {\r\n                \"shipToCountries\": \"US\",\r\n                \"hsCodeProvided\": \"6116.91.0000\"\r\n            }\r\n        }\r\n    ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/ValidateOnly",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "ValidateOnly"
                                    ]
                                }
                            },
                            "response": []
                        },
                        {
                            "name": "RetrieveClassifications",
                            "request": {
                                "auth": {
                                    "type": "oauth2",
                                    "oauth2": [
                                        {
                                            "key": "grant_type",
                                            "value": "client_credentials",
                                            "type": "string"
                                        },
                                        {
                                            "key": "addTokenTo",
                                            "value": "header",
                                            "type": "string"
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Authorization",
                                        "value": "{{bearer_token}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_id",
                                        "value": "{{client_id}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "Content-Type",
                                        "value": "{{content-Type}}",
                                        "type": "text"
                                    },
                                    {
                                        "key": "client_tpid",
                                        "value": "{{client_tpid}}",
                                        "type": "text"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\r\n  \"request_id\": \"xyz1234\",\r\n  \"inputs\": [\r\n    {\r\n      \"id\": \"xx\"\r\n    },\r\n    {\r\n       \"id\": \"classification_0a440dbc-6d4f-48d5-8310-fc85c466aa5f\"\r\n    }\r\n  ]\r\n}",
                                    "options": {
                                        "raw": {
                                            "language": "json"
                                        }
                                    }
                                },
                                "url": {
                                    "raw": "{{url}}/classify/RetrieveClassifications",
                                    "host": [
                                        "{{url}}"
                                    ],
                                    "path": [
                                        "classify",
                                        "RetrieveClassifications"
                                    ]
                                }
                            },
                            "response": []
                        }
                    ]
                }
            ]
        }
    ]
}

Step 6: Choose “Import From Link”, then copy and paste the below Environment Variables JSON and click Import.

Environment Variables JSON:

{
    "id": "ccfee873-b8ff-4a4f-8fda-5c03fbb99e06",
    "name": "Environment Variables",
    "values": [
        {
            "key": "client_id",
            "value": "use your client id",
            "type": "default",
            "enabled": true
        },
        {
            "key": "client_secret",
            "value": "use your client secret",
            "type": "default",
            "enabled": true
        },
        {
            "key": "client_tpid",
            "value": "use account number",
            "type": "default",
            "enabled": false
        },
        {
            "key": "bearer_token",
            "value": "",
            "type": "default",
            "enabled": true
        },
        {
            "key": "content-Type",
            "value": "application/json",
            "type": "default",
            "enabled": true
        },
        {
            "key": "url",
            "value": "https://api.nzpost.co.nz/lookup-tariff-codes/v1",
            "type": "default",
            "enabled": true
        },
        {
            "key": "url_uat",
            "value": "https://api.uat.nzpost.co.nz/lookup-tariff-codes/v1",
            "type": "default",
            "enabled": true
        }
    ],
    "_postman_variable_scope": "environment",
    "_postman_exported_at": "2024-10-10T22:34:05.260Z",
    "_postman_exported_using": "Postman/11.16.0-241001-0722"
}

Step 7: Update the place-holder values in the Environment Variables with your own values.

Step 8: In the top right corner of Postman, click the environment selector and select the appropriate Environment variables collection.

resources/image-f2245edd-363b-4244-84d1-65dbb0de9d56.png

Postman collection is available to test lookup-tariff-codes API.


Reviews