Logo
Swift API Sandbox Collections API Documentation

Subscribe to a category(Queue) for notifications.

POST {{baseUrl}}/subscriptions

A client can invoke this API when they want to subscribe to a category in order to receive notifications from that category.The category is the queue from which the customer can consume notifications. The longpoll subscription id is automatically generated becaue it is the default delivery channel that is always available. The subscription ids for a Webhook, email, or SMS delivery channel are only generated when information is provided for those parameters.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
notif-role
string (Required) Header that identifies role of the requester to validate if its a provider or consumer. Added by the client in the request.
Content-Type
string




RESPONSES

status Created

{ "subscription_ids": { "long_poll": "54947df8-0e9e-4471-a2f2-9af509fb588" }, "subscription_info": { "recipient_institution": [ "CITIUS33", "CITIGB22" ], "service_name": "GPI", "category": "gCASE", "expiration": "2018-12-07T17:58:31.357Z", "batch_size_max": 10, "description": "GPI subscription" } }



Curl
curl -X POST 'https://sandbox.swift.com/swift-notif/v1/subscriptions' -H 'notif-role: Y29uc3VtZXI=' -H 'Content-Type: application/json' -d '{"category":"gcase","recipient_institution":["GPIIUS22"],"service_name":"GPI","emails":[""],"expiration":"2021-12-27T17:40:30.000Z","webhook_url":"","batch_size_max":15,"description":"gpi gcase subscription"}'

ENDPOINTS