Skip to content

Commit

Permalink
Merged PR 83450: add connection failed webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
Codat Pipeline Bot committed Oct 24, 2024
1 parent ef60043 commit 078dc56
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 3 deletions.
65 changes: 64 additions & 1 deletion json/Codat-Platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -3940,6 +3940,68 @@
}
}
},
"connection.failed": {
"post": {
"description": "Called when a connection failed linking to the SMB.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionWebhook"
},
"examples": {
"Connection failed": {
"value": {
"id": "ba29118f-5406-4e59-b05c-ba307ca38d01",
"type": "connection.failed",
"generatedDate": "2024-08-08T17:10:34.015Z",
"payload": {
"referenceCompany": {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "Bank of Dave",
"description": "internal_id_mxO7rLfo",
"links": {
"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary"
},
"tags": {
"customerRegion": "us",
"uid": "335a086e-8563-4b03-94e3-39544225ecb6"
}
},
"connection": {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "PendingAuth",
"created": "2022-10-27T09:53:29.000Z",
"sourceType": "Banking",
"dataConnectionErrors": [
{
"statusCode": "403",
"statusText": "User cancelled linking",
"errorMessage": "User cancelled",
"erroredOnUtc": "2022-10-27T09:53:29.000Z",
"status": "Active"
}
]
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Return a 200 status to indicate that the webhook was received successfully."
}
}
}
},
"connection.disconnected": {
"post": {
"description": "Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration.",
Expand Down Expand Up @@ -5481,7 +5543,8 @@
"connection.connected",
"connection.disconnected",
"connection.reconnected",
"connection.deleted"
"connection.deleted",
"connection.failed"
]
},
"generatedDate": {
Expand Down
3 changes: 2 additions & 1 deletion json/Codat-Sync-Commerce.json
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,8 @@
"connection.connected",
"connection.disconnected",
"connection.reconnected",
"connection.deleted"
"connection.deleted",
"connection.failed"
]
},
"generatedDate": {
Expand Down
65 changes: 64 additions & 1 deletion json/Webhooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,68 @@
}
}
},
"connection.failed": {
"post": {
"description": "Called when a connection failed linking to the SMB.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConnectionWebhook"
},
"examples": {
"Connection failed": {
"value": {
"id": "ba29118f-5406-4e59-b05c-ba307ca38d01",
"type": "connection.failed",
"generatedDate": "2024-08-08T17:10:34.015Z",
"payload": {
"referenceCompany": {
"id": "0498e921-9b53-4396-a412-4f2f5983b0a2",
"name": "Bank of Dave",
"description": "internal_id_mxO7rLfo",
"links": {
"portal": "https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary"
},
"tags": {
"customerRegion": "us",
"uid": "335a086e-8563-4b03-94e3-39544225ecb6"
}
},
"connection": {
"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd",
"integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c",
"integrationKey": "dfxm",
"sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee",
"platformName": "Basiq",
"linkUrl": "https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start",
"status": "PendingAuth",
"created": "2022-10-27T09:53:29.000Z",
"sourceType": "Banking",
"dataConnectionErrors": [
{
"statusCode": "403",
"statusText": "User cancelled linking",
"errorMessage": "User cancelled",
"erroredOnUtc": "2022-10-27T09:53:29.000Z",
"status": "Active"
}
]
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Return a 200 status to indicate that the webhook was received successfully."
}
}
}
},
"connection.disconnected": {
"post": {
"description": "Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration.",
Expand Down Expand Up @@ -3960,7 +4022,8 @@
"connection.connected",
"connection.disconnected",
"connection.reconnected",
"connection.deleted"
"connection.deleted",
"connection.failed"
]
},
"generatedDate": {
Expand Down
44 changes: 44 additions & 0 deletions yaml/Codat-Platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,49 @@ webhooks:
responses:
'200':
description: Return a 200 status to indicate that the webhook was received successfully.
connection.failed:
post:
description: Called when a connection failed linking to the SMB.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionWebhook'
examples:
Connection failed:
value:
id: ba29118f-5406-4e59-b05c-ba307ca38d01
type: connection.failed
generatedDate: '2024-08-08T17:10:34.015Z'
payload:
referenceCompany:
id: 0498e921-9b53-4396-a412-4f2f5983b0a2
name: Bank of Dave
description: internal_id_mxO7rLfo
links:
portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary'
tags:
customerRegion: us
uid: 335a086e-8563-4b03-94e3-39544225ecb6
connection:
id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd
integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c
integrationKey: dfxm
sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee
platformName: Basiq
linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start'
status: PendingAuth
created: 2022-10-27T09:53:29.000Z
sourceType: Banking
dataConnectionErrors:
- statusCode: '403'
statusText: User cancelled linking
errorMessage: User cancelled
erroredOnUtc: 2022-10-27T09:53:29.000Z
status: Active
responses:
'200':
description: Return a 200 status to indicate that the webhook was received successfully.
connection.disconnected:
post:
description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration.
Expand Down Expand Up @@ -3884,6 +3927,7 @@ components:
- connection.disconnected
- connection.reconnected
- connection.deleted
- connection.failed
generatedDate:
$ref: '#/components/schemas/DateTime'
description: The date time in UTC the event was generated in Codat.
Expand Down
1 change: 1 addition & 0 deletions yaml/Codat-Sync-Commerce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ components:
- connection.disconnected
- connection.reconnected
- connection.deleted
- connection.failed
generatedDate:
$ref: '#/components/schemas/Connection/properties/created'
description: The date time in UTC the event was generated in Codat.
Expand Down
44 changes: 44 additions & 0 deletions yaml/Webhooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,49 @@ webhooks:
responses:
'200':
description: Return a 200 status to indicate that the webhook was received successfully.
connection.failed:
post:
description: Called when a connection failed linking to the SMB.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionWebhook'
examples:
Connection failed:
value:
id: ba29118f-5406-4e59-b05c-ba307ca38d01
type: connection.failed
generatedDate: '2024-08-08T17:10:34.015Z'
payload:
referenceCompany:
id: 0498e921-9b53-4396-a412-4f2f5983b0a2
name: Bank of Dave
description: internal_id_mxO7rLfo
links:
portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary'
tags:
customerRegion: us
uid: 335a086e-8563-4b03-94e3-39544225ecb6
connection:
id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd
integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c
integrationKey: dfxm
sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee
platformName: Basiq
linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start'
status: PendingAuth
created: 2022-10-27T09:53:29.000Z
sourceType: Banking
dataConnectionErrors:
- statusCode: '403'
statusText: User cancelled linking
errorMessage: User cancelled
erroredOnUtc: 2022-10-27T09:53:29.000Z
status: Active
responses:
'200':
description: Return a 200 status to indicate that the webhook was received successfully.
connection.disconnected:
post:
description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration.
Expand Down Expand Up @@ -2963,6 +3006,7 @@ components:
- connection.disconnected
- connection.reconnected
- connection.deleted
- connection.failed
generatedDate:
$ref: '#/components/schemas/Connection/properties/created'
description: The date time in UTC the event was generated in Codat.
Expand Down

0 comments on commit 078dc56

Please sign in to comment.