Validates a CSV taxonomy file for the given targeting vendor and returns an impact report (segment counts before/after, diff, affected strategies). Nothing is written to the database — this is a dry-run only.
Two-character alphanumeric namespace code identifying the targeting vendor (e.g. mm). Must match an existing record in targeting_vendors.
curl -i -X POST \
https://api.mediamath.com/api/v3.0/targeting_segments/taxonomy_upload \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: multipart/form-data' \
-F targeting_vendor=mm \
-F file=stringCSV impact report. The same format is returned by both the dry-run and apply endpoints. Response headers carry the numeric counts; the body is a CSV attachment with two summary blocks followed by an optional affected-strategies table.
Attachment filename in the form attachment; filename=<VendorName>_taxonomy_update_report.csv.
Number of retired targeting segments before this upload.
Number of retired targeting segments after this upload.
Number of strategy-targeting-segment links before this upload.
Number of strategy-targeting-segment links after this upload.
Number of retired strategy-targeting-segment links before this upload.
Number of retired strategy-targeting-segment links after this upload.
Number of distinct strategies that target at least one segment present in the uploaded taxonomy (i.e. segments being kept or updated).
CRLF-terminated CSV with three sections separated by blank lines:
Header message — one of:
THE SYSTEM HAS NOT BEEN CHANGED, BUT THIS WOULD BE THE RESULT!(dry-run)THE FOLLOWING CHANGES HAVE BEEN APPLIED!(apply)
Count summary — two-column rows, key and value:
X-Num-Targeting-Segments-Before,<n> X-Num-Targeting-Segments-After,<n> X-Num-Strategy-Targeting-Segments-Before,<n> X-Num-Strategy-Targeting-Segments-After,<n> X-Num-Retired-Targeting-Segments-Before,<n> X-Num-Retired-Targeting-Segments-After,<n> X-Num-Retired-Strategy-Targeting-Segments-Before,<n> X-Num-Retired-Strategy-Targeting-Segments-After,<n>Diff summary — two-column rows, key and value:
X-Num-Segments-Updated,<n> X-Num-Segments-Added,<n> X-Num-Segments-Removed,<n> X-Num-Strategies-Migrated,<n> X-Num-Strategies-Targeting-Retired-Segments,<n>Affected strategies table (only present when at least one strategy targets a segment being retired) — header row followed by one data row per affected strategy/segment pair:
organization_name,agency_name,advertiser_name,campaign_name,strategy_name, strategy_id,strategy_status,strategy_start_date,strategy_end_date, targeting_segment_full_path,targeting_segment_external_code
string