# Update activation

Update an activation (formerly syndication).

Endpoint: PUT /audiences/{audienceId}/segments/{segmentId}/syndications/{syndicationId}
Version: 1.0.0
Security: TdApikeyAuth

## Security:

  - `TdApikeyAuth` (unknown)
    apiKey in header Authorization

## Path parameters:

  - `audienceId` (integer, required)
    Master Segment ID of the syndication

  - `segmentId` (integer, required)
    Segment ID of the syndication

  - `syndicationId` (integer, required)
    ID of Syndication to return

## Request fields (application/json):

  - `name` (string, required)

  - `description` (string)

  - `allColumns` (boolean)
    syndication all column flag  ('true' means  that you use all attribute data)

  - `columns` (array)
    Syndication column detail. Basic syntax is `{"column": "alias_name", "source": {...}}`. `source` accepts various definitions. See ColumnExpression/StringExpression for details. example value is using ColumnExpression without `function` property.
    Example: [{"column":"alias_name","source":{"column":"real_column_name"}}]

  - `columns.id` (string)

  - `columns.column` (string, required)

  - `columns.source` (any, required)

  - `columns.source.column` (string, required)

  - `columns.source.customerGroup` (string)

  - `columns.source.functions` (array)

  - `columns.source.functions.function` (string, required)
    Enum: "+", "-", "*", "/"

  - `columns.source.functions.arg` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "replace"

  - `columns.source.functions.search` (string)

  - `columns.source.functions.replacement` (string)

  - `columns.source.functions.function` (string, required)
    Enum: "substr"

  - `columns.source.functions.start` (number)

  - `columns.source.functions.length` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "regexp_extract"

  - `columns.source.functions.pattern` (string)

  - `columns.source.functions.group` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "day_of_week", "from_iso8601_timestamp", "ln", "elapsed_days", "td_ip_to_least_specific_subdivision_name", "td_ip_to_country_name", "td_ip_to_city_name", "td_ip_to_connection_type", "td_ip_to_domain"

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_quantitative"

  - `columns.source.functions.default` (number, required)

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_categorical"

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_categorical_array"

  - `columns.source.functions.function` (string, required)
    Enum: "if"

  - `columns.source.functions.op` (string)
    Enum: ">", "<", "<=", ">=", "=", "!=", "is", "is\\", "not"

  - `columns.source.functions.right_value` (number)

  - `columns.source.functions.then` (number)

  - `columns.source.functions.else` (number)

  - `columns.source.string` (string, required)

  - `columns.source.parameters` (array)
    Values for the placeholders ($1, $2, $3, ...) in the string

  - `columns.source.parameters.type` (string)
    Enum: "String"

  - `columns.source.parameters.string` (string)

  - `columns.source.parameters.type` (string)
    Enum: "Timestamp"

  - `columns.source.parameters.format` (string)

  - `columns.source.parameters.type` (string)
    Enum: "SegmentName", "SegmentId", "AudienceId", "FunnelName", "StageName"

  - `scheduleType` (string)
    Deprecated. Old parameter for setting schedule type. See/Use RepeatUnit instead.
    Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly"

  - `scheduleOption` (string)
    Deprecated. Old parameter for setting schedule. Use startAt instead.

  - `repeatUnit` (string)
    Setting an activation repetition cycle such as "day" or "week".
    Enum: "none", "minute", "hour", "day", "week", "month", "once"

  - `repeatFrequency` (integer)
    Setting an activation repeat frequency.
Currently, it is set only when the repeat unit is "minute". If the repeat unit is "minute", the interval is set in minutes.

  - `repeatSubFrequency` (array)
    Parameter for more detailed frequency settings. Values are array of integers.
Currently, this parameter is only valid for repeat unit "week".
For multiple days of the week, each value should be 1 to 7.
1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday
    Example: [1,5,6]

  - `startAt` (string)
    cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected.

  - `runAt` (string)

  - `cron` (string)

  - `timezone` (string)

  - `connectionId` (integer)

  - `connectorConfig` (object)

  - `notifyOn` (array)

  - `emailRecipients` (array)

  - `nestedWorkflowProjectName` (string)

  - `nestedWorkflowName` (string)

  - `lockEnabled` (boolean)

  - `activationTemplateId` (string)

  - `syndicationBehavior` (object)
    Deprecated. Use syndicationBehaviors instead. Cannot be specified together with syndicationBehaviors.

  - `syndicationBehavior.behaviorTableName` (string)
    Behavior table name which contains behavior records
    Example: purchase_history

  - `syndicationBehavior.joinRow` (integer)
    How much rows would be joined (value is N for Top-N join)
    Example: 3

  - `syndicationBehavior.joinStrategy` (string)
    Label of what is the wanted record(s).
    Enum: "All", "First", "Last", "Top-N"

  - `syndicationBehavior.formatting` (string)
    Enum: "rows", "cols"

  - `syndicationBehavior.orderBy` (array)
    Example: [{"key":"purchased_at","order":"descending"},{"key":"price","order":"ascending"}]

  - `syndicationBehavior.orderBy.key` (string)

  - `syndicationBehavior.orderBy.order` (string)
    Enum: "ascending", "descending"

  - `syndicationBehaviors` (array)
    Behavior activation configurations. Cannot be specified together with syndicationBehavior.

## Response 200:

  - `200` (unknown)
    successful operation

## Response 200 fields (application/json):

  - `id` (string)

  - `audienceId` (string)

  - `segmentId` (string)

  - `name` (string)

  - `description` (string)

  - `allColumns` (boolean)
    syndication all column flag  ('true' means  that you use all attribute data)

  - `columns` (any)

  - `columns.id` (string)

  - `columns.column` (string, required)

  - `columns.source` (any, required)

  - `columns.source.column` (string, required)

  - `columns.source.customerGroup` (string)

  - `columns.source.functions` (array)

  - `columns.source.functions.function` (string, required)
    Enum: "+", "-", "*", "/"

  - `columns.source.functions.arg` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "replace"

  - `columns.source.functions.search` (string)

  - `columns.source.functions.replacement` (string)

  - `columns.source.functions.function` (string, required)
    Enum: "substr"

  - `columns.source.functions.start` (number)

  - `columns.source.functions.length` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "regexp_extract"

  - `columns.source.functions.pattern` (string)

  - `columns.source.functions.group` (number)

  - `columns.source.functions.function` (string, required)
    Enum: "day_of_week", "from_iso8601_timestamp", "ln", "elapsed_days", "td_ip_to_least_specific_subdivision_name", "td_ip_to_country_name", "td_ip_to_city_name", "td_ip_to_connection_type", "td_ip_to_domain"

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_quantitative"

  - `columns.source.functions.default` (number, required)

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_categorical"

  - `columns.source.functions.function` (string, required)
    Enum: "cast_as_categorical_array"

  - `columns.source.functions.function` (string, required)
    Enum: "if"

  - `columns.source.functions.op` (string)
    Enum: ">", "<", "<=", ">=", "=", "!=", "is", "is\\", "not"

  - `columns.source.functions.right_value` (number)

  - `columns.source.functions.then` (number)

  - `columns.source.functions.else` (number)

  - `columns.source.string` (string, required)

  - `columns.source.parameters` (array)
    Values for the placeholders ($1, $2, $3, ...) in the string

  - `columns.source.parameters.type` (string)
    Enum: "String"

  - `columns.source.parameters.string` (string)

  - `columns.source.parameters.type` (string)
    Enum: "Timestamp"

  - `columns.source.parameters.format` (string)

  - `columns.source.parameters.type` (string)
    Enum: "SegmentName", "SegmentId", "AudienceId", "FunnelName", "StageName"

  - `columns.thisKeyNeverHit` (string)

  - `scheduleType` (string)
    Enum: "cron", "daily", "hourly", "minutes_interval", "monthly", "none", "weekly"

  - `scheduleOption` (string)

  - `startAt` (string)
    cdp-api will fill some value for old syndications with ScheduleType is not NoneType. '%Y-%M-%DT%h:%m:%s' is expected.

  - `endOn` (string)

  - `repeatUnit` (string)

  - `repeatFrequency` (integer)

  - `repeatSubFrequency` (array)
    Parameter for more detailed frequency settings. Values are array of integers.
Currently, this parameter is only valid for repeat unit "week".
For multiple days of the week, each value should be 1 to 7.
1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday, 7: Sunday
    Example: [1,5,6]

  - `timezone` (string)

  - `connectionId` (string)

  - `connectorConfig` (object)

  - `createdAt` (string)

  - `updatedAt` (string)

  - `createdBy` (object)

  - `createdBy.id` (string)

  - `createdBy.td_user_id` (string)

  - `createdBy.name` (string)

  - `valid` (boolean)

  - `executions` (array)

  - `executions.syndicationId` (string)

  - `notifyOn` (array)

  - `emailRecipients` (array)

  - `activationTemplateId` (string)

## Response 400:

  - `400` (unknown)
    Given parameters are not valid

## Response 400 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 401:

  - `401` (unknown)
    Unauthorized; You don't provide valid credentials. Maybe you didn't specify valid TD's Master API Key as 'TD1 {Your TD Master API Key}'.

## Response 401 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 403:

  - `403` (unknown)
    Requested resource or action is not allowed because you don't have sufficient permissions

## Response 403 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 404:

  - `404` (unknown)
    The specified resource was not found

## Response 404 fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 4XX:

  - `4XX` (unknown)
    There is a high possibility of error of the authentication system. Please check the contents and authority of the key. Please contact the TD support team if you do not resolve it.

## Response 4XX fields (application/json):

  - `code` (string, required)

  - `message` (string, required)

## Response 5XX:

  - `5XX` (unknown)
    System error. Because there is a possibility of a temporary error due to network trouble and so on, we recommend several times retry on request side. Please contact the TD support team if you do not resolve it.

## Response 5XX fields (application/json):

  - `status` (integer, required)
    Error status

  - `error` (string, required)
    Error message

  - `details` (string)
    Detailed error message

