placementIdpathrequiredstring — The placementId for this request.
Example: id_demo_001
Beladed Ads API
Process Vote through the reviewed Beladed Ads contract.
/api/ads/placement/vote/{placementId}curl --request POST 'https://api.beladed.dev/api/ads/placement/vote/id_demo_001' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"voteData": {
"choice": "like",
"userId": "id_demo_001",
"timestamp": "2025-08-28T12:00:00Z"
}
}'const response = await fetch("https://api.beladed.dev/api/ads/placement/vote/id_demo_001", {
method: "POST",
headers: {
"Accept": "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify({
"voteData": {
"choice": "like",
"userId": "id_demo_001",
"timestamp": "2025-08-28T12:00:00Z"
}
})
});
const data = await response.json();import requests
response = requests.request(
"POST",
"https://api.beladed.dev/api/ads/placement/vote/id_demo_001",
headers={"Accept":"application/json","Content-Type":"application/json"},
json={
"voteData": {
"choice": "like",
"userId": "id_demo_001",
"timestamp": "2025-08-28T12:00:00Z"
}
},
timeout=30,
)
response.raise_for_status()
data = response.json()<?php
$client = curl_init("https://api.beladed.dev/api/ads/placement/vote/id_demo_001");
curl_setopt_array($client, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Accept: application/json","Content-Type: application/json"],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => json_encode({
"voteData": {
"choice": "like",
"userId": "id_demo_001",
"timestamp": "2025-08-28T12:00:00Z"
}
}),
]);
$response = curl_exec($client);require "net/http"
require "json"
uri = URI("https://api.beladed.dev/api/ads/placement/vote/id_demo_001")
request = Net::HTTP::Post.new(uri)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = "{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }var request = java.net.http.HttpRequest.newBuilder()
.uri(java.net.URI.create("https://api.beladed.dev/api/ads/placement/vote/id_demo_001"))
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.method("POST", java.net.http.HttpRequest.BodyPublishers.ofString("{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}"))
.build();
var response = java.net.http.HttpClient.newHttpClient().send(request, java.net.http.HttpResponse.BodyHandlers.ofString());package main
import (
"bytes"
"net/http"
)
func callBeladed() (*http.Response, error) {
body := []byte("{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}")
request, err := http.NewRequest("POST", "https://api.beladed.dev/api/ads/placement/vote/id_demo_001", bytes.NewReader(body))
if err != nil { return nil, err }
request.Header.Set("Accept", "application/json")
request.Header.Set("Content-Type", "application/json")
return http.DefaultClient.Do(request)
}using var client = new HttpClient();
using var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.beladed.dev/api/ads/placement/vote/id_demo_001");
request.Headers.TryAddWithoutValidation("Accept", "application/json");
request.Headers.TryAddWithoutValidation("Content-Type", "application/json");
request.Content = new StringContent("{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}", System.Text.Encoding.UTF8, "application/json");
using var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();var request = URLRequest(url: URL(string: "https://api.beladed.dev/api/ads/placement/vote/id_demo_001")!)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = "{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}".data(using: .utf8)
let (data, response) = try await URLSession.shared.data(for: request)val request = okhttp3.Request.Builder()
.url("https://api.beladed.dev/api/ads/placement/vote/id_demo_001")
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json")
.method("POST", okhttp3.RequestBody.create(okhttp3.MediaType.get("application/json"), "{\n \"voteData\": {\n \"choice\": \"like\",\n \"userId\": \"id_demo_001\",\n \"timestamp\": \"2025-08-28T12:00:00Z\"\n }\n}"))
.build()
val response = okhttp3.OkHttpClient().newCall(request).execute()
placementIdpathrequiredstring — The placementId for this request.
Example: id_demo_001
{
"type": "object",
"properties": {
"voteData": {
"type": "object",
"properties": {
"choice": {
"type": "string"
},
"userId": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
}
}
}{
"voteData": {
"choice": "like",
"userId": "id_demo_001",
"timestamp": "2025-08-28T12:00:00Z"
}
}
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
}
}
},
"requestId": {
"type": "string"
}
}
}{
"data": {
"id": "id_demo_001",
"status": "available"
},
"requestId": "req_demo_001"
}
invalid_requestThe request did not satisfy the documented contract.
not_foundThe requested public or account-owned resource was not found.
rate_limitedRetry after the current product limit resets.
This operation is published from reviewed repository contracts. Source metadata is included for traceability without exposing internal implementation details.