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
To configure the information, you can customize in the file "s-cart/config/json-api-paginate.php"
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"
(*) Note: Add "Accept:application/json" in the header of all requests sent to the API.SCart-folder/
├── app
├── config
│ ├── json-api-paginate.php
Related topics
Latest Document
- Upgrade guide 2024-03-24
- Customize search page 2023-08-02
- Discount code (coupon) 2023-05-14
- Upgrade guide 2023-11-23
- Data relations in S-Cart 2023-02-05