Pinterest Employers API

The Employers API from Pinterest — 1 operation(s) for employers.

OpenAPI Specification

pinterest-employers-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  version: 5.13.0
  title: Pinterest Employers 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: Employers
paths:
  /businesses/employers:
    get:
      summary: List business employers for user
      description: Get all of the viewing user's business employers.
      operationId: get/business_employers
      security:
      - pinterest_oauth2:
        - biz_access:read
      x-ratelimit-category: ads_read
      x-sandbox: enabled
      parameters:
      - $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
                      description: List of employers.
                      items:
                        $ref: '#/components/schemas/UserBusinessRoleBinding'
          description: Success
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unexpected error
      tags:
      - Employers
components:
  schemas:
    BusinessRoleResponse:
      type: string
      description: 'The access level a member/partner has to the business. Values are case-sensitive.

        <br> - EMPLOYEE: Can only view and access assets you assign to them.

        They cannot see details about other employees, partners, or other assets.

        <br> - BIZ_ADMIN: Have full control of roles and can add employees or external partners as well as grant asset access.

        <br> - PARTNER: Can only view and access assets you assign them to/or they assign to you.'
      example: BIZ_ADMIN
    BusinessMemberAssetsSummary:
      type: object
      description: Ad accounts and profiles the business member/partner has access to.
      nullable: true
      properties:
        ad_accounts:
          type: array
          description: List of ad account IDs and respective permission levels.
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier of a business ad account.
                example: '549755885175'
                pattern: ^\d+$
                minLength: 1
                maxLength: 20
              permissions:
                $ref: '#/components/schemas/PermissionsResponse'
        profiles:
          type: array
          description: List of profile IDs and respective permission levels.
          items:
            type: object
            properties:
              id:
                type: string
                description: Unique identifier of a business profile.
                example: '383791336903426391'
                pattern: ^\d+$
                minLength: 1
                maxLength: 20
              permissions:
                $ref: '#/components/schemas/PermissionsResponse'
    PermissionsResponse:
      type: array
      description: Permission levels member or partner has on an asset.
      example:
      - FINANCE_MANAGER
      - CATALOGS_MANAGER
      - AUDIENCE_MANAGER
      items:
        type: string
    UserBusinessRoleBinding:
      type: object
      properties:
        assets_summary:
          type: object
          nullable: true
          allOf:
          - $ref: '#/components/schemas/BusinessMemberAssetsSummary'
        business_roles:
          description: The access level a user has on the business. This can be EMPLOYEE, BIZ_ADMIN, or PARTNER.
          type: array
          example:
          - BIZ_ADMIN
          items:
            $ref: '#/components/schemas/BusinessRoleResponse'
        created_by_business:
          type: object
          nullable: true
          description: Metadata for the business that created the business relationship.
          allOf:
          - $ref: '#/components/schemas/BusinessAccessUserSummary'
        created_by_user:
          type: object
          nullable: true
          description: Metadata for the user that created the business relationship.
          allOf:
          - $ref: '#/components/schemas/BusinessAccessUserSummary'
        created_time:
          type: integer
          nullable: true
          description: The time the business relationship was created. Returned in milliseconds.
          example: 1646767577816
        id:
          type: string
          description: Unique identifier of the business member/business partner/employer.
          example: '383791336903426391'
          pattern: ^\d+$
        is_shared_partner:
          type: boolean
          description: 'This field is only relevant when business_role="PARTNER".

            <br>If is_shared_partner=FALSE, the partner can access your business assets. If assets_summary

            is not empty, the assets listed are your business assets the partner has access to.

            <br>If is_shared_partner=TRUE, you can access the partner''s business asset. If assets_summary

            is not empty, the assets listed are the partner''s business assets you have access to.'
          example: false
        user:
          type: object
          nullable: true
          description: Metadata for the business member/business partner/employer.
          allOf:
          - $ref: '#/components/schemas/BusinessAccessUserSummary'
    Error:
      title: Error
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
      required:
      - code
      - message
    BusinessAccessUserSummary:
      type: object
      description: Metadata of the member/partner that has access to the asset.
      properties:
        email:
          description: Email of the business member/partner.
          example: business0101@business.com
          type: string
          nullable: true
        id:
          description: Unique identifier of the business member/partner.
          example: '383791336903426391'
          type: string
          nullable: true
          minLength: 1
          maxLength: 20
        username:
          description: Username of the business member/partner.
          example: business0101
          nullable: true
          type: string
    Paginated:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
        bookmark:
          type: string
          nullable: true
      required:
      - items
  parameters:
    query_page_size:
      name: page_size
      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.
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 25
    query_bookmark:
      name: bookmark
      description: Cursor used to fetch the next page of items
      in: query
      required: false
      schema:
        type: string
  securitySchemes:
    pinterest_oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.pinterest.com/oauth/
          tokenUrl: https://api.pinterest.com/v5/oauth/token
          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
            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: http
      scheme: bearer
      description: This security scheme only applies to the conversion events endpoint (POST /ad_accounts/{ad_account_id}/events). This endpoint requires a bearer token generated via Ads Manager (ads.pinterest.com).
    basic:
      type: http
      scheme: basic
x-tagGroups:
- name: Pin and Boards
  tags:
  - pins
  - boards
  - media
  - aggregated_comments
  - aggregated_pin_data
  - user_account
- name: Campaign Management
  tags:
  - ad_accounts
  - campaigns
  - ad_groups
  - ads
  - product_group_promotions
  - bulk
- name: Targeting
  tags:
  - audiences
  - customer_lists
  - keywords
  - targeting_template
  - audience_insights
  - audience_sharing
- name: Ad Formats
  tags:
  - lead_forms
  - lead_ads
  - leads_export
- name: Billing
  tags:
  - billing
  - order_lines
  - terms_of_service
- name: Business Access
  tags:
  - business_access_assets
  - business_access_invite
  - business_access_relationships
- name: Conversions
  tags:
  - conversion_events
  - conversion_tags
- name: Others
  tags:
  - integrations
  - oauth
  - resources
  - search
  - terms
- name: Shopping
  tags:
  - catalogs
- name: Deprecated
  tags:
  - product_groups