İçeriğe atla
ShopentlyLearn

Sonuçları sayfalama

Uzun bir sonuç listesini birden fazla istekle alabilirsiniz. Daha fazla veri varsa yanıtta nereden devam edeceğinizi gösteren bir imleç bulunur. Listenin sonraki bölümünü almak için bunu bir sonraki istekte gönderin. Tüm sonuçları alana kadar devam edin veya ihtiyacınız olan veriyi alınca durun.

İstek örneği

GET/api/v1/orders?limit=2

cURL isteği

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request GET \
  --url 'https://shop.onshopently.com/api/v1/orders?limit=2' \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'

Yanıt

{
  "data": [
    {
      "created_at": "2026-10-19T10:00:00Z",
      "customer": {
        "email": "customer@example.invalid",
        "first_name": "Example",
        "last_name": "Example",
        "phone": null
      },
      "delivery": {
        "amount": {
          "amount": "0.00",
          "currency": "PLN",
          "minor_units": 2
        },
        "dates": {
          "dispatch_timezone": "Europe/Warsaw",
          "estimated_delivery_from": "2026-10-20",
          "estimated_delivery_to": "2026-10-21",
          "planned_dispatch_on": "2026-10-19"
        },
        "method_code": "shipping-old",
        "method_name": "Historic carrier",
        "pickup_point": null,
        "recipient_mode": "full_address"
      },
      "discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "id": "order-0000",
      "lifecycle_state": "placed",
      "locale": "pl",
      "market_id": "market-pl",
      "number": "0001",
      "payment": {
        "amount": {
          "amount": "329.40",
          "currency": "PLN",
          "minor_units": 2
        },
        "environment": "live",
        "method_code": "payment-old",
        "method_name": "Historic method",
        "paid_at": null,
        "status": "unpaid",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 0
      },
      "prices_include_tax": true,
      "shipping_discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "status": {
        "id": "status-0",
        "name": "Status 0",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 1
      },
      "subtotal": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax": {
        "amount": "49.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax_country_code": "PL",
      "total": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      }
    },
    {
      "created_at": "2026-10-19T10:00:00Z",
      "customer": {
        "email": "customer@example.invalid",
        "first_name": "Example",
        "last_name": "Example",
        "phone": null
      },
      "delivery": {
        "amount": {
          "amount": "0.00",
          "currency": "PLN",
          "minor_units": 2
        },
        "dates": {
          "dispatch_timezone": "Europe/Warsaw",
          "estimated_delivery_from": "2026-10-20",
          "estimated_delivery_to": "2026-10-21",
          "planned_dispatch_on": "2026-10-19"
        },
        "method_code": "shipping-old",
        "method_name": "Historic carrier",
        "pickup_point": null,
        "recipient_mode": "full_address"
      },
      "discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "id": "order-0001",
      "lifecycle_state": "placed",
      "locale": "pl",
      "market_id": "market-pl",
      "number": "0002",
      "payment": {
        "amount": {
          "amount": "329.40",
          "currency": "PLN",
          "minor_units": 2
        },
        "environment": "live",
        "method_code": "payment-old",
        "method_name": "Historic method",
        "paid_at": null,
        "status": "unpaid",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 0
      },
      "prices_include_tax": true,
      "shipping_discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "status": {
        "id": "status-0",
        "name": "Status 0",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 1
      },
      "subtotal": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax": {
        "amount": "49.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax_country_code": "PL",
      "total": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      }
    }
  ],
  "meta": {
    "pagination": {
      "has_more": true,
      "limit": 2,
      "next_cursor": "EXAMPLE_NEXT_CURSOR"
    },
    "request_id": "example"
  }
}

Sonraki sonuç sayfası

meta.pagination içindeki has_more değeri true ise daha fazla sonuç vardır. Aynı bölümdeki next_cursor değerini kopyalayıp sonraki istekte cursor olarak gönderin.

GET/api/v1/orders?cursor=EXAMPLE_NEXT_CURSOR&limit=2

cURL isteği

curl --disable --globoff --fail-with-body --silent --show-error \
  --proto '=https' --connect-timeout 5 --max-time 30 \
  --request GET \
  --url 'https://shop.onshopently.com/api/v1/orders?cursor=EXAMPLE_NEXT_CURSOR&limit=2' \
  --header 'Authorization: Bearer EXAMPLE_ACCESS_TOKEN'

Yanıt

{
  "data": [
    {
      "created_at": "2026-10-19T10:00:00Z",
      "customer": {
        "email": "customer@example.invalid",
        "first_name": "Example",
        "last_name": "Example",
        "phone": null
      },
      "delivery": {
        "amount": {
          "amount": "0.00",
          "currency": "PLN",
          "minor_units": 2
        },
        "dates": {
          "dispatch_timezone": "Europe/Warsaw",
          "estimated_delivery_from": "2026-10-20",
          "estimated_delivery_to": "2026-10-21",
          "planned_dispatch_on": "2026-10-19"
        },
        "method_code": "shipping-old",
        "method_name": "Historic carrier",
        "pickup_point": null,
        "recipient_mode": "full_address"
      },
      "discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "id": "order-0002",
      "lifecycle_state": "placed",
      "locale": "pl",
      "market_id": "market-pl",
      "number": "0003",
      "payment": {
        "amount": {
          "amount": "329.40",
          "currency": "PLN",
          "minor_units": 2
        },
        "environment": "live",
        "method_code": "payment-old",
        "method_name": "Historic method",
        "paid_at": null,
        "status": "unpaid",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 0
      },
      "prices_include_tax": true,
      "shipping_discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "status": {
        "id": "status-0",
        "name": "Status 0",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 1
      },
      "subtotal": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax": {
        "amount": "49.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax_country_code": "PL",
      "total": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      }
    },
    {
      "created_at": "2026-10-19T10:00:00Z",
      "customer": {
        "email": "customer@example.invalid",
        "first_name": "Example",
        "last_name": "Example",
        "phone": null
      },
      "delivery": {
        "amount": {
          "amount": "0.00",
          "currency": "PLN",
          "minor_units": 2
        },
        "dates": {
          "dispatch_timezone": "Europe/Warsaw",
          "estimated_delivery_from": "2026-10-20",
          "estimated_delivery_to": "2026-10-21",
          "planned_dispatch_on": "2026-10-19"
        },
        "method_code": "shipping-old",
        "method_name": "Historic carrier",
        "pickup_point": null,
        "recipient_mode": "full_address"
      },
      "discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "id": "order-0003",
      "lifecycle_state": "placed",
      "locale": "pl",
      "market_id": "market-pl",
      "number": "0004",
      "payment": {
        "amount": {
          "amount": "329.40",
          "currency": "PLN",
          "minor_units": 2
        },
        "environment": "live",
        "method_code": "payment-old",
        "method_name": "Historic method",
        "paid_at": null,
        "status": "unpaid",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 0
      },
      "prices_include_tax": true,
      "shipping_discount_amount": {
        "amount": "24.60",
        "currency": "PLN",
        "minor_units": 2
      },
      "status": {
        "id": "status-0",
        "name": "Status 0",
        "updated_at": "2026-10-19T10:00:00Z",
        "version": 1
      },
      "subtotal": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax": {
        "amount": "49.40",
        "currency": "PLN",
        "minor_units": 2
      },
      "tax_country_code": "PL",
      "total": {
        "amount": "329.40",
        "currency": "PLN",
        "minor_units": 2
      }
    }
  ],
  "meta": {
    "pagination": {
      "has_more": false,
      "limit": 2,
      "next_cursor": null
    },
    "request_id": "example"
  }
}