Create Sample
POST {{baseUrl}}/directories/:directoryId/samples
Creates a mailing list subset (sample) or batch subset in a directory based off of an existing sample definition <!--From Readme--> <!-- theme: warning -->
This API call is only available to XM Directory users.
Parent ID
The
parentId
provided must be either a XM Directory mailing List ID (prefix: CG) or a XM Directory transaction batch ID (prefix: BT). On success, the resulting ID will be of the same type.
Types of criteria used in each parent type
Any sample definition that contains filters or logic related to transaction data is only applicable AND required when providing a
batchID
. If creating a sample from a mailing list, transaction filters are not allowed and will return an error. If creating a sample from a batch, transaction filters are required and lack thereof will return an error.
Request Body
{"parentId"=>"<string>", "sampleDefinitionId"=>"<string>", "name"=>"<string>", "description"=>"<string>", "category"=>"<string>", "directoryId"=>"<string>", "sampleCriteria"=>{"simpleFilter"=>{"filterType"=>"lastName", "comparison"=>"eq", "value"=>"<string>"}}, "maxSampleSize"=>0, "samplePercentage"=>"<integer>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"result":{"sampleId":"\u003cstring\u003e","progressId":"\u003cstring\u003e"},"meta":{"httpStatus":"\u003cstring\u003e","requestId":"\u003cstring\u003e","notice":"\u003cstring\u003e"}}