> ## 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 more hours for your business

> This endpoint allows you to set the **More Hours** for your business.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml post /business/{business_id}/more_hours
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}/more_hours:
    post:
      tags:
        - Businesses
      summary: Set more hours for your business
      description: |
        This endpoint allows you to set the **More Hours** for your business.
      operationId: postBusinessMoreHours
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoreHoursBusinessPostBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MoreHoursBusinessPostResponse'
        '400':
          description: Wrong or missing parameters
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/MoreHoursBusinessPostInvalidCategory'
                  - $ref: '#/components/schemas/MoreHoursBusinessPostOverlappingHours'
        '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:
    MoreHoursBusinessPostBody:
      properties:
        more_hours:
          description: >-
            Array containing the more hours values to update. Grouped by More
            Hour ID. Only More Hour IDs included in the body will be updated.
          type: array
          items:
            type: object
            properties:
              gmb_id:
                description: More Hour ID for which to update hours.
                type: string
              value:
                $ref: '#/components/schemas/MoreHoursPost'
          example:
            - gmb_id: KITCHEN
              value:
                monday: []
                tuesday: []
                wednesday: []
                thursday: []
                friday: []
                saturday:
                  - 08:00-15:00
                  - 18:00-23:00
                sunday:
                  - 08:00-15:00
                  - 18:00-23:00
            - gmb_id: BRUNCH
              value: null
    MoreHoursBusinessPostResponse:
      properties:
        status:
          description: >-
            Status of the request. Should say "success" unless something
            unexpected went wrong.
          type: string
          example: success
        id:
          description: ID of the business that was just updated.
          type: string
          example: 545f7bf982efa41a496379d2
    MoreHoursBusinessPostInvalidCategory:
      properties:
        errors:
          description: Object containing all errors encountered.
          type: object
          properties:
            json:
              description: Object containing any errors related to the request JSON body.
              type: object
              properties:
                more_hours:
                  description: >-
                    Array containing any errors related to the `more_hours`
                    property in the request JSON body.
                  type: array
                  items:
                    type: string
                  example:
                    - '''foo'' is not a valid gmb_id'
    MoreHoursBusinessPostOverlappingHours:
      properties:
        errors:
          description: Object containing all errors encountered.
          type: object
          properties:
            json:
              description: Object containing any errors related to the request JSON body.
              type: object
              properties:
                more_hours:
                  description: >-
                    Object containing any errors related to the `more_hours`
                    property in the request JSON body.
                  type: object
                  properties:
                    '0':
                      description: >-
                        Each index contains the errors found at that index in
                        the array of More Hours given in the request JSON body.
                      type: object
                      properties:
                        value:
                          description: >-
                            Object that indicates value errors for each given
                            weekday.
                          type: object
                          properties:
                            saturday:
                              description: >-
                                Each weekday key indicates an error in the More
                                Hours value given for that specific weekday.
                              type: object
                              properties:
                                '0':
                                  description: >-
                                    Each index contains a string describing the
                                    errors found at that index in the array of
                                    More Hours time slots.
                                  type: string
                                  example: start time cannot be superior to end time
    MoreHoursPost:
      description: >
        The More Hours of the business and category (in its timezone).


        More hours are specified per weekday. This is done by supplying a More
        Hour ID (`BREAKFAST`, `DINNER`, etc.), and 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 kitchen hours to between
        08:00-15:00 in the afternoon and 18:00-23:00 in the evening on
        Mondays:  

        `{"gmb_id": "KITCHEN", "value": {"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"]`.


        To delete a More Hours value, supply a `null` value.
      type: object
      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'
    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
  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

````