Guides

Pagination

Page through a sync's rejections and warnings with after and nextAfter.

Read the first page

List sync rejections (GET /api/integrations/push/v1/sync/rejections) and the Integrations MCP server's get_rejections tool return a sync's issues one page at a time.

  • syncId: the sync to read. Leave it out to read the latest sync.
  • type: rejection (the default) for the records a sync refused, or warning for the values it dropped from records it accepted.
  • limit: items per page, 1 to 1,000. The default is 100.
curl "https://www.postaged.com/api/integrations/push/v1/sync/rejections?syncId=0b6f3c3e-8d2a-4f7e-9a51-2c4d8e6f1a20&limit=1" \
  -H "Authorization: Bearer $POSTAGED_API_KEY"
Response200 OK
{
  "syncId": "0b6f3c3e-8d2a-4f7e-9a51-2c4d8e6f1a20",
  "type": "rejection",
  "items": [
    {
      "id": 7,
      "batch": 1,
      "index": 3,
      "externalId": "crm-1077",
      "code": "invalid_email",
      "field": "email",
      "message": "\"email\" does not look like an email address."
    }
  ],
  "nextAfter": "7"
}

Read the next page

Each page carries nextAfter. Pass it back as after, with the same syncId, type, and limit, until nextAfter is null: that page is the last.

An after that is not a nextAfter value is refused with 400 invalid_cursor.

curl "https://www.postaged.com/api/integrations/push/v1/sync/rejections?syncId=0b6f3c3e-8d2a-4f7e-9a51-2c4d8e6f1a20&limit=1&after=7" \
  -H "Authorization: Bearer $POSTAGED_API_KEY"