REST /api/v1/affiliations 6 endpoints
GET /api/v1/affiliations/api/v1/affiliations

List all affiliations

Public

Response Example

{
  "data": [
    {
      "affiliation_id": "aff-301",
      "contact_id": "contact-8821",
      "chapter_id": "chapter-oslo",
      "status": "active",
      "loaded_at": "2026-03-26T12:00:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 12
  }
}
GET /api/v1/affiliations/api/v1/affiliations/:id

Get a single affiliation record

Public

Response Example

{
  "affiliation_id": "aff-301",
  "contact_id": "contact-8821",
  "chapter_id": "chapter-oslo",
  "chapter_name": "Oslo Chapter",
  "status": "active",
  "loaded_at": "2026-03-26T12:00:00Z"
}
POST /api/v1/affiliations/api/v1/affiliations

Create a new affiliation (add contact to chapter via cubit flow)

Public

Request Example

{
  "contact_id": "contact-8821",
  "chapter_id": "chapter-trondheim"
}

Response Example

{
  "affiliation_id": "aff-302",
  "contact_id": "contact-8821",
  "chapter_id": "chapter-trondheim",
  "status": "active",
  "created_at": "2026-03-26T12:35:00Z"
}
PUT /api/v1/affiliations/api/v1/affiliations/:id

Update affiliation status

Public

Request Example

{
  "status": "suspended"
}

Response Example

{
  "affiliation_id": "aff-302",
  "contact_id": "contact-8821",
  "chapter_id": "chapter-trondheim",
  "status": "suspended",
  "updated_at": "2026-03-26T14:10:00Z"
}
DELETE /api/v1/affiliations/api/v1/affiliations/:id

Remove an affiliation (remove contact from chapter via cubit flow)

Public

Response Example

{
  "deleted": true,
  "affiliation_id": "aff-302"
}
GET /api/v1/affiliations/api/v1/affiliations/contact/:contactId/load

Load all chapter affiliations for a contact (cubit loadAffiliations)

Public

Response Example

{
  "contact_id": "contact-8821",
  "affiliations": [
    {
      "affiliation_id": "aff-301",
      "chapter_id": "chapter-oslo",
      "chapter_name": "Oslo Chapter",
      "status": "active"
    },
    {
      "affiliation_id": "aff-299",
      "chapter_id": "chapter-stavanger",
      "chapter_name": "Stavanger Chapter",
      "status": "active"
    }
  ],
  "total_chapters": 2
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}