NUTRINTG Webhook monitoring
Overview
Service name: p-webhook-monitoring(-test, -stage)
Service is monitoring if Shopify webhook works fine.
Schedulers
Customer
Order
Schedulers run twice a day and send each webhook status object to queue, then queue is subscribed in db-proxy service where the service save message in “webhook” collection.
Webhook status object
Name | Type | Description | Required |
---|---|---|---|
accountSource | string | Account Source of the shop integration in Middleware | true |
domain | string | Shopify domain | true |
operation | string | Const value: WEBHOOK_STATUS_INSERT | true |
dateTime | datetime as string | Current date time with Europe/Warsaw timezone | true |
webhook | string | Webhook name | true |
isWorking | boolean | Webhook status (true|false) | true |
cause | string | Error label | false |
REST endpoints
Application has following endpoints:
GET webhooks
POST webhook
DELETE webhook
UPDATE webhook
UPDATE webhook async
Endpoints are both private an requires application to be in the same network and public which requires Okta token.
GET webhooks
HTTP Method | GET | |||
---|---|---|---|---|
Public Endpoint | /shopify/webhook-monitoring | |||
Private Endpoint | /shopify/webhook | |||
Headers | token | string | Okta token. Required for public endpoint. | true |
Query params | domain | string |
| true |
accountSource | string |
| true |
Name | Type | Description | Required |
---|---|---|---|
token | string | header | true |
domain | string | query param | true |
accountSource | string | query param | true |
POST webhook
HTTP Method | POST | |||
---|---|---|---|---|
Public Endpoint | /shopify/webhook-monitoring | |||
Private Endpoint | /shopify/webhook | |||
Headers | token | string | Okta token. Required for public endpoint. | true |
Body | domain | string |
| true |
accountSource | string |
| true | |
webhookAddress | string |
| true | |
webhookName | string |
| true |
DELETE webhook
HTTP Method | DELETE | |||
---|---|---|---|---|
Public Endpoint | /shopify/webhook-monitoring | |||
Private Endpoint | /shopify/webhook | |||
Headers | token | string | Okta token. Required for public endpoint. | true |
Body | domain | string |
| true |
accountSource | string |
| true | |
webhookAddress | string |
| true | |
webhookName | string |
| true |
UPDATE webhook
HTTP Method | PUT | |||
---|---|---|---|---|
Public Endpoint | /shopify/webhook-monitoring | |||
Private Endpoint | /shopify/webhook | |||
Headers | token | string | Okta token. Required for public endpoint. | true |
Body | domain | string |
| true |
accountSource | string |
| false | |
newWebhookAddress | string |
| true | |
oldWebhookAddress | string |
| true | |
webhookName | string |
| true |
UPDATE webhook async
HTTP Method | PUT | |||
---|---|---|---|---|
Public Endpoint | /shopify/webhook-monitoring/async | |||
Private Endpoint | /shopify/webhook/async | |||
Headers | token | string | Okta token. Required for public endpoint. | true |
Body | domain | string |
| true |
accountSource | string |
| false | |
newWebhookAddress | string |
| true | |
oldWebhookAddress | string |
| true | |
webhookName | string |
| true |