Skip to content

Get Price List Assignments API is not working when I use limit > 50. #981

@cjbarth

Description

@cjbarth

Describe the bug
When I call the API the limit parameter is ignored when limit is > 50.

To Reproduce
Steps to reproduce the behavior:

  1. Call https://api.bigcommerce.com/stores/{{store_hash}}/v3/pricelists/assignments?limit=250
  2. Observe the meta shows that there are 233 total items and that the per_page is listed at 250 and the count is listed at 50.

Please link to a repo that can be used to reproduce this issue, if possible. It'll help fix the bug faster.

Expected behavior
If there are only 233 items, and my limit is set to 250 and the cursor_pagination property of per_page matches that 250, then I expect that there would be 233 shown in my results instead of 50 and I would expect that total_pages would be 1 instead of 5.

Screenshots

    "meta": {
        "pagination": {
            "total": 233,
            "count": 50,
            "per_page": 50,
            "current_page": 1,
            "total_pages": 5
        },
        "cursor_pagination": {
            "count": 50,
            "per_page": 250,
            "start_cursor": "NA==",
            "end_cursor": "NTM=",
            "links": {
                "next": "?limit=250&after=NTM%3D"
            }
        }
    }

Additional context
The documentation for this API doesn't list that limit can only be in a certain range. It also looks like the API recognizes that I asked for 250 but then did the wrong thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions