Create a Profile List with or without brand Context
/rest/api/v1.3/lists
Request
object
Create Profile List Request model
-
brandName(optional):
string
The name of the brand with which the profile list is associated. Required if account is brand-enabled.
-
description(optional):
string
Description about the Profile list
-
fields(optional):
array fields
The Profile List Fields
-
listFolderName:
string
The name of the folder in which the Profile List is to be created
-
listName:
string
The name of the Profile List
object
-
fieldName:
string
The Profile List Field Name
-
fieldType:
string
The Profile List Field Type
Response
- application/json
Default Response
object
Create Profile List Response model
-
message:
string
Allowed Values:
[ "List has been created." ]
The List has been created -
name:
string
The Profile list Name.
Examples
Create a Profile List with or without brand Context.
FIELDS | DESCRIPTION |
---|---|
Authorization | <AUTH_TOKEN> |
Content-Type | application/json |
Sample Request
{ "listName": "abc", "listFolderName": "xyz", "description": "description about the profile list.", "brandName": "brand1", "fields": [ { "fieldName": "custom1", "fieldType": "CHAR" }, { "fieldName": "custom2", "fieldType": "STR50" } ] }
Sample Response: Success
Response Notes:
{ "listName": "abc ", "message": "List Has Been Created." }
Sample Response: Failure
List already exists: Requests fail if a profile list with the specified name already exists. The error resembles:
{ "type": "", "title": "List already exists", "errorCode": "LIST_ALREADY_EXISTS", "detail": "List already exists.", "errorDetails": [] }
Sample Response: Failure
Brand name not found: Requests fail if specifying a brand and the brand name cannot be found. The error resembles:
{ "type": "", "title": "Record not found", "errorCode": "RECORD_NOT_FOUND", "detail": "List already exists.", "errorDetails": [] }
Sample Response: Failure
Folder not found: Requests fail if the folder name specified cannot be found. The error resembles:
{ "type": "", "title": "Record not found", "errorCode": "FOLDER_NOT_FOUND", "detail": "Folder [Folder_name] not found", "errorDetails": [] }
Sample Response: Failure
Invalid folder name: Requests fail if the folder name contains an invalid character. The error resembles:
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Invalid Folder Name in the Request", "errorDetails": [] }
Sample Response: Failure
Invalid List Name: Requests fail if the ListName is not provided. The error resembles:
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Invalid List Name in the Request", "errorDetails": [] }
Sample Response: Failure
Invalid field types: Requests will fail if invalid field types are specified in the request. Field types must be one of: CHAR
, STR25
, STR100
, STR500
, STR4000
, NUMBER
, INTEGER
, or TIMESTAMP
. Error resembles:
{ "type": "", "title": "Invalid Field Type", "errorCode": "INVALID_FIELD_TYPE", "detail": "One or more invalid field types in the request", "errorDetails": [] }
Sample Response: Failure
List name more than characters defined in account settings: Requests will fail if the list name exceeds the account settings character limit. Error resembles:
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Max Length of listName allowed: 10", "errorDetails": [] }
Sample Response: Failure
Max number of custom fields allowed: Requests will fail if more than 5 custom fields are included. Error resembles:
{ "type": "", "title": "Invalid request parameters", "errorCode": "INVALID_PARAMETER", "detail": "Max No. of custom fields allowed :5", "errorDetails": [] }
Sample Response: Failure
API limit exceeded: When the client application exceeds the throttling limit for this API, a 401 Unauthorized error is returned with the following error response body. Refer to Get Throttling Limits to learn more. Error resembles:
{ "type": "API_Limit_Exceeded", "title": "", "errorCode": "API_LIMIT_EXCEEDED", "detail": "", "errorDetails": [] }
Sample Response: Failure
Invalid field name: Requests fail if any field names provided are invalid.
{ "type": "", "title": "Invalid field name", "errorCode": "INVALID_FIELD_NAME", "detail": "The following field names [invalid_field_names_list] are invalid", "errorDetails": [] }