Skip to content

GET Payments Table

Ksenyia edited this page Nov 2, 2016 · 7 revisions

Resource URI

/transfer_table/{type}/{id}

OR

if type='country'

/prod_table/country/{iso2}

Resource Properties

Property Description
id A string that uniquely identifies.
iso2 2 digit ISO country code
type Collection type( for example, request for getting payments are called at country page. payments have following type="country" ). Possible variants of the types: project,site,field,concession,contract,commodity,country, companies.
Response Attribute
{
    transfers: [
        {
            _id: String,
            transfer_year: Integer,
            company: 
               {
                   _id: Integer,
                   company_name: String
               },
            country:
                {
                    name: String,
                    iso2: String
                },
            source:
                {
                    _id: Integer,
                    source_date: Date,
                    source_name: String,
                    source_type_id: Integer,
                    source_url: String
                },
            transfer_type: String,
            transfer_unit: String,
            transfer_value: Integer,
            transfer_level: String,
            transfer_gov_entity: String,
            transfer_audit_type: String,
            proj_site: 
                {
                    name: String,
                    _id: String,
                    type: String
                }
        }
    ],
    transfers_query: Array
}    

HTTP GET

Default Request

curl -GET http://end-point-uri/transfer_table/project/57100133bd08c40100abf6de

OR

if type='country'

curl -GET http://end-point-uri/transfer_table/country/AD

Response

HTTP Status Code 200

{
    transfers: [
        {
            _id: "57156908a6565c01006341f8",
            transfer_year: 2015,
            company: 
               {
                   _id: "580df27a8c2de3b25f97efc7",
                   company_name: "Ampolex (Cepu) PTE. Ltd"
               },
            country:
                {
                    name: "South Africa",
                    iso2: "ZA"
                },
            source:
                {
                    _id: "580df2798c2de3b25f97ef8a",
                    source_date: "2010-01-01T00:00:00.000Z",
                    source_name: "Indonesia2010",
                    source_type_id: "56e873691d1d2a3824141428",
                    source_url: "https://eiti.org/report/indonesia/2010"
                },
            transfer_type: "Royalties",
            transfer_unit: "USD",
            transfer_value: 1823000,
            transfer_level: "project",
            transfer_gov_entity: "transfer_gov_entity",
            transfer_audit_type: "company_payment",
            proj_site: 
                {
                    name: "Agnes",
                    _id: "ad-agne-11geq3",
                    type: "project"
                }
        },
        ...
    ],
    transfers_query: [
        "5710043b76c9bc01003ae1c7",
        "57100216bd08c40100ac0775",
        "57100216bd08c40100ac0780",
        "57100217bd08c40100ac07f4",
        "57100217bd08c40100ac07ff",
        "57100217bd08c40100ac080a",
        ...
    ]
}    
Clone this wiki locally