Webhooks

Storage

Table: prod-txn-transactions

Location: us-east-2

Keys

  • PK - WEBHOOK_ITEM#<item_id>

  • SK - DATETIME#<datetime>#TYPE#<type>#CODE#<code>

  • GSI1PK - WEBHOOK_USER#<user_id>

  • GSI1SK - DATETIME<datetime>#TYPE#<type>#CODE#<code>#WEBHOOK_ITEM#<item_id>

  • GSI2PK - WEBHOOK_ITEM#<item_id>

  • GSI2SK - TYPE#<type>#CODE#<code>#DATETIME#<datetime>

  • GSI3PK - WEBHOOK_USER#<user_id>

  • GSI3SK - TYPE#<type>#CODE#<code>#DATETIME#<datetime>#WEBHOOK_ITEM#<item_id>

  • GSI4PK - WEBHOOK_ITEM#<item_id>

  • GSI4SK - SOURCE#<source>#TYPE#<type>#CODE#<code>#DATETIME#<datetime>

Attributes

  • type - WEBHOOK_INFO

  • user_id

  • item_id

  • update_info

    • total_transactions

    • plaid_accounts - array of

      • account_id

      • type

      • name

    • institution_id

  • webhook

    • webhook_type

    • webook_code

    • new_transactions

    • removed_transactions - array of txn ids

  • source

  • created_on

Query Patterns

Query Index Conditions

List webhooks by itemID

Primary

PK = WEBHOOK_ITEM#item_id, SK begins with DATETIME#

List webhooks by userID

GSI1

GSI1PK = WEBHOOK_USER#user_id, GSI1SK begins with DATETIME#

List webhooks by itemID and type

GSI2

GSI2PK = WEBHOOK_ITEM#item_id, GSI2SK begins with TYPE#type

List webhooks by itemID, type and code

GSI2

GSI2PK = WEBHOOK_ITEM#item_id, GSI2SK = TYPE#type#CODE#code

List webhooks by userID and type

GSI3

GSI3PK = WEBHOOK_USER#user_id, GSI3SK begins with TYPE#type

List webhooks by userID, type and code

GSI3

GSI3PK = WEBHOOK_USER#user_id, GSI3SK = TYPE#type#CODE#code