Campaign Subscription
The campaign subscription record exposes a campaign subscription to REST web services.
This record:
-
is not a subrecord
-
contains no subrecords
For more information about working with campaign subscriptions in the UI, see Setting Up Campaign Subscriptions.
The REST API Browser includes information about the field names and field types of the campaign subscription record and about the HTTP methods, request parameters, and operations available to this record. For details, see the REST API Browser's campaign subscription reference page.
For information about using the REST API Browser, see The REST API Browser.
Record ID
The record ID for a campaign subscription REST record is campaignsubscription.
Prerequisites
You must enable the Marketing Automation feature before you can use this record through REST web services. For more information, see Marketing Automation Overview.
Code Samples
The following samples show common actions for a campaign subscription.
POST Request
POST /services/rest/record/v1/campaignsubscription HTTP/1.1
Host: 3619616.suitetalk.api.netsuite.com
Content-Type: application/json
Authorization: OAuth realm="3619616",oauth_consumer_key="",oauth_token="",oauth_signature_method="",oauth_timestamp="",oauth_nonce="",oauth_version="1.0",oauth_signature=""
Content-Length: 84
{
"description": "Test description",
"externalDescription": "Test external description",
"name": "Test name",
"externalName": "Test external name",
"isInactive": false
"subscribedByDefault": false
}
GET Request
GET /services/rest/record/v1/campaignsubscription/1?expandSubResources=true HTTP/1.1
Host: 3619616.suitetalk.api.netsuite.com
Authorization: OAuth realm="3619616",oauth_consumer_key="",oauth_token="",oauth_signature_method="",oauth_timestamp="",oauth_nonce="",oauth_version="1.0",oauth_signature=""
PATCH Request
PATCH /services/rest/record/v1/campaignsubscription/1 HTTP/1.1
Host: 3619616.suitetalk.api.netsuite.com
Content-Type: application/json
Authorization: OAuth realm="3619616",oauth_consumer_key="",oauth_token="",oauth_signature_method="",oauth_timestamp="",oauth_nonce="",oauth_version="1.0",oauth_signature=""
Content-Length: 105
{
"description": "Test description updated",
"externalDescription": "Test external description updated",
"name": "Test name updated",
"externalName": "Test external name updated",
"isInactive": true
"subscribedByDefault": true
}
DELETE Request
DELETE /services/rest/record/v1/campaignsubscription/1 HTTP/1.1
Host: 3619616.suitetalk.api.netsuite.com
Authorization: OAuth realm="3619616",oauth_consumer_key="",oauth_token="",oauth_signature_method="",oauth_timestamp="",oauth_nonce="",oauth_version="1.0",oauth_signature=""