openapi: 3.0.3 info: version: 5.13.0 title: Pinterest Ad API description: This is the description of your API. contact: name: Pinterest, Inc. url: https://developers.pinterest.com/ license: name: MIT url: https://spdx.org/licenses/MIT termsOfService: https://developers.pinterest.com/terms/ servers: - url: https://api.pinterest.com/v5 tags: - name: Ad paths: /ad_accounts: get: summary: List ad accounts description: 'Get a list of the ad_accounts that the "operation user_account" has access to. - This includes ad_accounts they own and ad_accounts that are owned by others who have granted them Business Access.' tags: - Ad operationId: ad_accounts/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/query_bookmark' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_include_shared_accounts' responses: '200': description: response content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: description: Ad accounts items: $ref: '#/components/schemas/AdAccount' default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' post: summary: Create ad account description: 'Create a new ad account. Different ad accounts can support different currencies, payment methods, etc. An ad account is needed to create campaigns, ad groups, and ads; other accounts (your employees or partners) can be assigned business access and appropriate roles to access an ad account.
You can set up up to 50 ad accounts per user. (The user must have a business account to create an ad account.) For more, see Create an advertiser account.' tags: - Ad operationId: ad_accounts/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled requestBody: content: application/json: schema: $ref: '#/components/schemas/AdAccountCreateRequest' description: Ad account to create. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdAccount' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error /ad_accounts/{ad_account_id}: get: summary: Get ad account description: Get an ad account operationId: ad_accounts/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdAccount' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad /ad_accounts/{ad_account_id}/ad_groups: get: summary: List ad groups description: 'List ad groups based on provided campaign IDs or ad group IDs.(campaign_ids or ad_group_ids). Note: Provide only campaign_id or ad_group_id. Do not provide both.' operationId: ad_groups/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_campaign_ids' - $ref: '#/components/parameters/query_ad_group_ids' - $ref: '#/components/parameters/query_entity_statuses' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' - $ref: '#/components/parameters/query_translate_interests_to_names' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/AdGroupResponse' description: Success '400': description: Invalid ad account group parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account group parameters. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad post: summary: Create ad groups description: "Create multiple new ad groups. All ads in a given ad group will have the same budget, bid, run dates, targeting, and placement (search, browse, other). For more information, click here.\nNote:\n- 'bid_in_micro_currency' and 'budget_in_micro_currency' should be expressed in microcurrency amounts based on the currency field set in the advertiser's profile.\nMicrocurrency is used to track very small transactions, based on the currency set in the advertisers profile.
\nA microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertisers profile.
\nEquivalency equations, using dollars as an example currency:
\nTo convert between currency and microcurrency, using dollars as an example currency:
\nad_account_id, filtered by the specified options.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ad_groups/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_ad_group_ids_required'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdGroupsAnalyticsResponse'
description: Success
'400':
description: Invalid ad account group analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account group analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ad_groups/targeting_analytics:
get:
summary: Get targeting analytics for ad groups
description: 'Get targeting analytics for one or more ad groups.
For the requested ad group(s) and metrics, the response will include the requested metric information
(e.g. SPEND_IN_DOLLAR) for the requested target type (e.g. "age_bucket") for applicable values (e.g. "45-49").
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ad_groups_targeting_analytics/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_ad_group_ids_required'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_targeting_types'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
- $ref: '#/components/parameters/query_attribution_types'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
description: Success
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ad_groups/audience_sizing:
post:
summary: Get audience sizing
description: "Get potential audience size for an ad group with given targeting criteria. \nPotential audience size estimates the number of people you may be able to reach per month with your campaign. \nIt is based on historical advertising data and the targeting criteria you select.\nIt does not guarantee results or take into account factors such as bid, budget, schedule, seasonality or product experiments."
operationId: ad_groups/audience_sizing
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AdGroupAudienceSizingRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdGroupAudienceSizingResponse'
description: Success
'400':
description: Invalid ad group audience sizing parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad group audience sizing parameters.
'403':
description: No access to requested audience list or product group.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 403
message: You don't have access to the requested audience list or product group.
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/ad_groups/{ad_group_id}:
get:
summary: Get ad group
description: 'Get a specific ad given the ad ID. If your pin is rejected, rejected_reasons will
contain additional information from the Ad Review process.
For more information about our policies and rejection reasons see the Pinterest advertising standards.'
operationId: ad_groups/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_ad_group_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdGroupResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/ad_previews:
post:
summary: Create ad preview with pin or image
description: 'Create an ad preview given an ad account ID and either an existing organic pin ID or the URL for an image to be used to create the Pin and the ad.
If you are creating a preview from an existing Pin, that Pin must be promotable: that is, it must have a clickthrough link and meet other requirements. (See Ads Overview.)
You can view the returned preview URL on a webpage or iframe for 7 days, after which the URL expires. Collection ads are not currently supported ad preview.'
tags:
- Ad
operationId: ad_previews/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
description: Create ad preview with pin or image.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdPreviewRequest'
responses:
'200':
description: Successful ad preview creation.
content:
application/json:
schema:
$ref: '#/components/schemas/AdPreviewURLResponse'
'400':
description: Invalid Pin parameters response
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
InvalidPinUrl:
value:
code: 1
message: Whoops! It looks like you entered an invalid URL. Try creating a Pin again with a valid URL.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/ads:
get:
summary: List ads
description: "List ads that meet the filters provided:\n - Listed campaign ids or ad group ids or ad ids\n - Listed entity statuses \nIf no filter is provided, all ads in the ad account are returned. \nNote:\nProvide only campaign_id or ad_group_id or ad_id. Do not provide more than one type. \nReview status is provided for each ad; if review_status is REJECTED, the rejected_reasons field will contain additional information.\nFor more, see Pinterest advertising standards."
operationId: ads/list
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_campaign_ids'
- $ref: '#/components/parameters/query_ad_group_ids'
- $ref: '#/components/parameters/query_ad_ids'
- $ref: '#/components/parameters/query_entity_statuses'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_order'
- $ref: '#/components/parameters/query_bookmark'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/AdResponse'
description: Success
'400':
description: Invalid ad account ads parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
post:
description: Create multiple new ads. Request must contain ad_group_id, creative_type, and the source Pin pin_id.
operationId: ads/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/AdCreateRequest'
maxItems: 30
minItems: 1
type: array
description: List of ads to create, size limit [1, 30].
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdArrayResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Create ads
tags:
- Ad
patch:
description: Update multiple existing ads
operationId: ads/update
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
items:
$ref: '#/components/schemas/AdUpdateRequest'
maxItems: 30
minItems: 1
type: array
description: List of ads to update, size limit [1, 30]
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdArrayResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Update ads
tags:
- Ad
/ad_accounts/{ad_account_id}/ads/analytics:
get:
summary: Get ad analytics
description: 'Get analytics for the specified ads in the specified ad_account_id, filtered by the specified options.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ads/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_ad_ids_required'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdsAnalyticsResponse'
description: Success
'400':
description: Invalid ad account ads analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ads_credit/discounts:
get:
summary: Get ads credit discounts
description: 'Returns the list of discounts applied to the account.
This endpoint might not be available to all apps. Learn more.'
operationId: ads_credits_discounts/get
security:
- pinterest_oauth2:
- ads:read
- billing:read
x-ratelimit-category: ads_read
x-sandbox: disabled
tags:
- Ad
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/AdsCreditDiscountsResponse'
description: Success
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/ads_credit/redeem:
post:
summary: Redeem ad credits
description: 'Redeem ads credit on behalf of the ad account id and apply it towards billing.
This endpoint might not be available to all apps. Learn more.'
tags:
- Ad
operationId: ads_credit/redeem
security:
- pinterest_oauth2:
- ads:write
- billing:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
description: Redeem ad credits request.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdsCreditRedeemRequest'
responses:
'200':
description: Successfully redeemed ad credits.
content:
application/json:
schema:
$ref: '#/components/schemas/AdsCreditRedeemResponse'
'400':
description: Error thrown when unable to redeem offer code.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
ValidationError:
value:
code: 15
message: Unable to redeem offer code. Try again later.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/ads/targeting_analytics:
get:
summary: Get targeting analytics for ads
description: 'Get targeting analytics for one or more ads. For the requested ad(s) and metrics,
the response will include the requested metric information (e.g. SPEND_IN_DOLLAR) for the requested target type
(e.g. "age_bucket") for applicable values (e.g. "45-49").
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ad_targeting_analytics/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_ad_ids_required'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_targeting_types'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
- $ref: '#/components/parameters/query_attribution_types'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/ads/{ad_id}:
get:
summary: Get ad
description: 'Get a specific ad given the ad ID. If your pin is rejected, rejected_reasons will
contain additional information from the Ad Review process.
For more information about our policies and rejection reasons see the Pinterest advertising standards.'
operationId: ads/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_ad_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/analytics:
get:
summary: Get ad account analytics
description: 'Get analytics for the specified ad_account_id, filtered by the specified options.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time.'
operationId: ad_account/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdAccountAnalyticsResponse'
description: Success
'400':
description: Invalid ad account analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/audience_insights:
get:
summary: Get audience insights
description: 'Get Audience Insights for an ad account. The response will return insights for 3 types of audiences: the
ad account''s engaged audience on Pinterest, the ad account''s total audience on Pinterest and Pinterest''s
total audience.
Learn more about Audience Insights.'
operationId: audience_insights/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_audience_insight_type'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceInsightsResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/audiences:
get:
summary: List audiences
description: Get list of audiences for the ad account.
operationId: audiences/list
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_bookmark'
- description: 'The order in which to sort the items returned: ASCENDING or DESCENDING by ID.
For received audiences, it is sorted by sharing event time.
Note that higher-value IDs are associated with more-recently added items.'
in: query
name: order
required: false
schema:
type: string
example: ASCENDING
enum:
- ASCENDING
- DESCENDING
- $ref: '#/components/parameters/query_page_size'
- description: 'This feature is currently in beta and not available to all apps.
Filter audiences by ownership type.'
in: query
name: ownership_type
required: false
example: OWNED
schema:
type: string
default: OWNED
enum:
- OWNED
- RECEIVED
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/Audience'
description: Success
'400':
description: Invalid ad account audience parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account audience parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
post:
description: 'Create an audience you can use in targeting for specific ad groups. Targeting combines customer information with
the ways users interact with Pinterest to help you reach specific groups of users; you can include or exclude
specific audience_ids when you create an ad group.
For more, see Audience targeting.'
operationId: audiences/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceCreateRequest'
description: List of ads to create, size limit [1, 30]
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Audience'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Create audience
tags:
- Ad
/ad_accounts/{ad_account_id}/audiences/{audience_id}:
get:
summary: Get audience
description: Get a specific audience given the audience ID.
operationId: audiences/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_audience_id'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Audience'
'404':
description: Audience not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
patch:
summary: Update audience
description: Update (edit or remove) an existing targeting audience.
operationId: audiences/update
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_audience_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceUpdateRequest'
description: The audience to be updated.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Audience'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/audiences/custom:
post:
summary: Create custom audience
description: Create a custom audience and find the audiences you want your ads to reach.
operationId: audiences/create_custom
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
description: Custom audience to create.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceCreateCustomRequest'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/Audience'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/bid_floor:
post:
description: "List bid floors for your campaign configuration. Bid floors are given in microcurrency values based on the currency in the bid floor specification. \nMicrocurrency is used to track very small transactions, based on the currency set in the advertisers profile.
\nA microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertiser s profile.
\nEquivalency equations, using dollars as an example currency:
\nTo convert between currency and microcurrency, using dollars as an example currency:
\nrequest_id
that can be used to obtain the status of the request.'
operationId: bulk_upsert/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/BulkUpsertRequest'
description: Parameters to get create/update ad entities in bulk
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BulkUpsertResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Create/update ad entities in bulk
tags:
- Ad
/ad_accounts/{ad_account_id}/bulk/{bulk_request_id}:
get:
description: 'Get the status of a bulk request by request_id, along with a download URL that will allow you to download the
new or updated entity data (campaigns, ad groups, product groups, ads, or keywords).'
operationId: bulk_request/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_bulk_request_id'
- $ref: '#/components/parameters/include_details'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BulkUpsertStatusResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
summary: Download advertiser entities in bulk
tags:
- Ad
/ad_accounts/{ad_account_id}/campaigns:
get:
summary: List campaigns
description: 'Get a list of the campaigns in the specified ad_account_id, filtered by the specified options.
- 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, Campaign Manager.'
operationId: campaigns/list
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_campaign_ids'
- $ref: '#/components/parameters/query_entity_statuses'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_order'
- $ref: '#/components/parameters/query_bookmark'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/CampaignResponse'
description: Success
'400':
description: Invalid ad account campaign parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account campaign parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
post:
summary: Create campaigns
description: "Create multiple new campaigns. Every campaign has its own campaign_id and houses one or more ad groups, which contain one or more ads.\nFor more, see Set up your campaign. \nNote:\n- The values for 'lifetime_spend_cap' and 'daily_spend_cap' are microcurrency amounts based on the currency field set in the advertiser's profile. (e.g. USD) \nMicrocurrency is used to track very small transactions, based on the currency set in the advertisers profile.
\nA microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertisers profile.
\nEquivalency equations, using dollars as an example currency:
\nTo convert between currency and microcurrency, using dollars as an example currency:
\nThe values for 'lifetime_spend_cap' and 'daily_spend_cap' are microcurrency amounts based on the currency field set in the advertiser's profile. (e.g. USD)
\nMicrocurrency is used to track very small transactions, based on the currency set in the advertisers profile.
\nA microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertiser s profile.
\nEquivalency equations, using dollars as an example currency:
\nTo convert between currency and microcurrency, using dollars as an example currency:
\nad_account_id, filtered by the specified options.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: campaigns/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_campaign_ids_required'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignsAnalyticsResponse'
description: Success
'400':
description: Invalid ad account campaign analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account campaign analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/campaigns/targeting_analytics:
get:
summary: Get targeting analytics for campaigns
description: 'Get targeting analytics for one or more campaigns.
For the requested account and metrics, the response will include the requested metric information
(e.g. SPEND_IN_DOLLAR) for the requested target type (e.g. "age_bucket") for applicable values (e.g. "45-49").
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: campaign_targeting_analytics/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_campaign_ids_required'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_targeting_types'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
- $ref: '#/components/parameters/query_attribution_types'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
description: Success
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/campaigns/{campaign_id}:
get:
summary: Get campaign
description: Get a specific campaign given the campaign ID.
operationId: campaigns/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_campaign_id'
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/CampaignResponse'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/conversion_tags:
get:
summary: Get conversion tags
description: List conversion tags associated with an ad account.
operationId: conversion_tags/list
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_filter_deleted'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionTagListResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
x-sandbox: disabled
post:
x-sandbox: disabled
summary: Create conversion tag
description: 'Create a conversion tag, also known as Pinterest tag, with the option to enable enhanced match.
The Pinterest Tag tracks actions people take on the ad account s website after they view the ad account''s ad on Pinterest. The advertiser needs to customize this tag to track conversions.
For more information, see:
Set up the Pinterest tag
Pinterest Tag
Enhanced match'
operationId: conversion_tags/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionTagCreate'
description: Conversion Tag to create
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionTagResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/conversion_tags/ocpm_eligible:
get:
summary: Get Ocpm eligible conversion tags
description: Get Ocpm eligible conversion tag events for an ad account.
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
operationId: ocpm_eligible_conversion_tags/get
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
x-sandbox: disabled
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionTagsOcpmEligibleResponse'
default:
description: Unexpected errors
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/conversion_tags/page_visit:
get:
summary: Get page visit conversion tags
description: Get all page visit conversion tag events for an ad account.
operationId: page_visit_conversion_tags/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_order'
- $ref: '#/components/parameters/query_bookmark'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/ConversionEventResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/conversion_tags/{conversion_tag_id}:
get:
x-sandbox: disabled
summary: Get conversion tag
description: Get information about an existing conversion tag.
operationId: conversion_tags/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_conversion_tag_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionTagResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/customer_lists:
post:
description: "Create a customer list from your records(hashed or plain-text email addresses, or hashed MAIDs or IDFAs).
\nA customer list is one of the four types of Pinterest audiences: for more information, see Audience targeting\nor the Audiences section of the ads management guide.
\nPlease review our requirements for what type of information is allowed when uploading a customer list.
\nWhen you create a customer list, the system scans the list for existing Pinterest accounts;\nthe list must include at least 100 Pinterest accounts. Your original list will be deleted when the matching process\nis complete. The filtered list containing only the Pinterest accounts that were included in your starting\nlist is what will be used to create the audience.
\nNote that once you have created your customer list, you must convert it into an audience (of the CUSTOMER_LIST type)\nusing the create audience endpoint before it can be used.
" operationId: customer_lists/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerListRequest' description: Parameters to get Customer lists info required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CustomerList' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Create customer lists tags: - Ad get: description: "Get a set of customer lists including id and name based on the filters provided.
\n(Customer lists are a type of audience.) For more information, see\nAudience targeting\n or the Audiences\nsection of the ads management guide.
" operationId: customer_lists/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/CustomerList' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Get customer lists tags: - Ad /ad_accounts/{ad_account_id}/customer_lists/{customer_list_id}: get: summary: Get customer list description: Gets a specific customer list given the customer list ID. operationId: customer_lists/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_customer_list_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/CustomerList' description: Success default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad patch: description: "Append or remove records to/from an existing customer list. (A customer list is one of the four types of Pinterest audiences.)
\nWhen you add records to an existing customer list, the system scans the additions for existing Pinterest\naccounts; those are the records that will be added to your CUSTOMER_LIST audience. Your original list of records\n to add will be deleted when the matching process is complete.
\nFor more information, see Audience targeting\nor the Audiences\nsection of the ads management guide.
" operationId: customer_lists/update security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_customer_list_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/CustomerListUpdateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CustomerList' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Update customer list tags: - Ad /ad_accounts/{ad_account_id}/events: post: summary: Send conversions description: '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 theirad_account_id. The request body should be a JSON object.
- This endpoint requires an access_token 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.)'
operationId: events/create
tags:
- Ad
security:
- pinterest_oauth2:
- ads:write
- conversion_token: []
x-ratelimit-category: ads_conversions
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- name: test
description: '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.'
in: query
required: false
schema:
type: boolean
requestBody:
description: Conversion events.
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionEvents'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ConversionApiResponse'
description: Success
'400':
description: The request was invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 4196
message: The request was invalid.
'401':
description: Not authorized to send conversion events
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
UnauthorizedAccess:
value:
code: 2
message: Authentication failed.
'403':
description: Unauthorized access.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
UnauthorizedAccess:
value:
code: 29
message: You are not permitted to access that resource.
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/DetailedError'
description: Not all events were successfully processed.
'429':
description: 'This request exceeded a rate limit. This can happen if the client exceeds one
of the published rate limits within a short time window.'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 8
message: 'This request exceeded a rate limit. This can happen if the client exceeds one
of the published rate limits within a short time window.'
'503':
description: The endpoint has been ramped down and is currently not accepting any traffic.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 4197
message: The endpoint has been ramped down and is currently not accepting any traffic.
default:
description: Unexpected errors
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/ad_accounts/{ad_account_id}/insights/audiences:
get:
summary: Get audience insights scope and type
description: Get the scope and type of available audiences, which along with a date, is an audience that has recently had an interaction (referred to here as a type) on pins. Interacted pins can belong to at least the most common **partner** or **Pinterest** scopes. This means that user interactions made on advertiser or partner pins will have the **partner** scope. You can also have user interactions performed in general on Pinterest with the **Pinterest** scope. In that case, you can then use the returned type and scope values together on requests to other endpoints to retrieve insight metrics for a desired audience.
operationId: audience_insights_scope_and_type/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AudienceDefinitionResponse'
description: Success
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
/ad_accounts/{ad_account_id}/keywords:
get:
summary: Get keywords
description: 'Get a list of keywords based on the filters provided. If no filter is provided, it will default to the ad_account_id filter, which means it will only return keywords that specifically have parent_id set to the ad_account_id. Note: Keywords can have ad_account_ids, campaign_ids, and ad_group_ids set as their parent_ids. Keywords created through Ads Manager will have their parent_id set to an ad_group_id, not ad_account_id.
For more information, see Keyword targeting.
Notes:
For more information on match types, see match type enums.
Returns:
A successful call returns an object containing an array of new keyword objects and an empty "errors" object array.
An unsuccessful call returns an empty keywords array, and, instead, inserts the entire object with nulled/negated properties into the "errors" object array:
{ "keywords": [], "errors": [ { "data": { "archived": null, "match_type": "EXACT", "parent_type": null, "value": "foobar", "parent_id": null, "type": "keyword", "id": null }, "error_messages": [ "Advertisers and Campaigns only accept excluded targeting attributes." ] } } Create keywords for following entity types(advertiser, campaign, ad group or ad).
For more information, see Keyword targeting.
Notes:
For more information on match types, see match type enums.
Returns:
A successful call returns an object containing an array of new keyword objects and an empty "errors" object array.
An unsuccessful call returns an empty keywords array, and, instead, inserts the entire object with nulled/negated properties into the "errors" object array:
{ "keywords": [], "errors": [ { "data": { "archived": null, "match_type": "EXACT", "parent_type": null, "value": "foobar", "parent_id": null, "type": "keyword", "id": null }, "error_messages": [ "Advertisers and Campaigns only accept excluded targeting attributes." ] } } Rate limit: WRITE.
' operationId: keywords/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/KeywordsRequest' responses: '200': content: application/json: schema: $ref: '#/components/schemas/KeywordsResponse' description: Success default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad patch: summary: Update keywords description:Update one or more keywords' bid and archived fields.
Archiving a keyword effectively deletes it - keywords no longer receive metrics and no longer visible within the parent entity's keywords list.
operationId: keywords/update security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/KeywordUpdateBody' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/KeywordsResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad /ad_accounts/{ad_account_id}/keywords/metrics: get: summary: Get country's keyword metrics description: 'See keyword metrics for a specified country, aggregated across all of Pinterest. (Definitions are available from the "Get delivery metrics definitions" API endpoint).' operationId: country_keywords_metrics/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_country_code' - $ref: '#/components/parameters/query_keywords' responses: '200': content: application/json: schema: $ref: '#/components/schemas/KeywordsMetricsArrayResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad /ad_accounts/{ad_account_id}/lead_forms: get: summary: Get lead forms description: 'This feature is currently in beta and not available to all apps, if you''re interested in joining the beta, please reach out to your Pinterest account manager. Gets all Lead Forms associated with an ad account ID. For more, see Lead ads.' operationId: lead_forms/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/LeadFormResponse' description: Success '400': description: Invalid ad account lead forms parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account lead forms parameters. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}: get: summary: Get lead form by id description: 'This feature is currently in beta and not available to all apps, if you''re interested in joining the beta, please reach out to your Pinterest account manager. Gets a lead form given it''s ID. It must also be associated with the provided ad account ID. For more, see Lead ads.' operationId: lead_form/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_lead_form_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/LeadFormResponse' description: Success '400': description: Invalid ad account lead forms parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 1 message: Invalid ad account lead forms parameters. '404': description: The lead form ID for the given ad account ID does not exist. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 4842 message: Lead form is not found. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/lead_forms/{lead_form_id}/test: post: summary: Create lead form test data description: 'Create lead form test data based on the list of answers provided as part of the body. - List of answers should follow the questions creation order. This endpoint is currently in beta and not available to all apps. Learn more.' operationId: lead_form_test/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_lead_form_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/LeadFormTestRequest' description: Subscription to create. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/LeadFormTestResponse' description: Success '400': description: Invalid parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 1 message: Invalid parameters. '404': description: Lead not found. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 4842 message: Lead not found. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/leads/subscriptions: post: summary: Create lead ads subscription description: "Create a lead ads webhook subscription.\nSubscriptions allow Pinterest to deliver lead data from Ads Manager directly to the subscriber. Subscriptions can exist for a specific lead form or at ad account level. \n- Only requests for the OWNER or ADMIN of the ad_account will be allowed.\n- Advertisers can set up multiple integrations using ad_account_id + lead_form_id but only one integration per unique records.\n- For data security, egress lead data is encrypted with AES-256-GCM.\n\nThis endpoint is currently in beta and not available to all apps. Learn more." tags: - Ad operationId: ad_accounts_subscriptions/post security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/AdAccountCreateSubscriptionRequest' description: Subscription to create. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdAccountCreateSubscriptionResponse' description: Success '400': description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 1 message: Advertiser ID must be numeric. '403': description: Can't access this subscription. content: application/json: schema: $ref: '#/components/schemas/Error' examples: NotIntegrationOwner: value: code: 4182 message: Can't access this subscription. default: description: Unexpected error. content: application/json: schema: $ref: '#/components/schemas/Error' get: summary: Get lead ads subscriptions description: 'Get the advertiser''s list of lead ads subscriptions. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more.' operationId: ad_accounts_subscriptions/get_list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/AdAccountGetSubscriptionResponse' description: Success '403': description: Can't access this subscription. content: application/json: schema: $ref: '#/components/schemas/Error' examples: NotIntegrationOwner: value: code: 29 message: You are not permitted to access that resource. default: description: Unexpected error. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/leads/subscriptions/{subscription_id}: get: summary: Get lead ads subscription description: 'Get a specific lead ads subscription record. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more.' operationId: ad_accounts_subscriptions/get_by_id security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_subscription_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdAccountGetSubscriptionResponse' description: Success '400': description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 1 message: Advertiser ID must be numeric. '403': description: Can't access this subscription. content: application/json: schema: $ref: '#/components/schemas/Error' examples: NotIntegrationOwner: value: code: 29 message: You are not permitted to access that resource. '404': description: Subscription not found. content: application/json: schema: $ref: '#/components/schemas/Error' examples: CommerceIntegrationNotFound: value: code: 4517 message: Subscription for given ids not found. default: description: Unexpected error. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad delete: summary: Delete lead ads subscription description: 'Delete an existing lead ads webhook subscription by ID. - Only requests for the OWNER or ADMIN of the ad_account will be allowed. This endpoint is currently in beta and not available to all apps. Learn more.' operationId: ad_accounts_subscriptions/del_by_id security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_subscription_id' responses: '204': description: Subscription deleted successfully '400': description: Invalid input parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 1 message: Advertiser ID must be numeric. '403': description: You are not authorized to delete this subscription. content: application/json: schema: $ref: '#/components/schemas/Error' examples: NotIntegrationOwner: value: code: 29 message: You are not permitted to access that resource. '404': description: Subscription not found. content: application/json: schema: $ref: '#/components/schemas/Error' examples: CommerceIntegrationNotFound: value: code: 4517 message: Subscription for given ids not found. default: description: Unexpected error. content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/mmm_reports: get: summary: Get advertiser Marketing Mix Modeling (MMM) report. description: 'Get an mmm report for an ad account. This returns a URL to an mmm metrics report given a token returned from the create mmm report endpoint.' operationId: analytics/get_mmm_report security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_token_required' responses: '200': content: application/json: schema: $ref: '#/components/schemas/GetMMMReportResponse' description: Success '400': description: Invalid ad account ads analytics parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account ads analytics parameters. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad post: summary: Create a request for a Marketing Mix Modeling (MMM) report description: 'This creates an asynchronous mmm report based on the given request. It returns a token that you can use to download the report when it is ready. NOTE: An additional limit of 5 queries per minute per advertiser applies to this endpoint while it''s in beta release.' operationId: analytics/create_mmm_report security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_analytics x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMMMReportRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CreateMMMReportResponse' description: Success '400': description: Invalid ad account ads analytics mmm parameters content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account ads analytics mmm parameters default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/order_lines: get: summary: Get order lines description: List existing order lines associated with an ad account. operationId: order_lines/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/OrderLine' description: Success default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/order_lines/{order_line_id}: get: summary: Get order line description: Get a specific existing order line associated with an ad account. operationId: order_lines/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_order_line_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/OrderLine' description: Success default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/product_group_promotions: post: description: Add one or more product groups from your catalog to an existing ad group. (Product groups added to an ad group are a 'product group promotion.') operationId: product_group_promotions/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductGroupPromotionCreateRequest' description: List of Product Group Promotions to create, size limit [1, 30]. required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductGroupPromotionResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Create product group promotions tags: - Ad patch: description: Update multiple existing Product Group Promotions (by product_group_id) operationId: product_group_promotions/update security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: content: application/json: schema: $ref: '#/components/schemas/ProductGroupPromotionUpdateRequest' description: Parameters to update Product group promotions required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductGroupPromotionResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Update product group promotions tags: - Ad get: description: 'List existing product group promotions associated with an ad account. Include either ad_group_id or product_group_promotion_ids in your request. Note: ad_group_ids and product_group_promotion_ids are mutually exclusive parameters. Only provide one. If multiple options are provided, product_group_promotion_ids takes precedence over ad_group_ids. If none are provided, the endpoint returns an error.' operationId: product_group_promotions/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_product_group_promotion_ids' - $ref: '#/components/parameters/query_entity_statuses' - $ref: '#/components/parameters/query_ad_group_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/ProductGroupPromotionResponseItem' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Get product group promotions tags: - Ad /ad_accounts/{ad_account_id}/product_group_promotions/{product_group_promotion_id}: get: description: Get a product group promotion by id operationId: product_group_promotions/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_product_group_promotion_id' responses: '200': content: application/json: schema: $ref: '#/components/schemas/ProductGroupPromotionResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Get a product group promotion by id tags: - Ad /ad_accounts/{ad_account_id}/product_groups/analytics: get: summary: Get product group analytics description: 'Get analytics for the specified product groups in the specifiedad_account_id, filtered by the specified options.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: product_groups/analytics
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_product_group_ids_required'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ProductGroupAnalyticsResponse'
description: Success
'400':
description: Invalid ad account ads analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/product_groups/catalogs:
get:
deprecated: true
description: This endpoint is completely deprecated. Please use List product groups from Catalogs API instead.
operationId: ad_accounts_catalogs_product_groups/list
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_feed_profile_id'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/CatalogProductGroup'
description: Success
'400':
description: Invalid ad account ads parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads parameters.
'401':
description: Access Denied. This can happen if account is not yet approved to operate as Merchant on Pinterest.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Merchant data not found.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
summary: Get catalog product groups
tags:
- Ad
/ad_accounts/{ad_account_id}/reports:
get:
summary: Get the account analytics report created by the async call
description: 'This returns a URL to an analytics report given a token returned from the post request report creation call. You can use the URL to download the report. The link is valid for five minutes and the report is valid for one hour.
- 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, Campaign Manager.'
operationId: analytics/get_report
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_token_required'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdsAnalyticsGetAsyncResponse'
description: Success
'400':
description: Invalid ad account ads analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
post:
summary: Create async request for an account analytics report
description: 'This returns a token that you can use to download the report when it is ready. Note that this endpoint requires the parameters to be passed as JSON-formatted in the request body. This endpoint does not support URL query parameters.
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 914 days before the current date in UTC time and the max time range supported is 186 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.
- If level is PRODUCT_ITEM, the furthest back you can are allowed to pull data is 92 days before the current date in UTC time and the max time range supported is 31 days.
- If level is PRODUCT_ITEM, ad_ids and ad_statuses parameters are not allowed. Any columns related to pin promotion and ad is not allowed either.'
operationId: analytics/create_report
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AdsAnalyticsCreateAsyncRequest'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AdsAnalyticsCreateAsyncResponse'
description: Success
'400':
description: Invalid ad account ads analytics parameters.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account ads analytics parameters.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/sandbox:
delete:
summary: Delete ads data for ad account in API Sandbox
description: "Delete an ad account and all the ads data associated with that account. \nA string message is returned indicating the status of the delete operation.\n\nNote: This endpoint is only allowed in the Pinterest API Sandbox (https://api-sandbox.pinterest.com/v5). \nGo to https://developers.pinterest.com/docs/dev-tools/sandbox/ for more information."
operationId: sandbox/delete
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
example: Delete Success
'400':
description: Invalid ad account id.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account id
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ssio/accounts:
get:
summary: Get Salesforce account details including bill-to information.
description: 'Get Salesforce account details including bill-to information to be used in insertion orders process for ad_account_id.
- 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, Finance, Campaign.'
operationId: ssio_accounts/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOAccountResponse'
description: Success
'400':
description: Invalid request parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request parameter.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ssio/insertion_orders:
post:
summary: Create insertion order through SSIO.
description: 'Create insertion order through SSIO for ad_account_id.
- 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, Finance, Campaign.'
operationId: ssio_insertion_order/create
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOCreateInsertionOrderRequest'
description: Order line to create.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOCreateInsertionOrderResponse'
description: Success
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
patch:
summary: Edit insertion order through SSIO.
description: 'Edit insertion order through SSIO for ad_account_id.
- 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, Finance, Campaign.'
operationId: ssio_insertion_order/edit
security:
- pinterest_oauth2:
- ads:write
x-ratelimit-category: ads_write
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOEditInsertionOrderRequest'
description: Order line to create.
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOEditInsertionOrderResponse'
description: Success
'400':
description: Invalid request.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ssio/insertion_orders/status:
get:
summary: Get insertion order status by ad account id.
description: 'Get insertion order status for account id ad_account_id.
- 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, Finance, Campaign.'
operationId: ssio_insertion_orders_status/get_by_ad_account
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
description: Insertion orders status by ad acount id
items:
$ref: '#/components/schemas/SSIOInsertionOrderStatus'
description: Success
'400':
description: Invalid request parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request parameter.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ssio/insertion_orders/{pin_order_id}/status:
get:
summary: Get insertion order status by pin order id.
description: 'Get insertion order status for pin order id pin_order_id.
- 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, Finance, Campaign.'
operationId: ssio_insertion_orders_status/get_by_pin_order_id
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/path_pin_order_id'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SSIOInsertionOrderStatusResponse'
description: Success
'400':
description: Invalid request parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request parameter.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/ssio/order_lines:
get:
summary: Get Salesforce order lines by ad account id.
description: 'Get Salesforce order lines for account id ad_account_id.
- 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, Finance, Campaign.'
operationId: ssio_order_lines/get_by_ad_account
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_bookmark'
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_pin_order_id'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
description: SSIO order lines by ad acount id
items:
$ref: '#/components/schemas/SSIOOrderLine'
description: Success
'400':
description: Invalid request parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid request parameter.
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/targeting_analytics:
get:
summary: Get targeting analytics for an ad account
description: 'Get targeting analytics for an ad account.
For the requested account and metrics, the response will include the requested metric information
(e.g. SPEND_IN_DOLLAR) for the requested target type (e.g. "age_bucket") for applicable values (e.g. "45-49").
- 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, Campaign Manager.
- If granularity is not HOUR, the furthest back you can are allowed to pull data is 90 days before the current date in UTC time and the max time range supported is 90 days.
- If granularity is HOUR, the furthest back you can are allowed to pull data is 8 days before the current date in UTC time and the max time range supported is 3 days.'
operationId: ad_account_targeting_analytics/get
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_analytics
x-sandbox: enabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_start_date'
- $ref: '#/components/parameters/query_end_date'
- $ref: '#/components/parameters/query_targeting_types'
- $ref: '#/components/parameters/query_columns'
- $ref: '#/components/parameters/query_granularity'
- $ref: '#/components/parameters/query_conversion_attribution_click_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_engagement_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_view_window_days'
- $ref: '#/components/parameters/query_conversion_attribution_conversion_report_time'
- $ref: '#/components/parameters/query_attribution_types'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricsResponse'
description: Success
default:
description: Unexpected error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
tags:
- Ad
/ad_accounts/{ad_account_id}/targeting_templates:
get:
summary: List targeting templates
description: Get a list of the targeting templates in the specified ad_account_id
operationId: targeting_template/list
security:
- pinterest_oauth2:
- ads:read
x-ratelimit-category: ads_read
x-sandbox: disabled
parameters:
- $ref: '#/components/parameters/path_ad_account_id'
- $ref: '#/components/parameters/query_order'
- in: query
description: Include audience sizing in result or not
name: include_sizing
required: false
schema:
type: boolean
default: false
- description: Search keyword for targeting templates
in: query
name: search_query
example: gaming
required: false
schema:
type: string
- $ref: '#/components/parameters/query_page_size'
- $ref: '#/components/parameters/query_bookmark'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Paginated'
- type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/TargetingTemplateResponseData'
description: Success
'400':
description: Invalid ad account id.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
code: 400
message: Invalid ad account id
default:
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: Unexpected error
tags:
- Ad
post:
summary: Create targeting templates
description: "Targeting templates allow advertisers to save a set of targeting details including audience lists,\n keywords & interest, demographics, and placements to use more than once during the campaign creation process.
\nTemplates can be used to build out basic targeting criteria that you plan to use across campaigns and to reuse\n performance targeting from prior campaigns for new campaigns.
" operationId: targeting_template/create security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: description: targeting template creation entity required: true content: application/json: schema: $ref: '#/components/schemas/TargetingTemplateCreate' responses: '200': content: application/json: schema: $ref: '#/components/schemas/TargetingTemplateGetResponseData' description: Success '400': description: Invalid ad account id. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account id default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad patch: summary: Update targeting templates description:Update the targeting template given advertiser ID and targeting template ID
operationId: targeting_template/update security: - pinterest_oauth2: - ads:write x-ratelimit-category: ads_write x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' requestBody: description: Operation type and targeting template ID required: true content: application/json: schema: $ref: '#/components/schemas/TargetingTemplateUpdateRequest' responses: '200': description: Success '400': description: Invalid ad account id. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account id default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad /ad_accounts/{ad_account_id}/templates: get: summary: List templates description: Gets all Templates associated with an ad account ID. operationId: templates/list security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_page_size' - $ref: '#/components/parameters/query_order' - $ref: '#/components/parameters/query_bookmark' responses: '200': content: application/json: schema: allOf: - $ref: '#/components/schemas/Paginated' - type: object properties: items: type: array items: $ref: '#/components/schemas/TemplateResponse' description: Success '400': description: Invalid ad account template parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account template parameters default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/templates/{template_id}/reports: post: summary: Create async request for an analytics report using a template description: 'This takes a template ID and an optional custom timeframe and constructs an asynchronous report based on the template. It returns a token that you can use to download the report when it is ready.' operationId: analytics/create_template_report security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_analytics x-sandbox: disabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/path_template_id' - $ref: '#/components/parameters/query_start_date_async' - $ref: '#/components/parameters/query_end_date_async' - $ref: '#/components/parameters/query_granularity_async' responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdsAnalyticsCreateAsyncResponse' description: Success '400': description: Invalid ad account ads analytics template parameters. content: application/json: schema: $ref: '#/components/schemas/Error' example: code: 400 message: Invalid ad account analytics template parameters. default: description: Unexpected error content: application/json: schema: $ref: '#/components/schemas/Error' tags: - Ad /ad_accounts/{ad_account_id}/terms_of_service: get: description: Get the text of the terms of service and see whether the advertiser has accepted the terms of service. operationId: terms_of_service/get x-sandbox: enabled parameters: - $ref: '#/components/parameters/path_ad_account_id' - $ref: '#/components/parameters/query_include_html' - $ref: '#/components/parameters/query_tos_type' security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read responses: '200': content: application/json: schema: $ref: '#/components/schemas/TermsOfService' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error summary: Get terms of service tags: - Ad /resources/ad_account_countries: get: summary: Get ad accounts countries description: Get Ad Accounts countries operationId: ad_account_countries/get security: - pinterest_oauth2: - ads:read x-ratelimit-category: ads_read x-sandbox: enabled responses: '200': content: application/json: schema: $ref: '#/components/schemas/AdAccountsCountryResponse' description: Success default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error tags: - Ad components: schemas: AdGroupArrayResponse: type: object properties: items: type: array items: $ref: '#/components/schemas/AdGroupArrayResponseElement' EntityStatus: type: string description: Entity status example: ACTIVE enum: - ACTIVE - PAUSED - ARCHIVED - DRAFT - DELETED_DRAFT AudienceDefinitionType: description: Generated audience type to request. type: string properties: scope: enum: - IMPRESSION_PLUS_ENGAGEMENT - ENGAGEMENT KeywordUpdate: title: KeywordUpdate type: object properties: id: type: string description: Keyword ID. example: '2886364308355' pattern: ^\d+$ title: id archived: type: boolean description: Is keyword archived? example: false title: archived bid: type: integer minimum: 1 description: Keyword custom bid in microcurrency - null if inherited from parent ad group. example: 200000 nullable: true title: bid required: - id ProductGroupPromotionCreateRequestElement: type: object title: ProductGroupPromotionCreateRequestElement allOf: - $ref: '#/components/schemas/ProductGroupPromotion' - type: object properties: creative_type: $ref: '#/components/schemas/CreativeType' MetricsReportingLevel: type: string description: Level of the reporting request example: CAMPAIGN enum: - ADVERTISER - ADVERTISER_TARGETING - CAMPAIGN - CAMPAIGN_TARGETING - AD_GROUP - AD_GROUP_TARGETING - PIN_PROMOTION - PIN_PROMOTION_TARGETING - KEYWORD - PRODUCT_GROUP - PRODUCT_GROUP_TARGETING - PRODUCT_ITEM AdsAnalyticsCreateAsyncRequest: type: object allOf: - type: object properties: start_date: description: 'Metric report start date (UTC). Format: YYYY-MM-DD' type: string pattern: ^(\d{4})-(\d{2})-(\d{2})$ example: '2020-12-20' end_date: description: 'Metric report end date (UTC). Format: YYYY-MM-DD' type: string pattern: ^(\d{4})-(\d{2})-(\d{2})$ example: '2020-12-20' granularity: description: TOTAL - metrics are aggregated over the specified date range.review_status is "REJECTED".
type: array
items:
type: string
description: ad disapproval reasons
enum:
- HASHTAGS
- PROMOTIONS_AND_PRICES
- TARGETING
- LANDING_PAGE
- CAPS_AND_SYMBOLS
- SHOCKING
- WEIGHT_LOSS
- PROHIBITED_PRODUCT
- AUTHENTICITY
- NUDITY
- CONFUSING_DESIGN
- URGENCY
- RATINGS
- APP
- ALCOHOL
- CONTESTS
- POLITICAL
- OTHER
- IMAGE
- NAR
- INCONSISTENT
- CLICKBAIT
- NO_DESCRIPTION
- LOW_QUALITY
- EXAGGERATED_CLAIMS
- PINTEREST_BRAND
- ALCOHOL_NO_SALE
- LANDING_PAGE_SPEED
- LANDING_PAGE_HARDWALL
- LANDING_PAGE_BROKEN
- LANDING_PAGE_QUALITY
- OUT_OF_STOCK
- IMAGE_LOW_QUALITY
- IMAGE_BUSY
- IMAGE_POORLY_EDITED
- IMAGE_BEFORE_AFTER
- UGC
- FAKE_BUTTONS
- WEAPONS
- SENSITIVE
- UNACCEPTABLE_BUSINESS
- SUSPICIOUS_CLAIMS
- PHARMA
- SUSPICIOUS_SUPPLEMENTS
- ILLEGAL_RECREATIONAL_DRUG
- LOW_QUALITY_LANDING_PAGE
- RESTRICTED_HEALTHCARE
- INCONSISTENT_LANG_FR
rejection_labels:
description: Text reason why the pin was rejected. Returned if review_status is "REJECTED".
type: array
items:
type: string
review_status:
type: string
description: Ad review status
example: PENDING
enum:
- OTHER
- PENDING
- REJECTED
- APPROVED
type:
description: Always "ad".
example: pinpromotion
type: string
updated_time:
description: Last update time. Unix timestamp in seconds.
example: 1451431341
type: integer
summary_status:
type: string
allOf:
- $ref: '#/components/schemas/PinPromotionSummaryStatus'
description: Ad summary status
GridClickType:
type: string
description: Where a user is taken after clicking on an ad in grid. Note: This parameter is read-only and is set to DIRECT_TO_DESTINATION by default for direct links supported ads. grid_click_type values provided will be ignored.
example: CLOSEUP
nullable: true
enum:
- CLOSEUP
- DIRECT_TO_DESTINATION
AudienceCreateCustomRequest:
type: object
allOf:
- $ref: '#/components/schemas/AudienceCommon'
- title: AudienceCreateCustomRequest
required:
- sharing_type
- name
- rule
- data_party
properties:
sharing_type:
$ref: '#/components/schemas/AudienceSharingType'
data_party:
$ref: '#/components/schemas/AudienceDataParty'
category:
type: string
example: DLX Demographics
TermsOfService:
example:
has_accepted: true
html: example test
id: '2650449554526'
ad_account_id: '549755885175'
properties:
id:
description: The ID of the terms of service
example: '2650449554526'
title: id
type: string
html:
description: The terms of service content
example: example test
nullable: true
title: html
type: string
has_accepted:
description: Whether the ad account has accepted terms of service.
example: true
title: hasAccepted
type: boolean
ad_account_id:
description: The ID of the ad account.
example: '549755885175'
title: adAccountId
type: string
title: TermsOfService
type: object
TargetingTemplateResponseData:
type: object
allOf:
- $ref: '#/components/schemas/TargetingTemplateCommon'
- type: object
title: TargetingTemplateResponseData
properties:
id:
description: Targeting template ID.
example: '643'
type: string
pattern: ^\d+$
created_time:
description: Targeting template created time. Unix timestamp in seconds.
example: 1432744744
title: created_time
type: integer
updated_time:
description: Targeting template updated time.Unix timestamp in seconds.
example: 1432744744
title: updated_time
type: integer
ad_account_id:
description: The ID of the advertiser that this targeting template belongs to.
example: '549755885175'
type: string
pattern: ^\d+$
status:
type: string
description: Indicate targeting template is active or Deleted
allOf:
- type: string
description: Indicate targeting template is active or Deleted
example: ACTIVE
default: ACTIVE
enum:
- ACTIVE
- DELETED
sizing:
$ref: '#/components/schemas/TargetingTemplateAudienceSizing'
AudienceDemographics:
title: AudienceDemographics
description: Audience demographics
type: object
properties:
ages:
title: ages
description: Ages distribution.
type: array
items:
$ref: '#/components/schemas/AudienceDemographicValue'
genders:
title: genders
description: Gender distribution.
type: array
items:
$ref: '#/components/schemas/AudienceDemographicValue'
devices:
title: devices
description: Device usage distribution.
type: array
items:
$ref: '#/components/schemas/AudienceDemographicValue'
metros:
title: metros
description: Geographic metro area distribution.
type: array
items:
$ref: '#/components/schemas/AudienceDemographicValue'
countries:
title: countries
description: Country area distribution.
type: array
items:
$ref: '#/components/schemas/AudienceDemographicValue'
KeywordsCommon:
type: object
properties:
bid:
type: integer
description: Keyword custom bid in microcurrency - null if inherited from parent ad group.
example: 200000
nullable: true
match_type:
$ref: '#/components/schemas/MatchTypeResponse'
value:
type: string
description: Keyword value (120 chars max).
required:
- match_type
- value
KeywordsRequest:
type: object
properties:
keywords:
type: array
description: Keyword JSON array. Each array element has 3 fields
items:
$ref: '#/components/schemas/KeywordsCommon'
parent_id:
description: Keyword parent entity ID (advertiser, campaign, ad group).
example: '383791336903426391'
pattern: ^((AG)|C)?\d+$
title: parent_id
type: string
required:
- keywords
- parent_id
KeywordMetrics:
description: Keyword metrics JSON
title: KeywordMetrics
type: object
properties:
avg_cpc_in_micro_currency:
example: 100000
title: avg_cpc_in_micro_currency
description: Average cost per click
type: number
keyword_query_volume:
example: 5M+
title: keyword_query_volume
description: Keyword's search frequency. This value is based on keyword frequency in pepsi client response
type: string
TargetingTemplateCommon:
type: object
properties:
name:
type: string
example: Gaming
description: targeting template name
auto_targeting_enabled:
type: boolean
default: true
description: Enable auto-targeting for ad group. Also known as "expanded targeting".
targeting_attributes:
$ref: '#/components/schemas/TargetingSpec'
placement_group:
$ref: '#/components/schemas/PlacementGroupType'
keywords:
type: array
example:
- value: cats
match_type: EXACT_NEGATIVE
items:
$ref: '#/components/schemas/TargetingTemplateKeyword'
tracking_urls:
$ref: '#/components/schemas/TrackingUrls'
SSIOInsertionOrderCommon:
type: object
properties:
start_date:
description: 'Starting date of time period. Format: YYYY-MM-DD'
type: string
pattern: ^(\d{4})-(\d{2})-(\d{2})$
example: '2020-12-20'
end_date:
description: 'End date of time period. Format: YYYY-MM-DD'
type: string
pattern: ^(\d{4})-(\d{2})-(\d{2})$
example: '2020-12-20'
po_number:
description: The po number
type: string
budget_amount:
type: number
description: If Budget order line, the budget amount.
example: 5000000
billing_contact_firstname:
description: The billing contact first name
type: string
billing_contact_lastname:
description: The billing contact last name
type: string
billing_contact_email:
description: The billing contact email
example: test@example
type: string
media_contact_firstname:
description: The media contact first name
type: string
media_contact_lastname:
description: The media contact last name
type: string
media_contact_email:
description: The media contact email
example: test@example
type: string
agency_link:
description: URL link for agency
type: string
user_email:
description: The email of user submitting the insertion order
example: test@example
type: string
CreateMMMReportResponse:
type: object
properties:
code:
example: 0
type: number
data:
title: CreateMMMReportResponseData
type: object
properties:
report_status:
type: string
allOf:
- $ref: '#/components/schemas/BulkReportingJobStatus'
token:
type: string
message:
type: string
nullable: true
status:
example: success
type: string
MMMReportingTargetingType:
type: string
description: Ad targeting types for MMM report
example: APPTYPE
enum:
- APPTYPE
- COUNTRY
- CREATIVE_TYPE
- GENDER
- LOCATION
OrderLine:
type: object
allOf:
- $ref: '#/components/schemas/OrderLines'
- type: object
properties:
campaign_ids:
description: Associated List of campaign IDs.
example:
- '626735565838'
items:
type: string
title: campaign_ids
type: array
required:
- campaign_ids
title: OrderLine
AdAccountAnalyticsResponse:
type: array
items:
type: object
properties:
AD_ACCOUNT_ID:
description: The ID of the advertiser that this metrics belongs to.
type: string
pattern: ^\d+$
DATE:
description: Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`)
type: string
format: date
required:
- AD_ACCOUNT_ID
additionalProperties: true
example:
DATE: '2021-04-01'
AD_ACCOUNT_ID: '547602124502'
SPEND_IN_DOLLAR: 30
TOTAL_CLICKTHROUGH: 216
AudienceInsightsResponse:
title: AudienceInsightsResponse
description: Audience interests and demographics.
type: object
properties:
categories:
title: categories
description: Category interest distribution
type: array
items:
$ref: '#/components/schemas/AudienceCategory'
demographics:
$ref: '#/components/schemas/AudienceDemographics'
type:
$ref: '#/components/schemas/AudienceInsightType'
date:
title: date
description: Generation date
type: string
nullable: true
example: '2022-10-09'
pattern: ^\d{4}-\d{2}-\d{2}$
size:
title: size
description: Population count.
type: integer
example: 10000
size_is_upper_bound:
title: size_is_upper_bound
description: Indicates whether the audience size has been rounded up to the next highest upper boundary.
type: boolean
example: true
AdUpdateRequest:
type: object
allOf:
- $ref: '#/components/schemas/AdCommon'
- type: object
title: AdUpdateRequest
properties:
id:
type: string
example: '687195134316'
pattern: ^\d+$
description: The ID of this ad.
title: id
pin_id:
type: string
description: Pin ID. This field may only be updated for draft ads.
example: '394205773611545468'
pattern: ^\d+$
nullable: true
required:
- id
ProductGroupPromotionResponseItem:
type: object
title: ProductGroupPromotionResponseItem
properties:
data:
$ref: '#/components/schemas/ProductGroupPromotionResponseElement'
exceptions:
nullable: true
items:
nullable: true
$ref: '#/components/schemas/Exception'
AdsAnalyticsFilterOperator:
type: string
description: Filter operator for sync reporting
example: LESS_THAN
enum:
- LESS_THAN
- GREATER_THAN
SSIOAccountResponse:
type: object
properties:
eligible:
description: Advertiser eligible to create order lines
example: true
type: boolean
can_edit:
description: Advertiser eligible to update order lines
example: true
type: boolean
billto_infos:
type: array
description: An array of Salesforce account information that includes address, io terms, etc.
items:
$ref: '#/components/schemas/SSIOAccountItem'
currency:
type: string
example: USD
pmp_names:
type: array
items:
$ref: '#/components/schemas/SSIOAccountPMPName'
error:
description: Error indicator from Salesforce which could be "No Error"
example: No Error
type: string
SSIOCreateInsertionOrderResponse:
type: object
properties:
pin_order_id:
description: Salesforce order id
type: string
ActionType:
type: string
description: Ad group billable event type. For update, only draft ad groups may update billable event.
example: CLICKTHROUGH
enum:
- CLICKTHROUGH
- IMPRESSION
- VIDEO_V_50_MRC
ConversionTagCreate:
type: object
allOf:
- $ref: '#/components/schemas/ConversionTagConfigs'
example:
name: ACME Tools Tag
properties:
name:
description: Conversion tag name.
example: ACME Tools Tag
title: name
type: string
required:
- name
title: ConversionTagCreate
CampaignCreateResponse:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/CampaignCreateResponseItem'
MetricsResponse:
properties:
data:
items:
type: object
type: array
example:
- targeting_type: KEYWORD
targeting_value: christmas decor ideas
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: iphone
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: ipad
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: web
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: web_mobile
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: android_mobile
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: APPTYPE
targeting_value: android_tablet
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: GENDER
targeting_value: female
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: LOCATION
targeting_value: 500
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: PLACEMENT
targeting_value: SEARCH
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: COUNTRY
targeting_value: US
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: TARGETED_INTEREST
targeting_value: Food and Drinks
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: PINNER_INTEREST
targeting_value: Chocolate Cookies
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: AUDIENCE_INCLUDE
targeting_value: 254261234567
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: GEO
targeting_value: US:94102
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: AGE_BUCKET
targeting_value: 45-49
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
- targeting_type: REGION
targeting_value: US-CA
metrics:
AD_GROUP_ID: 2680067996745
DATE: '2022-04-26'
SPEND_IN_DOLLAR: 240
type: object
AdsAnalyticsMetricsFilter:
type: object
properties:
field:
$ref: '#/components/schemas/AdsAnalyticsFilterColumn'
operator:
$ref: '#/components/schemas/AdsAnalyticsFilterOperator'
values:
type: array
description: List of values for filtering
items:
type: number
minItems: 1
required:
- field
- operator
- values
CampaignCommon:
type: object
description: Campaign Data
properties:
ad_account_id:
description: Campaign's Advertiser ID. If you want to create a campaign in a Business Account shared account you need to specify the Business Access advertiser ID in both the query path param as well as the request body schema.
example: '549755885175'
type: string
pattern: ^\d+$
name:
type: string
description: Campaign name.
example: ACME Tools
status:
type: string
allOf:
- $ref: '#/components/schemas/EntityStatus'
lifetime_spend_cap:
description: Campaign total spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and "daily_spend_cap" cannot be set at the same time.
example: 1432744744
type: integer
nullable: true
daily_spend_cap:
description: Campaign daily spending cap. Required for Campaign Budget Optimization (CBO) campaigns. This and "lifetime_spend_cap" cannot be set at the same time.
example: 1432744744
type: integer
nullable: true
order_line_id:
description: Order line ID that appears on the invoice.
example: '549755885175'
type: string
pattern: ^\d+$
nullable: true
tracking_urls:
type: object
nullable: true
allOf:
- $ref: '#/components/schemas/TrackingUrls'
start_time:
type: integer
description: Campaign start time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.
example: 1580865126
nullable: true
end_time:
type: integer
description: Campaign end time. Unix timestamp in seconds. Only used for Campaign Budget Optimization (CBO) campaigns.
example: 1644023526
nullable: true
summary_status:
type: string
allOf:
- $ref: '#/components/schemas/CampaignSummaryStatus'
MatchTypeResponse:
type: string
description: Keyword match type
nullable: true
example: BROAD
enum:
- BROAD
- PHRASE
- EXACT
- EXACT_NEGATIVE
- PHRASE_NEGATIVE
- null
CampaignIsCampaignBudgetOptimization:
type: boolean
description: Determines if a campaign automatically generate ad-group level budgets given a campaign budget to maximize campaign outcome. When transitioning from non-cbo to cbo, all previous child ad group budget will be cleared.
example: true
default: false
TrackingUrls:
description: Third-party tracking URLs. Up to three tracking URLs - with a max length of 2,000 - are supported for each event type. Tracking URLs set at the ad group or ad level can override those set at the campaign level. For more information, see Third-party and dynamic tracking.
example:
impression:
- URL1
- URL2
click:
- URL1
- URL2
engagement:
- URL1
- URL2
buyable_button:
- URL1
- URL2
audience_verification:
- URL1
- URL2
type: object
nullable: true
properties:
impression:
type: array
items:
type: string
click:
type: array
items:
type: string
engagement:
type: array
items:
type: string
buyable_button:
type: array
items:
type: string
audience_verification:
type: array
items:
type: string
SSIOInsertionOrderStatusResponse:
allOf:
- $ref: '#/components/schemas/SSIOInsertionOrderStatus'
- type: object
LeadFormQuestionType:
type: string
description: Lead form question type
example: FIRST_NAME
enum:
- CUSTOM
- FULL_NAME
- FIRST_NAME
- LAST_NAME
- EMAIL
- PHONE_NUMBER
- ZIP_CODE
- AGE
- GENDER
- CITY
- COUNTRY
- PREFERRED_CONTACT_METHOD
- STATE_PROVINCE
- ADDRESS
- DATE_OF_BIRTH
ConversionReportAttributionType:
type: string
description: Attribution type. Refers to the Pinterest Tag endpoints
example: INDIVIDUAL
enum:
- INDIVIDUAL
- HOUSEHOLD
UserListOperationType:
description: User list operation type (add or remove)
enum:
- ADD
- REMOVE
example: REMOVE
title: UserListOperationType
type: string
QuizPinOption:
description: ' This field contains multiple options to a quiz question.'
example:
id: 1
text: Where do you thrive?
type: object
nullable: true
properties:
id:
type: number
text:
type: string
CampaignsAnalyticsResponse:
type: array
items:
type: object
properties:
CAMPAIGN_ID:
description: The ID of the campaing that this metrics belongs to.
type: string
pattern: ^\d+$
DATE:
description: Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`)
type: string
format: date
required:
- CAMPAIGN_ID
additionalProperties: true
example:
DATE: '2021-04-01'
CAMPAIGN_ID: '547602124502'
SPEND_IN_DOLLAR: 30
TOTAL_CLICKTHROUGH: 216
BulkDownloadRequest:
type: object
description: Ad entities to get in bulk request.
properties:
entity_types:
type: array
items:
type: string
allOf:
- $ref: '#/components/schemas/BulkEntityType'
minItems: 1
maxItems: 5
description: All entity types specified will be downloaded. Fewer types result in faster downloads.
example:
- CAMPAIGN
- AD_GROUP
entity_ids:
type: array
items:
type: string
pattern: ^\d+$
description: All entities specified by these IDs as well as their children and grandchildren will be downloaded if the entity type is one of the types requested to be downloaded.
updated_since:
type: string
pattern: ^\d+$
example: '1622848072'
description: Unix UTC timestamp to retrieve all entities that have changed since this time.
campaign_filter:
type: object
properties:
start_time:
type: string
pattern: ^\d+$
example: '1622848072'
description: Unix UTC timestamp.
end_time:
type: string
pattern: ^\d+$
example: '1622848072'
description: Unix UTC timestamp.
name:
type: string
example: campaign name
description: Campaign name
campaign_status:
type: array
items:
$ref: '#/components/schemas/CampaignSummaryStatus'
objective_type:
type: array
items:
$ref: '#/components/schemas/ObjectiveType'
output_format:
type: string
allOf:
- $ref: '#/components/schemas/BulkOutputFormat'
default: JSON
AdsCreditRedeemResponse:
type: object
properties:
success:
description: Returns true if the offer code was successfully applied(validateOnly=false) or can be applied(validateOnly=true).
type: boolean
example: false
errorCode:
description: Error code type if error occurs
type: integer
nullable: true
example: 2708
errorMessage:
description: Reason for failure
type: string
nullable: true
example: The offer has already been redeemed by this advertiser
AudienceDataParty:
description: Whether the data is owned by the partner (1p) or by the data provider (3p)
type: string
enum:
- 1p
- 3p
ProductGroupPromotionResponseElement:
type: object
title: ProductGroupPromotionResponseElement
allOf:
- $ref: '#/components/schemas/ProductGroupPromotion'
- type: object
properties:
creative_type:
$ref: '#/components/schemas/CreativeType'
AdGroupResponse:
type: object
allOf:
- $ref: '#/components/schemas/AdGroupCommon'
- type: object
properties:
id:
description: Ad group ID.
type: string
pattern: ^\d+$
example: '2680060704746'
ad_account_id:
description: Advertiser ID.
type: string
pattern: ^\d+$
example: '549755885175'
created_time:
description: Ad group creation time. Unix timestamp in seconds.
type: integer
example: 1476477189
updated_time:
description: Ad group last update time. Unix timestamp in seconds.
type: integer
example: 1476477189
type:
description: Always "adgroup".
type: string
default: adgroup
conversion_learning_mode_type:
type: string
description: oCPM learn mode
example: ACTIVE
nullable: true
enum:
- NOT_ACTIVE
- ACTIVE
- null
summary_status:
type: string
allOf:
- $ref: '#/components/schemas/AdGroupSummaryStatus'
description: Ad group summary status.
feed_profile_id:
description: Feed Profile ID associated to the adgroup.
type: string
example: '626736533506'
dca_assets:
description: '[DCA] The Dynamic creative assets to use for DCA. Dynamic Creative Assembly (DCA) accepts basic creative assets of an ad (image, video, title, call to action, logo etc). Then it automatically generates optimized ad combinations based on these assets.'
TargetingTemplateUpdateRequest:
required:
- operation_type
- id
type: object
properties:
operation_type:
enum:
- REMOVE
type: string
id:
description: Targeting template ID
example: '643'
type: string
pattern: ^\d+$
SSIOEditInsertionOrderRequest:
type: object
allOf:
- $ref: '#/components/schemas/SSIOInsertionOrderCommon'
- type: object
properties:
oracle_line_id:
description: LineId in the Oracle DB
type: string
salesforce_order_id:
description: OrderId in SFDC
type: string
salesforce_order_line_id:
description: OrderLineId in SFDC
type: string
ads_manager_order_line_id:
description: Ads manager OrderLineId
type: string
LeadFormTestRequest:
title: LeadFormTestRequest
description: Request to create test data for lead data test API.
type: object
properties:
answers:
description: Test lead answers. Should follow the creation order.
type: array
items:
type: string
example:
- John
- Doe
- abc@email.com
- '987654321'
required:
- answers
AdPreviewURLResponse:
example:
url: https://ads.pinterest.com/ad-preview/58f1a0e9ab0bd0f99462a0e4c5dd7e8297888c8a36331e88f757abe8f0295d31/
properties:
url:
description: '''Preview URL, expires in 7 days. Can be used in an iframe.
For example: https://ads.pinterest.com/ad-preview/74667c814dd2b19/
The preview object ID/key is the last param - 74667c814dd2b19'''
example: https://ads.pinterest.com/ad-preview/58f1a0e9ab0bd0f99462a0e4c5dd7e8297888c8a36331e88f757abe8f0295d31/
title: url
type: string
title: AdPreviewURLResponse
type: object
OrderLineStatus:
description: Order Line Status
enum:
- ACTIVE
- PAUSED
- DELETED
example: ACTIVE
title: OrderLineStatus
type: string
MMMReportingColumn:
type: string
description: Marketing Mix Modeling (MMM) Reporting Columns
example: SPEND_IN_DOLLAR
enum:
- SPEND_IN_DOLLAR
- SPEND_IN_MICRO_DOLLAR
- ECPC_IN_DOLLAR
- ECTR
- CAMPAIGN_NAME
- TOTAL_ENGAGEMENT
- EENGAGEMENT_RATE
- ECPM_IN_DOLLAR
- CAMPAIGN_ID
- ADVERTISER_ID
- AD_GROUP_ID
- AD_GROUP_NAME
- CLICKTHROUGH_1
- IMPRESSION_1
- CLICKTHROUGH_2
- IMPRESSION_2
- TOTAL_CLICKTHROUGH
- TOTAL_IMPRESSION
- ADVERTISER_NAME
- SPEND_ORDER_LINE_PAID_TYPE
ProductGroupPromotion:
properties:
id:
description: ID of the product group promotion.
example: '2680059592705'
title: id
type: string
pattern: ^\d+$
ad_group_id:
description: ID of the ad group the product group belongs to.
example: '2680059592705'
pattern: ^(AG)?\d+$
title: ad_group_id
type: string
bid_in_micro_currency:
description: The bid in micro currency.
example: 14000000
title: bid_in_micro_currency
type: integer
nullable: true
included:
description: True if the group is BIDDABLE, false if it should be EXCLUDED from serving ads.
example: true
nullable: true
title: included
type: boolean
definition:
description: The full product group definition path
example: '*/product_type_0=''kitchen''/product_type_1=''beverage appliances'''
nullable: true
title: definition
type: string
relative_definition:
description: The definition of the product group, relative to its parent - an attribute name/value pair
example: product_type_1='beverage appliances'
nullable: true
title: relative_definition
type: string
parent_id:
description: The parent Product Group ID of this Product Group
example: '1231234'
nullable: true
title: parent_id
type: string
pattern: ^\d+$
slideshow_collections_title:
description: Slideshow Collections Title
example: slideshow title
nullable: true
title: slideshow_collections_title
type: string
slideshow_collections_description:
description: Slideshow Collections Description
example: slideshow description
nullable: true
title: slideshow_collections_description
type: string
is_mdl:
description: If set to true products promoted in this product group will use the Mobile Deep Link specified in your catalog
example: true
nullable: true
title: is_mdl
type: boolean
status:
$ref: '#/components/schemas/EntityStatus'
tracking_url:
description: Tracking template for proudct group promotions. 4000 limit
example: https://www.pinterest.com
nullable: true
title: tracking_url
type: string
catalog_product_group_id:
description: ID of the catalogs product group that this product group promotion references
example: '1231235'
title: catalog_product_group_id
type: string
pattern: ^\d+$
nullable: true
catalog_product_group_name:
description: Catalogs product group name
example: catalogProductGroupName
title: product_group_promotion_name
type: string
nullable: true
collections_hero_pin_id:
description: Hero Pin ID if this PG is promoted as a Collection
example: '123123'
nullable: true
title: collections_hero_pin_id
type: string
pattern: ^\d+$
collections_hero_destination_url:
description: Collections Hero Destination Url
example: http://www.pinterest.com
nullable: true
title: collections_hero_destination_url
type: string
grid_click_type:
$ref: '#/components/schemas/GridClickType'
type: object
title: ProductGroupPromotion
AdsAnalyticsGetAsyncResponse:
type: object
properties:
report_status:
type: string
allOf:
- $ref: '#/components/schemas/BulkReportingJobStatus'
url:
type: string
nullable: true
size:
type: number
nullable: true
AudienceUpdateOperationType:
title: operation_type
type: string
description: Audience operation type (update or remove).
example: UPDATE
default: UPDATE
enum:
- UPDATE
- REMOVE
LeadFormTestResponse:
title: LeadFormTestResponse
type: object
description: Response for lead data test API.
properties:
subscription_id:
description: Subscription ID.
example: '8078432025948590686'
type: string
pattern: ^\d+$
AdsAnalyticsResponse:
type: array
items:
type: object
properties:
AD_ID:
description: The ID of the ad that this metrics belongs to.
type: string
pattern: ^\d+$
DATE:
description: Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`)
type: string
format: date
required:
- AD_ID
additionalProperties: true
example:
DATE: '2021-04-01'
AD_ID: '547602124502'
SPEND_IN_DOLLAR: 30
TOTAL_CLICKTHROUGH: 216
BulkUpsertStatus:
type: string
enum:
- RUNNING
- SUCCEEDED
- FAILED
example: SUCCEEDED
AdGroupUpdateRequest:
type: object
allOf:
- $ref: '#/components/schemas/AdGroupCommon'
- type: object
properties:
id:
description: Ad group ID.
type: string
pattern: ^\d+$
example: '2680060704746'
required:
- id
CampaignCreateCommon:
type: object
allOf:
- $ref: '#/components/schemas/CampaignCommon'
- type: object
properties:
status:
type: string
default: ACTIVE
allOf:
- $ref: '#/components/schemas/EntityStatus'
is_flexible_daily_budgets:
type: boolean
default: false
allOf:
- $ref: '#/components/schemas/CampaignIsFlexibleDailyBudgets'
default_ad_group_budget_in_micro_currency:
type: integer
description: When transitioning from campaign budget optimization to non-campaign budget optimization, the default_ad_group_budget_in_micro_currency will propagate to each child ad groups daily budget. Unit is micro currency of the associated advertiser account.
example: 0
nullable: true
is_automated_campaign:
type: boolean
default: false
allOf:
- $ref: '#/components/schemas/CampaignIsAutomatedCampaign'
EnhancedMatchStatusType:
description: The enhanced match status of the tag
enum:
- UNKNOWN
- NOT_VALIDATED
- VALIDATING_IN_PROGRESS
- VALIDATION_COMPLETE
- null
example: VALIDATION_COMPLETE
nullable: true
title: EnhancedMatchStatusType
type: string
BillingProfilesResponse:
type: object
properties:
id:
description: Billing ID.
type: string
pattern: ^\d+$
example: '12312451231'
card_type:
description: Type of the card.
type: string
enum:
- UNKNOWN
- VISA
- MASTERCARD
- AMERICAN_EXPRESS
- DISCOVER
- ELO
example: VISA
status:
description: Status of the billing.
type: string
enum:
- UNSPECIFIED
- VALID
- INVALID
- PENDING
- DELETED
- SECONDARY
- PENDING_SECONDARY
example: INVALID
advertiser_id:
description: Advertiser ID of the billing.
type: string
pattern: ^\d+$
example: '12312451231'
payment_method_brand:
description: Brand of the payment method.
type: string
enum:
- UNKNOWN
- VISA
- MASTERCARD
- AMERICAN_EXPRESS
- DISCOVER
- SOFORT
- DINERS_CLUB
- ELO
- CARTE_BANCAIRE
example: VISA
KeywordsResponse:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/KeywordError'
keywords:
type: array
items:
$ref: '#/components/schemas/Keyword'
AdPreviewRequest:
oneOf:
- example:
image_url: https://somewebsite.com/someimage.jpg
title: My Preview Image
properties:
image_url:
description: Image URL.
example: https://somewebsite.com/someimage.jpg
title: image_url
type: string
title:
description: Title displayed below ad.
example: My Preview Image
title: title
type: string
required:
- image_url
- title
title: AdPreviewCreateFromImage
type: object
- example:
pin_id: '7389479023'
properties:
pin_id:
description: Pin ID.
example: '7389479023'
title: pin_id
type: string
required:
- pin_id
title: AdPreviewCreateFromPin
type: object
Error:
title: Error
type: object
properties:
code:
type: integer
message:
type: string
required:
- code
- message
AudienceType:
description: Audience type
enum:
- CUSTOMER_LIST
- VISITOR
- ENGAGEMENT
- ACTALIKE
- PERSONA
example: ACTALIKE
title: AudienceType
type: string
ProductGroupPromotionResponse:
type: object
title: ProductGroupPromotionResponse
properties:
items:
type: array
items:
$ref: '#/components/schemas/ProductGroupPromotionResponseItem'
LeadFormResponse:
type: object
allOf:
- $ref: '#/components/schemas/LeadFormCommon'
- type: object
properties:
id:
description: The ID of this lead form
example: '7765300871171'
type: string
pattern: ^\d+$
ad_account_id:
description: The Ad Account ID that this lead form belongs to.
example: '549755885175'
type: string
pattern: ^\d+$
created_time:
description: Lead form creation time. Unix timestamp in seconds.
example: 1451431341
type: integer
updated_time:
description: Last update time. Unix timestamp in seconds.
example: 1451431341
type: integer
Exception:
title: Generic exception class to be used within schemas
type: object
properties:
code:
type: integer
example: 2
description: Exception error code.
message:
type: string
example: Advertiser not found.
description: Exception message.
ConversionTagsOcpmEligibleResponse:
type: object
additionalProperties:
type: array
items:
$ref: '#/components/schemas/ConversionEventResponse'
example:
'12345':
- conversion_event: PAGE_LOAD
created_time: 1564768710
conversion_tag_id: '2614324385652'
ad_account_id: '549757463328'
- conversion_event: CHECKOUT
created_time: 1564710210
conversion_tag_id: '2614324315793'
ad_account_id: '549757463328'
AdsCreditDiscountsResponse:
type: object
properties:
active:
description: True if the offer code is currently active.
type: boolean
example: true
advertiser_id:
description: Advertiser ID the offer was applied to.
type: string
pattern: ^\d+$
example: '12312451231'
discountType:
description: The type of discount of this credit
type: string
nullable: true
enum:
- COUPON
- CREDIT
- COUPON_APPLIED
- CREDIT_APPLIED
- MARKETING_OFFER_CREDIT
- MARKETING_OFFER_CREDIT_APPLIED
- GOODWILL_CREDIT
- GOODWILL_CREDIT_APPLIED
- INTERNAL_CREDIT
- INTERNAL_CREDIT_APPLIED
- PREPAID_CREDIT
- PREPAID_CREDIT_APPLIED
- SALES_INCENTIVE_CREDIT
- SALES_INCENTIVE_CREDIT_APPLIED
- CREDIT_EXPIRED
- FUTURE_CREDIT
- REFERRAL_CREDIT
- INVOICE_SALES_INCENTIVE_CREDIT
- INVOICE_SALES_INCENTIVE_CREDIT_APPLIED
- PREPAID_CREDIT_REFUND
- null
discountInMicroCurrency:
description: The discount applied in the offers currency value.
type: number
nullable: true
example: 125000000
discountCurrency:
type: string
nullable: true
description: Currency value for the discount.
example: USD
title:
description: Human readable title of the offer code.
type: string
nullable: true
example: Ads Credits
remainingDiscountInMicroCurrency:
type: number
nullable: true
description: The credits left to spend.
example: 125000000
AudienceDefinitionResponse:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/AudienceDefinition'
ProductGroupAnalyticsResponse:
type: array
items:
type: object
properties:
PRODUCT_GROUP_ID:
description: The ID of the product group that this metrics belongs to.
type: string
pattern: ^\d+$
DATE:
description: Current metrics date. Only returned when granularity is a time-based value (`DAY`, `HOUR`, `WEEK`, `MONTH`)
type: string
format: date
required:
- PRODUCT_GROUP_ID
additionalProperties: true
example:
DATE: '2021-04-01'
PRODUCT_GROUP_ID: '74629351736530'
SPEND_IN_DOLLAR: 30
TOTAL_CLICKTHROUGH: 216
SSIOAccountPMPName:
type: object
properties:
name:
description: Display name
example: Bidalgo
type: string
id:
description: Salesforce id for PMP
example: 0011N00001LW2aSQAT
type: string
TargetingSpec:
description: Ad group targeting specification defining the ad group target audience. For example, `{"APPTYPE":["iphone"], "GENDER":["male"], "LOCALE":["en-US"], "LOCATION":["501"], "AGE_BUCKET":["25-34"]}`
type: object
properties:
AGE_BUCKET:
type: array
nullable: true
description: Age ranges. If the AGE_BUCKET field is missing, the default behavior in terms of ad delivery is that **All age buckets** will be targeted.
example:
- 35-44
- 50-54
items:
type: string
enum:
- 18-24
- 21+
- 25-34
- 35-44
- 45-49
- 50-54
- 55-64
- 65+
APPTYPE:
type: array
nullable: true
description: Allowed devices. If the APPTYPE field is missing, the default behavior in terms of ad delivery is that **All devices/apptypes** will be targeted.
example:
- ipad
- iphone
items:
type: string
enum:
- android_mobile
- android_tablet
- ipad
- iphone
- web
- web_mobile
AUDIENCE_EXCLUDE:
type: array
nullable: true
description: 'Excluded customer list IDs. Used to drive new customer acquisition goals. For example: ["2542620905475"]. Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_EXCLUDE field is missing, the default behavior in terms of ad delivery is that **No users will be excluded**.'
items:
type: string
pattern: ^\d+$
minItems: 100
AUDIENCE_INCLUDE:
type: array
nullable: true
description: 'Targeted customer list IDs. For example: ["2542620905473"]. Audience lists need to have at least 100 people with Pinterest accounts in them Audience lists need to have at least 100 people with Pinterest accounts in them. If the AUDIENCE_INCLUDE field is missing, the default behavior in terms of ad delivery is that **All users will be included**.'
items:
type: string
pattern: ^\d+$
minItems: 100
GENDER:
type: array
nullable: true
description: 'Targeted genders. Values: ["unknown","male","female"]. If the GENDER field is missing, the default behavior in terms of ad delivery is that **All genders will be targeted**.'
items:
type: string
enum:
- unknown
- male
- female
GEO:
type: array
nullable: true
description: Location region codes, e.g., "BE-VOV" (East Flanders, Belgium) For complete list, click here or postal codes, e.g., "US-94107". Use either region codes or postal codes but not both. At least one of LOCATION or GEO must be specified. If the GEO field is missing, then only LOCATION values will be targeted (see LOCATION field below).
items:
type: string
INTEREST:
type: array
description: Array of interest object IDs. If the INTEREST field is missing, the default behavior in terms of ad delivery is that **All interests will be targeted**.
items:
type: string
LOCALE:
type: array
nullable: true
description: 24 ISO 639-1 two letter language codes. If the LOCALE field is missing, the default behavior in terms of ad delivery is that **All languages will be targeted, only english non-sublanguage will be targeted**.
items:
type: string
LOCATION:
type: array
nullable: true
description: 22 ISO Alpha 2 two letter country codes or US Nielsen DMA (Designated Market Area) codes (location region codes) (e.g., ["US", "807"]). For complete list, click here. Location-Country and Location-Metro codes apply. At least one of LOCATION or GEO must be specified. If the LOCATION field is missing, then only GEO values will be targeted (see GEO field above).
items:
type: string
SHOPPING_RETARGETING:
type: array
nullable: true
description: "Array of object: lookback_window\t[Integer]: Number of days ago to start lookback timeframe for dynamic retargeting tag_types [Array of integer]: Event types to target for dynamic retargeting exclusion_window [Integer]: Number of days ago to stop lookback timeframe for dynamic retargeting"
items:
type: object
example:
lookback_window: 30
exclusion_window: 14
tag_types:
- 0
- 6
properties:
lookback_window:
description: Number of days ago to start lookback timeframe for dynamic retargeting
example: 30
title: lookback_window
type: integer
tag_types:
description: Event types to target for dynamic retargeting
example:
- 0
- 6
items:
type: integer
title: tag_types
type: array
exclusion_window:
description: Number of days ago to stop lookback timeframe for dynamic retargeting
example: 14
title: exclusion_window
type: integer
title: TargetingSpec_SHOPPING_RETARGETING
TARGETING_STRATEGY:
type: array
nullable: true
description: ''
items:
enum:
- CHOOSE_YOUR_OWN
- FIND_NEW_CUSTOMERS
- RECONNECT_WITH_USERS
LeadFormQuestion:
type: object
properties:
question_type:
$ref: '#/components/schemas/LeadFormQuestionType'
custom_question_field_type:
$ref: '#/components/schemas/LeadFormQuestionFieldType'
custom_question_label:
description: Question label for a custom question.
nullable: true
type: string
custom_question_options:
description: Question options for a custom question.
nullable: true
type: array
minItems: 0
maxItems: 5
items:
type: string
ConversionEventsUserData:
description: Object containing customer information data. Note, It is required at least one of 1) em, 2) hashed_maids or 3) pair client_ip_address + client_user_agent.
type: object
anyOf:
- properties:
em:
description: Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 411e44ce1261728ffd2c0686e44e3fffe413c0e2c5adc498bc7da883d476b9c8
- 09831ea51bd1b7b32a836683a00a9ccaf3d05f59499f42d9883412ed79289969
hashed_maids:
description: Sha256 hashes of user's "Google Advertising IDs" (GAIDs) or "Apple's Identifier for Advertisers" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 0192518eb84137ccfe82c8b6322d29631dae7e28ed9d0f6dd5f245d73a58c5f1
- 837b850ac46d62b2272a71de73c27801ff011ac1e36c5432620c8755cf90db46
client_ip_address:
description: The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: 216.3.128.12
client_user_agent:
description: The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
required:
- em
- properties:
em:
description: Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 411e44ce1261728ffd2c0686e44e3fffe413c0e2c5adc498bc7da883d476b9c8
- 09831ea51bd1b7b32a836683a00a9ccaf3d05f59499f42d9883412ed79289969
hashed_maids:
description: Sha256 hashes of user's "Google Advertising IDs" (GAIDs) or "Apple's Identifier for Advertisers" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 0192518eb84137ccfe82c8b6322d29631dae7e28ed9d0f6dd5f245d73a58c5f1
- 837b850ac46d62b2272a71de73c27801ff011ac1e36c5432620c8755cf90db46
client_ip_address:
description: The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: 216.3.128.12
client_user_agent:
description: The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
required:
- hashed_maids
- properties:
em:
description: Sha256 hashes of lowercase version of user's email addresses. Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 411e44ce1261728ffd2c0686e44e3fffe413c0e2c5adc498bc7da883d476b9c8
- 09831ea51bd1b7b32a836683a00a9ccaf3d05f59499f42d9883412ed79289969
hashed_maids:
description: Sha256 hashes of user's "Google Advertising IDs" (GAIDs) or "Apple's Identifier for Advertisers" (IDFAs). Used for matching. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 0192518eb84137ccfe82c8b6322d29631dae7e28ed9d0f6dd5f245d73a58c5f1
- 837b850ac46d62b2272a71de73c27801ff011ac1e36c5432620c8755cf90db46
client_ip_address:
description: The user's IP address, which can be either in IPv4 or IPv6 format. Used for matching. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: 216.3.128.12
client_user_agent:
description: The user agent string of the user's web browser. We highly recommend this for all events. It may improve reporting performance such as ROAS/CPA.
type: string
example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36
required:
- client_ip_address
- client_user_agent
properties:
ph:
description: Sha256 hashes of user's phone numbers, only digits with country code, area code, and number. Remove any symbols, letters, spaces and leading zeros. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 45df139772a81b6011bdc1c9cc3d1cb408fc0b10ec0c5cb9d4d4e107f0ddc49d
ge:
description: Sha256 hashes of user's gender, in lowercase. Either "f" or "m" or "n" for non-binary gender.
type: array
items:
type: string
example:
- 0d248e82c62c9386878327d491c762a002152d42ab2c391a31c44d9f62675ddf
db:
description: Sha256 hashes of user's date of birthday, given as year, month, and day.
type: array
items:
type: string
example:
- d4426a0086d10f12ad265539ae8d54221dc67786053d511407204b76e99d7739
ln:
description: Sha256 hashes of user's last name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 7e546b3aa43f989dd359672e6c3409d4f9d4e8f155ae1e9b90ee060985468c19
fn:
description: Sha256 hashes of user's first name, in lowercase. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- ec1e6a072231703f1bc41429052fff8c00a7e0c6aaec2e7107241ca8f3ceb6b2
ct:
description: Sha256 hashes of user's city, in lowercase, and without spaces or punctuation. User residency city (mostly billing).
type: array
items:
type: string
example:
- 4ac01a129bfd10385c9278c2cf2c46fac5ab57350841234f587c8522a2e4ce36
st:
description: Sha256 hashes of user's state, given as a two-letter code in lowercase. User residency state (mostly billing).
type: array
items:
type: string
example:
- 49a6d05b8e4b516656e464271d9dd38d0a7e0142f7f49546f4dabd2720cafc34
zp:
description: Sha256 hashes of user's zipcode, only digits. User residency zipcode (mostly billing).
type: array
items:
type: string
example:
- fd5f56b40a79a385708428e7b32ab996a681080a166a2206e750eb4819186145
country:
description: Sha256 hashes of two-character ISO-3166 country code indicating the user's country, in lowercase.
type: array
items:
type: string
example:
- 9b202ecbc6d45c6d8901d989a918878397a3eb9d00e8f48022fc051b19d21a1d
external_id:
description: Sha256 hashes of the unique id from the advertiser that identifies a user in their space, e.g. user id, loyalty id, etc. We highly recommend this on all events. It may improve reporting performance such as ROAS/CPA.
type: array
items:
type: string
example:
- 6a7a73766627eb611720883d5a11cc62b5bfee237b00a6658d78c50032ec4aee
click_id:
description: The unique identifier stored in _epik cookie on your domain or &epik= query parameter in the URL. We highly recommend this on checkout events at least. It may improve reporting performance such as ROAS/CPA.
type: string
example: dj0yJnU9b2JDcFFHekV4SHJNcmVrbFBkUEdqakh0akdUT1VjVVUmcD0yJm49cnNBQ3F2Q2dOVDBXWWhkWklrUGxBUSZ0PUFBQUFBR1BaY3Bv
nullable: true
partner_id:
description: A unique identifier of visitors' information defined by third party partners. e.g RampID
type: string
example: BUJrTlRRzGJmWhRXFZdkioV6wKPBve7Lom__GU9J74hq2NIQj4O3nOZJrp3mcUr5MptkXsI14juMOIM9mNZnM4zEUFT2JLVaFhcOfuuWz3IWEDtBf6I0DPc
nullable: true
SSIOInsertionOrderStatus:
type: object
properties:
pin_order_id:
description: Salesforce order id
example: 0Q01N0000015hekSAB
type: string
status:
description: Salesforce insertion order status
example: Approved
type: string
creation_time:
description: Salesforce insertion order creation time
example: '2017-06-21T23:11:11.000Z'
type: string
nullable: true
ConversionTagCommon:
type: object
properties:
ad_account_id:
description: Ad account ID.
example: '549755885175'
title: ad_account_id
type: string
code_snippet:
description: Tag code snippet.
example: