Last Updated:




Get Subscriptions for a Person

The following will return all the confirmed Subscriptions for the specified Person.

GET /companies/:company_id/mobiledb/persons/:person_id/subscriptions
GET /companies/:company_id/mobiledb/persons/external/:external_person_id/subscriptions

If you have any inactive subscriptions, they will be returned if you add the active_only=false filter. For example:

GET /companies/:company_id/mobiledb/persons/:person_id/subscriptions?active_only=false

Request JSON

There is no Request JSON with a GET.

Return JSON

An array of Subscription objects for the Person.

[
   {
      "person":{
         "id":"ABC123",
         "url":"/companies/:company_id/mobiledb/persons/ABC123"
      },
      "subscription_list":{
         "id":"1234",
         "url":"/companies/:company_id/mobiledb/subscription_lists/1234"
      },
      "opt_in_date":"2017-01-15T15:34:52Z",
      "url":"/companies/:company_id/mobiledb/persons/ABC123/subscriptions/1234"
   },
   {
      "person":{
         "id":"ABC123",
         "url":"/companies/:company_id/mobiledb/persons/ABC123"
      },
      "subscription_list":{
         "id":"123456",
         "url":"/companies/:company_id/mobiledb/subscription_lists/123456"
      },
      "opt_in_date":"2018-01-15T15:34:52Z",
      "opt_out_date":"2018-07-09T23:55:00.000Z",
      "opt_out_reason":"user_opt_out", 
      "url":"/companies/:company_id/mobiledb/persons/1234/subscriptions/123456"
   }
]


Note: A 404 - Not Found error will be returned if the Person cannot be located, or if the Person is not subscribed to the specified list.

Get a Person's Subscription Status for a List

The following will return the Person's Subscription information for the specified subscription_list.

GET /companies/:company_id/mobiledb/persons/:person_id/subscriptions/:subscription_list_id
GET /companies/:company_id/mobiledb/persons/external/:external_person_id/subscriptions/:subscription_list_id

Request JSON

There is no Request JSON with a GET.

Return JSON

A Subscription object for the Person and the list.

Note: A 404 - Not Found error will be returned if the Person cannot be located, or if the Person is not subscribed to the specified list.

Add a Subscription (Subscribe Person)

A Subscription cannot be added to a Person in the Mobile Database directly. New Subscriptions are added/created by utilizing an Acquisition Campaign, which contains the rules, compliance and confirmation settings for adding the Person to the list.

See Also: Acquisition Campaign - Add Participant.

Delete Subscription (Unsubscribe Person)

The following will remove the Person from the specified subscription_list.

DELETE /companies/:company_id/mobiledb/persons/:person_id/subscriptions/:subscription_list_id
DELETE /companies/:company_id/mobiledb/persons/external/:external_person_id/subscriptions/:subscription_list_id

Request JSON

No body is returned and an HTTP 204 - No Content will be returned if the deletion was successful.

Return JSON

None.

Note: A 404 - Not Found error will be returned if the Person cannot be located, or if the Person is not subscribed to the specified list.