pinterest_sdk

PinterestSdkClient - the Ruby gem for the Pinterest REST API

Pinterest's REST API

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 5.28.0
  • Package version: 2.1.0
  • Generator version: 7.24.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://github.com/oapicf/pinterest-sdk

Installation

Build a gem

To build the Ruby code into a gem:

gem build pinterest_sdk.gemspec

Then either install the gem locally:

gem install ./pinterest_sdk-2.1.0.gem

(for development, run gem install --dev ./pinterest_sdk-2.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'pinterest_sdk', '~> 2.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/oapicf/pinterest-sdk, then add the following in the Gemfile:

gem 'pinterest_sdk', :git => 'https://github.com/oapicf/pinterest-sdk.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'pinterest_sdk'

# Setup authorization
PinterestSdkClient.configure do |config|
  # Configure OAuth2 access token for authorization: pinterest_oauth2
  config.access_token = 'YOUR ACCESS TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 

  # Configure OAuth2 access token for authorization: client_credentials
  config.access_token = 'YOUR ACCESS TOKEN'
  # Configure a proc to get access tokens in lieu of the static access_token configuration
  config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' } 
end

api_instance = PinterestSdkClient::AdAccountsApi.new
start_date = Date.parse('2013-10-20') # Date | Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days back from today.
end_date = Date.parse('2013-10-20') # Date | Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 90 days past start_date.
columns = [PinterestSdkClient::ReportingColumnSync::SPEND_IN_MICRO_DOLLAR] # Array<ReportingColumnSync> | Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD, ($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.  For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).  If a column has no value, it may not be returned.
granularity = PinterestSdkClient::Granularity::TOTAL # Granularity |   TOTAL - metrics are aggregated over the specified date range.    DAY - metrics are broken down daily.    HOUR - metrics are broken down hourly.    WEEK - metrics are broken down weekly.    MONTH - metrics are broken down monthly
 = 'ad_account_id_example' # String | Unique identifier of an ad account.
opts = {
  click_window_days: 0, # Float | Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.
  engagement_window_days: 0, # Float | Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days. **Note:** This parameter no longer returns new data. However, you can still access historic data through **Sept 30, 2027**.
  view_window_days: 0, # Float | Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.
  conversion_report_time: 'TIME_OF_AD_ACTION', # String | The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.
  reporting_timezone: PinterestSdkClient::ReportingTimeZone::PINTEREST_TIME_ZONE # ReportingTimeZone | Specify the timezone to be applied for the reporting. This feature is currently in BETA and is not available to all users.
}

begin
  #Get ad account analytics
  result = api_instance.(start_date, end_date, columns, granularity, , opts)
  p result
rescue PinterestSdkClient::ApiError => e
  puts "Exception when calling AdAccountsApi->ad_account_analytics: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.pinterest.com/v5

Class Method HTTP request Description
PinterestSdkClient::AdAccountsApi ad_account_analytics GET /ad_accounts/ad_account_id/analytics Get ad account analytics
PinterestSdkClient::AdAccountsApi ad_account_targeting_analytics_get GET /ad_accounts/ad_account_id/targeting_analytics Get targeting analytics for an ad account
PinterestSdkClient::AdAccountsApi ad_accounts_create POST /ad_accounts Create ad account
PinterestSdkClient::AdAccountsApi ad_accounts_get GET /ad_accounts/ad_account_id Get ad account
PinterestSdkClient::AdAccountsApi ad_accounts_list GET /ad_accounts List ad accounts
PinterestSdkClient::AdAccountsApi analytics_create_conversion_product_report POST /ad_accounts/ad_account_id/reports/brand_category_sku Create a request for a brand, category, SKU report
PinterestSdkClient::AdAccountsApi analytics_create_mmm_report POST /ad_accounts/ad_account_id/mmm_reports Create a request for a Marketing Mix Modeling (MMM) report
PinterestSdkClient::AdAccountsApi analytics_create_report POST /ad_accounts/ad_account_id/reports Create async request for an account analytics report
PinterestSdkClient::AdAccountsApi analytics_create_template_report POST /ad_accounts/ad_account_id/templates/template_id/reports Create async request for an analytics report using a template
PinterestSdkClient::AdAccountsApi analytics_get_conversion_product_report GET /ad_accounts/ad_account_id/reports/brand_category_sku Get advertiser brand, category, SKU report
PinterestSdkClient::AdAccountsApi analytics_get_mmm_report GET /ad_accounts/ad_account_id/mmm_reports Get advertiser Marketing Mix Modeling (MMM) report.
PinterestSdkClient::AdAccountsApi analytics_get_report GET /ad_accounts/ad_account_id/reports Get the account analytics report created by the async call
PinterestSdkClient::AdAccountsApi sandbox_delete DELETE /ad_accounts/ad_account_id/sandbox Delete ads data for ad account in API Sandbox
PinterestSdkClient::AdAccountsApi templates_list GET /ad_accounts/ad_account_id/templates List templates
PinterestSdkClient::AdGroupsApi ad_groups_analytics GET /ad_accounts/ad_account_id/ad_groups/analytics Get ad group analytics
PinterestSdkClient::AdGroupsApi ad_groups_audience_sizing POST /ad_accounts/ad_account_id/ad_groups/audience_sizing Get audience sizing
PinterestSdkClient::AdGroupsApi ad_groups_bid_floor_get POST /ad_accounts/ad_account_id/bid_floor Get bid floors
PinterestSdkClient::AdGroupsApi ad_groups_create POST /ad_accounts/ad_account_id/ad_groups Create ad groups
PinterestSdkClient::AdGroupsApi ad_groups_dynamic_titles_download_csv GET /ad_accounts/ad_account_id/ad_groups/ad_group_id/dynamic_titles/csv Get dynamic titles CSV download URL
PinterestSdkClient::AdGroupsApi ad_groups_dynamic_titles_get_status GET /ad_accounts/ad_account_id/ad_groups/ad_group_id/dynamic_titles/status Get dynamic titles status
PinterestSdkClient::AdGroupsApi ad_groups_dynamic_titles_get_upload_url GET /ad_accounts/ad_account_id/ad_groups/ad_group_id/dynamic_titles/uploads Get dynamic titles upload URL
PinterestSdkClient::AdGroupsApi ad_groups_dynamic_titles_process_csv POST /ad_accounts/ad_account_id/ad_groups/ad_group_id/dynamic_titles Process dynamic titles CSV
PinterestSdkClient::AdGroupsApi ad_groups_get GET /ad_accounts/ad_account_id/ad_groups/ad_group_id Get ad group
PinterestSdkClient::AdGroupsApi ad_groups_list GET /ad_accounts/ad_account_id/ad_groups List ad groups
PinterestSdkClient::AdGroupsApi ad_groups_targeting_analytics_get GET /ad_accounts/ad_account_id/ad_groups/targeting_analytics Get targeting analytics for ad groups
PinterestSdkClient::AdGroupsApi ad_groups_update PATCH /ad_accounts/ad_account_id/ad_groups Update ad groups
PinterestSdkClient::AdGroupsApi get_ad_groups_by_promotion_ids_list GET /ad_accounts/ad_account_id/promotion_applied_entities List of ad groups using promotions IDs.
PinterestSdkClient::AdsApi ad_previews_create POST /ad_accounts/ad_account_id/ad_previews Create ad preview with pin or image
PinterestSdkClient::AdsApi ad_targeting_analytics_get GET /ad_accounts/ad_account_id/ads/targeting_analytics Get targeting analytics for ads
PinterestSdkClient::AdsApi ads_analytics GET /ad_accounts/ad_account_id/ads/analytics Get ad analytics
PinterestSdkClient::AdsApi ads_create POST /ad_accounts/ad_account_id/ads Create ads
PinterestSdkClient::AdsApi ads_get GET /ad_accounts/ad_account_id/ads/ad_id Get ad
PinterestSdkClient::AdsApi ads_list GET /ad_accounts/ad_account_id/ads List ads
PinterestSdkClient::AdsApi ads_update PATCH /ad_accounts/ad_account_id/ads Update ads
PinterestSdkClient::AdsApi campaign_ad_preview_create POST /ad_accounts/ad_account_id/campaign_ad_preview Create ad preview records for one or more ad groups
PinterestSdkClient::AdsApi campaign_ad_preview_delete DELETE /ad_accounts/ad_account_id/campaign_ad_preview Delete ad preview records for one or more ad groups
PinterestSdkClient::AdsApi campaign_ad_preview_read GET /ad_accounts/ad_account_id/campaign_ad_preview Fetch ad preview records for one or more ad groups
PinterestSdkClient::AdvancedAuctionApi advanced_auction_items_get_post POST /advanced_auction/items/get Get item bid options (POST)
PinterestSdkClient::AdvancedAuctionApi advanced_auction_items_submit_post POST /advanced_auction/items/submit Operate on item level bid options
PinterestSdkClient::AudienceInsightsApi audience_insights_get GET /ad_accounts/ad_account_id/audience_insights Get audience insights
PinterestSdkClient::AudienceInsightsApi audience_insights_scope_and_type_get GET /ad_accounts/ad_account_id/insights/audiences Get audience insights scope and type
PinterestSdkClient::AudienceSharingApi ad_accounts_audiences_shared_accounts_list GET /ad_accounts/ad_account_id/audiences/shared/accounts List accounts with access to an audience owned by an ad account
PinterestSdkClient::AudienceSharingApi business_account_audiences_shared_accounts_list GET /businesses/business_id/audiences/shared/accounts List accounts with access to an audience owned by a business
PinterestSdkClient::AudienceSharingApi shared_audiences_for_business_list GET /businesses/business_id/audiences List received audiences for a business
PinterestSdkClient::AudienceSharingApi update_ad_account_to_ad_account_shared_audience PATCH /ad_accounts/ad_account_id/audiences/ad_accounts/shared Update audience sharing between ad accounts
PinterestSdkClient::AudienceSharingApi update_ad_account_to_business_shared_audience PATCH /ad_accounts/ad_account_id/audiences/businesses/shared Update audience sharing from an ad account to businesses
PinterestSdkClient::AudienceSharingApi update_business_to_ad_account_shared_audience PATCH /businesses/business_id/audiences/ad_accounts/shared Update audience sharing from a business to ad accounts
PinterestSdkClient::AudienceSharingApi update_business_to_business_shared_audience PATCH /businesses/business_id/audiences/businesses/shared Update audience sharing between businesses
PinterestSdkClient::AudiencesApi audiences_create POST /ad_accounts/ad_account_id/audiences Create audience
PinterestSdkClient::AudiencesApi audiences_get GET /ad_accounts/ad_account_id/audiences/audience_id Get audience
PinterestSdkClient::AudiencesApi audiences_list GET /ad_accounts/ad_account_id/audiences List audiences
PinterestSdkClient::AudiencesApi audiences_update PATCH /ad_accounts/ad_account_id/audiences/audience_id Update audience
PinterestSdkClient::BillingApi ads_credit_redeem POST /ad_accounts/ad_account_id/ads_credit/redeem Redeem ad credits
PinterestSdkClient::BillingApi ads_credits_discounts_get GET /ad_accounts/ad_account_id/ads_credit/discounts Get ads credit discounts
PinterestSdkClient::BillingApi billing_invoice_download_get GET /ad_accounts/ad_account_id/billing_invoice/billing_invoice_id/download Get download url for a billing invoice
PinterestSdkClient::BillingApi billing_invoices_get GET /ad_accounts/ad_account_id/billing_invoices Get billing invoices
PinterestSdkClient::BillingApi billing_profiles_get GET /ad_accounts/ad_account_id/billing_profiles Get billing profiles
PinterestSdkClient::BillingApi ssio_accounts_get GET /ad_accounts/ad_account_id/ssio/accounts Get Salesforce account details including bill-to information.
PinterestSdkClient::BillingApi ssio_insertion_order_create POST /ad_accounts/ad_account_id/ssio/insertion_orders Create insertion order through SSIO.
PinterestSdkClient::BillingApi ssio_insertion_order_edit PATCH /ad_accounts/ad_account_id/ssio/insertion_orders Edit insertion order through SSIO.
PinterestSdkClient::BillingApi ssio_insertion_orders_status_get_by_ad_account GET /ad_accounts/ad_account_id/ssio/insertion_orders/status Get insertion order status by ad account id.
PinterestSdkClient::BillingApi ssio_insertion_orders_status_get_by_pin_order_id GET /ad_accounts/ad_account_id/ssio/insertion_orders/pin_order_id/status Get insertion order status by pin order id.
PinterestSdkClient::BillingApi ssio_order_lines_get_by_ad_account GET /ad_accounts/ad_account_id/ssio/order_lines Get Salesforce order lines by ad account id.
PinterestSdkClient::BoardsApi board_sections_create POST /boards/board_id/sections Create board section
PinterestSdkClient::BoardsApi board_sections_delete DELETE /boards/board_id/sections/section_id Delete board section
PinterestSdkClient::BoardsApi board_sections_list GET /boards/board_id/sections List board sections
PinterestSdkClient::BoardsApi board_sections_list_pins GET /boards/board_id/sections/section_id/pins List Pins on board section
PinterestSdkClient::BoardsApi board_sections_update PATCH /boards/board_id/sections/section_id Update board section
PinterestSdkClient::BoardsApi boards_create POST /boards Create board
PinterestSdkClient::BoardsApi boards_delete DELETE /boards/board_id Delete board
PinterestSdkClient::BoardsApi boards_get GET /boards/board_id Get board
PinterestSdkClient::BoardsApi boards_list GET /boards List boards
PinterestSdkClient::BoardsApi boards_list_pins GET /boards/board_id/pins List Pins on board
PinterestSdkClient::BoardsApi boards_update PATCH /boards/board_id Update board
PinterestSdkClient::BulkApi bulk_download_create POST /ad_accounts/ad_account_id/bulk/download Get advertiser entities in bulk
PinterestSdkClient::BulkApi bulk_request_get GET /ad_accounts/ad_account_id/bulk/bulk_request_id Download advertiser entities in bulk
PinterestSdkClient::BulkApi bulk_upsert_create POST /ad_accounts/ad_account_id/bulk/upsert Create/update ad entities in bulk
PinterestSdkClient::BusinessAccessAssetsApi asset_group_create POST /businesses/business_id/asset_groups Create a new asset group.
PinterestSdkClient::BusinessAccessAssetsApi asset_group_delete DELETE /businesses/business_id/asset_groups Delete asset groups.
PinterestSdkClient::BusinessAccessAssetsApi asset_group_update PATCH /businesses/business_id/asset_groups Update asset groups.
PinterestSdkClient::BusinessAccessAssetsApi business_asset_members_get GET /businesses/business_id/assets/asset_id/members Get members with access to asset
PinterestSdkClient::BusinessAccessAssetsApi business_asset_partners_get GET /businesses/business_id/assets/asset_id/partners Get partners with access to asset
PinterestSdkClient::BusinessAccessAssetsApi business_assets_get GET /businesses/business_id/assets List business assets
PinterestSdkClient::BusinessAccessAssetsApi business_member_assets_get GET /businesses/business_id/members/member_id/assets Get assets assigned to a member
PinterestSdkClient::BusinessAccessAssetsApi business_members_asset_access_delete DELETE /businesses/business_id/members/assets/access Delete member access to asset
PinterestSdkClient::BusinessAccessAssetsApi business_members_asset_access_update PATCH /businesses/business_id/members/assets/access Assign/Update member asset permissions
PinterestSdkClient::BusinessAccessAssetsApi business_partner_asset_access_get GET /businesses/business_id/partners/partner_id/assets Get assets assigned to a partner or assets assigned by a partner
PinterestSdkClient::BusinessAccessAssetsApi delete_partner_asset_access_handler_impl DELETE /businesses/business_id/partners/assets Delete partner access to asset
PinterestSdkClient::BusinessAccessAssetsApi update_partner_asset_access_handler_impl PATCH /businesses/business_id/partners/assets Assign/Update partner asset permissions
PinterestSdkClient::BusinessAccessInviteApi asset_access_requests_create POST /businesses/business_id/requests/assets/access Create a request to access an existing partner's assets.
PinterestSdkClient::BusinessAccessInviteApi cancel_invites_or_requests DELETE /businesses/business_id/invites Cancel invites/requests
PinterestSdkClient::BusinessAccessInviteApi create_asset_invites POST /businesses/business_id/invites/assets/access Update invite/request with an asset permission
PinterestSdkClient::BusinessAccessInviteApi create_membership_or_partnership_invites POST /businesses/business_id/invites Create invites or requests
PinterestSdkClient::BusinessAccessInviteApi get_invites GET /businesses/business_id/invites Get invites/requests
PinterestSdkClient::BusinessAccessInviteApi respond_business_access_invites PATCH /businesses/invites Accept or decline an invite/request
PinterestSdkClient::BusinessAccessRelationshipsApi brand_accounts_create POST /business_access/business_hierarchy/business_hierarchy_id/brand_accounts Create a Brand Account
PinterestSdkClient::BusinessAccessRelationshipsApi brand_accounts_update PATCH /business_access/business_hierarchy/business_hierarchy_id/brand_accounts/brand_account_id Update a Brand Account
PinterestSdkClient::BusinessAccessRelationshipsApi delete_business_membership DELETE /businesses/business_id/members Terminate business memberships
PinterestSdkClient::BusinessAccessRelationshipsApi delete_business_partners DELETE /businesses/business_id/partners Terminate business partnerships
PinterestSdkClient::BusinessAccessRelationshipsApi get_business_employers GET /businesses/employers List business employers for user
PinterestSdkClient::BusinessAccessRelationshipsApi get_business_members GET /businesses/business_id/members Get business members
PinterestSdkClient::BusinessAccessRelationshipsApi get_business_partners GET /businesses/business_id/partners Get business partners
PinterestSdkClient::BusinessAccessRelationshipsApi system_user_update PATCH /businesses/business_id/system_users/system_user_id Update a system user information.
PinterestSdkClient::BusinessAccessRelationshipsApi update_business_memberships PATCH /businesses/business_id/members Update member's business role
PinterestSdkClient::CampaignsApi ad_pins_analytics GET /ad_accounts/ad_account_id/pins/analytics Get pins analytics
PinterestSdkClient::CampaignsApi campaign_targeting_analytics_get GET /ad_accounts/ad_account_id/campaigns/targeting_analytics Get targeting analytics for campaigns
PinterestSdkClient::CampaignsApi campaigns_analytics GET /ad_accounts/ad_account_id/campaigns/analytics Get campaign analytics
PinterestSdkClient::CampaignsApi campaigns_create POST /ad_accounts/ad_account_id/campaigns Create campaigns
PinterestSdkClient::CampaignsApi campaigns_get GET /ad_accounts/ad_account_id/campaigns/campaign_id Get campaign
PinterestSdkClient::CampaignsApi campaigns_list GET /ad_accounts/ad_account_id/campaigns List campaigns
PinterestSdkClient::CampaignsApi campaigns_update PATCH /ad_accounts/ad_account_id/campaigns Update campaigns
PinterestSdkClient::CampaignsApi get_campaign_delivery_estimates POST /ad_accounts/ad_account_id/campaigns/delivery_estimates Get campaign delivery estimates
PinterestSdkClient::CatalogFeedsApi feed_processing_results_list GET /catalogs/feeds/feed_id/processing_results List feed processing results
PinterestSdkClient::CatalogFeedsApi feeds_create POST /catalogs/feeds Create feed
PinterestSdkClient::CatalogFeedsApi feeds_delete DELETE /catalogs/feeds/feed_id Delete feed
PinterestSdkClient::CatalogFeedsApi feeds_get GET /catalogs/feeds/feed_id Get feed
PinterestSdkClient::CatalogFeedsApi feeds_ingest POST /catalogs/feeds/feed_id/ingest Ingest feed items
PinterestSdkClient::CatalogFeedsApi feeds_list GET /catalogs/feeds List feeds
PinterestSdkClient::CatalogFeedsApi feeds_update PATCH /catalogs/feeds/feed_id Update feed
PinterestSdkClient::CatalogFeedsApi items_issues_list GET /catalogs/processing_results/processing_result_id/item_issues List item issues
PinterestSdkClient::CatalogItemsApi items_batch_get GET /catalogs/items/batch/batch_id Get item batch status
PinterestSdkClient::CatalogItemsApi items_batch_post POST /catalogs/items/batch Operate on item batch
PinterestSdkClient::CatalogItemsApi items_post POST /catalogs/items Get catalogs items (POST)
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_group_pins_list GET /catalogs/product_groups/product_group_id/products List products by product group
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_create POST /catalogs/product_groups Create product group
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_create_many POST /catalogs/product_groups/multiple Create product groups
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_delete DELETE /catalogs/product_groups/product_group_id Delete product group
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_delete_many DELETE /catalogs/product_groups/multiple Delete product groups
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_get GET /catalogs/product_groups/product_group_id Get product group
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_list GET /catalogs/product_groups List product groups
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_product_counts_get GET /catalogs/product_groups/product_group_id/product_counts Get product counts
PinterestSdkClient::CatalogProductGroupsApi catalogs_product_groups_update PATCH /catalogs/product_groups/product_group_id Update single product group
PinterestSdkClient::CatalogProductGroupsApi products_by_product_group_filter_list POST /catalogs/products/get_by_product_group_filters List products by filter
PinterestSdkClient::CatalogReportsApi reports_create POST /catalogs/reports Build catalogs report
PinterestSdkClient::CatalogReportsApi reports_get GET /catalogs/reports Get catalogs report
PinterestSdkClient::CatalogReportsApi reports_stats GET /catalogs/reports/stats List report stats
PinterestSdkClient::CatalogSupplementalApi catalogs_local_inventory_items_batch_operate POST /catalogs/catalog_id/local_inventory_items/batch Operate on local inventory item batch
PinterestSdkClient::CatalogSupplementalApi catalogs_local_inventory_items_post POST /catalogs/catalog_id/local_inventory_items/query Get local inventory items (POST)
PinterestSdkClient::CatalogSupplementalApi catalogs_local_stores_create POST /catalogs/catalog_id/local_stores Create local stores
PinterestSdkClient::CatalogSupplementalApi catalogs_local_stores_delete DELETE /catalogs/catalog_id/local_stores Delete local stores
PinterestSdkClient::CatalogSupplementalApi catalogs_local_stores_list GET /catalogs/catalog_id/local_stores List local stores
PinterestSdkClient::CatalogSupplementalApi catalogs_local_stores_update PATCH /catalogs/catalog_id/local_stores Update local stores
PinterestSdkClient::CatalogSupplementalApi catalogs_supplemental_items_batch_get GET /catalogs/catalog_id/supplemental_items/batch/batch_id Get supplemental items batch status
PinterestSdkClient::CatalogsApi catalogs_available_filter_values GET /catalogs/available_filter_values List available filter values
PinterestSdkClient::CatalogsApi catalogs_create POST /catalogs Create catalog
PinterestSdkClient::CatalogsApi catalogs_list GET /catalogs List catalogs
PinterestSdkClient::ConversionDeletionRequestsApi conversion_deletion_request_create POST /ad_accounts/ad_account_id/conversion_deletion_requests Create a conversion deletion request
PinterestSdkClient::ConversionDeletionRequestsApi conversion_deletion_request_delete DELETE /ad_accounts/ad_account_id/conversion_deletion_requests/request_id Delete a conversion deletion request
PinterestSdkClient::ConversionDeletionRequestsApi conversion_deletion_request_get GET /ad_accounts/ad_account_id/conversion_deletion_requests/request_id Get a single conversion deletion request
PinterestSdkClient::ConversionDeletionRequestsApi conversion_deletion_request_list GET /ad_accounts/ad_account_id/conversion_deletion_requests List conversion deletion requests
PinterestSdkClient::ConversionEqsApi conversion_eqs_list GET /ad_accounts/ad_account_id/conversion_eqs Get event quality score (EQS)
PinterestSdkClient::ConversionEventsApi events_create POST /ad_accounts/ad_account_id/events Send conversions
PinterestSdkClient::ConversionTagsApi conversion_tags_create POST /ad_accounts/ad_account_id/conversion_tags Create conversion tag
PinterestSdkClient::ConversionTagsApi conversion_tags_get GET /ad_accounts/ad_account_id/conversion_tags/conversion_tag_id Get conversion tag
PinterestSdkClient::ConversionTagsApi conversion_tags_list GET /ad_accounts/ad_account_id/conversion_tags List conversion tags
PinterestSdkClient::ConversionTagsApi ocpm_eligible_conversion_tags_get GET /ad_accounts/ad_account_id/conversion_tags/ocpm_eligible Get Ocpm eligible conversion tags
PinterestSdkClient::ConversionTagsApi page_visit_conversion_tags_get GET /ad_accounts/ad_account_id/conversion_tags/page_visit Get page visit conversion tags
PinterestSdkClient::ConversionsApi advertiser_defined_events_create POST /ad_accounts/ad_account_id/advertiser_defined_events Create advertiser defined events
PinterestSdkClient::ConversionsApi advertiser_defined_events_delete DELETE /ad_accounts/ad_account_id/advertiser_defined_events Delete advertiser defined events
PinterestSdkClient::ConversionsApi advertiser_defined_events_get GET /ad_accounts/ad_account_id/advertiser_defined_events Get advertiser defined events
PinterestSdkClient::ConversionsApi advertiser_defined_events_update PATCH /ad_accounts/ad_account_id/advertiser_defined_events Update advertiser defined events
PinterestSdkClient::CustomerListUploadsApi customer_list_uploads_create POST /ad_accounts/ad_account_id/customer_lists/customer_list_id/uploads Create customer list upload
PinterestSdkClient::CustomerListUploadsApi customer_list_uploads_get GET /ad_accounts/ad_account_id/customer_lists/customer_list_id/uploads/customer_list_upload_id Get customer list upload
PinterestSdkClient::CustomerListUploadsApi customer_list_uploads_run POST /ad_accounts/ad_account_id/customer_lists/customer_list_id/uploads/customer_list_upload_id/run Run customer list upload
PinterestSdkClient::CustomerListsApi customer_lists_create POST /ad_accounts/ad_account_id/customer_lists Create customer lists
PinterestSdkClient::CustomerListsApi customer_lists_get GET /ad_accounts/ad_account_id/customer_lists/customer_list_id Get customer list
PinterestSdkClient::CustomerListsApi customer_lists_list GET /ad_accounts/ad_account_id/customer_lists Get customer lists
PinterestSdkClient::CustomerListsApi customer_lists_update PATCH /ad_accounts/ad_account_id/customer_lists/customer_list_id Update customer list
PinterestSdkClient::CustomerSegmentApi customer_segment_create POST /ad_accounts/ad_account_id/customer_segments Create customer segments
PinterestSdkClient::CustomerSegmentApi customer_segment_list GET /ad_accounts/ad_account_id/customer_segments List customer segments
PinterestSdkClient::CustomerSegmentApi customer_segment_update PATCH /ad_accounts/ad_account_id/customer_segments Update customer segments
PinterestSdkClient::IntegrationsApi integrations_commerce_del DELETE /integrations/commerce/external_business_id Delete commerce integration
PinterestSdkClient::IntegrationsApi integrations_commerce_get GET /integrations/commerce/external_business_id Get commerce integration
PinterestSdkClient::IntegrationsApi integrations_commerce_patch PATCH /integrations/commerce/external_business_id Update commerce integration
PinterestSdkClient::IntegrationsApi integrations_commerce_post POST /integrations/commerce Create commerce integration
PinterestSdkClient::IntegrationsApi integrations_get_by_id GET /integrations/id Get integration metadata
PinterestSdkClient::IntegrationsApi integrations_get_list GET /integrations Get integration metadata list
PinterestSdkClient::IntegrationsApi integrations_logs_post POST /integrations/logs Receives batched logs from integration applications.
PinterestSdkClient::KeywordsApi country_keywords_metrics_get GET /ad_accounts/ad_account_id/keywords/metrics Get country's keyword metrics
PinterestSdkClient::KeywordsApi keywords_create POST /ad_accounts/ad_account_id/keywords Create keywords
PinterestSdkClient::KeywordsApi keywords_get GET /ad_accounts/ad_account_id/keywords Get keywords
PinterestSdkClient::KeywordsApi keywords_update PATCH /ad_accounts/ad_account_id/keywords Update keywords
PinterestSdkClient::KeywordsApi trending_keywords_list GET /trends/keywords/region/top/trend_type List trending keywords
PinterestSdkClient::LabelsApi labels_apply POST /ad_accounts/ad_account_id/labels/label_id/apply Apply label to entity
PinterestSdkClient::LabelsApi labels_create POST /ad_accounts/ad_account_id/labels Create labels
PinterestSdkClient::LabelsApi labels_list GET /ad_accounts/ad_account_id/labels List labels
PinterestSdkClient::LabelsApi labels_remove POST /ad_accounts/ad_account_id/labels/label_id/remove Remove label from entities
PinterestSdkClient::LabelsApi labels_update PATCH /ad_accounts/ad_account_id/labels Update labels
PinterestSdkClient::LeadAdsApi ad_accounts_subscriptions_del_by_id DELETE /ad_accounts/ad_account_id/leads/subscriptions/subscription_id Delete lead ads subscription
PinterestSdkClient::LeadAdsApi ad_accounts_subscriptions_get_by_id GET /ad_accounts/ad_account_id/leads/subscriptions/subscription_id Get lead ads subscription by ID
PinterestSdkClient::LeadAdsApi ad_accounts_subscriptions_get_list GET /ad_accounts/ad_account_id/leads/subscriptions Get lead ads subscriptions
PinterestSdkClient::LeadAdsApi ad_accounts_subscriptions_post POST /ad_accounts/ad_account_id/leads/subscriptions Create lead ads subscription
PinterestSdkClient::LeadFormsApi lead_form_get GET /ad_accounts/ad_account_id/lead_forms/lead_form_id Get lead form by id
PinterestSdkClient::LeadFormsApi lead_form_test_create POST /ad_accounts/ad_account_id/lead_forms/lead_form_id/test Create lead form test data
PinterestSdkClient::LeadFormsApi lead_forms_create POST /ad_accounts/ad_account_id/lead_forms Create lead forms
PinterestSdkClient::LeadFormsApi lead_forms_list GET /ad_accounts/ad_account_id/lead_forms List lead forms
PinterestSdkClient::LeadFormsApi lead_forms_update PATCH /ad_accounts/ad_account_id/lead_forms Update lead forms
PinterestSdkClient::LeadsExportApi leads_export_create POST /ad_accounts/ad_account_id/leads_export Create a request to export leads collected from a lead ad
PinterestSdkClient::LeadsExportApi leads_export_get GET /ad_accounts/ad_account_id/leads_export/leads_export_id Get the lead export from the lead export create call
PinterestSdkClient::MediaApi media_create POST /media Register media upload
PinterestSdkClient::MediaApi media_get GET /media/media_id Get media upload details
PinterestSdkClient::MediaApi media_list GET /media List media uploads
PinterestSdkClient::MsotEventsApi msot_events_create POST /ad_accounts/ad_account_id/msot/events Send Measurement Source Of Truth (MSOT) attributed conversion events
PinterestSdkClient::NotificationApi notification_post POST /notifications Receive notifications from external partners.
PinterestSdkClient::OauthApi oauth_conversion_token POST /oauth/conversion_token Generate OAuth access token for conversion API
PinterestSdkClient::OauthApi oauth_token POST /oauth/token Generate OAuth access token
PinterestSdkClient::OauthApi token_revoke POST /oauth/token/revoke Revoke a token
PinterestSdkClient::OrderLinesApi order_lines_get GET /ad_accounts/ad_account_id/order_lines/order_line_id Get order line
PinterestSdkClient::OrderLinesApi order_lines_list GET /ad_accounts/ad_account_id/order_lines Get order lines.
PinterestSdkClient::PinsApi multi_pins_analytics GET /pins/analytics Get multiple Pin analytics
PinterestSdkClient::PinsApi pins_analytics GET /pins/pin_id/analytics Get Pin analytics
PinterestSdkClient::PinsApi pins_create POST /pins Create Pin
PinterestSdkClient::PinsApi pins_delete DELETE /pins/pin_id Delete Pin
PinterestSdkClient::PinsApi pins_get GET /pins/pin_id Get Pin
PinterestSdkClient::PinsApi pins_list GET /pins List Pins
PinterestSdkClient::PinsApi pins_save POST /pins/pin_id/save Save Pin
PinterestSdkClient::PinsApi pins_update PATCH /pins/pin_id Update Pin
PinterestSdkClient::ProductGroupPromotionsApi product_group_promotions_create POST /ad_accounts/ad_account_id/product_group_promotions Create product group promotions
PinterestSdkClient::ProductGroupPromotionsApi product_group_promotions_get GET /ad_accounts/ad_account_id/product_group_promotions/product_group_promotion_id Get a product group promotion by id
PinterestSdkClient::ProductGroupPromotionsApi product_group_promotions_list GET /ad_accounts/ad_account_id/product_group_promotions Get product group promotions
PinterestSdkClient::ProductGroupPromotionsApi product_group_promotions_update PATCH /ad_accounts/ad_account_id/product_group_promotions Update product group promotions
PinterestSdkClient::ProductGroupPromotionsApi product_groups_analytics GET /ad_accounts/ad_account_id/product_groups/analytics Get product group analytics
PinterestSdkClient::ProductTagsApi product_tags_bulk_add POST /pins/pin_id/product_tags Add product tags to pin
PinterestSdkClient::ProductTagsApi product_tags_bulk_delete POST /pins/pin_id/product_tags/bulk-delete Delete product tags from pin
PinterestSdkClient::ProductTagsApi product_tags_list GET /pins/pin_id/product_tags Get product tags for pin
PinterestSdkClient::PromotionsApi promotions_create POST /ad_accounts/ad_account_id/promotions Create promotions
PinterestSdkClient::PromotionsApi promotions_delete DELETE /ad_accounts/ad_account_id/promotions/promotion_id Delete promotion by id
PinterestSdkClient::PromotionsApi promotions_get GET /ad_accounts/ad_account_id/promotions/promotion_id Get promotion by id
PinterestSdkClient::PromotionsApi promotions_list GET /ad_accounts/ad_account_id/promotions Get promotions
PinterestSdkClient::PromotionsApi promotions_update PATCH /ad_accounts/ad_account_id/promotions Update promotions
PinterestSdkClient::ResourcesApi ad_account_countries_get GET /resources/ad_account_countries Get ad accounts countries
PinterestSdkClient::ResourcesApi delivery_metrics_get GET /resources/delivery_metrics Get available metrics' definitions
PinterestSdkClient::ResourcesApi interest_targeting_options_get GET /resources/targeting/interests/interest_id Get interest details
PinterestSdkClient::ResourcesApi lead_form_questions_get GET /resources/lead_form_questions Get lead form questions
PinterestSdkClient::ResourcesApi metrics_ready_state_get GET /resources/metrics_ready_state Get metrics ready state
PinterestSdkClient::ResourcesApi targeting_options_get GET /resources/targeting/targeting_type Get targeting options
PinterestSdkClient::SchedulesApi schedules_create POST /ad_accounts/ad_account_id/schedules Create schedules
PinterestSdkClient::SchedulesApi schedules_list GET /ad_accounts/ad_account_id/schedules Get Schedules
PinterestSdkClient::SchedulesApi schedules_update PATCH /ad_accounts/ad_account_id/schedules Update schedules
PinterestSdkClient::SearchApi search_partner_pins GET /search/partner/pins Search pins by a given search term
PinterestSdkClient::SearchApi search_user_boards_get GET /search/boards Search user's boards
PinterestSdkClient::SearchApi search_user_pins_list GET /search/pins Search user's Pins
PinterestSdkClient::TargetingTemplateApi targeting_template_create POST /ad_accounts/ad_account_id/targeting_templates Create targeting templates
PinterestSdkClient::TargetingTemplateApi targeting_template_list GET /ad_accounts/ad_account_id/targeting_templates List targeting templates
PinterestSdkClient::TargetingTemplateApi targeting_template_update PATCH /ad_accounts/ad_account_id/targeting_templates Update targeting templates
PinterestSdkClient::TermsApi terms_related_list GET /terms/related List related terms
PinterestSdkClient::TermsApi terms_suggested_list GET /terms/suggested List suggested terms
PinterestSdkClient::TermsOfServiceApi terms_of_service_get GET /ad_accounts/ad_account_id/terms_of_service Get terms of service
PinterestSdkClient::TrendsApi trends_editorial_articles_list GET /trends/editorial_articles Returns editorial articles for a given region
PinterestSdkClient::TrendsApi trends_featured_topics_list GET /trends/topics/featured Get featured topics
PinterestSdkClient::TrendsApi trends_product_categories_details_list GET /trends/product_categories/details Get product category details
PinterestSdkClient::TrendsApi trends_product_categories_trending_list GET /trends/product_categories/trending Get a list of growing Shopping Product Categories
PinterestSdkClient::UserAccountApi boards_user_follows_list GET /user_account/following/boards List following boards
PinterestSdkClient::UserAccountApi follow_user_update POST /user_account/following/username Follow user
PinterestSdkClient::UserAccountApi followers_list GET /user_account/followers List followers
PinterestSdkClient::UserAccountApi linked_business_accounts_get GET /user_account/businesses List linked businesses
PinterestSdkClient::UserAccountApi unverify_website_delete DELETE /user_account/websites Unverify website
PinterestSdkClient::UserAccountApi user_account_analytics GET /user_account/analytics Get user account analytics
PinterestSdkClient::UserAccountApi user_account_analytics_top_pins GET /user_account/analytics/top_pins Get user account top pins analytics
PinterestSdkClient::UserAccountApi user_account_analytics_top_video_pins GET /user_account/analytics/top_video_pins Get user account top video pins analytics
PinterestSdkClient::UserAccountApi user_account_followed_interests GET /users/username/interests/follow List following interests
PinterestSdkClient::UserAccountApi user_account_get GET /user_account Get user account
PinterestSdkClient::UserAccountApi user_following_get GET /user_account/following List following
PinterestSdkClient::UserAccountApi user_websites_get GET /user_account/websites Get user websites
PinterestSdkClient::UserAccountApi verify_website_update POST /user_account/websites Verify website
PinterestSdkClient::UserAccountApi website_verification_get GET /user_account/websites/verification Get user verification code for website claiming

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

pinterest_oauth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://www.pinterest.com/oauth/
  • Scopes:
    • ads:read: See all of your advertising data, including ads, ad groups, campaigns etc.
    • ads:write: Create, update, or delete ads, ad groups, campaigns etc.
    • billing:read: See all of your billing data, billing profile, etc.
    • billing:write: Create, update, or delete billing data, billing profiles, etc.
    • biz_access:read: See business access data
    • biz_access:write: Create, update, or delete business access data
    • boards:read: See your public boards, including group boards you join
    • boards:read_secret: See your secret boards
    • boards:write: Create, update, or delete your public boards
    • boards:write_secret: Create, update, or delete your secret boards
    • catalogs:read: See all of your catalogs data
    • catalogs:write: Create, update, or delete your catalogs data
    • msot:write: Create measurement source of truth events
    • pins:read: See your public Pins
    • pins:read_secret: See your secret Pins
    • pins:write: Create, update, or delete your public Pins
    • pins:write_secret: Create, update, or delete your secret Pins
    • user_accounts:read: See your user accounts and followers
    • user_accounts:write: Update your user accounts and followers

client_credentials

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • ads:read: See all of your advertising data, including ads, ad groups, campaigns etc.
    • ads:write: Create, update, or delete ads, ad groups, campaigns etc.
    • billing:read: See all of your billing data, billing profile, etc.
    • billing:write: Create, update, or delete billing data, billing profiles, etc.
    • biz_access:read: See business access data
    • biz_access:write: Create, update, or delete business access data
    • boards:read: See your public boards, including group boards you join
    • boards:read_secret: See your secret boards
    • boards:write: Create, update, or delete your public boards
    • boards:write_secret: Create, update, or delete your secret boards
    • catalogs:read: See all of your catalogs data
    • catalogs:write: Create, update, or delete your catalogs data
    • msot:write: Create measurement source of truth events
    • pins:read: See your public Pins
    • pins:read_secret: See your secret Pins
    • pins:write: Create, update, or delete your public Pins
    • pins:write_secret: Create, update, or delete your secret Pins
    • user_accounts:read: See your user accounts and followers
    • user_accounts:write: Update your user accounts and followers

conversion_token

  • Type: Bearer authentication

basic

  • Type: HTTP basic authentication