Recommend this page to a friend! |
Classes of Francesco Danti | Scloby Client API | docs/Api/ItemsApi.md | Download |
|
![]() Swagger\Client\ItemsApiAll URIs are relative to https://api.scloby.com/v2 Method | HTTP request | Description ------------- | ------------- | ------------- itemsGet | GET /items | GET All items itemsIdDelete | DELETE /items/{id} | Delete existing Item itemsIdGet | GET /items/{id} | Get existing item itemsIdPut | PUT /items/{id} | Edit existing item itemsPost | POST /items | Add new Item itemsGet> \Swagger\Client\Model\Items itemsGet($pagination, $per_page, $page) GET All items Returns a Json with data about all items of selected shop. Paginated by default (per_page=1000) Example
ParametersName | Type | Description | Notes ------------- | ------------- | ------------- | ------------- pagination | bool| Pagination param | [optional] per_page | int| results_per_page | [optional] page | int| PAGE_NUMBER(starting from 0 to TOTAL_PAGE-1) | [optional] Return typeAuthorizationHTTP request headers- Content-Type: Not defined - Accept: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) itemsIdDelete> itemsIdDelete($id) Delete existing Item In this case you must specify the id in the URL, but it is no necessary in the request body Example
ParametersName | Type | Description | Notes ------------- | ------------- | ------------- | ------------- id | string| id of the item that need to be deleted | Return typevoid (empty response body) AuthorizationHTTP request headers- Content-Type: Not defined - Accept: Not defined [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) itemsIdGet> \Swagger\Client\Model\Items itemsIdGet($id) Get existing item In this case you must specify the id in the URL Example
ParametersName | Type | Description | Notes ------------- | ------------- | ------------- | ------------- id | string| id of the item | Return typeAuthorizationHTTP request headers- Content-Type: Not defined - Accept: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) itemsIdPut> \Swagger\Client\Model\Items itemsIdPut($body, $id) Edit existing item In this case you must specify the id in the URL and change the data you wanna update. As every scloby resource, you can do a PUT request. First of all you have to save the original content of the resource (simply doing a GET request), edit what do you want, and resend it in a PUT request. Example
ParametersName | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | \Swagger\Client\Model\Items| Object data that need to be updated | id | string| id of the item that need to be updated | Return typeAuthorizationHTTP request headers- Content-Type: application/json - Accept: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) itemsPost> \Swagger\Client\Model\Items itemsPost($body) Add new Item You must know first the department id and the category id. The category id can be not set, in this case its value will be null, and the item will be shown in the section No category of the app. If the item is a restaurant item you must know if he has allergens and insert the ids in the allergents node of json. If this item has ingredients, you can specify the components ids. Example
ParametersName | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | \Swagger\Client\Model\Items| Item object that needs to be added. | Return typeAuthorizationHTTP request headers- Content-Type: application/json - Accept: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) |