Skip to main content
PUT
/
api
/
external
/
v1
/
listings
/
{externalReference}
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": "84118503-030b-45f3-a867-c77d54d00b4c",
    "status": "active",
    "title": "Opel Corsa 1.2 Turbo",
    "description": "Compact city car in excellent condition",
    "price": 19995,
    "brand": "Opel",
    "model": "Corsa",
    "year": 2021,
    "mileage": 25000,
    "fuelType": "petrol",
    "transmission": "automatic",
    "bodyType": "hatchback",
    "postalCode": "9000",
    "city": "Gent",
    "province": "Oost-Vlaanderen",
    "features": [
      {"category": "comfort", "name": "Airconditioning"},
      {"category": "safety", "name": "ABS"}
    ],
    "images": [
      "https://partner.example/car1.jpg",
      {"url": "https://partner.example/car2.jpg", "position": 1}
    ]
  }'
{
  "data": {
    "listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
    "externalReference": "MY-REF-001",
    "status": "active",
    "created": true
  }
}

Create or Update Listing

Upsert a vehicle listing by external reference. Creates a new listing if it doesn’t exist, or updates the existing one.
Requires the write:listings scope. Contact support to enable write access.

Path Parameters

externalReference
string
required
Your unique reference for this listing (max 64 characters)

Request Body

dealerProfileId
string
Dealer profile UUID. Required if dealerLocationCode is not provided.
dealerLocationCode
string
Location code. Required if dealerProfileId is not provided.
status
string
default:"draft"
Listing status: active, pending, sold, or draft
title
string
required
Listing title
description
string
Detailed description (max 15,000 characters)
price
number
Price in EUR. Required when status is active or pending.
brand
string
Vehicle brand (e.g., “Opel”, “Volkswagen”)
model
string
Vehicle model (e.g., “Corsa”, “Golf”)
year
integer
Build year (1900 - current year + 1)
mileage
integer
Kilometers driven
fuelType
string
Fuel type: petrol, diesel, electric, hybrid, lpg, cng, other
transmission
string
Transmission: manual, automatic, semi-automatic, other
bodyType
string
Body type: hatchback, sedan, suv, wagon, convertible, van, coupe, other
postalCode
string
Belgian postal code. Required for active listings.
city
string
City name. Required for active listings.
province
string
Province name. Required for active listings.
features
array
Array of feature objects with category and name
images
array
Array of image URLs or objects with url and position. Images are automatically mirrored to Okasie storage.

Response

data.listingId
string
Okasie listing UUID
data.externalReference
string
Your provided reference
data.status
string
Current listing status
data.created
boolean
true if newly created, false if updated
data.warnings
object
Optional warnings (e.g., skipped images)
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": "84118503-030b-45f3-a867-c77d54d00b4c",
    "status": "active",
    "title": "Opel Corsa 1.2 Turbo",
    "description": "Compact city car in excellent condition",
    "price": 19995,
    "brand": "Opel",
    "model": "Corsa",
    "year": 2021,
    "mileage": 25000,
    "fuelType": "petrol",
    "transmission": "automatic",
    "bodyType": "hatchback",
    "postalCode": "9000",
    "city": "Gent",
    "province": "Oost-Vlaanderen",
    "features": [
      {"category": "comfort", "name": "Airconditioning"},
      {"category": "safety", "name": "ABS"}
    ],
    "images": [
      "https://partner.example/car1.jpg",
      {"url": "https://partner.example/car2.jpg", "position": 1}
    ]
  }'
{
  "data": {
    "listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
    "externalReference": "MY-REF-001",
    "status": "active",
    "created": true
  }
}

Error Responses

StatusCodeDescription
400INVALID_TITLETitle is required
400INVALID_PRICEPrice required for active listings
400INVALID_LOCATIONpostalCode, city, and province required
400INVALID_PROFILEdealerProfileId or dealerLocationCode required
403PROFILE_FORBIDDENNo access to requested profile
422VALIDATION_FAILEDPayload validation failed