---
title: "Companies and warehouses | Docs | ERP by R&D Copilot"
description: "Which company a call acts for, and where stock is kept."
canonical: "https://erp.rdcopilot.com/docs/concepts/companies-and-warehouses/"
language: en
updated: 2026-11-22
---

# Companies and warehouses

Which company a call acts for, and where stock is kept.

## The company

Every document belongs to one legal company. The client credentials you receive are issued for one company, and every request acts for it: you never name the company in a request, and you cannot read or change the documents of another one. A group of companies has one set of credentials per company.

Events carry the company as `legalCompanyId` and the account as `customerOrgId`, so one endpoint can serve several companies and still tell them apart. See [Event envelope](https://erp.rdcopilot.com/docs/events/event-envelope/).

## Customers and suppliers

Customers and suppliers are partners of the company. A partner has `roles`: a customer has terms of payment (`paymentTermsDays`) and a `creditLimit`, a supplier has neither. Orders name their partner by `customerId` or `supplierId`, the `id` of the partner.

## Warehouses

Stock is kept in the warehouses of the company. `GET /warehouses` lists them. A receipt names the warehouse the goods go into and a delivery the one the units leave, both with `warehouseId`; a company with one warehouse can leave it out.

The stock fields of an item (`onHand`, `reserved`, `available`, `incoming`) are totals over the warehouses. See [Items, units and prices](https://erp.rdcopilot.com/docs/concepts/items-units-and-prices/) for what each one counts.

curl

```bash
curl "$RDC_BASE_URL/erp/v1/warehouses?limit=20" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/erp/v1/warehouses?limit=20`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/erp/v1/warehouses?limit=20',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/erp/v1/warehouses?limit=20');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/erp/v1/warehouses?limit=20");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Response 200

```json
{
  "items": [
    {
      "id": "418d35c2-d9c8-4021-917a-04c8ebe593a7",
      "name": "Central warehouse"
    }
  ],
  "nextCursor": null
}
```
