> ## 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.

# Set Google attributes for your business

> This endpoint allows you to set **Google attributes** for your business.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml post /business/{business_id}/attributes
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:
  /business/{business_id}/attributes:
    post:
      tags:
        - Businesses
      summary: Set Google attributes for your business
      description: |
        This endpoint allows you to set **Google attributes** for your business.
      operationId: postBusinessAttributes
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BusinessPostAttributesBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
        '400':
          description: Wrong request Body
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/BusinessPostWrongAttributesValuesError
                  - $ref: '#/components/schemas/BusinessPostUnknownAttributesError'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
components:
  parameters:
    business_id:
      in: path
      name: business_id
      required: true
      schema:
        type: string
      description: >
        Business id.      


        It may be replaced by `c-{code}` where code is the store code, which
        should be unique per organization. This can be used only for
        `ORG_ADMIN`, `GROUP_MANAGER` and `BUSINESS_MANAGER` users.
  schemas:
    BusinessPostAttributesBody:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/PostAttributes.Array'
    RequestStatus:
      description: Request status
      type: string
      enum:
        - success
    BusinessPostWrongAttributesValuesError:
      description: At least one of the attributes values in the request body is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
      example:
        errors:
          json:
            wi_fi: must be a string
            has_curbside_pickup: must be a bool
            url_reservations: must be a list
            url_menu: must be a valid url
            pay_credit_card_types_accepted: must contain set_values and unset_values
    BusinessPostUnknownAttributesError:
      description: >-
        At least one of the attributes in the request body does not exist in our
        Database
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
      example:
        errors:
          json:
            unknown_attribute: does not exist in DB
    PostAttributes.Array:
      description: List of Business Attributes
      type: array
      items:
        anyOf:
          - $ref: '#/components/schemas/Attributes.Field.BOOL'
            title: Boolean
          - $ref: '#/components/schemas/Attributes.Field.ENUM'
            title: Enum
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            title: Repeatable Enum
          - $ref: '#/components/schemas/Attributes.Field.URL'
            title: URL
          - $ref: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
            title: Repeatable URL
        discriminator:
          propertyName: type
          mapping:
            BOOL:
              $ref: '#/components/schemas/Attributes.Field.BOOL'
            ENUM:
              $ref: '#/components/schemas/Attributes.Field.ENUM'
            REPEATABLE_ENUM:
              $ref: '#/components/schemas/Attributes.Field.REPEATABLE_ENUM'
            URL:
              $ref: '#/components/schemas/Attributes.Field.URL'
            REPEATABLE_URL:
              $ref: '#/components/schemas/Attributes.Field.REPEATABLE_URL'
      example:
        - type: BOOL
          gmb_id: has_curbside_pickup
          value: false
        - type: ENUM
          gmb_id: wi_fi
          value: free_wi_fi
        - type: REPEATABLE_ENUM
          gmb_id: pay_credit_card_types_accepted
          value:
            set_values:
              - american_express
              - discover
            unset_values: []
        - type: URL
          gmb_id: url_menu
          value: https://www.test.fr
        - type: REPEATABLE_URL
          gmb_id: url_reservations
          value:
            - https://www.test1.fr
            - https://www.test2.fr
    Attributes.Field.BOOL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - boolean
                - 'null'
    Attributes.Field.ENUM:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - string
                - 'null'
    Attributes.Field.REPEATABLE_ENUM:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              type:
                - object
                - 'null'
              description: |
                Value for this Attribute. Can be null if not set
              properties:
                set_values:
                  type: array
                  description: |
                    Options which are true for the Attribute. Can be empty.
                  items:
                    type: string
                unset_values:
                  type: array
                  description: |
                    Options which are false for the Attributes. Can be empty
                  items:
                    type: string
    Attributes.Field.URL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - string
                - 'null'
    Attributes.Field.REPEATABLE_URL:
      allOf:
        - $ref: '#/components/schemas/Attributes.Field.Base'
        - properties:
            value:
              description: |
                Value for this Attribute. Can be null if not set
              type:
                - array
                - 'null'
              items:
                type: string
              deprecated: true
    Attributes.Field.Base:
      description: A Google Attribute
      type: object
      properties:
        gmb_id:
          description: Google id of the attribute
          type: string
        type:
          description: >-
            Possible values are "BOOL", "ENUM", "REPEATABLE_ENUM", "URL",
            "REPEATABLE_URL".
          type: string
  responses:
    '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
    '403':
      description: |
        You are not allowed to perform this action
      content:
        application/json:
          schema:
            description: >
              Error that occurs when you are authenticated but you are trying to
              perform an action you are not allowed to perform
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  authorization:
                    type: string
                    default: Operation not allowed
    '404':
      description: Resource does not exist
      content:
        application/json:
          schema:
            description: >-
              Error that occcurs when you are trying to reach a resource that
              does not exist
            type: object
            properties:
              errors:
                type: object
                description: The detail of the error encountered
                properties:
                  json:
                    type: string
                    default: Resource not found
  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

````