Process the results returned by the api

S-Cart uses json format for API results(*)
There are 2 types of json returned:

- Json single: Returns a single result.
Example api for details of a product
- Json paging Returns a list of objects.
Example: product list
We use package spatie/laravel-json-api-paginate for the task of handling the returned pagination.
To configure the information, you can customize in the file "s-cart/config/json-api-paginate.php"

SCart-folder/
├── app
├── config
│     ├── json-api-paginate.php

(*) Note: Add "Accept:application/json" in the header of all requests sent to the API.

Related topics

Latest Document