> ## Documentation Index
> Fetch the complete documentation index at: https://developers.partoo.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List Partoo categories

> This endpoint lets you read and filter through Partoo categories.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml get /categories
openapi: 3.1.0
info:
  title: Partoo Rest API
  version: v2
  license:
    name: © Copyright Partoo
    url: https://www.partoo.co/en/gtu-api/
  x-logo:
    url: >-
      https://partoo-client-images.s3.amazonaws.com/logo-partoo-restapi-white.png
  description: >
    ## Introduction

    The Partoo Rest API allows you to automate all the actions that are possible
    to do in the Partoo Web Application.


    The Partoo Rest API can be used for many different purposes:
      - Create/update/delete your businesses & users if you are a client.
      - Create/subscribe/manage organizations, businesses & users if you are a reseller.
      - Retrieve data on businesses you have access to if you are a publisher.
      - ...
servers:
  - url: https://api.partoo.co/v2
    description: Production server
  - url: https://api.sandbox.partoo.co/v2
    description: Sandbox server (dev environment for clients & partners)
security:
  - ApiKeyAuth: []
paths:
  /categories:
    get:
      tags:
        - Categories
      summary: List Partoo categories
      description: |
        This endpoint lets you read and filter through Partoo categories.
      operationId: getCategories
      parameters:
        - $ref: '#/components/parameters/query_category_country'
        - $ref: '#/components/parameters/query_category_lang'
        - $ref: '#/components/parameters/query_category_state'
        - $ref: '#/components/parameters/query_category_block_push_long'
        - $ref: '#/components/parameters/query_category_search_query'
        - $ref: '#/components/parameters/query_category_order_by'
        - $ref: '#/components/parameters/query_category_live__isnull'
        - $ref: '#/components/parameters/query_page'
        - $ref: '#/components/parameters/query_per_page_1_100'
        - $ref: '#/components/parameters/query_category_with_names_categories'
        - $ref: '#/components/parameters/query_category_with_countries'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ListResult'
                  - type: object
                    properties:
                      categories:
                        type: array
                        description: List of categories
                        items:
                          $ref: '#/components/schemas/CategorySql'
              examples:
                with default parameters:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        live_id: null
                with_countries=true:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        countries:
                          - RU
                          - FR
                        live_id: null
                with_names=true:
                  value:
                    page: 1
                    max_page: 10
                    count: 287
                    categories:
                      - id: 4018
                        gmb_id: gcid:wood_industry
                        name: Industrie du bois
                        state: OK
                        block_push_long_description_on_gmb: false
                        names:
                          - name: Wood industry
                            lang: de
                          - name: Wood industry
                            lang: es
                        live_id: null
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
components:
  parameters:
    query_category_country:
      in: query
      name: country
      required: false
      description: >
        Filters categories available for businesses in given country.


        If no country is given, then the endpoint returns the list of all
        existing available categories.


        Use country ISO 3166 alpha2 code.
      schema:
        type: string
      example: FR
    query_category_lang:
      in: query
      name: lang
      required: false
      schema:
        $ref: '#/components/schemas/Lang'
      description: >
        Language to get the category name. If not given, the user's language is
        used.
    query_category_state:
      in: query
      name: state
      required: false
      schema:
        type: string
        enum:
          - OK
          - DEPRECATED
    query_category_block_push_long:
      in: query
      name: block_push_long_description_on_gmb
      description: >-
        Filter on `block_push_long_description_on_gmb` param (boolean indicating
        if the business long description can be pushed to Google when the
        business belongs to this category)
      required: false
      schema:
        type: boolean
    query_category_search_query:
      in: query
      name: search_query
      description: Fuzzy search on gmb_id and names translations
      required: false
      schema:
        type: string
    query_category_order_by:
      in: query
      name: order_by
      description: |
        Order results by colum. Add "-" before for ordering by descending order.
      required: false
      schema:
        type: string
        enum:
          - gmb_id
          - '-gmb_id'
          - impacted_businesses
          - '-impacted_businesses'
    query_category_live__isnull:
      in: query
      name: live__isnull
      description: |
        Filter on `live_id` parameter value

        - True: Recover categories which `live_id` is null      
        - False: Recover categories which `live_id` is not null     

        Null: Do not filter on `live_id`
      schema:
        type: boolean
    query_page:
      in: query
      name: page
      schema:
        type: integer
        default: 1
      description: |
        Page number.
        Starts at 1. Any value lower than 1 will be considered as 1.
        For the number of items per page, see the `per_page` query parameter.
    query_per_page_1_100:
      in: query
      name: per_page
      schema:
        type: integer
        default: 30
        minimum: 1
        maximum: 100
      description: Number of items to return per page. Currently limited to 100.
    query_category_with_names_categories:
      in: query
      name: with_names
      description: >
        Returns an object representing the list of translations in the available
        languages for the requested category. See example on the right.


        If `with_names` is true, the translations will appear in the field
        __names__
      required: false
      schema:
        type: boolean
        default: false
    query_category_with_countries:
      in: query
      name: with_countries
      description: >
        Returns an array of strings representing the list of country codes in
        which the requested category is available.


        If `with_countries` is true, the country list will appear in the field
        __countries__
      required: false
      schema:
        type: boolean
        default: false
  schemas:
    ListResult:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/current_page'
        max_page:
          $ref: '#/components/schemas/max_page'
        count:
          $ref: '#/components/schemas/count'
    CategorySql:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/CategorySqlId'
        gmb_id:
          $ref: '#/components/schemas/CategorySqlGmbId'
        name:
          $ref: '#/components/schemas/CategoryName'
        names:
          $ref: '#/components/schemas/CategorySqlNames'
        state:
          $ref: '#/components/schemas/CategorySqlState'
        block_push_long_description_on_gmb:
          $ref: '#/components/schemas/CategorySqlBlockPushLong'
        countries:
          $ref: '#/components/schemas/CategoryCountries'
        live_id:
          $ref: '#/components/schemas/CategorySqlLiveId'
    Lang:
      description: Available language in the application
      type: string
      enum:
        - fr
        - en
        - es
        - it
        - pt-br
        - de
        - ar
        - nl
        - pl
        - cs
        - ca
        - sk
        - pt
        - lv
        - ro
        - bg
        - hu
      example: fr
    current_page:
      type: integer
      description: Current page number
      example: 1
    max_page:
      type: integer
      description: Last page number
      example: 10
    count:
      type: integer
      description: Number of resources complying with filters
      example: 287
    CategorySqlId:
      type: integer
      description: Category id
      example: 42
    CategorySqlGmbId:
      type: string
      description: >
        Unique category id. This is the id you should pass in
        business.categories array when creating/updating a business
      example: gcid:climbing_gym
    CategoryName:
      type: string
      description: Category name in given language or user's language
      example: Cabinet d'expertise comptable
    CategorySqlNames:
      type: array
      description: |
        Category names translated for available languages

        *If `with_names` is true*
      items:
        $ref: '#/components/schemas/CategorySqlName'
    CategorySqlState:
      type: string
      description: State of category ( OK or DEPRECATED )
      example: OK
    CategorySqlBlockPushLong:
      type: boolean
      description: >-
        Boolean indicating if the business long description can be pushed to
        Google when the business belongs to this category
      example: false
    CategoryCountries:
      type: array
      items:
        type: string
      description: >
        Array of strings representing the list of country codes in which the
        category is available


        *If `with_countries` is true*
      example:
        - FR
        - GB
        - IT
        - ES
    CategorySqlLiveId:
      type:
        - string
        - 'null'
      description: >-
        Live category id to which the category is mapped (deprecated categories
        are mapped to the closest category)
      example: gcid:sport_club
    CategorySqlName:
      type: object
      properties:
        name:
          type: string
          description: Translated category name
          example: salle d'escalade
        lang:
          type: string
          description: Available language in the application
          example: FR
  responses:
    '400':
      description: Your request is incorrect
      content:
        application/json:
          schema:
            description: |
              Error that occcurs when your request is incorrect
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: object
    '401':
      description: You are not authenticated
      content:
        application/json:
          schema:
            description: Error that occurs when you are not authenticated
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authentication:
                    type: string
                    default: User not authenticated
  securitySchemes:
    ApiKeyAuth:
      description: >
        The authentication system on Partoo API is using API Key that should be
        put in the header of the request (the name of the header is `x-APIKey`).
        An api_key is linked to a user. This user's role will give you different
        access level to the API features.
      type: apiKey
      in: header
      name: x-APIKey

````