{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Consume ntm-subscribe-service","description":"Accelerate E&P application development and protect your innovation by consuming our Data and Domain APIs / Platform APIs.","lang":"en-US","meta":[{"name":"robots","content":"noindex"}],"llmstxt":{"hide":true,"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"consume-ntm-subscribe-service","__idx":0},"children":["Consume ntm-subscribe-service"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Subscribe service can be used to:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a user or subscription to a channel with a keyword."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get a list of all subscriptions present for a channel."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get a list of application subscriptions created by an application."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get a list of user subscriptions created by a user."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Delete a subscription by subscription id."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Update Subscription Status."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Get details of a subscription by subscription id."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["userId"]},": Identity of the user."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["channelName"]},": Name of the channel user/application wants to subscribe to. For the list of channels"," ","use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/ntm/tutorial/ntm-consume-channel-service"},"children":["Channel Service"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["channelId"]},": Unique identifier of the channel, user/application wants to subscribe to. For the list of channels"," ","use ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/ntm/tutorial/ntm-consume-channel-service"},"children":["Channel Service"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["keyword"]},": Keyword works as a filter. Application/user will get messages with a title containing the keyword."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, if a user subscribes with the keyword \"Contract\", the user will get all the messages with a message title"," ","containing the keyword \"Contract\"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["endpointUrl"]},": Messages will be posted to this endpoint URL given by the subscriber. Please refer"," ","to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/ntm/tutorial/ntm-interpret-push-notification"},"children":["Interpret a push notification"]}," for a"," ","template of the JSON data that will be"," ","pushed to this endpoint. For securing this endpoint, please refer"," ","to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/solutions/ntm/tutorial/ntm-secure-subscription"},"children":["Secure Subscription Endpoint URL"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["context"]},": Context in which a user is present."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The client identity used to create a subscription in NTM should add NTM Master client identity(\"*"," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["ntm-master-svc-ntm.slbservice.com"]},"*\") under its ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["approved-callers-list"]}," in Developer Portal."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["This whitelisting will enable NTM to push notifications to the subscriber's endpoint URL seamlessly."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["It takes around 20 mins for a new subscription to reflect in the system. Please ensure that you allow this time to the system before you can listen to a notification via your subscription."]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Requests"]},":"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" POST:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription"]}]}," - for User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A Subscription ID will be generated after making a POST request, where this Subscription ID can be used to delete the"," ","subscription."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mandatory fields for user subscription"]},": [ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["userId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["channelId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keyword"]}," ]"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X POST \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v2/subscription' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-user-exchanged-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Content-Type: application/json' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -d '{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"userId\":\"abc@slb.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelId\": \"hg08cfa9-a0a4-4c7b-9882-1b3b93b4895b\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\",",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"context\": { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"account\": \"Account A, ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"contract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"department\": \"Department D\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    \"Message\": \"fc08cfa9-a0a4-4c7b-9882-1b3b93b4895b\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," }"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" POST:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription"]}]}," - for Application"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A Subscription ID will be generated after making a POST request, where this Subscription ID can be used to delete the"," ","subscription."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Mandatory fields for application subscription"]},": [ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["channelId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["endpointUrl"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["context/account"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["keyword"]}," ]"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X POST \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v2/subscription' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Content-Type: application/json' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -d '{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelId\": \"hg08cfa9-a0a4-4c7b-9882-1b3b93b4895b\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"context\": { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"account\": \"Account A, ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"contract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"        \"department\": \"Department D\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    \"Message\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," }"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" GET:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets the list of all subscriptions for a specific channel."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X GET \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v1/subscription?channelId=50fab0ce-5b25-400d-8408-af620e43a932' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelID\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelName\": \"ntm\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextAccount\": \"Account A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextContract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"sourceAppId\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriber\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriptionId\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }, ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelID\": \"e3b0a2eb-8489-9351-d622-daf4fe94cd78\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelName\": \"ntm\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextAccount\": \"Account A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextContract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"sourceAppId\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriber\": \"abc@slb.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriptionId\": \"fc08cfa9-a0a4-4c7b-9882-1b3b93b4895b\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ]"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" GET:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription/application"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets the list of all subscriptions made by an application."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X GET \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v1/subscription/application' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelID\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelName\": \"ntm\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextAccount\": \"Account A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextContract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"sourceAppId\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriber\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriptionId\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ]"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" GET:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription/user/{userId}"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Gets the list of all subscriptions made by a user."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X GET \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v1/subscription/abc@slb.com' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["[ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    { ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelID\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelName\": \"ntm\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextAccount\": \"Account A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextContract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"sourceAppId\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriber\": \"abc@slb.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriptionId\": \"fc08cfa9-a0a4-4c7b-9882-1b3b93b4895b\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," ]"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" DELETE:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription/{subscriptionId}"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deletes a subscription using Subscription ID."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X DELETE \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v1/subscription/4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    \"Message\": \"Subscription with ID fc08cfa9-a0a4-4c7b-9882-1b3b93b4895b is deleted.\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," }"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" PUT:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription/{subscriptionId}/status"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Updates an existing subscription status based on subscriptionId. You can only Update this details of a subscription by"," ","using a private clientID."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["status"]}," values can be: [ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["approved"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["denied"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["revoked"]}," ]"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X PUT \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/v1/subscription/4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9/status' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-user-exchanged-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Content-Type: application/json' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -d '{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      } ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    \"Message\": \"User subscription status updated\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]}," }"]}]}]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,153,0)"}},"children":[" GET:"]}," ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["/subscription/{subscriptionId}"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get details of a subscription based on subscriptionId. You can access subscription details only for subscriptions, created for your application, or created by your application as a subscriber."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample cUrl"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Output"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["curl -X GET \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    'https://api.delfi.slb.com/ntm/subscribe/v1/subscription/4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Authorization: Bearer <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-ccg-token"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'AppKey: <",{"$$mdtype":"Tag","name":"span","attributes":{"style":{"color":"rgb(255,0,0)"}},"children":["your-appkey"]},">' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Cache-Control: no-cache' \\ ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    -H 'Content-Type: application/json' \\  ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }'"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{  ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelID\": \"806ad674-db3d-44ab-8d73-d02fd632b385\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"channelName\": \"ntm\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextAccount\": \"Account A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextDepartment\": \"Department A\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"contextContract\": \"Contract C\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"endpointUrl\": \"exampleendpointurl@example.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"keyword\": \"Contract\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"sourceAppId\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"status\": \"approved\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriber\": \"ntm-master-svc-ntm.slbservice.com\", ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"      \"subscriptionId\": \"4bd2a2eb-4045-4ee2-b31f-4cd78daf4fe9\" ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"    }"]}]}]}]}]}]},"headings":[{"value":"Consume ntm-subscribe-service","id":"consume-ntm-subscribe-service","depth":3}],"frontmatter":{"seo":{"title":"Consume ntm-subscribe-service"}},"lastModified":"2025-11-10T08:01:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/solutions/ntm/tutorial/ntm-consume-subscribe-service","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}