Skip to main content

Quickstart Guide

Follow this guide to make your first API call to the Okasie Partner API.

Prerequisites

Before you begin, you need:
A partner API secret (contact [email protected] to request access)
A tool to make HTTP requests (cURL, Postman, or your programming language)

Step 1: Test Authentication

Let’s verify your API credentials work correctly.
curl -X GET "https://www.okasie.be/api/external/v1/listings?pageSize=1" \
  -H "Authorization: Bearer YOUR_API_SECRET"
Replace YOUR_API_SECRET with your actual API secret. Never commit secrets to version control.

Expected Response

A successful response (HTTP 200) looks like:
{
  "data": [
    {
      "id": "46c7f6c9-70f7-4f98-8c32-12f1a67c6f2e",
      "title": "Opel Corsa 1.2 Turbo",
      "status": "active",
      "price": 19995,
      ...
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 1,
    "totalItems": 123,
    "totalPages": 123
  },
  "meta": {
    "partner": {
      "id": "your-partner-id",
      "name": "Your Partner Name"
    }
  }
}

Step 2: Create Your First Listing

Now let’s create a vehicle listing.
curl -X PUT "https://www.okasie.be/api/external/v1/listings/MY-REF-001" \
  -H "Authorization: Bearer YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "dealerProfileId": "YOUR_DEALER_PROFILE_ID",
    "status": "active",
    "title": "Opel Corsa 1.2 Turbo",
    "price": 19995,
    "brand": "Opel",
    "model": "Corsa",
    "year": 2021,
    "mileage": 25000,
    "fuelType": "petrol",
    "postalCode": "9000",
    "city": "Gent",
    "province": "Oost-Vlaanderen",
    "images": ["https://your-cdn.com/car-image.jpg"]
  }'

Success Response

{
  "data": {
    "listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
    "externalReference": "MY-REF-001",
    "status": "active",
    "created": true
  }
}

Step 3: Update or Mark as Sold

Update a Listing

Simply call PUT again with the same external reference:
curl -X PUT "https://www.okasie.be/api/external/v1/listings/MY-REF-001" \
  -H "Authorization: Bearer YOUR_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"dealerProfileId": "...", "title": "Updated Title", "price": 18995, ...}'

Mark as Sold

curl -X DELETE "https://www.okasie.be/api/external/v1/listings/MY-REF-001" \
  -H "Authorization: Bearer YOUR_API_SECRET"

Next Steps