I'm trying to pull all the shop items from Square Connect API, and the pagination seems to be broken. Here is the request I'm making:
$ http https://connect.squareup.com/v1/{location id}/items 'Authorization: Bearer XXXXXXXXXXXX'
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Link
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Tue, 29 Nov 2016 09:25:50 GMT
ETag: "-307839789"
Keep-Alive: timeout=60
Strict-Transport-Security: max-age=631152000
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: DENY
X-Request-Id: ed/QSsnKQaeuhjoT4K/R
X-Response-Time: 529ms
X-XSS-Protection: 1; mode=block
transfer-encoding: chunked
[
...
]
Critically, the Link header is missing. The documentation here https://docs.connect.squareup.com/api/connect/v1/#pagination describes pagination, and it seems like the header should be present when there are more than 10 results (which there are).
Am I doing something wrong?
GET /v1/LOCATION/items HTTP/1.1 Host: connect.squareup.com Authorization: Bearer sq0atp-Szwdidde-kKILsQCJYyETA Content-Type: application/json Cache-Control: no-cacheand wouldn't have a response code like200 OK- tristansokolhttp https://connect.squareup.com/v1/{location id}/items 'Authorization: Bearer XXXXXXXXXXXX'and the rest of it is the response. Sorry for being unclear. - Sam Lee