Skip to main content

Pagination Types

The IT Management API primarily uses cursor-based pagination. A small number of endpoints (users) use page-number pagination.

Cursor-Based Pagination (Primary)

Most list endpoints (people / services / devices / identity / event-logs / contracts / alerts, etc.) use cursor-based pagination.

Request Parameters

ParameterTypeDefaultMaximumDescription
cursorstringThe nextCursor value from the previous response. Omit to start from the beginning
limitnumber200Number of items to return per request
For the event-logs endpoint, the request parameter is named nextCursor instead of cursor.

Response Format

{
  "meta": {
    "nextCursor": "F3UdkoSbpBNrjwP93AX2HQ",
    "totalItems": 100
  },
  "items": [
    // Array of resources
  ]
}

Response Fields

FieldTypeDescription
meta.nextCursorstring | nullCursor for the next page. null when on the last page
meta.totalItemsinteger | nullTotal item count. May be null
itemsarrayArray of resources

Examples

# Retrieve the first page
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.itmc.i.moneyforward.com/api/v1/organizations/YOUR_ORG_ID/people?limit=50"

# Retrieve the next page (using nextCursor from previous response)
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.itmc.i.moneyforward.com/api/v1/organizations/YOUR_ORG_ID/people?cursor=F3UdkoSbpBNrjwP93AX2HQ&limit=50"
async function fetchAllPeople(orgId) {
  const allItems = [];
  let cursor = undefined;

  do {
    const params = new URLSearchParams({ limit: '200' });
    if (cursor) params.set('cursor', cursor);

    const response = await fetch(
      `https://api.itmc.i.moneyforward.com/api/v1/organizations/${orgId}/people?${params}`,
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );

    const data = await response.json();
    allItems.push(...data.items);
    cursor = data.meta.nextCursor;
  } while (cursor);

  return allItems;
}

Page-Number Pagination (users endpoint)

GET /api/v1/organizations/{id}/users uses page-number pagination.

Request Parameters

ParameterTypeDescription
pagenumberPage number (1-indexed)
limitnumberItems per page

Response Format

{
  "metadata": {
    "prevPage": 1,
    "nextPage": 3
  },
  "users": [
    // Array of users
  ]
}

Best Practices

  1. Loop until nextCursor is null to retrieve all items
  2. Avoid setting limit higher than necessary (maximum: 200)
  3. Do not rely on totalItems for loop termination — use nextCursor instead, as totalItems may be null
Last modified on May 18, 2026