Campaign Category
The campaign category record exposes a campaign category to REST web services.
This record:
-
is not a subrecord
-
contains the following subrecords:
-
leadSource
-
parent
-
For more information about working with campaign category in the UI, see Campaign Categories.
For information about using the REST API Browser, see The REST API Browser.
Record ID
The record ID for a campaign category REST record is campaigncategory.
Prerequisites
You must enable the following features before you can use this record through REST web services.
-
Customer Relationship Management
-
Marketing Automation
For more information, see Marketing Automation Overview.
Additional Details
Keep in mind certain behaviors when modifying the leadSource field. Before leadSource (Campaign) is updated on CampaignCategory:
-
The current leadSource (Campaign) field must be removed from CampaignCategory.
-
The category (CampaignCategory) must be set on the Campaign that will be used as the new leadSource.
Code Samples
The following samples show common actions for a campaign category.
POST Request:
POST /services/rest/record/v1/campaigncategory 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: 172
{
"description": "Test description",
"name": "Test name",
"isInactive": false,
"leadSource": {
"id": "-6"
},
"parent": {
"id": "-4"
}
}
GET Request:
GET /services/rest/record/v1/campaigncategory/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/campaigncategory/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: 172
{
"description": "Test description updated",
"name": "Test name updated",
"isInactive": true
"leadSource": {
"id": "-6"
},
"parent": {
"id": "-4"
}
}
DELETE Request:
DELETE /services/rest/record/v1/campaigncategory/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=""