Get Data (GET)

Overview

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.

HTTP Method: GET is a read-only method designed to retrieve data without modifying any resources. It's ideal for fetching information about products, orders, customers, and other entities in your store.

Making GET Requests

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.

Basic Request Structure

GET /api/{resource_type}/{id}

This pattern allows you to retrieve a specific resource by its unique identifier.

Path Components

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

Authentication

All API requests require authentication. Use HTTP Basic Authentication by providing your API key in the request header.

Request Example

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'
Tip: Replace 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.

Common Response Status Codes

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

Next Steps

Once you understand how to make basic GET requests, you can explore more advanced features: