---
title: "Inventariază o locație | Documentație | WMS by R&D Copilot"
description: "Cere inventarierea unui raft, introdu ce s-a numărat, numără din nou dacă este nevoie și aprobă ajustarea."
canonical: "https://warehouse.rdcopilot.com/ro/docs/guides/count-a-location/"
language: ro
updated: 2026-11-22
---

# Inventariază o locație

Cere inventarierea unui raft, introdu ce s-a numărat, numără din nou dacă este nevoie și aprobă ajustarea.

O inventariere compară stocul pe care îl ține sistemul pentru un articol și un lot de pe un raft cu ce numără acolo o persoană. Stocul se schimbă doar când șeful de depozit aprobă inventarierea. Stările sunt `to-count`, `counted` și `approved`.

## Cere o inventariere

Numește raftul, articolul și lotul lui. O singură inventariere a unui raft este deschisă la un moment dat: o a doua cerere este refuzată cu `count_requested`. O culegere închisă incomplet cu motivul `not-found` cere una singură, cu motivul `short-pick`.

curl

```bash
curl -X POST "$RDC_BASE_URL/warehouse/v1/counts" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
  "locationCode": "A-02-01",
  "sku": "ZA-0201",
  "lot": "L26-0870",
  "by": "mihai-stan"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
    "locationCode": "A-02-01",
    "sku": "ZA-0201",
    "lot": "L26-0870",
    "by": "mihai-stan"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'a23f419f-8068-42c1-85a8-f24186ea4ed1',
        'locationCode': 'A-02-01',
        'sku': 'ZA-0201',
        'lot': 'L26-0870',
        'by': 'mihai-stan',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
  "locationCode": "A-02-01",
  "sku": "ZA-0201",
  "lot": "L26-0870",
  "by": "mihai-stan"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
  "locationCode": "A-02-01",
  "sku": "ZA-0201",
  "lot": "L26-0870",
  "by": "mihai-stan"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "a23f419f-8068-42c1-85a8-f24186ea4ed1",
  "status": "accepted",
  "aggregateRevision": 1
}
```

## Introdu ce s-a numărat

Trimite cantitatea numărată, 0 sau mai mult. Sistemul păstrează ca `system` stocul pe care îl avea în acel moment, iar `difference` este `counted` minus `system`. Un raft la care un culegător a scanat o locație sau un articol nu poate fi numărat: răspunsul este `location_busy`.

curl

```bash
curl -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
  "expectedRevision": 1,
  "quantity": "27",
  "by": "dan-ilie"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
    "expectedRevision": 1,
    "quantity": "27",
    "by": "dan-ilie"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': 'f68c9ace-1e54-4920-8b06-bef2039d1b20',
        'expectedRevision': 1,
        'quantity': '27',
        'by': 'dan-ilie',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
  "expectedRevision": 1,
  "quantity": "27",
  "by": "dan-ilie"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000002/count");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
  "expectedRevision": 1,
  "quantity": "27",
  "by": "dan-ilie"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "f68c9ace-1e54-4920-8b06-bef2039d1b20",
  "status": "accepted",
  "aggregateRevision": 2
}
```

## Numără din nou

Dacă numărul pare greșit, trimite inventarierea înapoi la `to-count`. Numerele pe care le avea se șterg.

curl

```bash
curl -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
  "expectedRevision": 2
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
    "expectedRevision": 2
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '09f87735-539b-486b-8516-6f6b8d4b8f1b',
        'expectedRevision': 2,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
  "expectedRevision": 2
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/recount");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
  "expectedRevision": 2
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "09f87735-539b-486b-8516-6f6b8d4b8f1b",
  "status": "accepted",
  "aggregateRevision": 3
}
```

## Aprobă ajustarea

Aprobă doar șeful de depozit (altfel `approver_required`), niciodată o inventariere introdusă de el (`own_count`) și niciodată când stocul s-a mișcat după inventariere (`stock_changed`): numără din nou. O diferență zero se aprobă fără mișcare; oricare alta adaugă o mișcare de tip `adjust` între raft și `adjustment`.

curl

```bash
curl -X POST "$RDC_BASE_URL/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
  "expectedRevision": 2,
  "by": "mihai-stan"
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
    "expectedRevision": 2,
    "by": "mihai-stan"
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '4fbe134b-31a3-4323-8804-56154bd99553',
        'expectedRevision': 2,
        'by': 'mihai-stan',
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
  "expectedRevision": 2,
  "by": "mihai-stan"
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$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.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/counts/a3000000-0000-4000-8000-000000000001/approve");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
  "expectedRevision": 2,
  "by": "mihai-stan"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

Răspuns 202

```json
{
  "operationId": "4fbe134b-31a3-4323-8804-56154bd99553",
  "status": "accepted",
  "aggregateRevision": 3
}
```
