Please enable JavaScript to view this site.

iService API Documentation

Navigation: iService API Forms > Customer Info

Set Subscriptions (api=setsubscriptions)

Scroll Prev Top Next More

Purpose

 

The setsubscriptions API is used to set subscriptions to mailing lists, campaigns, and knowledge base articles.

 

UI Reference: The API is called when the save button is clicked on the Contact Subscriptions page. See https://www.iservice.info/guides/users/contact-subscriptions.html.

 

URI: webapp-api-custinfo?api=setsubscriptions

 

Access Rights Required:  All users, but contacts may only set subscriptions for their own contact ID.

 

 

Request

The request includes the IDs of the mailing lists, campaigns, and articles that will be set for the contact.

 

Request Parameters

Name

Type

Description

contactID

number

This parameter represents the ID of the user.

subscriptions

Object

This parameter represents the user’s subscriptions values.

listID

Array

This is a list of ids with active subscriptions to mailing lists or mailing campaigns. Campaigns are prefaced with the string campaign-.

optoutIDs

Array

This is a list of ids for mailing lists or mailing campaigns to which the contact has Opted Out. Campaigns are prefaced with the string campaign-.

articleIDs

Array

This is a list of knowledge base article ids with active subscriptions.

 

 

Request Payload Example

{

  "contactID": 4,

  "subscriptions": {

    "listIDs": [

      "3",

      "1",

      "10",

      "6",

      "campaign-1"

    ],

    "optoutIDs": [

      "campaign-2"

    ],

    "articleIDs": [

      "91"

    ]

  }

}

 

 

 

Response

 

Response Parameters

Name

Type

Description

errors

Array

An array of strings. Returns the error message if an error is encountered, otherwise a blank array if there is no error.

errorsDetails

Array

An array of strings. Provides detailed information about the error encountered, otherwise returns a blank array if no error is encountered.

 

 

Response Example

{
    "errors": [],
    "errorDetails": []
}

 

 

© 2008 - 2022 One-to-One Service.com, Inc. All rights reserved.