{
  "opencollection": "1.0.0",
  "info": {
    "name": "Pinterest Templates API",
    "version": "5.13.0"
  },
  "items": [
    {
      "info": {
        "name": "Templates",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List targeting templates",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.pinterest.com/v5/ad_accounts/:ad_account_id/targeting_templates",
            "params": [
              {
                "name": "ad_account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of an ad account."
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "The order in which to sort the items returned: ASCENDING or DESCENDING\nby ID. Note that higher-value IDs are associated with more-recently added\nitems."
              },
              {
                "name": "include_sizing",
                "value": "",
                "type": "query",
                "description": "Include audience sizing in result or not"
              },
              {
                "name": "search_query",
                "value": "gaming",
                "type": "query",
                "description": "Search keyword for targeting templates"
              },
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information."
              },
              {
                "name": "bookmark",
                "value": "",
                "type": "query",
                "description": "Cursor used to fetch the next page of items"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://www.pinterest.com/oauth/",
              "accessTokenUrl": "https://api.pinterest.com/v5/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a list of the targeting templates in the specified <code>ad_account_id</code>"
        },
        {
          "info": {
            "name": "Create targeting templates",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.pinterest.com/v5/ad_accounts/:ad_account_id/targeting_templates",
            "params": [
              {
                "name": "ad_account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of an ad account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://www.pinterest.com/oauth/",
              "accessTokenUrl": "https://api.pinterest.com/v5/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "<p>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.</p>\n <p>Templates 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.</p>"
        },
        {
          "info": {
            "name": "Update targeting templates",
            "type": "http"
          },
          "http": {
            "method": "PATCH",
            "url": "https://api.pinterest.com/v5/ad_accounts/:ad_account_id/targeting_templates",
            "params": [
              {
                "name": "ad_account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of an ad account."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://www.pinterest.com/oauth/",
              "accessTokenUrl": "https://api.pinterest.com/v5/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "<p>Update the targeting template given advertiser ID and targeting template ID</p>"
        },
        {
          "info": {
            "name": "List templates",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.pinterest.com/v5/ad_accounts/:ad_account_id/templates",
            "params": [
              {
                "name": "ad_account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of an ad account."
              },
              {
                "name": "page_size",
                "value": "",
                "type": "query",
                "description": "Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information."
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "The order in which to sort the items returned: ASCENDING or DESCENDING\nby ID. Note that higher-value IDs are associated with more-recently added\nitems."
              },
              {
                "name": "bookmark",
                "value": "",
                "type": "query",
                "description": "Cursor used to fetch the next page of items"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://www.pinterest.com/oauth/",
              "accessTokenUrl": "https://api.pinterest.com/v5/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Gets all Templates associated with an ad account ID."
        },
        {
          "info": {
            "name": "Create async request for an analytics report using a template",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.pinterest.com/v5/ad_accounts/:ad_account_id/templates/:template_id/reports",
            "params": [
              {
                "name": "ad_account_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of an ad account."
              },
              {
                "name": "template_id",
                "value": "",
                "type": "path",
                "description": "Unique identifier of a template."
              },
              {
                "name": "start_date",
                "value": "",
                "type": "query",
                "description": "Metric report start date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years back from today."
              },
              {
                "name": "end_date",
                "value": "",
                "type": "query",
                "description": "Metric report end date (UTC). Format: YYYY-MM-DD. Cannot be more than 2.5 years past start date."
              },
              {
                "name": "granularity",
                "value": "DAY",
                "type": "query",
                "description": "TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://www.pinterest.com/oauth/",
              "accessTokenUrl": "https://api.pinterest.com/v5/oauth/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "This takes a template ID and an optional custom timeframe and constructs an asynchronous report based on the\ntemplate. It returns a token that you can use to download the report when it is ready."
        }
      ]
    }
  ],
  "bundled": true
}