Api reference
Push Notification
curl -X GET "https://example.com/api/push/vapid-key"{ "success": true, "vapidPublicKey": "string"}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/push/subscribe" \ -H "Content-Type: application/json" \ -d '{ "endpoint": "string", "keys": { "p256dh": "string", "auth": "string" } }'{ "success": true, "message": "string", "preferences": { "orders": true, "menuItems": true, "customers": true, "callHistory": true }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/push/unsubscribe" \ -H "Content-Type: application/json" \ -d '{ "endpoint": "string" }'{ "success": true, "message": "string"}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Query Parameters
endpoint*string
Length
1 <= lengthResponse Body
application/json
curl -X GET "https://example.com/api/push/preferences?endpoint=string"{ "success": true, "preferences": { "orders": true, "menuItems": true, "customers": true, "callHistory": true }}Authorization
bearerAuth AuthorizationBearer <token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/api/push/preferences" \ -H "Content-Type: application/json" \ -d '{ "endpoint": "string", "preferences": {} }'{ "success": true, "message": "string", "preferences": { "orders": true, "menuItems": true, "customers": true, "callHistory": true }}