PlatformIntegrations
API ReferenceGetting Started

Pagination, Sorting & Search

Navigate large collections with pagination, sorting, and search.

List endpoints return collections using offset-based pagination with optional sorting and search.

Query parameters

ParameterTypeDescription
offsetintegerNumber of items to skip from the start. Default 0.
limitintegerDefault 10. The maximum depends on the endpoint. Larger values return 400.
sortBystringProperty to sort by. Each list endpoint accepts its own values, listed in the API Reference. Other values return 400.
descendingbooleantrue for descending order. Default false (ascending).
searchstringFree-text filter. Behavior is endpoint-specific.

Request

curl "https://api.sandbox.myobligo.com/leases?offset=20&limit=25&sortBy=createdAt&descending=true" \
  -u "$CLIENT_ID:$CLIENT_SECRET" \
  -H "Obligo-Version: 1.2"

Response

{
  "totalItems": 247,
  "items": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "unit": "4B",
      "rent": 250000,
      "startsAt": "2026-05-01",
      "endsAt": "2027-04-30",
      "termType": "Annual",
      "availableProducts": [
        {
          "type": "BillingAuthorization",
          "status": "Eligible",
          "optedOut": false,
          "eligibility": {
            "restrictions": []
          }
        }
      ],
      "metadata": {},
      "createdAt": "2026-03-01T10:30:00.000Z",
      "updatedAt": "2026-03-01T10:30:00.000Z"
    }
  ]
}

Response shape

PropertyTypeDescription
totalItemsintegerTotal matching items across all pages.
itemsarrayResource objects for this page.

Increase offset by limit while offset + items.length < totalItems.