{
    "data": [{
        "id": 1,
        "origin_address": {
            "id": 1,
            "name": "Kohler Group",
            "email": "parisian.kristoffer@yahoo.com",
            "phone": "+12069536978",
            "line_1": "193 Dach Shores Suite 632",
            "line_2": "Apt. 300",
            "city": "Moenburgh",
            "region": "Colorado",
            "post_code": "72099",
            "country": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        },
        "destination_address": {
            "id": 1,
            "name": "Kohler Group",
            "email": "parisian.kristoffer@yahoo.com",
            "phone": "+12069536978",
            "line_1": "193 Dach Shores Suite 632",
            "line_2": "Apt. 300",
            "city": "Moenburgh",
            "region": "Colorado",
            "post_code": "72099",
            "country": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        },
        "line_items": [{
            "id": 1,
            "product": {
                "id": 1,
                "sku": "1356284",
                "description": "Red Shirt",
                "category": "Clothing",
                "price": 55.71,
                "length": 6,
                "width": 11,
                "height": 3,
                "weight": 2,
                "returnable": true,
                "created_at": "2024-12-09 22:49:57",
                "updated_at": "2024-12-09 22:49:57"
            },
            "reason": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        }],
        "shipments": [{
            "id": 1,
            "status": 2,
            "package": "Large Box",
            "length": 6,
            "width": 11,
            "height": 3,
            "weight": 2,
            "tracking_number": "EX18472",
            "tracking_url": "https://provider.com/track/EX18472",
            "label_url": "https://provider.com/label/EX18472",
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        }],
        "reference": "ORD-12345",
        "price": 22.75,
        "carrier": "FedEx",
        "return_url": "https://app.returnpilot.co/...",
        "link_expires_at": "2024-12-09 15:39:37",
        "created_at": "2024-12-09 15:39:37",
        "updated_at": "2024-12-09 15:39:37"
    }],
    "links": {
        "first": "https://app.returnpilot.co/api/v1/orders?page=1",
        "last": null,
        "prev": null,
        "next": "https://app.returnpilot.co/api/v1/orders?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "https://app.returnpilot.co/api/v1/orders",
        "per_page": 20,
        "to": 20
    }
}

Overview

This endpoint can be used to retrieve orders. Endpoint: /api/v1/orders Method: GET
Orders are shown in descending order.For example, if you had 5 pages of orders, page 1 would contain the latest orders, while page 5 would contain the oldest orders.
This endpoint returns a paginated response.

Response

If the orders are successfully retrieved, the API will return a 200 OK status code. The response will contain the following content:
data
array
required
An array of Order objects.If no orders are found, this will be an empty array.
URLs for the first, last, previous, and next pages.Explained in further detail in the pagination guide.
meta
array
required
Metadata about the current page.Explained in further detail in the pagination guide.
{
    "data": [{
        "id": 1,
        "origin_address": {
            "id": 1,
            "name": "Kohler Group",
            "email": "parisian.kristoffer@yahoo.com",
            "phone": "+12069536978",
            "line_1": "193 Dach Shores Suite 632",
            "line_2": "Apt. 300",
            "city": "Moenburgh",
            "region": "Colorado",
            "post_code": "72099",
            "country": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        },
        "destination_address": {
            "id": 1,
            "name": "Kohler Group",
            "email": "parisian.kristoffer@yahoo.com",
            "phone": "+12069536978",
            "line_1": "193 Dach Shores Suite 632",
            "line_2": "Apt. 300",
            "city": "Moenburgh",
            "region": "Colorado",
            "post_code": "72099",
            "country": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        },
        "line_items": [{
            "id": 1,
            "product": {
                "id": 1,
                "sku": "1356284",
                "description": "Red Shirt",
                "category": "Clothing",
                "price": 55.71,
                "length": 6,
                "width": 11,
                "height": 3,
                "weight": 2,
                "returnable": true,
                "created_at": "2024-12-09 22:49:57",
                "updated_at": "2024-12-09 22:49:57"
            },
            "reason": 1,
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        }],
        "shipments": [{
            "id": 1,
            "status": 2,
            "package": "Large Box",
            "length": 6,
            "width": 11,
            "height": 3,
            "weight": 2,
            "tracking_number": "EX18472",
            "tracking_url": "https://provider.com/track/EX18472",
            "label_url": "https://provider.com/label/EX18472",
            "created_at": "2024-12-09 22:49:57",
            "updated_at": "2024-12-09 22:49:57"
        }],
        "reference": "ORD-12345",
        "price": 22.75,
        "carrier": "FedEx",
        "return_url": "https://app.returnpilot.co/...",
        "link_expires_at": "2024-12-09 15:39:37",
        "created_at": "2024-12-09 15:39:37",
        "updated_at": "2024-12-09 15:39:37"
    }],
    "links": {
        "first": "https://app.returnpilot.co/api/v1/orders?page=1",
        "last": null,
        "prev": null,
        "next": "https://app.returnpilot.co/api/v1/orders?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "path": "https://app.returnpilot.co/api/v1/orders",
        "per_page": 20,
        "to": 20
    }
}