Pagination

Each collection always has a meta and links key with information about the pagination.

Meta

meta contains the complete information of the paginator, such as the path, next cursor or the number of results.

Links

links contains the direct URLs for navigating through the result set (prev and next). Although there will be no page information but information on prev and next cursor with full URL.

Parameters

By default, 15 objects are returned per page.

You can request a different cursor string by appending ?cursor to the request with the endcoded string in meta.

You can use the URLs listed under links to browse through the pages or directly select a cursor using the ?cursor string parameter. With ?cursor=eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjMsIl9w you can e. g. go directly to specific page which is this encoded string pointing.

...
	"links": {
		"first": null,
		"last": null,
		"prev": null,
		"next": "https://api.smake.io/master-administration/product-option-values?cursor=eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjMsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
	},
	"meta": {
		"path": "https://api.smake.io/master-administration/product-option-values",
		"per_page": 15,
		"next_cursor": "eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjMsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
		"prev_cursor": null
	}
...

Example

Request

GET /product-option-values
?cursor=eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjMsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0 HTTP/1.1

Response

{
	"data": [
		{
			"id": 2,
			"handle": "S",
			"name": {
				"de": "S",
				"en": "S"
			},
			"option_type": 1,
			"media": [],
			"media_state": "empty",
			"created_at": "2023-01-10T10:11:18+00:00",
			"updated_at": "2023-01-10T10:11:18+00:00"
		},
		{
			"id": 1,
			"handle": "gray",
			"name": {
				"de": "gray",
				"en": "gray"
			},
			"option_type": 2,
			"media": [
				144
			],
			"media_state": "empty",
			"created_at": "2023-01-10T10:11:17+00:00",
			"updated_at": "2023-01-10T10:11:17+00:00"
		}
	],
	"links": {
		"first": null,
		"last": null,
		"prev": "https://api.smake.io/master-administration/product-option-values?cursor=eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjIsIl9wb2ludHNUb05leHRJdGVtcyI6ZmFsc2V9",
		"next": null
	},
	"meta": {
		"path": "https://api.smake.io/master-administration/product-option-values",
		"per_page": 15,
		"next_cursor": null,
		"prev_cursor": "eyJwcm9kdWN0aW9uX29wdGlvbl92YWx1ZXMuaWQiOjIsIl9wb2ludHNUb05leHRJdGVtcyI6ZmFsc2V9"
	}
}