> ## Documentation Index
> Fetch the complete documentation index at: https://developers.bspk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Slices

> List slices



## OpenAPI

````yaml get /api/extraction/v1/slices
openapi: 3.0.3
info:
  title: EXTRACTION API V1
  version: 1.0.0
  contact:
    name: BSPK API Support
    email: bspk-support@bspk.com
  description: >-

    # Introduction


    The BSPK RESTful JSON API gives you access to your company's BSPK data.

    For all BSPK API related questions please email: *bspk-support@bspk.com*



    ### Authentication


    BSPK uses Token-Based API Authentication. API keys can be managed from the
    API Keys section in your admin interface. All unauthenticated requests will
    return an HTTP 401 response.


    **Important:**  Developers with BSPK API keys will be granted full access to
    the data in each endpoint. Access to this data is binary: everything or
    nothing.


    **Authorization header**

    Your  `Authorization`  header should be in the following format:

    ```

    Authorization: Bearer [API_KEY]

    ```



    ### Filter params


    `client_ids`: Accept multiple ids in a comma separated way, eg.:
    `client_ids=CLI1,CLI2` and can't be combined with `sales_associate_ids`
    filter param.
      Example: To filter messages by Sales Associates CL1 and CL2 you should do `https://api.bspk.com/api/extraction/v1/messages?client_ids=CLI1,CLI2`.

    `sales_associate_ids`: Accept multiple ids in a comma separated way, eg.:
    `sales_associate_ids=SA1,SA2` and can't be combined with `client_ids` filter
    param.
      Example: To filter messages by Sales Associates SA1 and SA2 you should do `https://api.bspk.com/api/extraction/v1/messages?sales_associate_ids=SA1,SA2`.

    `from`: Accepts date-time value (YYYY-MM-DDTHH:MM:SS) to filter records
    created after the specified value (boundaries included).
      Example: To filter messages by a Sales Associate from July 16, 2020 till the present date you should do `https://api.bspk.com/api/extraction/v1/messages?sales_associate_ids=SA1&from=2020-07-16T00:00:00`.

    `to`: Accepts date-time value (YYYY-MM-DDTHH:MM:SS) to filter records
    created before the specified value (boundaries included).
      Example: To filter messages by a Sales Associate since the begining till July 16, 2020 (inclusive) you should do `https://api.bspk.com/api/extraction/v1/messages?sales_associate_ids=SA1&from=2020-07-16T23:59:59`.

    `page`: Accepts a page number to filter records, defaults to `1`.
      Example: To return the second page of messages created you should do `https://api.bspk.com/api/v1/messages?page=2`.

    `per_page`: Accepts a number of records per page to filter records, defaults
    to `100` (maximum of `1000`).
      Example: To return the `30` messages per page you should do `https://api.bspk.com/api/extraction/v1/messages?per_page=30`.

    ### Pagination information


    We basically expose the pagination information all via header attributes, as
    follows:


    - Information about the total records the query will return in total (all
    pages) you can find the attribute `x-total-count` in the header.


    - Information about pagination is provided in the [Link
    header](https://datatracker.ietf.org/doc/html/rfc5988) of an API call.


    For example, let's make a curl request to the messages API, to find out how
    many message we have for the client CLI1:

    `$ curl -I
    "https://api.bspk.com/api/extraction/v1/messages?client_ids=CLI1"`


    The `-I` parameter indicates that we only care about the headers, not the
    actual content. In examining the result, you'll notice some information in
    the Link header that looks like this:


    ```

    Link:
    <https://api.bspk.com/api/extraction/v1/messages?client_ids=CLI1&page=2>;
    rel="next",
          <https://api.bspk.com/api/extraction/v1/messages?client_ids=CLI1&page=30>; rel="last"
    ```


    Since by default, all paginated queries start at page 1. rel="last" provides
    some more information, stating that the last page of results is on page 30.
    Thus, we have 29 more pages of information about messages from client CLI1
    that we can consume.


    Always rely on these link relations provided to you. Don't try to guess or
    construct your own URL.



    ### Throttling


    API requests are limited to the amount specified in the returned
    `X-RateLimit-Limit` header (per 10 seconds). Exceeding that limit will cause
    BSPK to return an `HTTP 429` response. Check the `X-RateLimit-Limit` and
    `X-RateLimit-Remaining` headers to see how many more requests you are
    allowed until throttling kicks in.



    ### Error Codes


    - 400 - Bad Request.

    - 401 - Unauthorized – Invalid BSPK API key.

    - 404 - Not Found – Resource not found.

    - 422 - Unprocessable entity.

    - 429 - Throttle Limit reached.

    - 500 - BSPK Internal Server Error


    ### Validation


    Methods that take input will validate all parameters. Any parameter that
    fails validation will trigger an error response with status HTTP 422. The
    response body will be a JSON object like the example below which includes a
    list of fields that failed validation.


    `{'errors':[{'title': 'No clients found with IDs: [NON_EXISTING_ID,
    OTHER_NON_EXISTING_ID]','code':'not_found'}]}`



    ### Additional Information


    - Fields without a value will return null

    - Timestamps are rendered in ISO-8601 format (e.g. 2018-07-21T17:32:28Z)

    - BSPK reserves the right to add more properties to objects, but will never
    change or remove them. Any breaking changes will result in a major API
    version update.
         
servers:
  - url: https://api.bspk.com
    description: Production
security:
  - BearerAuth: []
paths:
  /api/extraction/v1/slices:
    get:
      tags:
        - Slices
      summary: List Slices
      description: List slices
      operationId: listSlices
      parameters:
        - name: sales_associate_ids
          in: query
          required: false
          description: Sales Associate id owned by the brand
          schema:
            type: string
        - name: from
          in: query
          required: false
          description: >-
            Only show slices updated after the given time. This is a timestamp
            in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: >-
            Combined with the `from` parameter, only show slices updated whitin
            the given range (from..to) time. This is a timestamp in ISO 8601
            format: YYYY-MM-DDTHH:MM:SSZ.
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: 'Page number of the results to fetch. Default: 1'
          schema:
            type: string
        - name: per_page
          in: query
          required: false
          description: 'Results per page (max 100). Default: 30'
          schema:
            type: string
      responses:
        '200':
          description: Successful response, returns array of slices
          content:
            application/json:
              example:
                - store_id: Store-external_id-68
                  store_name: Store-77
                  created_by_sales_associate_id: SA_01
                  created_by_sales_associate_name: FirstName-113 LastName-113
                  title: null
                  body: null
                  created_at: '2024-08-07T12:29:28.363Z'
                  updated_at: '2024-08-07T12:29:28.363Z'
                  item_ids:
                    - ITEM_OO1
              schema:
                $ref: '#/components/schemas/slice'
      security:
        - BearerAuth: []
components:
  schemas:
    slice:
      type: array
      items:
        type: object
        description: >-
          Get details about all slices (a curation of images) created and shared
          from sales associates to their clients
        properties:
          store_id:
            type: string
            description: >-
              Unique identifier of the store where the slice was created (based
              on associate assignment)
          store_name:
            type: string
            description: >-
              Store name of where the slice was created (based on associate
              assignment)
          created_by_sales_associate_id:
            type: string
            description: Unique identifier of the associate that created the slice
          created_by_sales_associate_name:
            type: string
            description: Full name of the associate who created the slice
          title:
            type: string
            nullable: true
            description: Short description of the slice added by the original associate
          body:
            type: string
            nullable: true
            description: Details added to the slice by the original associate
          created_at:
            type: string
            format: date_time
            description: Timestamp of when the slice was created
          updated_at:
            type: string
            format: date_time
            description: Timestamp of when the slice was last updated
          item_ids:
            type: array
            description: Unique identifiers of the items that were included in the slice
            items:
              type: string
        required:
          - store_id
          - store_name
          - created_by_sales_associate_id
          - created_by_sales_associate_name
          - title
          - body
          - created_at
          - updated_at
          - item_ids
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````