OSPI API Documentatie

Integreer OSPI in je applicaties met onze krachtige REST API

Quick Start
Begin binnen 5 minuten met de OSPI API

1. API Key verkrijgen

Registreer je account en genereer een API key

2. Eerste API call

Test de API met een eenvoudige GET request

3. Integreren

Implementeer OSPI in je applicatie

Product ophalen
Haal productinformatie op via OSPI code
GET
/api/v1/products/{ospi_code}

Voorbeeld Request:

curl -X GET \
"https://api.ospi.org/v1/products/OSPI-ACME-123456-PROD01" \
-H "Authorization: Bearer YOUR_API_KEY"

Voorbeeld Response:

{
"ospi_code": "OSPI-ACME-123456-PROD01-98765432-1-487",
"name": "Organic Coffee Beans",
"brand": "ACME Coffee Co.",
"category": "Food & Beverages",
"description": "Premium organic coffee beans...",
"sustainability": {
"carbon_footprint": "2.1kg CO2",
"certifications": ["Organic", "Fair Trade"]
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Product aanmaken
Voeg een nieuw product toe aan OSPI
POST
/api/v1/products

Request Body:

{
"name": "New Product Name",
"brand": "Your Brand",
"category_code": "123456",
"product_id": "PROD01",
"description": "Product description...",
"attributes": {
"color": "red",
"size": "large"
}
}
SDK's & Libraries
Officiële SDK's voor populaire programmeertalen
JS

JavaScript/Node.js

npm install ospi-sdk
PY

Python

pip install ospi-python
PHP

PHP

composer require ospi/sdk