Skip to main content

API Example Requests

This page provides simple examples of making API requests in various programming languages to help you get started with the OpenTiendas API. Each example show how to:

  • Send authenticated HTTP requests.
  • Parse the JSON response.
  • Handle basic errors.
info

These examples focus on authentication and request logic only.
For complete use cases, integrate them into your preferred framework and handle the API response appropriately.

use your shop ID

Use your unique store ID in place of {SHOP_ID}.
You can find this in the API section of your OpenTiendas Admin Panel.

Example: https://mystore123.opentiendas.app/api/v1/store

import requests

api_key = "YOUR_API_KEY"
headers = {"Authorization": f"Bearer {api_key}"}

response = requests.get("https://{SHOP_ID}.opentiendas.app/api/v1/store", headers=headers)

if response.status_code == 200:
data = response.json()
print("Store Info:", data)
else:
print(f"Error: {response.status_code} - {response.text}")

Need more help? Check out the API Reference or contact us.

🚀 Happy coding!