Create an item for an exception list

Creates a new item for an exception list. You have two methods to create an item: either manually input each item's URL-encoded Name and Value parameters, or upload a .CSV/.XLSX file with all items meant for a particular exception list.

Mode Parameters


Upsert optional

Whether existing items with the same Value attribute will have their details updated with the new item details provided. Omitting this parameter will default it to false; if false, any provided items with Value attributes already present in the list will be ignored.

Parameters


Value required, unless using the File parameter

What the exception list item is searching for. This will be the CATEGORY or SKU value that the exception list looks at, depending on the exception list's Type. Cannot use alongside the File parameter.


Name optional, unless using the File parameter

Item's display name for contracting purposes. Cannot use alongside the File parameter.


File required, unless using any other parameter

A .CSV/.XLSX file containing the column headers found below and the exception list's item's information. One exception list item per row. Cannot use alongside any other parameter.

View column headers
ValuerequiredThe CATEGORY or SKU value that the exception list looks at, depending on the exception list's Type.
NameoptionalItem's display name for contracting purposes.
ActiveStartDateoptionalThe date and time that the item will be added to the exception list. See ISO 8601.
ActiveEndDateoptionalThe date and time that the item will be removed from the exception list. See ISO 8601.
TimeZoneoptionalThe time zone that govern ActiveStartDate and ActiveEndDate. See impact.com's supported currencies.

Returns


If using the Name and Value parameters, returns the status of the request and the URI of the newly created exception list item. Returns an error if create parameters are invalid or if a required parameter is missing.

If using the File parameter, returns the status of the request and the URI of the exception list item list. Returns an error if create parameters are invalid or if a required parameter is missing.

Example Request


curl 'https://api.impact.com/Advertisers/<AccountSID>/ExceptionLists/<ExceptionListId>/Items' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'Name=White Anvil' \
-d 'Value=White Anvil' \
-d 'Upsert=false'
curl 'https://api.impact.com/Advertisers/<AccountSID>/ExceptionLists/<ExceptionListId>/Items' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-H 'Content-Type: multipart/form-data' \
-F 'File=@"path/to/a/file.csv"'
-d 'Upsert=true'

Example Response


{
  "Status": "OK",
  "Uri": "/Advertisers/<AccountSID>/ExceptionLists/10002/Items/00042"
}
{
  "Status": "OK",
  "Uri": "/Advertisers/<AccountSID>/ExceptionLists/10002/Items"
}