> ## 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 Place Action Links

> This endpoint enables you to manage place action links for a given business.  Create, update, or delete place action links by modifying the urls array for each gmb_id.
- Create: Include a place action link in urls without an id.
- Update: Include the given place action link in urls with an existing id.
- Delete: Omit the specific link object from urls or provide an empty urls array to remove all for the gmb_id .
For the POST method, ensure you send the complete list of desired links to retain or update per gmb_id.




## OpenAPI

````yaml /assets/openapi/openapi-bundled.yaml post /business/{business_id}/place_action_links
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}/place_action_links:
    post:
      tags:
        - Businesses
      summary: Set Place Action Links
      description: >
        This endpoint enables you to manage place action links for a given
        business.  Create, update, or delete place action links by modifying the
        urls array for each gmb_id.

        - Create: Include a place action link in urls without an id.

        - Update: Include the given place action link in urls with an existing
        id.

        - Delete: Omit the specific link object from urls or provide an empty
        urls array to remove all for the gmb_id .

        For the POST method, ensure you send the complete list of desired links
        to retain or update per gmb_id.
      operationId: postPlaceActionLink
      parameters:
        - $ref: '#/components/parameters/business_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceActionLinksPostBody'
      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/PlaceActionLinksNonExistingGmbIdsError
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueGmbIdsError'
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueUrlsError'
                  - $ref: >-
                      #/components/schemas/PlaceActionLinksMultiplePreferredUrlsError
                  - $ref: '#/components/schemas/PlaceActionLinksMissingIdsError'
                  - $ref: '#/components/schemas/PlaceActionLinksNonUniqueIdsError'
        '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:
    PlaceActionLinksPostBody:
      type: object
      properties:
        place_action_links:
          $ref: '#/components/schemas/PostPlaceActionLinks.Array'
    RequestStatus:
      description: Request status
      type: string
      enum:
        - success
    PlaceActionLinksNonExistingGmbIdsError:
      description: At least one of the attributes values in the request body is incorrect
      type: object
      properties:
        errors:
          type: object
          properties:
            non_existing_gmb_ids:
              type: array
              items:
                type: string
              description: List of `gmb_id` values that do not exist.
      example:
        errors:
          json:
            message: >-
              following gmb_ids do not exist in place_action_links:
              ['SHOPIFY_ONLINE', 'JUST_TAKEOUT']
    PlaceActionLinksNonUniqueGmbIdsError:
      description: The `gmb_id` values in the request are not unique.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: >-
                    Error message indicating that `gmb_id` values must be
                    unique.
      example:
        errors:
          json:
            message: gmb_ids must be unique
    PlaceActionLinksNonUniqueUrlsError:
      description: URL values are not unique within each `gmb_id`.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: >-
                    Error message indicating that URL values per `gmb_id` must
                    be unique.
      example:
        errors:
          json:
            message: url values per gmb_id must be unique
    PlaceActionLinksMultiplePreferredUrlsError:
      description: More than one URL is marked as preferred for a `gmb_id`.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: >-
                    Error message indicating that only one URL can be marked as
                    preferred per `gmb_id`.
      example:
        errors:
          json:
            message: only one is_preferred url at most per place_action_link
    PlaceActionLinksMissingIdsError:
      description: The `id` values in the request do not exist in the backend.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: >-
                    Error message indicating that some `id` values do not exist
                    for the business place action links.
      example:
        errors:
          json:
            message: 'place_action_link ids do not exist for business: {1, 2}'
    PlaceActionLinksNonUniqueIdsError:
      description: The `id` values in the request are not unique.
      type: object
      properties:
        errors:
          type: object
          properties:
            json:
              type: object
              properties:
                message:
                  type: string
                  description: Error message indicating that `id` values must be unique.
      example:
        errors:
          json:
            message: place_action_link ids must be unique
    PostPlaceActionLinks.Array:
      description: List of Business Place Action Links
      type: array
      items:
        type: object
        required:
          - gmb_id
          - urls
        properties:
          gmb_id:
            type: string
            description: The Google My Business ID for the place action type.
            enum:
              - APPOINTMENT
              - ONLINE_APPOINTMENT
              - DINING_RESERVATION
              - FOOD_ORDERING
              - FOOD_DELIVERY
              - FOOD_TAKEOUT
              - SHOP_ONLINE
          urls:
            type: array
            description: List of place action links associated with a given gmb_id.
            items:
              type: object
              required:
                - value
                - is_preferred
              properties:
                id:
                  type: integer
                  description: 'Optional: Include for existing links to update'
                value:
                  type: string
                  description: >-
                    Must be a valid url value and be unique within the list of
                    URLs for this gmb_id.
                is_preferred:
                  type: boolean
                  description: >-
                    Indicates if this URL is the preferred link. There can only
                    be one preferred URL per gmb_id.
      example:
        - gmb_id: SHOP_ONLINE
          urls:
            - value: https://www.example.com/shop_online
              is_preferred: true
            - id: 2
              value: https://www.example.com/shop_online2
              is_preferred: false
        - gmb_id: FOOD_TAKEOUT
          urls:
            - id: 3
              value: https://www.example.com/food_takeout1
              is_preferred: false
            - id: 4
              value: https://www.example.com/food_takeout2
              is_preferred: false
            - value: https://www.example.com/food_takeout3
              is_preferred: false
        - gmb_id: ONLINE_APPOINTMENT
          urls:
            - value: https://www.example.com/online_appointment
              is_preferred: true
            - id: 7
              value: https://www.example.com/online_appointment2
              is_preferred: false
        - gmb_id: DINING_RESERVATION
          urls:
            - id: 8
              value: https://www.example.com/dining_reservation1
              is_preferred: true
            - id: 9
              value: https://www.example.com/dining_reservation2
              is_preferred: false
        - gmb_id: APPOINTMENT
          urls:
            - value: https://www.example.com/appointment1
              is_preferred: true
            - id: 11
              value: https://www.example.com/appointment2
              is_preferred: false
        - gmb_id: FOOD_ORDERING
          urls:
            - value: https://www.example.com/food_ordering1
              is_preferred: true
            - id: 13
              value: https://www.example.com/food_ordering2
              is_preferred: false
        - gmb_id: FOOD_DELIVERY
          urls:
            - id: 14
              value: https://www.example.com/food_delivery1
              is_preferred: true
            - value: https://www.example.com/food_delivery2
              is_preferred: false
  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

````