-
Notifications
You must be signed in to change notification settings - Fork 0
GET Country By ID
Ksenyia edited this page Feb 1, 2017
·
3 revisions
It gives the data of country.
Resource URI
/countrycommodity/{id}
Resource Properties
Property | Description |
---|---|
id | A string that uniquely identifies the country. |
Response Attribute
{
companies: [
{
_id: String,
company_groups: Array,
company_name: String,
country_of_incorporation: {
country: String,
source: String,
timestamp: date
},
}
],
companies_of_operation: [
{
_id: String,
company_groups: Array,
company_name: String,
countries_of_operation: {
country: String,
source: String,
timestamp: date
},
}
],
errorList: Array,
concessions: Array,
productions: [
{
_id: String,
company: String,
country: {
iso2: String,
name: String
},
production_commodity: {
_id: String,
commodity_id: String,
commodity_name: String
},
production_level: String,
production_price: String,
production_price_unit: String,
production_unit: String,
production_volume: String,
production_year: String,
proj_site: {
_id: String,
name: String,
type: String
},
site: String
}
},
proj_coordinates:[
{
_id: String,
lat: Float,
lng: Float,
message: String,
timestamp: Date,
type: String,
}
],
projects:[
{
_id: String,
companies: Array,
companies_count: Integer,
proj_commodity: Array,
proj_country:Array,
proj_id: String
proj_name: String,
proj_status: Array,
project_id: Array
}
],
sites: [
{
_id: String,
companies: Array,
companies_count:1,
site_commodity: Array,
site_country:{
source: String,
country: String
},
site_name: String,
site_status: String
}
],
transfers: [
{
_id: String,
company: {
_id: String,
company_name: String
},
country: {
iso2: String,
name: String
},
proj_site: {
_id: String,
name: String,
type: String
},
transfer_label: String,
transfer_level: String,
transfer_type: String,
transfer_unit: String,
transfer_value: Integer,
transfer_year: Integer
}
],
transfersByRecipient: [
{
_id: String,
company: {
_id: String,
company_name: String
},
country: {
iso2: String,
name: String
},
proj_site: {
_id: String,
name: String,
type: String
},
transfer_gov_entity: String,
transfer_label: String,
transfer_level: String,
transfer_type: String,
transfer_unit: String,
transfer_value: Integer,
transfer_year: Integer
}
]
}
HTTP GET
Default Request
curl -GET http://end-point-uri/countrycommodity/56fcd1e3be65cd01000bd278
Response
HTTP Status Code 200
{
companies: [
{
_id: "585bba188bb3aa000f212248",
company_groups: [
_id: "585bba188bb3aa000f212223",
company_group_aliases: [],
company_group_name: "Government of Ghana",
company_group_record_established: "585bba178bb3aa000f212209",
country_of_incorporation: []
],
company_name: "Government of Ghana",
country_of_incorporation: {
country: "5808851f5e0ba42fc79bd565",
source: "585bba178bb3aa000f212209",
timestamp: "2016-12-22T11:17:39.000Z"
},
}
],
companies_of_operation: [
{
_id: "585bb9098bb3aa000f21168f",
company_groups: [
{
_id: "585bb9088bb3aa000f211573",
company_group_name: "Chrome Group",
company_group_record_established: "585bb9088bb3aa000f21155b",
country_of_incorporation: [],
company_group_aliases: []
}
],
company_name: "Starcrest",
countries_of_operation: {
country: "585bba178bb3aa000f212209",
source: "5808851f5e0ba42fc79bd565",
timestamp: "2016-12-22T11:17:39.000Z"
},
}
],
errorList: [],
concessions: [],
productions: [
{
_id: "585bba199cf560e6b32e2551",
company: null,
country: {
iso2: "GH",
name: "Ghana"
},
production_commodity: {
_id: "5808851f5e0ba42fc79bd4af",
commodity_id: "Gold",
commodity_name: "gold"
},
production_level: null,
production_price: null,
production_price_unit: null,
production_unit: null,
production_volume: 20001,
production_year: 2012,
proj_site: {
_id: String,
name: String,
type: String
},
site: null
}
},
proj_coordinates:[
{
_id: "585bba188bb3aa000f212271",
lat: 4.95613,
lng: -1.74714,
message: "Nkroful",
timestamp: "2016-12-22T11:17:39.000Z",
type: site
}
],
projects:[
{
_id: "585bba188bb3aa000f21225d",
companies: [],
companies_count: 0,
proj_commodity: [],
proj_country:[],
proj_id: "project",
proj_name: "Project",
proj_status: [],
project_id: 585bba188bb3aa000f21225d
}
],
sites: [
{
_id: "585bba188bb3aa000f21225d",
companies: [],
companies_count:0,
site_commodity: [],
site_country:{
source: "585bba188bb3aa000f21225d",
country: "5808851f5e0ba42fc79bd565"
},
site_name: "Akyem",
site_status: null
}
],
transfers: [
{
_id: "585bb8188bb3aa000f20b50d",
company: {
_id: "585bb8188bbhfs829f20b50d",
company_name: "BP"
},
country: {
iso2: "GH",
name: "Ghana"
},
proj_site: {
_id: "585bb8188bbhfs829f20b50d",
name: "Project",
type: "project"
},
transfer_label: null,
transfer_level: "project",
transfer_type: "Fees",
transfer_unit: "USD",
transfer_value: 60472,
transfer_year: 2015
}
],
transfersByRecipient: [
{
_id: "585bb8198bb3aa000f20b523",
company: {
_id: "585bb8198bbdre433f20b523",
company_name: "Company"
},
country: {
iso2: "GH",
name: "Ghana"
},
proj_site: {
_id: "585bb8198bb3aa000f20b523",
name: "Site",
type: "site"
},
transfer_gov_entity: "Ghana Revenue Authority",
transfer_label: null,
transfer_level: "country",
transfer_type: "Fees",
transfer_unit: "USD",
transfer_value: 25610,
transfer_year: 2014
}
]
}