curl -X POST "https://www.okasie.be/api/external/v1/listings/bulk-upsert" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"externalReference": "DEX-0001",
"dealerProfileId": "84118503-030b-45f3-a867-c77d54d00b4c",
"status": "active",
"title": "Jeep Compass 2019",
"price": 18500,
"brand": "Jeep",
"model": "Compass",
"year": 2019,
"mileage": 43700,
"fuelType": "petrol",
"carPassUrl": "https://public.car-pass.be/vhr/example",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen"
},
{
"externalReference": "DEX-0002",
"dealerLocationCode": "DEX-GENT",
"status": "pending",
"title": "Renault Trafic",
"price": 26990,
"brand": "Renault",
"model": "Trafic",
"year": 2020,
"mileage": 65000,
"fuelType": "diesel",
"carPassUrl": "12345678901",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen",
"images": ["https://partner.example/trafic.jpg"]
}
]
}'
{
"data": {
"successCount": 2,
"errorCount": 0,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
},
{
"index": 1,
"externalReference": "DEX-0002",
"listingId": "1d63dbf8-cdbb-5c48-cf1e-2c89d93d6336",
"status": "pending",
"created": true
}
],
"errors": []
}
}
{
"data": {
"successCount": 1,
"errorCount": 1,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
}
],
"errors": [
{
"index": 1,
"externalReference": "DEX-0002",
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"status": 422,
"issues": [
{"path": "price", "message": "Required", "code": "invalid_type"}
]
}
]
}
}
Listings
Bulk Create/Update Listings
Create or update up to 100 listings in a single request
POST
/
api
/
external
/
v1
/
listings
/
bulk-upsert
curl -X POST "https://www.okasie.be/api/external/v1/listings/bulk-upsert" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"externalReference": "DEX-0001",
"dealerProfileId": "84118503-030b-45f3-a867-c77d54d00b4c",
"status": "active",
"title": "Jeep Compass 2019",
"price": 18500,
"brand": "Jeep",
"model": "Compass",
"year": 2019,
"mileage": 43700,
"fuelType": "petrol",
"carPassUrl": "https://public.car-pass.be/vhr/example",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen"
},
{
"externalReference": "DEX-0002",
"dealerLocationCode": "DEX-GENT",
"status": "pending",
"title": "Renault Trafic",
"price": 26990,
"brand": "Renault",
"model": "Trafic",
"year": 2020,
"mileage": 65000,
"fuelType": "diesel",
"carPassUrl": "12345678901",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen",
"images": ["https://partner.example/trafic.jpg"]
}
]
}'
{
"data": {
"successCount": 2,
"errorCount": 0,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
},
{
"index": 1,
"externalReference": "DEX-0002",
"listingId": "1d63dbf8-cdbb-5c48-cf1e-2c89d93d6336",
"status": "pending",
"created": true
}
],
"errors": []
}
}
{
"data": {
"successCount": 1,
"errorCount": 1,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
}
],
"errors": [
{
"index": 1,
"externalReference": "DEX-0002",
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"status": 422,
"issues": [
{"path": "price", "message": "Required", "code": "invalid_type"}
]
}
]
}
}
Bulk Create/Update Listings
Upsert up to 100 listings in a single request. Each item is processed independently, allowing partial success.Requires the
write:listings scope. Contact support to enable write access.Request Body
The request body can be either:- An array of listing objects
- An object with an
itemsproperty containing the array
externalReference (or the accepted alias external_reference) plus all required listing fields.
All JSON field names, including Car-Pass/carpass aliases like
carPassNumber, are listed in the single upsert field reference.array
required
Array of listing objects (max 100 items)
Show Item properties
Show Item properties
string
required
Your unique reference for this listing
string
Accepted alias for
externalReference; prefer externalReferencestring
Dealer profile UUID
string
Location code
string
active, pending, sold, or draftstring
required
Listing title
number
Price (required for active/pending)
string
Public Car-Pass URL from
public.car-pass.be or car-pass.be, or a legacy 11-digit certificate number. Input aliases carPass, car_pass_url, and carPassNumber are also accepted....
All other fields from the single upsert endpoint
Response
integer
Number of successfully processed items
integer
Number of failed items
array
array
curl -X POST "https://www.okasie.be/api/external/v1/listings/bulk-upsert" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"externalReference": "DEX-0001",
"dealerProfileId": "84118503-030b-45f3-a867-c77d54d00b4c",
"status": "active",
"title": "Jeep Compass 2019",
"price": 18500,
"brand": "Jeep",
"model": "Compass",
"year": 2019,
"mileage": 43700,
"fuelType": "petrol",
"carPassUrl": "https://public.car-pass.be/vhr/example",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen"
},
{
"externalReference": "DEX-0002",
"dealerLocationCode": "DEX-GENT",
"status": "pending",
"title": "Renault Trafic",
"price": 26990,
"brand": "Renault",
"model": "Trafic",
"year": 2020,
"mileage": 65000,
"fuelType": "diesel",
"carPassUrl": "12345678901",
"postalCode": "9000",
"city": "Gent",
"province": "Oost-Vlaanderen",
"images": ["https://partner.example/trafic.jpg"]
}
]
}'
{
"data": {
"successCount": 2,
"errorCount": 0,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
},
{
"index": 1,
"externalReference": "DEX-0002",
"listingId": "1d63dbf8-cdbb-5c48-cf1e-2c89d93d6336",
"status": "pending",
"created": true
}
],
"errors": []
}
}
{
"data": {
"successCount": 1,
"errorCount": 1,
"results": [
{
"index": 0,
"externalReference": "DEX-0001",
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"status": "active",
"created": true
}
],
"errors": [
{
"index": 1,
"externalReference": "DEX-0002",
"code": "VALIDATION_FAILED",
"message": "Validation failed",
"status": 422,
"issues": [
{"path": "price", "message": "Required", "code": "invalid_type"}
]
}
]
}
}
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | EMPTY_PAYLOAD | No items provided |
| 400 | TOO_MANY_ITEMS | More than 100 items |
| 400 | INVALID_JSON | Invalid JSON body |
For large imports, split your data into batches of 100 items and process them sequentially with a small delay between batches.
⌘I