Get Shipping label https://api.rrr.lt/get/print_shipping_label/{order_id}

POST parameters

Name Type Required Data
username Text varchar(50) YES Username
password Text varchar(100) YES Password
user_token Text YES Token provided
Before printing Shipping label you have to create order post data. Click here to see how to do it.

URI values

Name Type Required Data
{order_id} Numeric (int 11) YES Order id

Query parameters

Name Type Required Data
label_type String NO Label format type. Allowed values: "pdf" (default), "zpl". Note: ZPL format is only supported for UPS, GLS and Geodis providers.

PHP Curl example code

$post = [
'username' => '',
'password' => '',
'user_token' => '',
];

// For PDF format (default)
$ch = curl_init('https://api.rrr.lt/get/print_shipping_label/{order_id}');

// For ZPL format
// $ch = curl_init('https://api.rrr.lt/get/print_shipping_label/{order_id}?label_type=zpl');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);

Output

On success (PDF format):
                        Content-Type: application/pdf
                    
On success (ZPL format):
                        Content-Type: application/zpl
                    
On failure:
                        json response with error message