### C# SOAP Client Setup for Packeta API
Source: https://docs.packeta.com/docs/packet-creation/home-delivery
This C# code snippet shows the basic setup for creating a SOAP client to interact with the Packeta API. It includes necessary using statements for WCF (Windows Communication Foundation) and asynchronous operations.
```csharp
using System;
using System.ServiceModel;
using System.Threading.Tasks;
```
--------------------------------
### Create Packet via Packeta API
Source: https://docs.packeta.com/docs/packet-creation/home-delivery
Demonstrates how to send a request to create a new shipment in the Packeta system. The C# example uses a generated client, while the Node.js example manually constructs an XML payload and sends it via HTTP POST.
```csharp
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
createPacketResponse response = await client.createPacketAsync(new createPacketRequest(apiPassword, packetAttributes));
Console.WriteLine(response.createPacketResult.id);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
```
```javascript
import { Builder, Parser } from "xml2js";
const requestBody = { /* ... payload structure ... */ };
try {
const response = await fetch("https://www.zasilkovna.cz/api/rest", {
method: "POST",
body: new Builder().buildObject(requestBody)
});
const responseBody = await new Parser({ explicitArray: false }).parseStringPromise(await response.text());
console.dir(responseBody, {depth: null});
}
catch (exception) {
console.log(exception);
}
```
--------------------------------
### PUDO Point Validation Response Example
Source: https://docs.packeta.com/docs/pudo-delivery/widget
A JSON response example demonstrating the structure of a PUDO point validation result, including the 'isValid' status, point details, and a list of specific error codes if validation fails.
```json
{
"isValid": false,
"point": {
"name": "Z-BOX",
"address": {
"street": "Českomoravská 2408",
"city": "Praha ",
"zip": "190 00",
"country": "cz"
},
"group": "zbox"
},
"errors": [
{
"code": "NoAgeVerification",
"description": "The PUDO point does not offer Age Verification Service."
}
]
}
```
--------------------------------
### Create Home Delivery Packet via C# WCF
Source: https://docs.packeta.com/docs/packet-creation/home-delivery
Demonstrates initializing a WCF service client in C# to communicate with the Packeta SOAP API. It shows the setup of bindings and the instantiation of the PacketAttributes object.
```C#
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
namespace PacketaClientExample
{
class Program
{
static async Task Main(string[] args)
{
BasicHttpsBinding binding = new BasicHttpsBinding();
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
const string apiPassword = "apiPassword";
PacketAttributes packetAttributes = new PacketAttributes
{
addressId = 106,
name = "John",
surname = "Doe",
email = "example@packetatest.com",
phone = "+420777777777",
value = 500,
weight = 1
};
}
}
}
```
--------------------------------
### Generate PDF Courier Labels (SOAP Request Example)
Source: https://docs.packeta.com/docs/label-printing/carrier-label
This snippet shows an example XML request payload for the SOAP API to generate multiple courier labels in PDF format. It specifies packet IDs, courier numbers, and the desired format. This is a request structure, not a full implementation.
```xml
{{apiPassword}}1234567890DR4362230958U1234567891DR4362235031U0A6 on A6
```
--------------------------------
### Implement Packeta Widget UI and Logic
Source: https://docs.packeta.com/docs/pudo-delivery/examples/packeta-pudos
A complete example showing the HTML button trigger and the JavaScript configuration required to initialize the widget and handle the selected pick-up point callback.
```HTML
```
```JavaScript
const packetaApiKey = '197fd6840f332ccf';
const packetaOptions = {
language: "en",
valueFormat: "Packeta,id,carrierId,carrierPickupPointId,name,city,street",
view: "modal",
vendors: [{ country: "cz" }, { country: "hu" }, { country: "sk" }, { country: "ro" }, { country: "cz", group: "zbox" }, { country: "sk", group: "zbox" }, { country: "hu", group: "zbox" }, { country: "pl" }, { country: "ro", group: "zbox" }]
};
function showSelectedPickupPoint(point) {
const saveElement = document.querySelector(".packeta-selector-value");
saveElement.innerText = '';
if (point) {
console.log("Selected point", point);
saveElement.innerText = "Address: " + point.formatedValue;
}
}
```
--------------------------------
### Generate ZPL Shipping Labels via SOAP Request Example
Source: https://docs.packeta.com/docs/label-printing/packeta-label
This snippet shows an example XML request payload for generating ZPL (Zebra Programming Language) shipping labels via the Packeta SOAP API. It includes parameters like API password, packet ID, and DPI.
```xml
{{apiPassword}}4308024368300
```
--------------------------------
### Packeta Packet Tracking SOAP Response Example
Source: https://docs.packeta.com/docs/packet-tracking/tracking
This is an example of a SOAP response received after tracking a packet. It contains a list of records, each detailing a status update with timestamp, status code, and descriptive text. The response structure includes namespaces for SOAP and the Packeta API.
```xml
2022-01-06T11:43:091received dataInternetový obchod předal informace o zásilce.002022-01-07T12:44:432arrivedZásilka byla přijata na pobočce Zásilkovna, Packeta office - pouze pro zaměstnance.103802022-01-07T12:44:443prepared for departureZásilka byla připravena k odeslání na pobočce Zásilkovna, Packeta office - pouze pro zaměstnance.1038134972022-01-07T14:12:113prepared for departureZásilka byla připravena k odeslání na depu Zásilkovna, DEPO, Praha - Štěrboholy, K Hrušovu 292/4.13497138542022-01-07T14:14:192arrivedZásilka byla přijata na depu Zásilkovna, DEPO, Praha - Štěrboholy, K Hrušovu 292/4.1349702022-01-10T00:23:084departedZásilka byla odeslána na pobočku DEPO, Hůry, Hůry 23813497138542022-01-10T03:21:112arrivedZásilka byla přijata na depu Zásilkovna, DEPO, Hůry, Hůry 238.1385402022-01-10T05:37:547deliveredZásilka byla vydána.185790
```
--------------------------------
### Generate PDF Courier Labels (REST Request Example)
Source: https://docs.packeta.com/docs/label-printing/carrier-label
This snippet provides an example XML request body for the Packeta REST API to generate multiple courier labels in PDF format. It lists packet IDs and courier numbers, along with offset and format preferences. This is a request structure, not a full implementation.
```xml
{{apiPassword}}1234567890DR4362230958U1234567891DR4362235031U0A6 on A6okJVBERi0xLjcKJeLjz9MKNSAwIG9iago8PCA.....vVHlwZSAvUGFYKMzQ0MDAKJSVFT0YK
```
--------------------------------
### Carrier Information Example (JSON)
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
This JSON object details a specific carrier, 'AT Austrian Post HD'. It includes their ID, availability, API enablement, and requirements for shipping, such as whether email or phone is mandatory. It also specifies the maximum weight and currency they handle.
```json
[
{
"id": "1",
"name": "AT Austrian Post HD",
"available": "true",
"pickupPoints": "false",
"apiAllowed": "true",
"separateHouseNumber": "false",
"customsDeclarations": "false",
"requiresEmail": "true",
"requiresPhone": "true",
"requiresSize": "false",
"disallowsCod": "false",
"country": "at",
"currency": "EUR",
"maxWeight": "30",
"labelRouting": "C38-***-080",
"labelName": "AT Austrian Post HD"
}
]
```
--------------------------------
### Generate PDF Shipping Labels via SOAP (C#)
Source: https://docs.packeta.com/docs/label-printing/packeta-label
This C# example shows how to generate PDF shipping labels using the Packeta SOAP API. It utilizes WCF client generation and asynchronous operations. The generated PDF is saved to a local file.
```csharp
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
using System.IO;
namespace PacketaClientExample
{
class Program
{
static async Task Main(string[] args)
{
BasicHttpsBinding binding = new BasicHttpsBinding() { MaxReceivedMessageSize = int.MaxValue };
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
string apiPassword = "apiPassword";
ulong[] packetIds = { 1234567890 };
string format = "A6 on A6";
uint offset = 0;
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
packetsLabelsPdfResponse response = await client.packetsLabelsPdfAsync(
new packetsLabelsPdfRequest(apiPassword, packetIds, format, offset)
);
//Process response
await File.WriteAllBytesAsync("./label.pdf", response.packetsLabelsPdfResult);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
```
--------------------------------
### GET /v5/{API_KEY}/carrier/json
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
Retrieves a list of available home delivery carrier options.
```APIDOC
## GET /v5/{API_KEY}/carrier/json
### Description
Retrieves a list of home delivery service options.
### Method
GET
### Endpoint
https://pickup-point.api.packeta.com/v5/__API_KEY__/carrier/json?lang=__LANGUAGE__
### Parameters
#### Path Parameters
- **API_KEY** (string) - Required - Your unique API key.
#### Query Parameters
- **lang** (string) - Required - Two-letter ISO 639-1 language code.
### Response
#### Success Response (200)
- **JSON** (object) - A list of available carriers.
#### Response Example
{
"carriers": [
{ "id": "CARRIER_ID", "name": "Carrier Name" }
]
}
```
--------------------------------
### Generate Packet Labels via SOAP API
Source: https://docs.packeta.com/docs/packet-tracking/tracking
This C# example demonstrates how to generate PDF shipping labels for packets using the Packeta SOAP API. It requires an API password and an array of packet IDs. The generated labels are saved as a PDF file.
```csharp
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
namespace PacketaClientExample
{
class Program
{
static async Task Main(string[] args)
{
BasicHttpsBinding binding = new BasicHttpsBinding() { MaxReceivedMessageSize = int.MaxValue };
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
string apiPassword = "apiPassword";
ulong[] packetIds = { 2400636120 };
string format = "A6 on A6";
uint offset = 0;
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
packetsLabelsPdfResponse response = await client.packetsLabelsPdfAsync(
new packetsLabelsPdfRequest(apiPassword, packetIds, format, offset)
);
//Process response
await File.WriteAllBytesAsync("./label.pdf", response.packetsLabelsPdfResult);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
```
--------------------------------
### Create Packet via SOAP API
Source: https://docs.packeta.com/docs/getting-started/packeta-api
Demonstrates how to initialize a SOAP client and invoke the createPacket method to register a new shipment. Includes error handling for SOAP faults and examples for both C# and PHP environments.
```csharp
using System;
using System.ServiceModel;
namespace ConsoleApplication1
{
using Packeta;
class Program
{
static void Main(string[] args)
{
Packeta.PacketaClient gw = new PacketaClient();
string apiPassword = "1234567890abcdef1234567890abcdef";
PacketAttributes attrs = new PacketAttributes();
attrs.number = "123456";
attrs.name = "John";
attrs.surname = "Doe";
attrs.email = "example@packetatest.com";
attrs.phone = "+420777123456";
attrs.addressId = 79;
attrs.cod = 145.55;
attrs.value = 145.55;
attrs.weight = 2;
attrs.eshop = "MyEshop";
PacketIdDetail packet;
try
{
packet = gw.createPacket(apiPassword, attrs);
}
catch (FaultException e) {
// TODO: process error
}
}
}
}
```
```php
$gw = new SoapClient("https://www.zasilkovna.cz/api/soap.wsdl");
$apiPassword = "1234567890abcdef1234567890abcdef";
try {
$packet = $gw->createPacket($apiPassword, array(
'number' => "123456",
'name' => "John",
'surname' => "Doe",
'email' => "example@packetatest.com",
'phone' => "+420777123456",
'addressId' => 79,
'cod' => 145.55,
'value' => 145.55,
'weight' => 2,
'eshop' => "MyEshop"
));
} catch (SoapFault $e) {
var_dump($e->detail); // property detail contains error info
}
```
--------------------------------
### Create Home Delivery Packet via REST and SOAP XML
Source: https://docs.packeta.com/docs/packet-creation/home-delivery
Demonstrates the raw XML structure for creating a packet using REST-like XML payloads and standard SOAP envelopes. These examples define the required packet attributes such as recipient contact information, physical address, and shipment values.
```XML
{{apiPassword}}orderNumberJohnDoeExample Companyexample@packetatest.com+4207777777771061232.5123CZKČeskomoravská2408/1aPraha19000NoteMyEshop
```
```XML
{{apiPassword}}orderNumberJohnDoeExample Companyexample@packetatest.cm+420777777777106123CZK1232.5MyEshopNoteČeskomoravská2408/1aPraha19000
```
--------------------------------
### Z-BOX Attributes Example (JSON)
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
This JSON object represents a Z-BOX (a type of automated parcel locker) and its attributes. It includes location details, operational status, payment options, and accessibility information. The `directions` field contains HTML formatted instructions for pickup.
```json
[
{
"id": "18579",
"type": "zbox",
"name": "Z-BOX Praha 9, Libeň, Českomoravská 2408",
"place": "Z-BOX",
"street": "Českomoravská 2408",
"city": "Praha ",
"zip": "190 00",
"country": "cz",
"currency": "CZK",
"status": {
"statusId": "1",
"description": "In operation"
},
"codAllowed": "1",
"displayFrontend": "1",
"directions": "
Z-BOX je umístěn při vstupu do budovy Balabenka office z ulic Sokolovská a Na Rozcestí.
\n
Dobré vědět:
\n
Standardní úložní doba zásilek je 2 dny s možností prodloužení o další 1 den.
\n
Co potřebujete k vyzvednutí zásilky?
\n
Můžete si vybrat, jak zásilku ze Z-BOXu vyzvednete:
\n\n
\n Pomocí aktuální verze mobilní aplikace Zásilkovna\n
\n
zapněte si Bluetooth a polohové služby
\n
ujistěte se, že v mobilní aplikaci i v objednávce zásilky máte uvedené stejné tel. číslo
\n
\n
\n
Pomocí kódu, který vám pošleme do e-mailu, aplikace a případně SMS, jakmile bude zásilka připravena k vyzvednutí
\n\n
Vyzvedáváte zásilku na dobírku? Tu je potřeba uhradit předem přímo v aplikaci nebo přes odkaz na sledování zásilky, který najdete v e-mailu.
",
"directionsCar": {},
"directionsPublic": {},
"wheelchairAccessible": "no",
"creditCardPayment": "yes",
"dressingRoom": "0",
"claimAssistant": "0",
"packetConsignment": "1",
"latitude": "50.1048",
"longitude": "14.48353",
"url": "https://www.zasilkovna.cz/pobocky/praha-ceskomoravska-2408",
"maxWeight": "15",
"hasKeypad": "1",
"labelRouting": "C10-617-18579",
"labelName": "Z-BOX Praha 9, Libeň, Českomoravská 2408",
"photos": [
{
"thumbnail": "https://files.packeta.com/points/thumb/point_18579_4299c793b533.jpg",
"normal": "https://files.packeta.com/points/normal/point_18579_4299c793b533.jpg"
},
{
"thumbnail": "https://files.packeta.com/points/thumb/point_18579_50b43da18d7c.jpg",
"normal": "https://files.packeta.com/points/normal/point_18579_50b43da18d7c.jpg"
},
{
"thumbnail": "https://files.packeta.com/points/thumb/point_18579_be127e71ddb2.jpg",
"normal": "https://files.packeta.com/points/normal/point_18579_be127e71ddb2.jpg"
}
],
"openingHours": {
"regular": {
"monday": "00:00–23:59",
"tuesday": "00:00–23:59",
"wednesday": "00:00–23:59",
"thursday": "00:00–23:59",
"friday": "00:00–23:59",
"saturday": "00:00–23:59",
"sunday": "00:00–23:59"
},
"exceptions": {}
},
"extendedDelivery": {
"saturday": "true"
}
}
]
```
--------------------------------
### Create Storage File via PHP SOAP
Source: https://docs.packeta.com/docs/packet-creation/customs-declarations/storage-file
Example implementation using the PHP SoapClient to upload a file. It reads a local file, encodes it to base64, and sends it to the Packeta API with authentication.
```php
createStorageFile(
$apiPassword,
[
'content' => base64_encode(file_get_contents('invoice_202101112.pdf')),
'name' => 'invoice_202101112.pdf',
]
);
} catch(SoapFault $e) {
var_dump($e->detail); // property detail contains error info
}
```
--------------------------------
### Create Packet Claim with Password via C#
Source: https://docs.packeta.com/docs/packet-creation/returns
Demonstrates integration using WCF (Windows Communication Foundation) in C#. It configures the BasicHttpsBinding and initializes the service client to perform the claim operation.
```csharp
BasicHttpsBinding binding = new BasicHttpsBinding();
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
const string apiPassword = "apiPassword";
ClaimWithPasswordAttributes claimAttributes = new ClaimWithPasswordAttributes
{
phone = "+48698183000",
email = "test@packetatest.cz",
value = 100,
eshop = "MyEshop",
number = "orderNumber",
currency = "CZK"
};
```
--------------------------------
### Create Packet Claim via API
Source: https://docs.packeta.com/docs/packet-creation/returns
Demonstrates how to initiate a packet return claim using various protocols and languages. The process requires authentication via API password and submission of claim attributes such as order number, customer email, and package value.
```REST
{{apiPassword}}claimNumberexample@packetatest.com100.00CZKMyEshopfalse
```
```SOAP
{{apiPassword}}claimNumberexample@packetatest.com+420777777777100CZKMyEshopfalse
```
```PHP
$apiPassword = 'apiPassword';
$claimAttributes = [
'number' => '20220513001',
'email' => 'example@packetatest.com',
'value' => '100',
'currency' => 'CZK',
'eshop' => 'MyEshop',
'sendEmailToCustomer' => false,
];
try {
$client = new SoapClient("https://www.zasilkovna.cz/api/soap.wsdl");
$result = $client->createPacketClaim($apiPassword, $claimAttributes);
var_dump($result);
}
catch (SoapFault $e){
echo $e->getMessage();
}
```
```C#
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
// ... inside Main method
BasicHttpsBinding binding = new BasicHttpsBinding();
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
const string apiPassword = "apiPassword";
ClaimAttributes claimAttributes = new ClaimAttributes
{
phone = "+48698183000",
email = "example@packetatest.com",
value = 500,
eshop = "MyEshop",
number = "orderNumber",
currency = "CZK",
sendLabelToEmail = false
};
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
createPacketClaimResponse response = await client.createPacketClaimAsync(new createPacketClaimRequest(apiPassword, claimAttributes));
Console.WriteLine(response.createPacketClaimResult.id);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
```
```Node.js
import { Builder, Parser } from "xml2js"
const requestBody = {
createPacketClaim: {
apiPassword: "",
claimAttributes: {
number: "claimNumber"
}
}
};
```
--------------------------------
### GET /packetsLabelsPdf
Source: https://docs.packeta.com/docs/label-printing/packeta-label
Retrieves multiple shipping labels in a single PDF document.
```APIDOC
## GET /packetsLabelsPdf
### Description
Generates a PDF document containing multiple shipping labels for a list of packets.
### Method
GET
### Endpoint
/packetsLabelsPdf
### Parameters
#### Query Parameters
- **packetIds** (array) - Required - A list of unique packet identifiers.
### Request Example
GET /packetsLabelsPdf?packetIds=123,456,789
### Response
#### Success Response (200)
- **Content-Type** (string) - application/pdf
#### Response Example
[Binary PDF data]
```
--------------------------------
### Generate PNG Courier Label via SOAP (C#)
Source: https://docs.packeta.com/docs/label-printing/carrier-label
This C# example demonstrates how to generate a courier label using the Packeta SOAP API. It utilizes System.ServiceModel to create a client, send a request with API credentials and packet details, and saves the resulting PNG image to a file. Error handling is included.
```csharp
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
using System.IO;
namespace PacketaClientExample
{
class Program
{
static async Task Main(string[] args)
{
BasicHttpsBinding binding = new BasicHttpsBinding() { MaxReceivedMessageSize = int.MaxValue };
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
string apiPassword = "apiPassword";
ulong packetId = 1234567890;
string courierNumber = "5451339442605";
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
packetCourierLabelPngResponse response = await client.packetCourierLabelPngAsync(
new packetCourierLabelPngRequest(apiPassword, packetId, courierNumber)
);
//Process response
await File.WriteAllBytesAsync("./label.png", response.packetCourierLabelPngResult);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
```
--------------------------------
### Generate ZPL Shipping Label via Packeta SOAP API (C#)
Source: https://docs.packeta.com/docs/label-printing/packeta-label
This C# example shows how to use the Packeta WCF client to call the `packetLabelZpl` asynchronous method. It configures the binding and endpoint, then sends a request with the API password, packet ID, and DPI. The resulting ZPL is saved to a file.
```csharp
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using PacketaService;
using System.IO;
namespace PacketaClientExample
{
class Program
{
static async Task Main(string[] args)
{
BasicHttpsBinding binding = new BasicHttpsBinding() { MaxReceivedMessageSize = int.MaxValue };
EndpointAddress endpointAddress = new EndpointAddress("https://www.zasilkovna.cz/api/soap");
string apiPassword = "apiPassword";
ulong packetId = 1234567890;
uint dpi = 300;
PacketaClient client = new PacketaClient(binding, endpointAddress);
try
{
packetLabelZplResponse response = await client.packetLabelZplAsync(
new packetLabelZplRequest(apiPassword, packetId, dpi)
);
//Process response
await File.WriteAllTextAsync("./label.zpl", response.packetLabelZplResult);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}
```
--------------------------------
### GET /packetLabelZpl
Source: https://docs.packeta.com/docs/label-printing/packeta-label
Retrieves a single shipping label in ZPL format for thermal printers.
```APIDOC
## GET /packetLabelZpl
### Description
Generates and retrieves a single Packeta shipping label in ZPL (Zebra Programming Language) format.
### Method
GET
### Endpoint
/packetLabelZpl
### Parameters
#### Query Parameters
- **packetId** (string) - Required - The unique identifier of the packet.
### Request Example
GET /packetLabelZpl?packetId=123456789
### Response
#### Success Response (200)
- **Content-Type** (string) - text/plain
#### Response Example
^XA^FO50,50^A0N,50,50^FDLabelData^FS^XZ
```
--------------------------------
### GET /packetLabelPdf
Source: https://docs.packeta.com/docs/label-printing/packeta-label
Retrieves a single shipping label in PDF format for a specific packet.
```APIDOC
## GET /packetLabelPdf
### Description
Generates and retrieves a single Packeta shipping label in PDF format.
### Method
GET
### Endpoint
/packetLabelPdf
### Parameters
#### Query Parameters
- **packetId** (string) - Required - The unique identifier of the packet.
### Request Example
GET /packetLabelPdf?packetId=123456789
### Response
#### Success Response (200)
- **Content-Type** (string) - application/pdf
#### Response Example
[Binary PDF data]
```
--------------------------------
### Create Packet with Customs Data via SOAP
Source: https://docs.packeta.com/docs/packet-creation/home-delivery
Demonstrates the SOAP envelope structure for submitting packet creation requests with customs requirements. Utilizes the Zasilkovna WSDL namespaces for attribute definition.
```XML
{{apiPassword}}orderNumberJohnDoe3294eadcreate
```
--------------------------------
### GET /v5/{API_KEY}/box/json
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
Retrieves a feed of all currently operational Packeta Z-BOXes.
```APIDOC
## GET /v5/{API_KEY}/box/json
### Description
Retrieves a list of all operational Packeta Z-BOXes.
### Method
GET
### Endpoint
https://pickup-point.api.packeta.com/v5/__API_KEY__/box/json?lang=__LANGUAGE__
### Parameters
#### Path Parameters
- **API_KEY** (string) - Required - Your unique API key.
#### Query Parameters
- **lang** (string) - Required - Two-letter ISO 639-1 language code.
### Response
#### Success Response (200)
- **JSON** (object) - A list of operational boxes.
#### Response Example
{
"boxes": [
{ "id": "Z123", "name": "Z-BOX Name", "location": "City" }
]
}
```
--------------------------------
### GET /v5/{API_KEY}/branch/json
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
Retrieves a feed of all currently operational Packeta Pick-up Points.
```APIDOC
## GET /v5/{API_KEY}/branch/json
### Description
Retrieves a list of all operational Packeta branches.
### Method
GET
### Endpoint
https://pickup-point.api.packeta.com/v5/__API_KEY__/branch/json?lang=__LANGUAGE__
### Parameters
#### Path Parameters
- **API_KEY** (string) - Required - Your unique API key found in the client section.
#### Query Parameters
- **lang** (string) - Required - Two-letter ISO 639-1 language code (e.g., cs, en, sk).
### Response
#### Success Response (200)
- **JSON** (object) - A list of operational branches.
#### Response Example
{
"branches": [
{ "id": "123", "name": "Branch Name", "address": "Street 1" }
]
}
```
--------------------------------
### Create Packet Claim with Password via Node.js
Source: https://docs.packeta.com/docs/packet-creation/returns
Demonstrates how to send a POST request to the Packeta API using the fetch API and xml2js for XML serialization. It handles the request body construction and parses the resulting XML response.
```javascript
try {
const response = await fetch(
"https://www.zasilkovna.cz/api/rest",
{
method: "POST",
body: new Builder().buildObject(requestBody)
}
);
const responseBody = await new Parser({ explicitArray: false }).parseStringPromise(await response.text());
console.dir({body: responseBody, status: response.status}, {depth: null});
}
catch (exception) {
console.log(exception);
}
```
--------------------------------
### GET /branches
Source: https://docs.packeta.com/docs/pudo-delivery/packeta-pudos
Retrieves detailed information about branches, including location, operational status, and accessibility features.
```APIDOC
## GET /branches
### Description
Retrieves a list of branches with their full attribute set, including location, status, and operational capabilities.
### Method
GET
### Endpoint
/branches
### Parameters
#### Query Parameters
- **lang** (String) - Optional - Language code for status messages (default: 'en').
### Response
#### Success Response (200)
- **id** (Integer) - Unique branch ID.
- **name** (String) - Branch name.
- **status** (Object) - Status container (see status object).
- **openingHours** (Object) - Container for opening hours.
- **photos** (Object) - Container for photo elements.
### Response Example
{
"id": 123,
"name": "Baker & Sons",
"status": {
"statusId": 1,
"description": "In operation"
},
"latitude": 50.08,
"longitude": 14.43
}
```