Skip to content

GET Company By ID

Ksenyia edited this page Feb 1, 2017 · 5 revisions

It gives the data of company like company groups and commodities.

Resource URI

/companydata/{id}

Resource Properties

Property Description
id A string that uniquely identifies the company.

Response Attribute

{
  errorList: [
    {
      type: String,
      message: String
    }
  ],
  company_commodity: Array,
  projects: [
    {
      _id: String,
      proj_id: String,
      proj_name: String,
      proj_commodity: Array,
      proj_country: [
        {
          _id: String,
          iso2: String,
          name: String,
          country_aliases: Array
        }
      ],
      proj_status: Array,
      proj_site: {
        _id: String
      }
    }
  ],
  sites: [
    {
      _id: String,
      field: Boolean,
      site_name: String,
      site_status: String,
      site_commodity: Array,
      site_country: {
        _id: String,
        iso2: String,
        name: String,
        country_aliases: Array
      }
    }
  ],
  concessions: [
    {
      _id: String,
      concession_name: String,
      concession_status: String,
      concession_commodities: Array,
      concession_country: {
        _id: String,
        iso2: String,
        name: String,
        country_aliases: Array
      }
    }
  ],
  proj_coordinates: Array,
  transfers: [
    {
      _id: String,
      transfer_year: Integer,
      transfer_type: String,
      transfer_level: String,
      transfer_label: String,
      transfer_unit: String,
      transfer_value: Integer,
      country: {
        iso2: String,
        name: String
      },
      company: {
        _id: String,
        company_name: String
      },
      proj_site: {
        _id: String,
        name: String,
        type: String
      }
    }
  ],
  production: Array,
  company_groups: Array
}

HTTP GET

Default Request

curl -GET http://end-point-uri/companydata/56fcd3d8be65cd01000bd79e

Response

HTTP Status Code 200

{
  errorList: [
    {
      type: "Company",
      message: "company site links not found"
    },
    {
      type: "Company",
      message: "company concession  links not found"
    },
    {
      type: "Company productions",
      message: "company productions not found"
    }
  ],
  company_commodity: [],
  projects: [
    {
      _id: "gb--m4etgt",
      proj_id: "gb--m4etgt",
      proj_name: "",
      proj_commodity: [],
      proj_country: [
        {
          _id: "5808851f5e0ba42fc79bd560",
          iso2: "GB",
          name: "United Kingdom of Great Britain and Northern Ireland",
          country_aliases: []
        }
      ],
      proj_status: [],
      proj_site: {
        _id: "gb--m4etgt"
      }
    }
  ],
  sites: [
    {
      _id: "585bb9208bb3aa000f211b50",
      field: true,
      site_name: "Nembe Creek East",
      site_status: null,
      site_commodity: [],
      site_country: {
        _id: "5808851f5e0ba42fc79bd5b7",
        iso2: "NG",
        name: "Nigeria",
        country_aliases: []
      }
    }
  ],
  concessions: [
    {
      _id: "585bb9208bb3aa000f211b4d",
      concession_name: "OPL-240",
      concession_status: null,
      concession_commodities: [],
      concession_country: {
        _id: "5808851f5e0ba42fc79bd5b7",
        iso2: "NG",
        name: "Nigeria",
        country_aliases: []
      }
    }
  ],
  proj_coordinates: [],
  transfers: [
    {
      _id: "585bb82e8bb3aa000f20b786",
      transfer_year: 2015,
      transfer_type: "Fees",
      transfer_level: "project",
      transfer_label: null,
      transfer_unit: "GBP",
      transfer_value: 0,
      country: {
        iso2: "GB",
        name: "United Kingdom of Great Britain and Northern Ireland"
      },
      company: {
        _id: "585bb82d8bb3aa000f20b77a",
        company_name: "Suncor Energy UK Limited"
      },
      proj_site: {
        _id: "gb--m4etgt",
        name: "",
        type: "project"
      }
    },
    {
      _id: "585bb82e8bb3aa000f20b784",
      transfer_year: 2015,
      transfer_type: "Tax",
      transfer_level: "country",
      transfer_label: null,
      transfer_unit: "GBP",
      transfer_value: 310592913,
      country: {
        iso2: "GB",
        name: "United Kingdom of Great Britain and Northern Ireland"
      },
      company: {
        _id: "585bb82d8bb3aa000f20b77a",
        company_name: "Suncor Energy UK Limited"
      },
      proj_site: []
    }
  ],
  production: [],
  company_groups: []
} 
Clone this wiki locally