### Pagination Parameters Source: https://docs.moovin.store/index All listing resources support pagination using the `page` and `size` parameters. The response includes the total number of items available. ```APIDOC ## Pagination Parameters ### Description All listing resources support pagination using the `page` and `size` parameters. The response includes the total number of items available, allowing for complete pagination. ### Method N/A (Applies to multiple endpoints) ### Endpoint N/A (Applies to multiple endpoints) ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. Defaults to 1. - **size** (integer) - Optional - The number of items per page. Maximum limit is 100. Defaults to 15. ### Request Example N/A ### Response #### Success Response (200) - **items** (array) - A list of items for the current page. - **total** (integer) - The total number of items available across all pages. #### Response Example ```json { "items": [], "total": 0 } ``` ``` -------------------------------- ### API Reference - Environment and Authentication Source: https://docs.moovin.store/index Information on how to access the API environment, obtain application keys (app_id and app_secret), and the authentication process. ```APIDOC ## Environment To use the API resources, you must have an account on our platform. Access https://login.moovin.store to register. After creating your account, contact our support to request your application keys: **app_id** and **app_secret**. ## Authentication [Details on the authentication mechanism would typically go here, e.g., API key in header, OAuth flow. This section is currently a placeholder.] ``` -------------------------------- ### Modelo de Resposta de Paginação JSON Source: https://docs.moovin.store/index Este snippet demonstra o formato padrão de resposta para requisições de listagem que utilizam paginação. A resposta inclui um array vazio de 'items' e um total de '0', indicando a estrutura esperada, mesmo quando não há resultados. ```json { "items": [], "total": 0 } ``` -------------------------------- ### API Reference - Introduction Source: https://docs.moovin.store/index General information about the API, including adherence to REST standards, use of JSON for data transfer, and HTTP status codes for responses. ```APIDOC ## API Reference ### Description Welcome! Following the best REST standards, here is the necessary documentation to integrate with the main resources. All requests are made through specific endpoints for different operations, according to HTTP verbs. All data traffic is carried out using JSON messages, and responses can be identified through HTTP codes and their respective messages, also in JSON. If you have any questions, please contact us through our support channels available within your administrative panel. ### Standards All APIs and their resources follow defined standards and models, facilitating data control in any of the endpoints. ### Data Format All data traffic is performed using JSON messages. Responses can be identified through HTTP codes and their respective messages, also in JSON. ``` -------------------------------- ### Mixed Operations: Update, Create, and Remove Subresources (JSON) Source: https://docs.moovin.store/index Demonstrates how to combine multiple list management operations (update, create, remove) within a single API request. This allows for complex data synchronization by sending a payload containing items with IDs for updates/removals and items without IDs for creation. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" }, { "name": "Fusce vehicula", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` -------------------------------- ### Partially Updating Subresources with IDs and Data (JSON) Source: https://docs.moovin.store/index Shows how to perform partial updates on existing subresource items. By providing both an 'id' and specific fields, only those fields are modified, optimizing update operations. This method is key for granular control over list elements. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6", "name": "Vestibulum ante neque" }, { "id": "45877ffc-f224-485a-a6e6-d0e425174d46", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` -------------------------------- ### API Reference - Return Codes and Error Handling Source: https://docs.moovin.store/index Explanation of HTTP status codes (2xx, 4xx, 5xx) and the structure of error responses. ```APIDOC ## Return Codes ### HTTP 2XX Any return with a status in the 2XX range represents a successfully completed operation. ### HTTP 4XX Any return with a status in the 4XX range represents an operation failure generated by the data sent. This means that if the submitted request is not altered, it will always return the same error. In this error range, it is always necessary to review the sent data and/or check the rules for the operation to be performed successfully. Therefore, check the message with the error details. Avoid excessive errors in this range, as it means the submission is not being made according to the endpoint rules. ### HTTP 5XX Any return with a status in the 5XX range represents an internal failure in our services. Try performing the operation again, and if the error persists, contact us through our support channels. ## Errors Whenever an error occurs, you will receive a JSON in the response body with a message and, in some scenarios, more details will also be returned. Errors will always be returned according to the model below: ```json { "code": "422.ExceptionCode", "message": "Error description.", "details": [] } ``` ``` -------------------------------- ### Creating New Subresources without IDs (JSON) Source: https://docs.moovin.store/index Demonstrates how to add new items to a subresource list by providing data without an 'id'. This is part of the API's strategy for managing list updates, allowing for the creation of new entries when an 'id' is omitted but other data is present. ```json [ { "name": "Vestibulum ante neque", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, { "name": "Fusce vehicula", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` -------------------------------- ### Updating Subresources with IDs (JSON) Source: https://docs.moovin.store/index Illustrates how to manage lists of subresources during updates. Sending only an 'id' preserves the existing item. This method is crucial for efficient partial updates of list-based data within the API. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" }, { "id": "45877ffc-f224-485a-a6e6-d0e425174d46" } ] ``` -------------------------------- ### API Reference - Update Rules Source: https://docs.moovin.store/index Details on how partial updates are handled, including specific rules for updating subresources like lists of items. ```APIDOC ## Update Rules Endpoints that perform updates operate partially, altering only the data that is sent. Avoid sending repeated data that will not be altered for better performance in specific updates. ### Subresource Updates In cases where the field to be updated is a list of items, we follow specific rules: * **Sending only `id`**: You will keep the registered item without any alteration. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" }, { "id": "45877ffc-f224-485a-a6e6-d0e425174d46" } ] ``` * **Sending an item without `id` but with data**: You will create a new item. ```json [ { "name": "Vestibulum ante neque", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, { "name": "Fusce vehicula", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` * **Sending an item with `id` and data**: You will partially update the item. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6", "name": "Vestibulum ante neque" }, { "id": "45877ffc-f224-485a-a6e6-d0e425174d46", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` * **Not sending an `id` (in a list context, this implies removal if the item is not meant to be created/updated)**: You will remove the item. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" } ] ``` Any of the above scenarios can be sent together, allowing you to update, create, or remove items from the list simultaneously. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" }, { "name": "Fusce vehicula", "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." } ] ``` ``` -------------------------------- ### Removing Subresources by Sending Only ID (JSON) Source: https://docs.moovin.store/index Illustrates the method for removing items from a subresource list. Sending an object with only an 'id' signals the API to delete that specific item. This is a straightforward approach for item removal within lists. ```json [ { "id": "d8ef2c3c-a872-43f2-9a9c-2b420782f7f6" } ] ``` -------------------------------- ### Error Response Structure (JSON) Source: https://docs.moovin.store/index Defines the standard JSON structure for API error responses. It includes a 'code' for the error type, a 'message' for a human-readable description, and an optional 'details' array for more specific information. This structure aids in consistent error handling across different programming languages. ```json { "code": "422.ExceptionCode", "message": "Error description.", "details": [] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.