# Conventions

### REST Conventions <a href="#rest-conventions" id="rest-conventions"></a>

* Accept and respond with JSON
* Use nouns instead of verbs in endpoint paths. To retrieve a list of cars, use HTTP GET with the endpoint `/cars/`, not `/getcars/`
* Name collections with plural nouns. Example: `/cars/`, not `/car/`
* Nest resources for hierarchical objects. Example: `/cars/{id}/reviews`
* Return standard error codes. 4xx errors if the client did something wrong and 5xx errors if something is wrong on the server
* Allow filtering, sorting, and pagination where a lot of data can be returned
* Use SSL
* Version APIs by adding it to the path. Example: `https://shop.com/v2/orders/`

***

### Links <a href="#links" id="links"></a>

[Stackoverflow REST Best Practices](https://stackoverflow.blog/2020/03/02/best-practices-for-rest-api-design/)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linx.software/reference/plugins/rest/conventions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
