curl -X POST "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"status": "pending"}'
const response = await fetch(
"https://www.okasie.be/api/external/v1/listings/MY-REF-001/status",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PARTNER_SECRET}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "pending" }),
}
);
const data = await response.json();
console.log(data.data.status);
import os
import requests
url = "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status"
headers = {
"Authorization": f"Bearer {os.getenv('PARTNER_SECRET')}",
"Content-Type": "application/json"
}
response = requests.post(url, json={"status": "pending"}, headers=headers)
status = response.json()['data']['status']
print(f"Listing status: {status}")
{
"data": {
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"externalReference": "MY-REF-001",
"status": "pending"
}
}
Listings
Update Listing Status
Update the current status of a listing
POST
/
api
/
external
/
v1
/
listings
/
{externalReference}
/
status
curl -X POST "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"status": "pending"}'
const response = await fetch(
"https://www.okasie.be/api/external/v1/listings/MY-REF-001/status",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PARTNER_SECRET}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "pending" }),
}
);
const data = await response.json();
console.log(data.data.status);
import os
import requests
url = "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status"
headers = {
"Authorization": f"Bearer {os.getenv('PARTNER_SECRET')}",
"Content-Type": "application/json"
}
response = requests.post(url, json={"status": "pending"}, headers=headers)
status = response.json()['data']['status']
print(f"Listing status: {status}")
{
"data": {
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"externalReference": "MY-REF-001",
"status": "pending"
}
}
Update Listing Status
Update the current status of a listing by external reference.Requires the
write:listings scope. Contact support to enable write access.Path Parameters
string
required
Your unique reference for this listing
Request Body
string
required
New status:
active, pending, sold, or draftResponse
string
Okasie listing UUID
string
Your provided reference
string
Updated status:
active, pending, sold, or draftcurl -X POST "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status" \
-H "Authorization: Bearer YOUR_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"status": "pending"}'
const response = await fetch(
"https://www.okasie.be/api/external/v1/listings/MY-REF-001/status",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PARTNER_SECRET}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ status: "pending" }),
}
);
const data = await response.json();
console.log(data.data.status);
import os
import requests
url = "https://www.okasie.be/api/external/v1/listings/MY-REF-001/status"
headers = {
"Authorization": f"Bearer {os.getenv('PARTNER_SECRET')}",
"Content-Type": "application/json"
}
response = requests.post(url, json={"status": "pending"}, headers=headers)
status = response.json()['data']['status']
print(f"Listing status: {status}")
{
"data": {
"listingId": "0c52cae7-bcaa-4b37-be0d-1b78c92c5225",
"externalReference": "MY-REF-001",
"status": "pending"
}
}
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | INVALID_REFERENCE | External reference is required |
| 400 | INVALID_JSON | Request body must be valid JSON |
| 400 | INVALID_BODY | Request body must be an object |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 403 | PROFILE_FORBIDDEN | No access to this listing |
| 404 | NOT_FOUND | Listing not found for this partner |
| 422 | VALIDATION_FAILED | Invalid or missing status |
Use this endpoint for lightweight status changes. Use DELETE when you only need to mark a listing as sold.
⌘I