API Endpoint Customization

Hello,

So I’m working with the API called the Trade Tariff API, which allows to request UK Trade Tariff content as structured data in a predictable format. Link here.

I want to allow my app’s users to view the data, such as the sections, chapters, headings and customs codes of goods in an accessible format.

However, the API endpoints (e.g. heading) only allow to view specific headings. But what I want to do is to allow the users to first select a section their goods belong to, then chapters, then headings in those specific chapters, to determine their relevant customs code and tariff.

Is there a way to tailor these endpoints? i.e. for the users to view all the headings in a specific chapter rather than a specific one that the API connector only allows me to set up?

If you have another strategy that would allow the users to view this data in the most accessible way, please share!

According to the docs you shared, the Response to a Get Chapter request includes the list of Headings from that chapter (and likewise, the Get Section request includes a list of Chapters…)

So everything you need should be accessible…

That’s very true.
But is it possible to access everything in one click? E.g. Section → Chapter → Heading → Goods nomenclature and code, rather than the user having to press separate buttons to trigger the API action?

Yes, just make the necessary API calls after a single button click…

The GET /chapters/{chapter_id} call only allows calls for a specific Chapter ID. Is there a way to customize this API call in a way that allows the user to make this API call to the chapter ID that they have set?

Yes, just make sure the chapter_id is dynamic, so you can set it in your workflows or datasource.

1 Like