Get Order Returns https://api.rrr.lt/get/order_returns/{date_from}/{date_to}

POST parameters

Name Type Required Data
username Text varchar(50) YES Username
password Text varchar(100) YES Password
user_token Text YES Token provided

URI values

Name Type Required Data
date_from date (Y-m-d) NO Date from Order Return created (exp. 2022-07-10)
date_to date (Y-m-d) NO Date to Order Return created (exp. 2023-07-25)
page integer NO Range from [1...PAGE_NUMBERS]

PHP Curl example code

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

$ch = curl_init('https://api.rrr.lt/get/order_returns?date_from=2022-07-01&date_to=2023-07-25&page=3');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = json_decode(curl_exec($ch));
curl_close($ch);

Output

{
    "list": [
        {
            "id": 12345,
            "order_id": 12345,
            "order_return_items": [
                {
                    "id": 12,
                    "part_id": 77,
                    "name": "Front door window",
                    "return_reason": "Not suitable for my vehicle",
                    "price": 275.11,
                    "returnable_amount": 275.11,
                    "currency": "EUR"
                }
            ],
            "status": "New",
            "shipping_price": 19.84,
            "returnable_shipping_amount": 19.84,
            "total_paid_price": 294.95,
            "total_returnable_amount": 275.11,
            "currency": "EUR",
            "created_at": "2023-07-10T20:14:39+03:00",
            "customer": {
                "first_name": "John",
                "last_name": "Doe",
                "postal_code": "13013",
                "telephone": "+37060000000",
                "country": "LT",
                "address": "Gedimino g. 1D",
                "region": "Vilnius"
            }
        },
        {
            "id": 123456,
            "order_id": 123456,
            "order_return_items": [
                {
                    "id": 123,
                    "part_id": 88,
                    "name": "Headlamp left",
                    "return_reason": "Part not working",
                    "price": 78.6,
                    "returnable_amount": 78.6,
                    "currency": "EUR"
                }
            ],
            "status": "Returned",
            "shipping_price": 21.72,
            "returnable_shipping_amount": 21.72,
            "total_paid_price": 100.32,
            "total_returnable_amount": 78.6,
            "currency": "EUR",
            "created_at": "2023-07-11T11:06:44+03:00",
            "customer": {
                "first_name": "Jane",
                "last_name": "Doe",
                "postal_code": "44055",
                "telephone": "+37060000000",
                "country": "IT",
                "address": "Via Leonardo Fibonacci, 30H",
                "region": "Bergamo"
            }
        }
    ],
    "msg": "OK",
    "status_code": "R200"
}