> For the complete documentation index, see [llms.txt](https://docs.parameter1.com/basecms-graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parameter1.com/basecms-graphql/querying-data/retrieving-a-company.md).

# Retrieving a Company

## Retrieve a company by ID

<mark style="color:green;">`POST`</mark> `https://<instance>.base-staging.parameter1.com/graphql`

This Query allows you to return company data after looking it up by its identifier.

#### Headers

| Name           | Type   | Description                                                         |
| -------------- | ------ | ------------------------------------------------------------------- |
| X-Tenant-Key   | string | The Tenant Key used to access your data.                            |
| Authentication | string | If specified, the user that should be attributed with this request. |

#### Request Body

| Name          | Type   | Description                                     |
| ------------- | ------ | ----------------------------------------------- |
| operationName | string | The name of the GraphQL query                   |
| variables     | object | The GraphQL variables to inject into the query. |
| query         | string | The GraphQL query text to execute               |

{% tabs %}
{% tab title="200 Request fulfilled successfully." %}

```
{
  "data": {
    "contentCompany": {
      "id": 21112606,
      "name": "Acme, Inc."
    }
  }
}
```

{% endtab %}

{% tab title="400 Your request could not be fulfilled. Check the `error` key of the JSON response to identify the issue(s) with your request." %}

```
{
  "error": {
    "errors": [
      {
        "message": "Variable \"$input\" got invalid value {}; Field id of required type Int! was not provided.",
        "extensions": {
          "code": "INTERNAL_SERVER_ERROR"
        }
      }
    ]
  }
}

```

{% endtab %}
{% endtabs %}

![The query as run within the GraphQL Playground client](/files/-MJnSC43mAMw_-T2LWMQ)

Query

{% tabs %}
{% tab title="GraphQL" %}
Query

```
query RetrieveCompanyByID($input: ContentCompanyQueryInput!) {
  contentCompany(input: $input) {
    id
    name
  }
}
```

Variables

```
{
  "input": {
    "id": 21112606
  }
}
```

{% endtab %}

{% tab title="cURL" %}
cURL Request

```
curl 'https://instance.graphql.base-cms.io' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Connection: keep-alive' -H 'DNT: 1' -H 'Origin: file://' -H 'x-tenant-key: my_tenant_key' --data-binary '{"query":"query RetrieveCompanyByID($input: ContentCompanyQueryInput!) {\n  contentCompany(input: $input) {\n    id\n    name\n  }\n}","variables":{"input":{"id":21112606}}}' --compressed
```

{% endtab %}
{% endtabs %}
