Create bulk upsert
documentedCreate or update advertiser entities in bulk (campaigns, ad groups, ads, etc.).
POST /ad_accounts/{ad_account_id}/bulk/upsertAdsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.pinterest.com/v5/ad_accounts/{{$ad_account_id}}/bulk/upsert" \
-X POST \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"create": {"campaigns": [{"name": "{{$campaign_name}}", "objective": "SALES"}], "ad_groups": [{"name": "{{$ad_group_name}}", "campaign_id": "{{$campaign_id}}"}], "ads": [{"name": "{{$ad_name}}", "ad_group_id": "{{$ad_group_id}}"}], "labels": [{"name": "{{$label_name}}"}], "catalog_product_groups": [{"catalog_id": "{{$catalog_id}}", "group_id": "{{$group_id}}"}]}, "update": {"campaigns": [{"id": "{{$campaign_id}}", "name": "{{$campaign_name}}"}], "ad_groups": [{"id": "{{$ad_group_id}}", "name": "{{$ad_group_name}}"}], "ads": [{"id": "{{$ad_id}}", "name": "{{$ad_name}}"}], "labels": [{"id": "{{$label_id}}", "name": "{{$label_name}}"}], "catalog_product_groups": [{"catalog_id": "{{$catalog_id}}", "group_id": "{{$group_id}}", "status": "{{$status}}"}]}, "reporting_event": "{{$reporting_event}}"}'"