openapi: 3.2.0 info: title: Campaign Build Purchase Categories API version: latest servers: - url: https://api.cardlytics.com description: Base URL declared by the provider in apis.yml (roadmap#122). security: - oauth2-cognito: - read tags: - name: PurchaseCategories paths: /v6/PurchaseCategories/{purchaseCategoryId}: get: tags: - PurchaseCategories summary: Returns a Purchase Category by its Id. parameters: - name: countryId in: query description: The ID of a country to search Purchase Category in. Defines localization for PurchaseCategory Name and Description. schema: type: integer format: int32 - name: purchaseCategoryId in: path description: The purchaseCategoryId to find. required: true schema: type: integer format: int32 responses: '200': description: The Purchase Category was found and returned in the response body. content: text/plain: schema: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' application/json: schema: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' text/json: schema: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' '308': description: CountryId was not provided. Redirecting to countryId=1 (US). '404': description: The Purchase Category was not found. content: text/plain: schema: $ref: '#/components/schemas/ProblemDetails' application/json: schema: $ref: '#/components/schemas/ProblemDetails' text/json: schema: $ref: '#/components/schemas/ProblemDetails' /v6/PurchaseCategories: get: tags: - PurchaseCategories summary: Returns all Purchase Categories from the repository. parameters: - name: PerPage in: query schema: minimum: 1 type: integer format: int32 - name: Page in: query schema: minimum: 1 type: integer format: int32 - name: countryId in: query description: The ID of a country to search Purchase Category in. Defines localization for PurchaseCategory Name and Description. schema: type: integer format: int32 responses: '200': description: The list of Purchase Categories was found and returned in the response body. content: text/plain: schema: type: array items: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' application/json: schema: type: array items: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' text/json: schema: type: array items: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' '308': description: CountryId was not provided. Redirecting to countryId=1 (US). components: schemas: GetPurchaseCategoryResourceModel: type: object properties: countryIds: type: - array - 'null' items: type: integer format: int32 subCategories: type: - array - 'null' items: $ref: '#/components/schemas/GetPurchaseCategoryResourceModel' purchaseCategoryId: type: integer format: int32 name: type: - string - 'null' description: type: - string - 'null' level: type: integer format: int32 additionalProperties: false ProblemDetails: type: object properties: type: type: - string - 'null' title: type: - string - 'null' status: type: - integer - 'null' format: int32 detail: type: - string - 'null' instance: type: - string - 'null' additionalProperties: {} securitySchemes: oauth2-cognito: type: oauth2 flows: authorizationCode: authorizationUrl: https://advertiser-auth-preprod.auth.us-east-1.amazoncognito.com/oauth2/authorize tokenUrl: https://advertiser-auth-preprod.auth.us-east-1.amazoncognito.com/oauth2/token scopes: openid: openid x-tokenName: id_token