Send conversion events to the Pinterest API for Conversions
POST {{baseUrl}}/ad_accounts/:ad_account_id/events?test=<boolean>
The Pinterest API offers advertisers a way to send Pinterest their conversion information (including web conversions, in-app conversions, or even offline conversions) based on their adaccountid
. The request body should be a JSON object.
- This endpoint requires an accesstoken
be generated through Ads Manager. Review the Conversions Guide for more details.
- The token's user
account
must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via Business Access: Admin, Analyst, Audience, Campaign. (Note that the token can be used across multiple ad accounts under an user ID.)
- This endpoint has a rate limit of 5,000 calls per minute per ad account.
- If the merchant is submitting this information using both Pinterest conversion tags and the Pinterest API, Pinterest will remove duplicate information before reporting. (Note that events that took place offline cannot be deduplicated.)
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
test | string | Include query param ?test=true to mark the request as a test request. The events will not be recorded but the API will still return the same response messages. Use this mode to verify your requests are working and your events are constructed correctly. | |
Warning: If you use this query parameter, be certain that it is off (set to false or deleted) before sending a legitimate (non-testing) request. |
Request Body
{"data"=>[{"event_name"=>"<string>", "action_source"=>"<string>", "event_time"=>"<long>", "user_data"=>{"em"=>["<string>", "<string>"], "hashed_maids"=>["<string>", "<string>"], "client_ip_address"=>"<string>", "client_user_agent"=>"<string>"}, "event_id"=>"<string>", "event_source_url"=>"<string>", "opt_out"=>"<boolean>", "partner_name"=>"<string>", "custom_data"=>{"currency"=>"<string>", "value"=>"<string>", "content_ids"=>["<string>", "<string>"], "content_name"=>"<string>", "content_category"=>"<string>", "content_brand"=>"<string>", "contents"=>[{"id"=>"<string>", "item_price"=>"<string>", "quantity"=>"<long>"}, {"id"=>"<string>", "item_price"=>"<string>", "quantity"=>"<long>"}], "num_items"=>"<long>", "order_id"=>"<string>", "search_string"=>"<string>", "opt_out_type"=>"<string>", "np"=>"<string>"}, "app_id"=>"<string>", "app_name"=>"<string>", "app_version"=>"<string>", "device_brand"=>"<string>", "device_carrier"=>"<string>", "device_model"=>"<string>", "device_type"=>"<string>", "os_version"=>"<string>", "wifi"=>"<boolean>", "language"=>"<string>"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"num_events_received":"\u003cinteger\u003e","num_events_processed":"\u003cinteger\u003e","events":[{"status":"failed","error_message":"\u003cstring\u003e","warning_message":"\u003cstring\u003e"},{"status":"failed","error_message":"\u003cstring\u003e","warning_message":"\u003cstring\u003e"}]}