Name | Type | Required | Data |
---|---|---|---|
username | Text varchar(50) | YES | Username |
password | Text varchar(100) | YES | Password |
user_token | Text | YES | Token provided |
Name | Type | Required | Data |
---|---|---|---|
{order_id} | Numeric (int 11) | YES | Order id |
$post = [
'username' => '',
'password' => '',
'user_token' => '',
];
$ch = curl_init('https://api.rrr.lt/get/print_shipping_label/{order_id}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);
Content-Type: application/pdfOn failure:
json response with error message