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

Goods code changelog #108

Closed saulius closed 11 years ago

saulius commented 11 years ago

This change is for https://www.pivotaltracker.com/story/show/43647015

This adds change log output for Commodity, Chapter, Heading. This is simplified implementation, to push MVP version of this and get feedback.

Example JSON output for commodity:

[
    {
        "model_name": "Measure",
        "operation": "C",
        "operation_date": "2013-07-26",
        "record": {
            "geographical_area": {
                "description": "Colombia",
                "geographical_area_id": "CO"
            },
            "goods_nomenclature_item_id": "0101000000",
            "import": true,
            "measure_sid": 3268611,
            "measure_type_description": "Tariff preference",
            "origin": "eu"
        }
    }
]

So we can say that on 26th of July, an EU measure 'Tariff preference' was introduced for Columbia for this particular commodity.

This is part of the work, will raise a pull request on the frontend converting this output to ATOM feed.

saulius commented 11 years ago

As noted in ticket comments, hardest part is finding what is a meaningful change for Commodity/Heading/Chapter and fetching it, as we're touching close to (or more than?) 40 tables when displaying a measure. This is now very simplified.