Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions api-reference/connect/webhooks/patch-webhook.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: patch /notification/v1/connect/webhook/subscriptions/{id}
---
3 changes: 3 additions & 0 deletions api-reference/connect/webhooks/put-webhook.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
openapi: put /notification/v1/connect/webhook/subscriptions/{id}
---
224 changes: 223 additions & 1 deletion api-reference/connect/webhooks/webhooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,234 @@ paths:
example: "SERVER_ERROR"

/notification/v1/connect/webhook/subscriptions/{id}:
patch:
tags:
- Webhooks
summary: Add Event to Webhook
description: |
Adds a new event to the specified webhook. The `id` path parameter identifies the webhook. The request body must include the `event_id` to be added.
security:
- bearerAuth: [ ]
parameters:
- name: id
in: path
required: true
description: The unique identifier of the webhook.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
event_id:
type: string
description: The event to add to the webhook.
example: "prescription.created"
required:
- event_id
responses:
'200':
description: Event added successfully.
content:
application/json:
schema:
type: object
properties:
msg:
type: string
example: "webhook event added successfully"
status:
type: string
example: "success"
'400':
description: Bad request.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Invalid event"
code:
type: string
example: "INVALID_REQUEST"
'401':
description: Unauthorized request.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Unauthorized request"
code:
type: string
example: "INVALID_REQUEST"
'404':
description: Webhook not found.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Webhook not found"
code:
type: string
example: "INVALID_REQUEST"
'500':
description: Server error.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Internal Server Error"
code:
type: string
example: "SERVER_ERROR"

put:
tags:
- Webhooks
summary: Update Webhook
description: |
Updates the specified webhook. The `id` path parameter identifies the webhook. The request body must include the new `event_ids` array and optionally a new `signing_key`.
security:
- bearerAuth: [ ]
parameters:
- name: id
in: path
required: true
description: The unique identifier of the webhook.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
event_ids:
type: array
items:
type: string
description: List of event names to update for the webhook.
example:
- "rec.srp"
- "user.data.access"
- "appointment.created"
signing_key:
type: string
description: New signing key for the webhook.
example: "supersigningkey1"
required:
- event_ids
responses:
'200':
description: Webhook updated successfully.
content:
application/json:
schema:
type: object
properties:
msg:
type: string
example: "webhook updated successfully"
status:
type: string
example: "success"
'400':
description: Bad request.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Invalid request"
code:
type: string
example: "INVALID_REQUEST"
'401':
description: Unauthorized request.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Unauthorized request"
code:
type: string
example: "INVALID_REQUEST"
'404':
description: Webhook not found.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Webhook not found"
code:
type: string
example: "INVALID_REQUEST"
'500':
description: Server error.
content:
application/json:
schema:
type: object
properties:
error:
type: object
properties:
message:
type: string
example: "Internal Server Error"
code:
type: string
example: "SERVER_ERROR"
delete:
tags:
- Webhooks
summary: Delete a Webhook
description: |
Deletes an existing webhook based on its ID. This endpoint allows partners to remove a previously registered webhook by specifying its unique identifier in the path parameter. The `id` parameter is required and must match the ID of the webhook to be deleted. Upon successful deletion, the service will no longer send POST requests to the webhook's URL for the specified scope. This operation helps partners manage and clean up their webhook configurations.
Deletes an existing webhook based on its ID. This endpoint allows partners to remove a previously registered webhook by specifying its unique identifier in the path parameter. The `id` parameter is required and must match the ID of the webhook to be deleted. Upon successful deletion, the service will no longer send POST requests to the webhook's URL for the specified scope.
security:
- bearerAuth: [ ]
parameters:
Expand Down
3 changes: 0 additions & 3 deletions api-reference/user-app/notifications/fcm-creds.mdx

This file was deleted.

43 changes: 0 additions & 43 deletions api-reference/user-app/notifications/notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,49 +241,6 @@ paths:
example:
message: Unauthorized access.
error_code: 401
'500':
description: Server error response
content:
application/json:
schema:
type: object
example:
message: Internal server error.
error_code: 500
/notification/fcm-creds:
post:
operationId: addFcmCreds
tags:
- Notifications
summary: Add FCM Credentials
description: |
Store FCM credentials. This endpoint allows clients to store Firebase Cloud Messaging (FCM) credentials by providing the service account key details. The stored credentials will be used for sending notifications to the registered devices. The request body must contain the FCM payload information.
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/FCMPayload'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
example:
message: FCM token added successfully
'400':
description: Client error response
content:
application/json:
schema:
type: object
example:
message: Unauthorized access.
error_code: 401
'500':
description: Server error response
content:
Expand Down
5 changes: 3 additions & 2 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
"api-reference/connect/webhooks/webhook-signature",
"api-reference/connect/webhooks/register-webhook",
"api-reference/connect/webhooks/get-webhooks",
"api-reference/connect/webhooks/patch-webhook",
"api-reference/connect/webhooks/put-webhook",
"api-reference/connect/webhooks/delete-webhook",
"api-reference/connect/webhooks/webhook-samples"
]
Expand Down Expand Up @@ -609,8 +611,7 @@
"icon": "bell",
"pages": [
"api-reference/user-app/notifications/add-device",
"api-reference/user-app/notifications/delete-device",
"api-reference/user-app/notifications/fcm-creds"
"api-reference/user-app/notifications/delete-device"
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions mint_old_deprecated.json
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,7 @@
"icon": "bell",
"pages": [
"api-reference/user-app/notifications/add-device",
"api-reference/user-app/notifications/delete-device",
"api-reference/user-app/notifications/fcm-creds"
"api-reference/user-app/notifications/delete-device"
]
},
{
Expand Down