How do I setup pagination correctly with the following in mind?
I’m trying to get pagination working for Phorest’s API (Phorest API).
I’m getting data back without pagination settings, but am getting a message “There was a calculation error in ‘Get Staffs from Phorest’” when I try to use paging.
I can get paging to work properly in Postman like so:
{{third-party-api}}/api/business/{{business}}/branch/{{branch}}/staff?page=0&size=2
Here’s example data:
{
"_embedded": {
"staffs": [
{
"staffId": "abc123",
"staffCategoryId": "xyz789",
"userId": "something",
"staffCategoryName": "Doctor",
"firstName": "Becca",
"lastName": "Hiya",
"selfEmployed": false,
"mobile": "5553214567",
"email": "anemail@example.com",
"hideFromOnlineBookings": true,
"hideFromAppointmentScreen": false,
"disqualifiedServices": [
"no5s4UTbky6UmJQx-WnQkw",
"hd__0qiZO1CfGs2FWONIew",
"CyOCMbFe8o28ijcMncgLGw",
]
},
{
"staffId": "123abc",
"staffCategoryId": "xyz789",
"userId": "somethingElse",
"staffCategoryName": "Doctor",
"firstName": "Billy",
"lastName": "Bob",
"selfEmployed": false,
"mobile": "12345678",
"email": "bill@example.com",
"hideFromOnlineBookings": true,
"hideFromAppointmentScreen": true,
"disqualifiedServices": [
"jACUHMcczpl3aLvDl1x_Pw",
"tmgjzYQcdZAcYGO01AklpA"
]
}
]
},
"page": {
"size": 2,
"totalElements": 43,
"totalPages": 22,
"number": 2
}
}
This is my setting in Parabola. Not sure if this matters, but note that I pull the Branches first and then use Enrich with an API to get all staff from all branches.