---
updatedAt: 2026-04-11T05:45:44.000Z
agentTools:
  projectIndex: https://docs.company.info/llms.txt
---

# JSON API

All Company.info APIs follow the JSON:API specification — a standardized format for structuring requests and responses in JSON.

This ensures consistency across all APIs in the Hub, making integration more predictable, maintainable, and efficient for developers.

***

## Structure of JSON API

Company.info APIs adhere to the JSON:API specification, which defines a consistent structure for both requests and responses. Below are the key components of the format:

**Resource Objects**\
&#x9;•	Represent core entities in the API.\
&#x9;•	Each resource includes a type and an id.\
&#x9;•	The attributes object contains data fields for the resource.\
&#x9;•	The relationships object defines links to related resources.

**Document Structure**\
&#x9;•	Every response is a JSON object containing one or more of the following top-level keys:\
&#x9;•	data: the primary resource(s) returned.\
&#x9;•	errors: contains error information when a request fails.\
&#x9;•	meta: includes additional metadata, such as pagination.\
&#x9;•	included: used to sideload related resources.

**Relationships**\
&#x9;•	Relationships between resources are represented in a dedicated relationships object.\
&#x9;•	To fetch related resources in the same response, use the include query parameter (e.g. `?include=parent,children`).

**Included Resources**\
&#x9;•	The included section (*optional*) returns related resources that are part of the relationships defined in data.\
&#x9;•	This avoids additional API calls and improves performance.

**Error Handling**\
&#x9;•	All errors are returned in a standardized structure under the errors key.\
&#x9;•	Each error object may include:\
&#x9;•	code: application-specific error code\
&#x9;•	title: brief summary of the error\
&#x9;•	detail: human-readable explanation of what went wrong

**Meta Information**\
&#x9;•	The meta object provides non-standard, supplementary information.\
&#x9;•	It can appear alongside data, errors, or on its own—for example, to describe pagination or versioning.

***

## Example Responses

### :white\_check\_mark: Successful response:

```json
{
  // the main resource object
  "data": [
    {
      "id": "0123456",
      "type": "orders",
      // attributes contains the actual requested data 
      "attributes": {
        "companyName": "Company A",
        "correspondenceAddress": {
          "city": "Amsterdam",
          "street": "amsterdamstraat"
        },
      },
      // (optional) links an object to another object if there is an relationship between them
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": "1234567"
          }
        }
      },
      // links contains the link to the object itself or other related objects
      "links": {
        "self": "https://example.com/0123456"
      }
    }
  ],
  // (optional) includes the object that is linked with the relationship object 
  "included": [
    {
      "type": "organizations",
      "id": "1234567",
      "attributes": {
        "tradeRegisterID": "98765"
      },
      "links": {
        "self": "https://example.com/1234567"
      }
    }
  ],
  // (optional) links contains the link to the object itself or other related objects
  "links": {
    "first": "https://example.com/",
    "last": "https://example.com/",
    "next": "https://example.com/",
    "prev": "https://example.com/",
    "self": "https://example.com/"
  },
  // (optional) additional information that is not linked to the object, but is useful
  "meta": {
    "totalResults": 0,
    "totalPages": 0
  }
}
```

### ❌ Error response:

```json
{
  "errors": [
    {
      "title": "failed to fetch requested order",
      "detail": "the parameter 'address' is a required field",
      "status": "400",
      "code": "400"
    }
  ]
}
```