REST /api/v1/dynamics-portal 5 endpoints
POST /api/v1/dynamics-portal/api/v1/dynamics-portal/authenticate

Authenticate with the Dynamics 365 portal and obtain a session token

Public

Request Example

{
  "client_id": "eircodex-service-account",
  "scope": "Dynamics365.ReadWrite"
}

Response Example

{
  "authenticated": true,
  "session_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_at": "2026-03-26T12:00:00Z",
  "tenant": "hlf-ireland.crm4.dynamics.com"
}
POST /api/v1/dynamics-portal/api/v1/dynamics-portal/records

Create a new record in Dynamics via POST

Public

Request Example

{
  "endpoint": "/api/data/v9.2/contacts",
  "payload": {
    "firstname": "Aoife",
    "lastname": "Brennan",
    "emailaddress1": "aoife.brennan@hlf.ie",
    "new_mentor_status": "paused"
  }
}

Response Example

{
  "dynamics_record_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "endpoint": "/api/data/v9.2/contacts",
  "status": "created",
  "created_at": "2026-03-26T08:30:00Z"
}
PUT /api/v1/dynamics-portal/api/v1/dynamics-portal/records/:recordId

Update an existing Dynamics record via PATCH

Public

Request Example

{
  "endpoint": "/api/data/v9.2/contacts",
  "payload": {
    "new_mentor_status": "active",
    "new_pause_end_date": "2026-04-15"
  }
}

Response Example

{
  "dynamics_record_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "endpoint": "/api/data/v9.2/contacts",
  "status": "updated",
  "updated_at": "2026-04-15T09:00:00Z"
}
GET /api/v1/dynamics-portal/api/v1/dynamics-portal/records/:recordId

Retrieve a record from Dynamics

Public

Response Example

{
  "dynamics_record_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "firstname": "Aoife",
  "lastname": "Brennan",
  "emailaddress1": "aoife.brennan@hlf.ie",
  "new_mentor_status": "active",
  "new_certification_expiry": "2028-03-26"
}
DELETE /api/v1/dynamics-portal/api/v1/dynamics-portal/records/:recordId

Delete a record from Dynamics

Public

Request Example

{
  "endpoint": "/api/data/v9.2/contacts"
}

Response Example

{
  "deleted": true,
  "dynamics_record_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "deleted_at": "2026-03-26T11:00:00Z"
}

Additional Metadata

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