| Parameter | Description |
|---|---|
namestring Required | Give the event type a unique name of up to 100 characters. Use any upper- or lower-case letters (treated as case insensitive), numerals 09_-Example: add_shipping_info |
mapped_conversion_typeenum Required | Map your custom event to a similar, optimizable Pinterest standard event, so that Pinterest handles your event as the standard event for campaign optimization purposes. Set to one of the following: SIGNUPADD_TO_CARTLEADCHECKOUTSUBSCRIBEADD_TO_WISHLISTADD_PAYMENT_INFOINITIATE_CHECKOUTCONTACTCUSTOMIZE_PRODUCTFIND_LOCATIONSCHEDULESUBMIT_APPLICATIONSTART_TRIALPAGE_VISITVIEW_CATEGORYVIEW_CONTENTSEARCHWATCH_VIDEO |
curl --request POST \ --url https://api.pinterest.com/v5/ad_accounts/123456789012/advertiser_defined_events \ --header 'authorization: Bearer pina_ABCD1234...' \ --header 'content-type: application/json' \ --data '{ "items": [ { "name": "custom_add_to_cart", "mapped_conversion_type": "ADD_TO_CART" }, { "name": "custom_checkout", "mapped_conversion_type": "CHECKOUT" } ] }'
| Field | Description |
|---|---|
items.statusstring | Either successfailure |
items.exceptionsarray of strings | For names that failed in the submitted request, the reason for the failure. |
{ "items": [ { "name": "custom_add_to_cart", "status": "failure", "exceptions": ["duplicate_event_name"] }, { "name": "custom_checkout", "status": "success" } ] }