REST /api/v1/contacts 7 endpoints
GET /api/v1/contacts/api/v1/contacts

List contacts from repository

Public

Response Example

{
  "data": [
    {
      "contact_id": "c-00123",
      "first_name": "Ingrid",
      "last_name": "Solberg",
      "email": "ingrid.solberg@example.no",
      "phone": "+47 912 34 567",
      "address": "Storgata 12, 0155 Oslo",
      "date_of_birth": "1988-04-21",
      "created_at": "2025-09-14T10:22:00Z",
      "updated_at": "2026-01-05T08:44:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 154
  }
}
GET /api/v1/contacts/api/v1/contacts/:id

Fetch contact by ID from repository (fetchContactById)

Public

Response Example

{
  "contact_id": "c-00123",
  "first_name": "Ingrid",
  "last_name": "Solberg",
  "email": "ingrid.solberg@example.no",
  "phone": "+47 912 34 567",
  "address": "Storgata 12, 0155 Oslo",
  "date_of_birth": "1988-04-21",
  "created_at": "2025-09-14T10:22:00Z",
  "updated_at": "2026-01-05T08:44:00Z"
}
POST /api/v1/contacts/api/v1/contacts

Create contact record in repository

Public

Request Example

{
  "first_name": "Bjørn",
  "last_name": "Dahl",
  "email": "bjorn.dahl@example.no",
  "phone": "+47 906 78 901",
  "address": "Rosenkrantz gate 3, 0159 Oslo",
  "date_of_birth": "1982-07-25"
}

Response Example

{
  "contact_id": "c-00209",
  "first_name": "Bjørn",
  "last_name": "Dahl",
  "email": "bjorn.dahl@example.no",
  "phone": "+47 906 78 901",
  "address": "Rosenkrantz gate 3, 0159 Oslo",
  "date_of_birth": "1982-07-25",
  "created_at": "2026-03-26T11:25:00Z",
  "updated_at": "2026-03-26T11:25:00Z"
}
PUT /api/v1/contacts/api/v1/contacts/:id

Update contact fields in repository (updateContact)

Public

Request Example

{
  "email": "bjorn.dahl@newemail.no",
  "address": "Rosenkrantz gate 5, 0159 Oslo"
}

Response Example

{
  "contact_id": "c-00209",
  "first_name": "Bjørn",
  "last_name": "Dahl",
  "email": "bjorn.dahl@newemail.no",
  "phone": "+47 906 78 901",
  "address": "Rosenkrantz gate 5, 0159 Oslo",
  "date_of_birth": "1982-07-25",
  "updated_at": "2026-03-26T12:30:00Z"
}
DELETE /api/v1/contacts/api/v1/contacts/:id

Delete contact record from repository

Public

Response Example

{
  "contact_id": "c-00209",
  "deleted": true,
  "deleted_at": "2026-03-26T13:00:00Z"
}
GET /api/v1/contacts/api/v1/contacts/:id/chapter-affiliations

Fetch chapter affiliations from repository (fetchChapterAffiliations)

Public

Response Example

{
  "data": [
    {
      "chapter_id": "ch-01",
      "chapter_name": "Oslo Sentrum",
      "joined_at": "2025-09-14T10:22:00Z"
    },
    {
      "chapter_id": "ch-07",
      "chapter_name": "Grünerløkka",
      "joined_at": "2026-01-03T09:10:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
PUT /api/v1/contacts/api/v1/contacts/:id/chapter-affiliations

Update chapter affiliations in repository (updateChapterAffiliations)

Public

Request Example

{
  "chapter_ids": [
    "ch-01",
    "ch-04"
  ]
}

Response Example

{
  "contact_id": "c-00123",
  "chapter_affiliations": [
    "ch-01",
    "ch-04"
  ],
  "updated_at": "2026-03-26T12:35:00Z"
}

Additional Metadata

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