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

# Get clients' ideabook actions (likes, dislikes, wishlists)

> Gets a list of ideabook actions for specified clients. The actions include all reactions to ideabook objects (ideabook object can stand for an item or simply attachment shared by sales associate like image or video). Among type of actions that might be performed by client there are:
- like
- dislike
- adding to wishlist
- like removal
- dislike removal
- removing from wishlist

If there are no clients found with given client IDs the API returns an error about no records found.

If among passed clients IDs in the query parameter there is at least one client who exists in the database the API will return an object with client IDs as keys and an array of ideabook actions as values. IDs of the clients that weren't found in the DB will not be returned in the response object.



## OpenAPI

````yaml get /api/extraction/v1/ideabook_actions
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/ideabook_actions:
    get:
      tags:
        - Ideabook
      summary: Get clients' ideabook actions (likes, dislikes, wishlists)
      description: >-
        Gets a list of ideabook actions for specified clients. The actions
        include all reactions to ideabook objects (ideabook object can stand for
        an item or simply attachment shared by sales associate like image or
        video). Among type of actions that might be performed by client there
        are:

        - like

        - dislike

        - adding to wishlist

        - like removal

        - dislike removal

        - removing from wishlist


        If there are no clients found with given client IDs the API returns an
        error about no records found.


        If among passed clients IDs in the query parameter there is at least one
        client who exists in the database the API will return an object with
        client IDs as keys and an array of ideabook actions as values. IDs of
        the clients that weren't found in the DB will not be returned in the
        response object.
      operationId: getClientsIdeabookActions
      parameters:
        - name: client_ids
          in: query
          required: true
          description: >-
            Format:
            `/api/extraction/v1/ideabook_actions?client_ids=CLIENT_ID_1,CLIENT_ID_2`
          schema:
            type: string
      responses:
        '200':
          description: Get clients' ideabook actions
          content:
            application/json:
              example:
                CLIENT_ID_2:
                  - created_by_sales_associate_id: SALES_ASOCIATE_ID_1
                    skus:
                      - SKU_3
                      - SKU_4
                    created_date: '2021-03-30T12:40:30.000Z'
                    feedback_date: '2024-08-07T12:29:25.370Z'
                    feedback_type: Remove like
                    item_id: ITEM_ID_2
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/007/original/file-name-7.
                  - created_by_sales_associate_id: null
                    skus: null
                    created_date: '2021-04-01T17:25:10.000Z'
                    feedback_date: '2024-08-07T12:29:25.399Z'
                    feedback_type: Remove dislike
                    item_id: null
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/008/original/file-name-8.
                  - created_by_sales_associate_id: SALES_ASOCIATE_ID_1
                    skus:
                      - SKU_3
                      - SKU_4
                    created_date: '2021-04-03T20:10:20.000Z'
                    feedback_date: '2024-08-07T12:29:25.406Z'
                    feedback_type: Remove from wishlist
                    item_id: ITEM_ID_2
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/007/original/file-name-7.
                CLIENT_ID_1:
                  - created_by_sales_associate_id: SALES_ASOCIATE_ID_1
                    skus:
                      - SKU_1
                      - SKU_2
                    created_date: '2021-03-30T12:40:30.000Z'
                    feedback_date: '2024-08-07T12:29:25.190Z'
                    feedback_type: Like
                    item_id: ITEM_ID_1
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/005/original/file-name-5.
                  - created_by_sales_associate_id: null
                    skus: null
                    created_date: '2021-04-01T17:25:10.000Z'
                    feedback_date: '2024-08-07T12:29:25.291Z'
                    feedback_type: Dislike
                    item_id: null
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/006/original/file-name-6.
                  - created_by_sales_associate_id: SALES_ASOCIATE_ID_1
                    skus:
                      - SKU_1
                      - SKU_2
                    created_date: '2021-04-03T20:10:20.000Z'
                    feedback_date: '2024-08-07T12:29:25.337Z'
                    feedback_type: Add to wishlist
                    item_id: ITEM_ID_1
                    image_url: >-
                      https://fake.cdn.aws.com/media/000/000/005/original/file-name-5.
                NON_EXISTING_CLIENT_ID: []
        '422':
          description: No clients with given IDs found
          content:
            application/json:
              example:
                errors:
                  - title: >-
                      No clients found with IDs: [NON_EXISTING_ID,
                      OTHER_NON_EXISTING_ID]
                    code: not_found
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````