Ambalează și expediază
Scanează unitățile culese în expediție, cântărește‑o, alege serviciul curierului, tipărește eticheta și predă‑o.
Pe această pagină
Fiecare comandă are o expediție. Postul de ambalare mută unitățile culese pentru comandă din naveta ei în expediție, verifică greutatea și tipărește eticheta. Stările sunt în Stări.
Scanează unitățile
Scanează codul de bare al unui articol al comenzii. Se acceptă doar un articol al comenzii (altfel wrong_item), doar ce s‑a cules (nothing_picked) și nu mai mult decât a rămas în navetă (too_many). O expediție conține ce s‑a cules, deci o culegere incompletă pleacă incompletă, iar restul rămâne în așteptare.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/scan-item" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "7a7461df-9c5d-4dc7-8417-da01623dda37",
"expectedRevision": 3,
"code": "2900000003071",
"quantity": "6"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/scan-item`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "7a7461df-9c5d-4dc7-8417-da01623dda37",
"expectedRevision": 3,
"code": "2900000003071",
"quantity": "6"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/scan-item',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '7a7461df-9c5d-4dc7-8417-da01623dda37',
'expectedRevision': 3,
'code': '2900000003071',
'quantity': '6',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "7a7461df-9c5d-4dc7-8417-da01623dda37",
"expectedRevision": 3,
"code": "2900000003071",
"quantity": "6"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/scan-item');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/scan-item");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "7a7461df-9c5d-4dc7-8417-da01623dda37",
"expectedRevision": 3,
"code": "2900000003071",
"quantity": "6"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "7a7461df-9c5d-4dc7-8417-da01623dda37",
"status": "accepted",
"aggregateRevision": 4
} Când un articol are unități din două loturi, lotul care expiră primul iese primul din navetă.
Cântărește‑o
Greutatea așteptată este greutatea unităților ambalate și a cartonului, iar expectedWeightKg o arată. Greutatea citită de tine este acceptată când este în limita a 3 la sută față de ea. În afara limitei este refuzată cu weight_mismatch: verifică expediția pentru o unitate lipsă sau pusă greșit. O cântărire cere toate unitățile culese ambalate și toate culegerile închise.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/weight" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "50ef2e5b-1db3-425d-8cf6-9d05f8e9882d",
"expectedRevision": 4,
"weightKg": "122.000"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/weight`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "50ef2e5b-1db3-425d-8cf6-9d05f8e9882d",
"expectedRevision": 4,
"weightKg": "122.000"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/weight',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '50ef2e5b-1db3-425d-8cf6-9d05f8e9882d',
'expectedRevision': 4,
'weightKg': '122.000',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "50ef2e5b-1db3-425d-8cf6-9d05f8e9882d",
"expectedRevision": 4,
"weightKg": "122.000"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/weight');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/weight");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "50ef2e5b-1db3-425d-8cf6-9d05f8e9882d",
"expectedRevision": 4,
"weightKg": "122.000"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "50ef2e5b-1db3-425d-8cf6-9d05f8e9882d",
"status": "accepted",
"aggregateRevision": 5
} Alege serviciul
standard se livrează în două zile lucrătoare după ziua în care pleacă expediția, next-day într‑una. Zilele lucrătoare sunt zilele care nu sunt sâmbătă, duminică sau sărbătoare legală.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/service" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "2918a9f7-d7e0-481f-89fc-94e955e7fa0f",
"expectedRevision": 3,
"service": "next-day"
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/service`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "2918a9f7-d7e0-481f-89fc-94e955e7fa0f",
"expectedRevision": 3,
"service": "next-day"
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/service',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '2918a9f7-d7e0-481f-89fc-94e955e7fa0f',
'expectedRevision': 3,
'service': 'next-day',
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "2918a9f7-d7e0-481f-89fc-94e955e7fa0f",
"expectedRevision": 3,
"service": "next-day"
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/service');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/service");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "2918a9f7-d7e0-481f-89fc-94e955e7fa0f",
"expectedRevision": 3,
"service": "next-day"
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "2918a9f7-d7e0-481f-89fc-94e955e7fa0f",
"status": "accepted",
"aggregateRevision": 4
} Tipărește eticheta
Eticheta cere o expediție ambalată, cântărită și cu serviciu ales. O expediție ambalată înainte de ora 14:00, ora locală, într‑o zi lucrătoare pleacă în ziua aceea, iar una ambalată mai târziu pleacă în următoarea zi lucrătoare. Eticheta poartă ziua în care pleacă și ziua livrării, iar odată tipărită, expediția este închisă: o altă scanare este refuzată cu label_printed.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/label" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "e68f5fae-0cec-430c-8b5c-9612dbb6d3cc",
"expectedRevision": 6
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/label`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "e68f5fae-0cec-430c-8b5c-9612dbb6d3cc",
"expectedRevision": 6
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/label',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': 'e68f5fae-0cec-430c-8b5c-9612dbb6d3cc',
'expectedRevision': 6,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "e68f5fae-0cec-430c-8b5c-9612dbb6d3cc",
"expectedRevision": 6
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/label');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/label");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "e68f5fae-0cec-430c-8b5c-9612dbb6d3cc",
"expectedRevision": 6
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "e68f5fae-0cec-430c-8b5c-9612dbb6d3cc",
"status": "accepted",
"aggregateRevision": 7
} Predă‑o
Când curierul ia expediția, înregistreaz‑o. Unitățile ei ies din stocul depozitului și se trimite com.rdcopilot.warehouse.shipment.dispatched.v1.
curl
curl -X POST "$RDC_BASE_URL/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/dispatch" \
-H "Authorization: Bearer $RDC_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"operationId": "49300b83-cd9d-4491-8cd1-64dda778fda1",
"expectedRevision": 7
}' JavaScript
const response = await fetch(`${process.env.RDC_BASE_URL}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/dispatch`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.RDC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"operationId": "49300b83-cd9d-4491-8cd1-64dda778fda1",
"expectedRevision": 7
}),
});
const result = await response.json(); Python
import os
import requests
response = requests.request(
'POST',
f'{os.environ["RDC_BASE_URL"]}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/dispatch',
headers={
'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
},
json={
'operationId': '49300b83-cd9d-4491-8cd1-64dda778fda1',
'expectedRevision': 7,
},
)
result = response.json() PHP
<?php
$body = <<<'JSON'
{
"operationId": "49300b83-cd9d-4491-8cd1-64dda778fda1",
"expectedRevision": 7
}
JSON;
$curl = curl_init(getenv('RDC_BASE_URL') . '/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/dispatch');
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#
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/warehouse/v1/shipments/a4000000-0000-4000-8000-000000001043/dispatch");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
"operationId": "49300b83-cd9d-4491-8cd1-64dda778fda1",
"expectedRevision": 7
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync(); {
"operationId": "49300b83-cd9d-4491-8cd1-64dda778fda1",
"status": "accepted",
"aggregateRevision": 8
}