# Best Practices

## Monitor your application

Do you monitor how many HTTP 4xx statuses your application is receiving?

It's common to find integrations that attempt to update a resource, receive an HTTP 4xx error, and keep trying to update without any change to the request, indefinitely.

Ideally, upon receiving an HTTP 4xx error, the application will only attempt to retry the request after the root cause of the error is resolved. (Ex: adding a required field that was missing from the request)

## Beware of the request limit

Be careful not to exceed the [limits of our API requests](https://skyhub-english.gitbook.io/skyhub-api-english/request-limits). If your application receives an HTTP 429, it must stop making requests for a while until a new window begins counting.

## Use only the necessary

Some of SkyHub API endpoints, especially the products one, allows only a few parameters to be passed in the update request. So If you want to update only the "qty" field of the product, you should do similar to the request below:

```
curl --request PUT \
  --url https://api.skyhub.com.br/products/sku123 \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'X-User-Email: name@email.com' \
  --header 'X-Api-Key: YOUR-API-KEY-HERE' \
  --header 'X-Accountmanager-Key: token_account'\
  --data '{"qty":0}'
```

This way your application will have less data traffic on the network, so the SkyHub API will process a smaller load data and perform better.


---

# 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://skyhub-english.gitbook.io/skyhub-api-english/best-practices.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.
