alphagov / trade-tariff-backend

Enabling the population and distribution via API of UK Customs tariffs and duties
MIT License
7 stars 6 forks source link

Expose country list with identifiers via API. #47

Closed saulius closed 11 years ago

saulius commented 11 years ago

This is needed to build a list of countries for import/export filtering functionality. Same thing as in EU Taric site, see Country of origin/destination in http://ec.europa.eu/taxation_customs/dds2/taric/taric_consultation.jsp?Lang=en

Related to Pivotal ticket https://www.pivotaltracker.com/story/show/36718601.

There will be a frontend counter part for this, but I want to see the final design for merged search form first (https://www.pivotaltracker.com/story/show/38329451).

matthewford commented 11 years ago

The country search would probably also include geographical areas - I will confirm. So searching by country or geographical area would be needed.

saulius commented 11 years ago

I'm not sure geographical area groups will make much sense to the end user, check some examples out:

...
["9B03", "Export refund Sector 5"],
 ["9B08", "Export refund Sector 5"],
 ["9B09", "Export refund Sector 5"],
 ["9E09", "Export refund Sector 8"],
 ["9E10", "Export refund Sector 8"],
 ["9L01", "Export refund Sector 9"],
 ["9L02", "Export Refund Sector 9"],
 ["9L03", "Export refund Sector 9"],
 ["9L04", "Export refund Sector 9"],
 ["9L08", "Export refund, sector 09, group L08"],
 ["9P02",
  "Export refunds for processed agricultural products containing eggs, Destination 02"],
 ["9P03",
  "Export refunds for processed agricultural products containing eggs, Destination 03"],
 ["9R02", "Export refund, Sector 2"],
 ["9R03", "Export refund, Sector 2"],
 ["9V01", "Export refund Sector 7"],
 ["9V02", "Export refund Sector 7"],
 ["9V03", "Export refund Sector 7"],
 ["A001", nil],
 ["A002", nil],
 ["A003", nil],
 ["A004", nil],
 ["A005", nil],
 ["A006", nil],
 ["A007", nil],
 ["A008", nil],
 ["A009", nil],
 ["A010", nil],
 ["A012", nil],
 ["A013", nil],
...
 ["B068", nil],
 ["B069", nil],
 ["B070", nil],
 ["B071", nil],
 ["B072", nil],
 ["B073", nil],
 ["B074", nil],
 ["B075", nil],
 ["B076", nil],
 ["B077", nil],
 ["B078", nil],
 ["B079", nil],
 ["B080", nil],
 ["B081", nil],
 ["B082", nil],
 ["B084", nil],
 ["B085", nil],

Unless we fetch some specific ones.

matthewford commented 11 years ago

hrm.. this is a good point, europa site has a few groupings, but let's use country for now, perhaps we should allow multi select in the ui