The HTTP GET method is used to retrieve data from the API. This guide explains how to make GET requests to fetch object data from the Venddor API.
To retrieve object data, send a GET HTTP request to the URL that refers to the appropriate resource. The URL structure follows RESTful conventions where each resource type has its own endpoint.
This pattern allows you to retrieve a specific resource by its unique identifier.
Component | Description |
---|---|
resource_type | The type of resource you want to retrieve (e.g., products, orders, categories) |
id | The unique identifier of the specific resource |
All API requests require authentication. Use HTTP Basic Authentication by providing your API key in the request header.
Here's an example of how to retrieve information about a product with ID 1:
curl --user admin@example.com:APIkey -X GET 'https://www.venddor.com.br/api/products/1'
admin@example.com
with your admin email and APIkey
with your actual API key. You can generate or manage your API keys in the administrator panel under Settings → API Access.
Status Code | Description |
---|---|
200 OK | The request was successful and the response contains the requested data |
401 Unauthorized | Authentication failed or was not provided |
403 Forbidden | You don't have permission to access the requested resource |
404 Not Found | The requested resource was not found |
429 Too Many Requests | Rate limit exceeded |
500 Internal Server Error | An error occurred on the server |
Once you understand how to make basic GET requests, you can explore more advanced features: