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

# Update business

> This endpoint lets you access to the information of a business. You need to have `WRITE` access on this business. Only indicated values are taken into account (it works like a `PATCH`). You cannot push fields disabled for your org.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml post /business/{business_id}
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}:
    post:
      tags:
        - Businesses
      summary: Update business
      description: >
        This endpoint lets you access to the information of a business. You need
        to have `WRITE` access on this business. Only indicated values are taken
        into account (it works like a `PATCH`). You cannot push fields disabled
        for your org.
      operationId: updateBusiness
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: Request object
              type: object
              properties:
                name:
                  $ref: '#/components/schemas/BusinessName'
                org_id:
                  $ref: '#/components/schemas/BusinessCreateUpdateOrgId'
                groups:
                  $ref: '#/components/schemas/groups'
                country:
                  $ref: '#/components/schemas/BusinessCountry'
                zipcode:
                  $ref: '#/components/schemas/BusinessZipcode'
                city:
                  $ref: '#/components/schemas/BusinessCity'
                region:
                  $ref: '#/components/schemas/BusinessRegion'
                categories:
                  $ref: '#/components/schemas/BusinessCategories'
                code:
                  $ref: '#/components/schemas/BusinessCode'
                status:
                  $ref: '#/components/schemas/BusinessStatus'
                opening_date:
                  $ref: '#/components/schemas/BusinessOpeningDate'
                address2:
                  description: Row address string
                  type: string
                address_full:
                  $ref: '#/components/schemas/AddressFull'
                lat:
                  $ref: '#/components/schemas/BusinessLatitude'
                long:
                  $ref: '#/components/schemas/BusinessLongitude'
                website_url:
                  $ref: '#/components/schemas/BusinessWebsite'
                facebook_url:
                  $ref: '#/components/schemas/BusinessFacebookPage'
                twitter_url:
                  $ref: '#/components/schemas/BusinessTwitter'
                description_short:
                  $ref: '#/components/schemas/BusinessShortDescription'
                description_long:
                  $ref: '#/components/schemas/BusinessLongDescription'
                open_hours:
                  $ref: '#/components/schemas/OpenHours'
                specific_hours:
                  $ref: '#/components/schemas/SpecificHours'
                contacts:
                  $ref: '#/components/schemas/BusinessContacts'
                photos:
                  $ref: '#/components/schemas/Photos'
                national_identification_number:
                  $ref: '#/components/schemas/BusinessNationalIdentificationNumber'
                custom_fields:
                  $ref: '#/components/schemas/CustomFields.Update'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    $ref: '#/components/schemas/RequestStatus'
                  id:
                    $ref: '#/components/schemas/BusinessId'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '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:
                        additionalProperties:
                          type: string
                          default: Operation not allowed
              example:
                errors:
                  authorization:
                    name: edit_not_allowed
                    open_hours: edit_not_allowed
                    photos.primary: edit_not_allowed
                    photos.secondary: edit_not_allowed
        '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:
    BusinessName:
      description: >-
        The name of the business (POI) as it will appear on the publishing
        platforms
      type: string
      minLength: 1
      example: Corner shop
    BusinessCreateUpdateOrgId:
      description: >
        Unique identifier of the organization to which the business should
        belong. Only `PROVIDER` users can set this field. If no `org_id` is
        given, this will default to the ID of your organization.
      type: integer
      example: 42
    groups:
      description: >
        List of Group ID of the business.


        Groups the business belongs to.


        See [the Groups and Sections
        description](/guides/api/resources/organizations/groups)
      type: array
      items:
        type: integer
      example:
        - 1
        - 2
        - 3
    BusinessCountry:
      description: >-
        Business country - In the ISO 3166 alpha2 code format (i.e. use “FR” for
        France instead of "fr")
      type: string
      example: FR
    BusinessZipcode:
      description: >-
        Zipcode (or postal code) for the business address. Can be empty if the
        business' country does not require one.
      type:
        - string
        - 'null'
      example: '75019'
    BusinessCity:
      description: The city where the business is located
      type:
        - string
        - 'null'
      example: Paris
    BusinessRegion:
      description: >-
        The region where the business is located. Can be empty, it is only
        useful for some countries like Italy or Spain among others.
      type:
        - string
        - 'null'
      example: Ile-de-France
    BusinessCategories:
      minItems: 1
      description: >
        A list of category ids mapped to the business. At least one category
        needs to be provided. For more information see [Categories
        section](/api-reference/categories/)
      type: array
      items:
        type: string
      example:
        - gcid:restaurant
        - gcid:fast_food_restaurant
        - gcid:hamburger_restaurant
    BusinessCode:
      description: >-
        The unique store code of the business. If not provided, it will be
        automatically generated
      type: string
      example: CS-75019
    BusinessStatus:
      description: >
        Defines the current status of the business. `open` indicates the
        business is up and running. `closed` means that the business has
        definitely closed. `closed_temporarily` means that the business is
        temporarily closed, it is advised when your business is closed for more
        than one week, otherwise use the `specific_hours`
      type: string
      enum:
        - open
        - closed
        - closed_temporarily
      default: open
      example: open
    BusinessOpeningDate:
      description: >-
        The opening_date represents the date when a business was opened. The
        format of the date must be in ISO 8601 format (YYYY-MM-DD). ⚠️ The date
        must be in the past or no more than one year in the future from the
        current date (Google API requirement).
      type: string
      format: YYYY-MM-DD
      example: '2025-01-01'
    AddressFull:
      description: |
        Full address of the business.

        For example : `130 Rue du Mont-Cenis`.
      type:
        - string
        - 'null'
      example: 12 bis rue du coquelicot
    BusinessLatitude:
      description: Latitude. Decimals are separated by a dot and not by a comma.
      type: number
      format: double
      example: -3.585993
    BusinessLongitude:
      description: Longitude. Decimals are separated by a dot and not by a comma.
      type: number
      format: double
      example: 47.870341
    BusinessWebsite:
      description: The business own website url or the main url of the company.
      type: string
      format: uri
      example: https://www.corner-shop.co/
    BusinessFacebookPage:
      description: Business Facebook page url
      type: string
      format: uri
      example: https://www.facebook.com/the-corner-shop
    BusinessTwitter:
      description: Business twitter page url
      type: string
      format: uri
      example: https://www.twitter.com/the-corner-shop
    BusinessShortDescription:
      description: |
        A short description of the business.    

        ⚠️ It is limited to 80 characters
      type: string
      example: lorem ipsum
    BusinessLongDescription:
      description: |
        A more detailed description of the business.    

        ⚠️ It is limited to 750 characters
      type: string
      example: lorem ipsum dolor sit amet
    OpenHours:
      description: >
        The opening hours of the business (in its timezone).


        Opening hours are specified per weekday. This is done by supplying an
        object mapping weekdays ("monday", "tuesday", etc.) to a list of
        strings. These strings in turn represent time slots during which the
        business is open.


        For example, the following value would set the opening hours to between
        08:00-15:00 in the afternoon and 18:00-23:00 in the evening on
        Mondays:  

        `{"monday": ["08:00-15:00", "18:00-23:00"]}`


        To indicate that a business is open 24 hours for a specific weekday, use
        the value `["00:00-23:59"]`.


        ❗ This field is not mandatory, but if not provided then the business
        will not be pushed on some platforms (example: Google).  

        If provided, then a schedule needs to be sent for each day in
        particular.
      type: object
      required:
        - monday
        - tuesday
        - wednesday
        - thursday
        - friday
        - saturday
        - sunday
      properties:
        monday:
          $ref: '#/components/schemas/Day'
        tuesday:
          $ref: '#/components/schemas/Day'
        wednesday:
          $ref: '#/components/schemas/Day'
        thursday:
          $ref: '#/components/schemas/Day'
        friday:
          $ref: '#/components/schemas/Day'
        saturday:
          $ref: '#/components/schemas/Day'
        sunday:
          $ref: '#/components/schemas/Day'
    SpecificHours:
      description: >
        Exceptional opening or closing times for the business (in its timezone).


        All exceptional days of the year, including temporarily closed, can be
        specified beforehand or on the go. For example:


        - Beforehand: bank holidays (like Christmas or Labor Day)  

        - Unpredicted: COVID-19 exceptional situation


        Specific hours are defined by two values:


        - `open`, containing a list of days with exceptional *opening* hours  

        - `close`, containing a list of days where the business is exceptionally
        closed all day


        These values in turn contain:


        - `starts_at` indicating the first date for which the exceptional hours
        are valid  

        - `ends_at` indicating the last date (inclusive) for which the
        exceptional hours are valid  

        - `open_hours` (only used for days with exceptional *opening* hours)
        indicating the actual time slots for the given period, following the
        same pattern as the time slots in `open_hours`
      type: object
      required:
        - open
        - close
      properties:
        open:
          type: array
          items:
            type: object
            properties:
              starts_at:
                type: string
                pattern: date
                example: '2020-01-20'
              ends_at:
                type: string
                pattern: date
                example: '2020-01-20'
              open_hours:
                type: array
                items:
                  $ref: '#/components/schemas/TimeWindow'
        close:
          type: array
          items:
            type: object
            properties:
              starts_at:
                type: string
                pattern: date
                example: '2020-01-20'
              ends_at:
                type: string
                pattern: date
                example: '2020-01-22'
    BusinessContacts:
      description: >-
        Specify how the clients can reach the persons in charge of the business
        in case they have questions.
      type: array
      items:
        $ref: '#/components/schemas/Contact'
    Photos:
      description: |
        Business photos   

        Each business can have one or more photos associated
      type: object
      properties:
        LOGO:
          description: >-
            The logo image of the brand. On Google, for example, for businesses
            that have their basic information (phone number, hours, etc.), the
            Business Profile will highlight the logo.
          type: string
          format: uri
        primary:
          description: >-
            The business's main photo URL. On Google, for example, it represents
            the cover photo on the top of the profile.
          type: string
          format: uri
        secondary:
          description: Additional photos that can highlight the features of the business.
          type: array
          items:
            type: string
            format: uri
    BusinessNationalIdentificationNumber:
      description: >
        The National Identification Number of the business.


        It describes a unique number for which the business is registered in a
        specific country.  

        For example, in France, it's the SIRET code, or for Ireland, it's the
        CRO.
      type: string
    CustomFields.Update:
      description: >
        Custom Fields set for this Business   


        They represent configurable fields that can be defined in addition to
        the normal business fields proposed by Partoo.    


        They are unique to the organization and should suit your company needs.
      type: object
      additionalProperties:
        description: >
          Replace `<custom_fields_name>` with the name of the custom field to
          update.   The value must comply with the custom field type.

          Set to NULL to empty the field.
      example:
        Parking: true
        ManagerName: toto
        Surface: 35
        DistanceFromSubway: 1.5
        Level: one
        Services:
          - DisabledAccess
          - FreeParking
        BannerImage:
          - image 1
          - image 2
        TeamMembers:
          - url: image1
            texts:
              name1: value 1
              name2: value 2
    RequestStatus:
      description: Request status
      type: string
      enum:
        - success
    BusinessId:
      description: Business id
      type: string
      example: 5409c35a97bbc544d8e26737
    Day:
      description: >-
        Open in the morning and in the evening `[10:00-14:00, 18:00-00:00]`.
        Closed the whole day `[]`
      type: array
      items:
        $ref: '#/components/schemas/TimeWindow'
      example:
        - 10:00-14:00
    TimeWindow:
      description: Time window
      type: string
      pattern: ^([0-1][0-9]|2[0-3]):([0-5][0-9])-([0-1][0-9]|2[0-3]):([0-5][0-9])$
      example: 10:00-14:00
    Contact:
      description: Business contact
      type: object
      properties:
        name:
          description: Contact full name
          type: string
          example: Hubert Bonisseur de la Bath
        email:
          description: Contact email
          type: string
          format: email
          example: hubert@oss117.fr
        phone_numbers:
          description: >-
            Contact phone numbers - Preferably in the format E.164
            ('+33302060628' instead of '0302060628')
          type: array
          items:
            type: string
          example:
            - '+33302060628'
        fax:
          description: Contact fax
          type: string
          example: '+33302060629'
  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
    '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

````