openapi: 3.1.0
info:
  title: 'Admin Management: Customer Segmentation'
  version: 1.0.0
paths:
  /stores/{store_hash}/v3/segments:
    get:
      operationId: GetPaginatedSegmentsList
      summary: List Segments
      description: Returns a paginated *Segments List*.
      tags:
        - segments
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Page number.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Items count per page.
          required: false
          schema:
            type: integer
        - name: id:in
          in: query
          description: |
            Comma separated IDs.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentCollectionResponse'
    post:
      operationId: SegmentsPostRequest
      summary: Create Segments
      description: |
        Creates *Segments*.

        **Limits**
        * Limit of 10 concurrent requests.
        * Max total segements allowed per store is 1000.
      tags:
        - segments
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: '| An array of created *Segments*.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentsResponse'
        '400':
          description: >
            The *Segment* was not valid. This is the result of either missing required fields, or because of invalid
            data. See the response for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentsPostRequestRequestConflictError'
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentsPostRequest'
    put:
      operationId: PutSegmentObjects
      summary: Update Segments
      description: |
        Updates *Segments*.

         **Limits**
         * Limit of 10 concurrent requests.
      tags:
        - segments
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: |
            An array of created *Segments*.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentsResponse'
        '400':
          description: >
            The *Segment* was not valid. This is the result of either missing required fields, or because of invalid
            data. See the response for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SegmentsPutRequest'
    delete:
      operationId: DeleteStoreSegment
      summary: Delete Segments
      description: |
        Deletes one or more *Segments* from a store. This will not delete any associated *Shopper Profiles*.
      tags:
        - segments
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: id:in
          in: query
          description: |
            Comma separated IDs.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '204':
          description: |
            An empty response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
  /stores/{store_hash}/v3/shopper-profiles/{shopperProfileId}/segments:
    get:
      operationId: GetListShopperProfile
      summary: List Segments for Shopper Profile
      description: Returns a paginated *Segments* list for a *Shopper Profile*.
      tags:
        - segmentsForAShopperProfile
      parameters:
        - name: shopperProfileId
          in: path
          description: The *Shopper Profile* ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Page number.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Items count per page.
          required: false
          schema:
            type: integer
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: |
            An array of *Segments* objects and metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SegmentCollectionResponse'
  /stores/{store_hash}/v3/shopper-profiles:
    get:
      operationId: GetShopperList
      summary: List Shopper Profiles
      description: |
        Returns a paginated *Shopper Profiles* list.
      tags:
        - shopperProfiles
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Page number.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Items count per page.
          required: false
          schema:
            type: integer
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: |
            An array of *Shopper Profiles* objects and metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopperProfilesCollectionResponse'
    post:
      operationId: ShopperProfilesRequest
      summary: Create Shopper Profiles
      description: |
        Creates a *Shopper Profile*.
      tags:
        - shopperProfiles
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: |
            An array of created *Shopper Profiles*.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopperProfilesResponse'
        '400':
          description: >
            The *Segment* was not valid. This is the result of either missing required fields, or because of invalid
            data. See the response for more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopperProfilesPostRequest'
    delete:
      operationId: DeleteStoreShopperProfile
      summary: Delete Shopper Profiles
      description: |
        Deletes one or more *Shopper Profiles* from a store.
      tags:
        - shopperProfiles
      parameters:
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: id:in
          in: query
          description: |
            Comma separated IDs.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '204':
          description: |
            An empty response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
  /stores/{store_hash}/v3/segments/{segmentId}/shopper-profiles:
    get:
      operationId: GetSegmentProfiles
      summary: List Shopper Profiles in Segment
      description: |
        Returns a list of *Shopper Profiles* that are associated with a given *Segment*.

        **NOTE**: The `modify` Customers OAuth scope is a requirement for this endpoint.
      tags:
        - shopperProfilesForASegment
      parameters:
        - name: segmentId
          in: path
          description: The *Segment* ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: |
            Page number.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Items count per page.
          required: false
          schema:
            type: integer
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '200':
          description: |
            An array of *Shopper Profiles* objects and metadata.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopperProfilesGetResponse'
    post:
      operationId: PostShopperProfile
      summary: Add Shopper Profiles to Segment
      description: |-
        Add *Shopper Profiles* to a specific *Segment*.

        **Limits**
        * Limit of *Shopper Profiles* per request is `50`.
        * Limit of 10 concurrent requests.
      tags:
        - shopperProfilesForASegment
      parameters:
        - name: segmentId
          in: path
          description: The *Segment* ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '201':
          description: An array of *Shopper Profiles* added to a *Segment*.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopperProfilesAddResponse'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostShopperProfileRequestConflictError'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopperProfilesAddRequest'
    delete:
      operationId: DeleteShopperProfile
      summary: Remove Shopper Profiles from Segment
      description: >
        Remove one or more *Shopper Profiles* that are associated with a *Segment*. This operation only removes the
        association; it doesn't delete the *Shopper Profiles*.
      tags:
        - shopperProfilesForASegment
      parameters:
        - name: segmentId
          in: path
          description: The *Segment* ID.
          required: true
          schema:
            type: string
            format: uuid
        - name: store_hash
          in: path
          description: Permanent ID of the BigCommerce store.
          required: true
          schema:
            type: string
        - name: id:in
          in: query
          description: |
            Comma separated IDs.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: X-Auth-Token
          in: header
          description: >-
            ### OAuth scopes

            | UI Name | Permission | Parameter |

            |:--------|:-----------|:----------|

            | Customers | modify | `store_v2_customers` |

            | Customers | read-only | `store_v2_customers_read_only` |


            **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
            Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
            endpoint which requires modify permission.


            ### Authentication header


            | Header | Argument | Description |

            |:-------|:---------|:------------|

            | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API
            Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


            ### Further reading


            For example requests and more information about authenticating BigCommerce APIs, see [Authentication and
            Example
            Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


            For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
            Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


            For a list of API status codes, see [API Status
            Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
          required: true
          schema:
            type: string
        - name: Accept
          in: header
          description: >-
            The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response
            body.
          required: true
          schema:
            type: string
            default: application/json
      responses:
        '204':
          description: |
            An empty response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
servers:
  - url: https://api.bigcommerce.com
    description: https://api.bigcommerce.com
components:
  schemas:
    Segment:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: |
            The ID of the segment.
        name:
          type: string
          description: |
            The name of the segment.
        description:
          type: string
          description: |
            The description of the segment.
        created_at:
          type: string
          format: date-time
          description: |
            The date of which the segment was created.
        updated_at:
          type: string
          format: date-time
          description: |
            The date of which the segment was updated.
      title: Segment
    Pagination:
      type: object
      properties:
        total:
          type: integer
          description: |
            Total number of items in the result set.
        count:
          type: integer
          description: |
            Total number of items in the collection response.
        per_page:
          type: integer
          description: |
            The amount of items returned in the collection per page, controlled by the limit parameter.
        current_page:
          type: integer
          description: |
            The page you are currently on within the collection.
        total_pages:
          type: integer
          description: |
            The total number of pages in the collection.
      description: |
        Data about the response including pagination, and collection totals.
      title: Pagination
    CollectionMeta:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
      description: |
        Data about the response including pagination, and collection totals.
      title: CollectionMeta
    SegmentCollectionResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Segment'
        meta:
          $ref: '#/components/schemas/CollectionMeta'
      description: |
        Response payload for the BigCommerce API.
      title: SegmentCollectionResponse
    SegmentPost:
      type: object
      properties:
        name:
          type: string
          description: Name of the segment
        description:
          type: string
          description: Description of the segment
      required:
        - name
      title: SegmentPost
    SegmentsPostRequest:
      type: array
      items:
        $ref: '#/components/schemas/SegmentPost'
      description: |
        Request payload for the BigCommerce API.
      title: SegmentsPostRequest
    SegmentsResponseMeta:
      type: object
      properties: {}
      title: SegmentsResponseMeta
    SegmentsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Segment'
        meta:
          $ref: '#/components/schemas/SegmentsResponseMeta'
      description: |
        Response payload for the BigCommerce API.
      title: SegmentsResponse
    DetailedErrors:
      type: object
      properties: {}
      title: DetailedErrors
    ErrorResponse:
      type: object
      properties:
        status:
          type: integer
          description: |
            The HTTP status code.
        title:
          type: string
          description: |
            The error title describing the particular error.
        type:
          type: string
        instance:
          type: string
        errors:
          $ref: '#/components/schemas/DetailedErrors'
      description: |
        Error payload for the BigCommerce API.
      title: ErrorResponse
    SegmentsPostResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties: {}
      title: SegmentsPostResponsesContentApplicationJsonSchemaDataItems
    SegmentsPostResponsesContentApplicationJsonSchemaErrorsItemsErrors:
      type: object
      properties: {}
      title: SegmentsPostResponsesContentApplicationJsonSchemaErrorsItemsErrors
    SegmentsPostResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        status:
          type: number
          format: double
        title:
          type: string
        type:
          type: string
        errors:
          $ref: '#/components/schemas/SegmentsPostResponsesContentApplicationJsonSchemaErrorsItemsErrors'
      required:
        - status
      title: SegmentsPostResponsesContentApplicationJsonSchemaErrorsItems
    SegmentsPostResponsesContentApplicationJsonSchemaMeta:
      type: object
      properties:
        total:
          type: number
          format: double
        success:
          type: number
          format: double
        failed:
          type: number
          format: double
      title: SegmentsPostResponsesContentApplicationJsonSchemaMeta
    SegmentsPostRequestRequestConflictError:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SegmentsPostResponsesContentApplicationJsonSchemaDataItems'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SegmentsPostResponsesContentApplicationJsonSchemaErrorsItems'
        meta:
          $ref: '#/components/schemas/SegmentsPostResponsesContentApplicationJsonSchemaMeta'
      required:
        - data
        - errors
        - meta
      title: SegmentsPostRequestRequestConflictError
    SegmentPut:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID of the segment.
        name:
          type: string
          description: Name of the segment.
        description:
          type: string
          description: Description of the segment.
      required:
        - id
      title: SegmentPut
    SegmentsPutRequest:
      type: array
      items:
        $ref: '#/components/schemas/SegmentPut'
      description: |
        Request payload for the BigCommerce API.
      title: SegmentsPutRequest
    ShopperProfile:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: |
            The ID of the *Shopper Profile*.
        customer_id:
          type: integer
          description: |
            The ID of the registered *Customer* associated with this *Shopper Profile*.
        created_at:
          type: string
          format: date-time
          description: |
            The date and time when the *Shopper Profile* was created.
        updated_at:
          type: string
          format: date-time
          description: |
            The date and time when the *Shopper Profile* was last updated.
      title: ShopperProfile
    ShopperProfilesCollectionResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShopperProfile'
        meta:
          $ref: '#/components/schemas/CollectionMeta'
      description: |
        Response payload for the BigCommerce API.
      title: ShopperProfilesCollectionResponse
    ShopperProfilePost:
      type: object
      properties:
        customer_id:
          type: number
          format: double
          description: The ID of a registered Customer to associate with the new *Shopper Profile*.
      title: ShopperProfilePost
    ShopperProfilesPostRequest:
      type: array
      items:
        $ref: '#/components/schemas/ShopperProfilePost'
      description: |
        Request payload for the BigCommerce API.
      title: ShopperProfilesPostRequest
    ShopperProfilesResponseMeta:
      type: object
      properties: {}
      title: ShopperProfilesResponseMeta
    ShopperProfilesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShopperProfile'
        meta:
          $ref: '#/components/schemas/ShopperProfilesResponseMeta'
      description: |
        Response payload for the BigCommerce API.
      title: ShopperProfilesResponse
    ShopperProfilesGetResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShopperProfile'
        meta:
          $ref: '#/components/schemas/CollectionMeta'
      title: ShopperProfilesGetResponse
    ShopperProfilesAddRequest:
      type: array
      items:
        type: string
        format: uuid
      description: A list of *Shopper Profiles* to associate with the segment.
      title: ShopperProfilesAddRequest
    ShopperProfilesAddResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ShopperProfile'
      title: ShopperProfilesAddResponse
    SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties: {}
      title: SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaDataItems
    SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItemsErrors:
      type: object
      properties:
        '0':
          type: string
      title: SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItemsErrors
    SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItems:
      type: object
      properties:
        status:
          type: number
          format: double
        title:
          type: string
        type:
          type: string
        errors:
          $ref: >-
            #/components/schemas/SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItemsErrors
      title: SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItems
    SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaMeta:
      type: object
      properties:
        total:
          type: number
          format: double
        success:
          type: number
          format: double
        failed:
          type: number
          format: double
      required:
        - total
        - success
        - failed
      title: SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaMeta
    PostShopperProfileRequestConflictError:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaDataItems'
        errors:
          type: array
          items:
            $ref: '#/components/schemas/SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaErrorsItems'
        meta:
          $ref: '#/components/schemas/SegmentsSegmentIdShopperProfilesPostResponsesContentApplicationJsonSchemaMeta'
      required:
        - data
        - errors
        - meta
      title: PostShopperProfileRequestConflictError
  securitySchemes:
    X-Auth-Token:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        ### OAuth scopes

        | UI Name | Permission | Parameter |

        |:--------|:-----------|:----------|

        | Customers | modify | `store_v2_customers` |

        | Customers | read-only | `store_v2_customers_read_only` |


        **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a
        Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles)
        endpoint which requires modify permission.


        ### Authentication header


        | Header | Argument | Description |

        |:-------|:---------|:------------|

        | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts
        and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts). |


        ### Further reading


        For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example
        Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests).


        For more about BigCommerce OAuth scopes, see [API Accounts and OAuth
        Scopes](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes).


        For a list of API status codes, see [API Status
        Codes](/developer/api-reference/rest/overview#rest-http-status-codes).
