Skip to content

feat!: add managed card alert endpoints#361

Merged
tessstoddard merged 1 commit intomasterfrom
tess/managed_card_alerts
Apr 8, 2026
Merged

feat!: add managed card alert endpoints#361
tessstoddard merged 1 commit intomasterfrom
tess/managed_card_alerts

Conversation

@tessstoddard
Copy link
Copy Markdown
Contributor

@tessstoddard tessstoddard commented Apr 7, 2026

Summary of Changes

  • Add managed card alert endpoints
  • Move alert models from com.mx.path.model.mdx.model.account.alerts to com.mx.path.model.mdx.model.account.alerts
  • Rename AccountAlert to Alert

Contains BREAKING CHANGES for any connector implementing account alerts. These connectors will have to update paths of the alert models and update the AccountAlert name. I made these changes because we've updated the spec to have an Alert API, which multiple features can reference. Can read more about those changes here https://developer.mx.com/drafts/mdx/alert/#mdx-alerts

Fixes # https://mxcom.atlassian.net/browse/GCU-1270

Public API Additions/Changes

Spec changes are here: https://developer.mx.com/drafts/mdx/managed_cards/#alerts

Downstream Consumer Impact

Breaking changes for Account Alerts since the models have been moved so that multiple features can reference

How Has This Been Tested?

Created a local version and verified new endpoints work as expects according to the spec

List managed card alerts
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/managed_cards/card1/alerts

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 264
Date: Tue, 07 Apr 2026 20:00:56 GMT

{
  "alerts": [
    {
      "id": "1",
      "is_enabled": false,
      "name": "card1",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    },
    {
      "id": "2",
      "is_enabled": false,
      "name": "card1",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
}
Get managed card alert
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/managed_cards/card1/alerts/1

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 121
Date: Tue, 07 Apr 2026 20:01:24 GMT

{
  "alert": {
    "id": "1",
    "is_enabled": false,
    "name": "card1",
    "user_id": "U-00u3la36x0bbNvPud1d7"
  }
}
Update managed card alert
PUT http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/managed_cards/card1/alerts/1
Accept: application/vnd.mx.mdx.v6+json
Content-Type: application/vnd.mx.mdx.v6+json
MX-SESSION-KEY: 58c231e9-b0d6-4096-85e2-1f73fb61781a
mx-feature: managed_cards
Content-Length: 443
User-Agent: IntelliJ HTTP Client/IntelliJ IDEA 2026.1
Accept-Encoding: br, deflate, gzip, x-gzip
Cookie: JSESSIONID=904854845A6123A5D49269722C804483

{
  "alert": {
    "criteria": [
      {
        "id": "CRITERIA-234",
        "int_value": 5,
        "name": "Check Number Start",
        "type": "INT"
      },
      {
        "id": "CRITERIA-345",
        "int_value": 10,
        "name": "Check Number End",
        "type": "INT"
      }
    ],
    "delivery_method_ids": [
      "DELIVERY-METHOD-1"
    ],
    "id": "ALERT-234",
    "is_enabled": true,
    "name": "Check Clearing"
  }
}

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 570
Date: Tue, 07 Apr 2026 20:02:33 GMT

{
  "alert": {
    "criteria": [
      {
        "id": "CRITERIA-234",
        "int_value": 5,
        "name": "Check Number Start",
        "type": "INT",
        "user_id": "U-00u3la36x0bbNvPud1d7"
      },
      {
        "id": "CRITERIA-345",
        "int_value": 10,
        "name": "Check Number End",
        "type": "INT",
        "user_id": "U-00u3la36x0bbNvPud1d7"
      }
    ],
    "delivery_method_ids": [
      "DELIVERY-METHOD-1"
    ],
    "id": "card1",
    "is_enabled": true,
    "name": "Check Clearing",
    "user_id": "U-00u3la36x0bbNvPud1d7"
  }
}
List managed card alert delivery preferences
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/managed_cards/card1/alerts/1/delivery_methods

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 174
Date: Tue, 07 Apr 2026 20:03:21 GMT

{
  "delivery_methods": [
    {
      "id": "1",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    },
    {
      "id": "2",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
}
List alert eligible managed card
GET http://localhost:3009/globalcu/users/U-00u3la36x0bbNvPud1d7/managed_cards/alert

HTTP/1.1 200 
Content-Type: application/vnd.mx.mdx.v6+json;charset=UTF-8
Content-Length: 171
Date: Tue, 07 Apr 2026 20:03:53 GMT

{
  "managed_cards": [
    {
      "id": "1",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    },
    {
      "id": "2",
      "user_id": "U-00u3la36x0bbNvPud1d7"
    }
  ]
}

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@tessstoddard tessstoddard force-pushed the tess/managed_card_alerts branch from c98ad93 to 67dbb6d Compare April 8, 2026 15:47
@tessstoddard tessstoddard merged commit 607b09d into master Apr 8, 2026
7 checks passed
@tessstoddard tessstoddard deleted the tess/managed_card_alerts branch April 8, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants