openapi: 3.2.0 info: title: Firstpromoter Asset Categories API version: '1.0' description: 'Operations tagged Asset Categories across 2 of this provider''s published API definitions: firstpromoter-v2-affiliate-assets-openapi.yml, firstpromoter-v2-asset-categories-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.firstpromoter.com/api/v2/affiliate - url: https://api.firstpromoter.com/api/v2/company security: - BearerAuth: [] tags: - name: Asset Categories paths: /asset_categories: get: summary: Get available asset categories description: "Returns all asset categories \n **HTTP Request**
` GET https://api.firstpromoter.com/api/v2/affiliate/asset_categories`
" parameters: - $ref: '#/components/parameters/AccountId' responses: '200': description: Successful operation '401': description: Unauthorized tags: - Asset Categories servers: - url: https://api.firstpromoter.com/api/v2/affiliate /assets/categories: get: summary: Get available asset categories description: "Get all available asset categories \n **HTTP Request**
`GET https://api.firstpromoter.com/api/v2/company/assets/categories`
" tags: - Asset Categories responses: '200': description: Successfully retrieved asset categories content: application/json: schema: type: array items: $ref: '#/components/schemas/AssetCategory' '401': description: Unauthorized put: summary: Update asset categories tags: - Asset Categories description: "Update asset categories. \n **HTTP Request**
`PUT https://api.firstpromoter.com/api/v2/company/assets/categories`
" requestBody: required: true content: application/json: schema: type: object properties: asset_categories: type: array description: Array of asset categories to be created, updated or deleted items: type: object required: - name - position properties: id: type: integer description: ID of the asset category to be updated or deleted name: type: string description: Name of the asset category position: type: integer description: Position of the asset category _destroy: type: boolean description: Flag to destroy the asset category, if set to true and id is present responses: '200': description: Successfully updated asset categories content: application/json: schema: type: array items: $ref: '#/components/schemas/AssetCategory' '401': description: Unauthorized servers: - url: https://api.firstpromoter.com/api/v2/company components: parameters: AccountId: name: Account-ID in: header required: true description: Account identifier that specifies which account is making the request schema: type: string example: acc_123456 schemas: AssetCategory: type: object properties: id: type: integer description: Asset category ID name: type: string description: Name of the asset category position: type: integer description: Position/order of the asset category created_at: type: string format: date-time description: Creation timestamp updated_at: type: string format: date-time description: Last update timestamp required: - name - position securitySchemes: BearerAuth: type: http scheme: bearer description: Access token passed as a Bearer token in the Authorization header accountId: type: apiKey in: header name: ACCOUNT-ID description: Account ID required with bearer token x-refined-from: - firstpromoter-v2-affiliate-assets-openapi.yml - firstpromoter-v2-asset-categories-openapi.yml