curl --request GET \
--url https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}import requests
url = "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"type": "Text",
"description": "<string>",
"default": "<string>",
"placeholder": "<string>",
"isRequired": true,
"isPublisherOnly": true,
"order": 0,
"options": [
"<string>"
],
"maxLength": 0,
"min": 123,
"max": 123,
"workspaceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "CONFLICT_FIELD",
"status": 409,
"message": "CONFLICT_FIELD",
"data": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"defined": true,
"code": "INPUT_VALIDATION_FAILED",
"status": 422,
"message": "INPUT_VALIDATION_FAILED",
"data": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}Get a single creative field
curl --request GET \
--url https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}import requests
url = "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.revinel.com/v1/workspaces/{workspaceId}/fields/{fieldId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "<string>",
"key": "<string>",
"name": "<string>",
"type": "Text",
"description": "<string>",
"default": "<string>",
"placeholder": "<string>",
"isRequired": true,
"isPublisherOnly": true,
"order": 0,
"options": [
"<string>"
],
"maxLength": 0,
"min": 123,
"max": 123,
"workspaceId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"defined": true,
"code": "CONFLICT_FIELD",
"status": 409,
"message": "CONFLICT_FIELD",
"data": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}{
"defined": true,
"code": "INPUT_VALIDATION_FAILED",
"status": 422,
"message": "INPUT_VALIDATION_FAILED",
"data": {
"formErrors": [
"<string>"
],
"fieldErrors": {}
}
}Response
OK
Machine-readable slug the ad meta is keyed by. Derived from the name on create and immutable, so renaming a field never breaks renderers reading the slug.
Human-readable field label.
Input type of the creative field.
Text, Textarea, Url, Number, Switch, Image, Color, Select Help text shown under the input in the creative form.
Value pre-filled in the creative form when the field is blank. Typed per field type: a Switch stores a boolean, a Number may store a number, other types store strings. "" when unset.
Placeholder shown in the creative form input (a Select's trigger text). Empty for types without one (Switch, Image, Color).
Whether advertisers must fill this field.
Hidden from the advertiser's creative form; only the publisher sets the value. The value still serves in ad.meta, so this hides the input, not the data.
Sort position within the creative form. Kept as a dense 0..n-1 sequence: reordering renumbers every field, so sparse values are not preserved.
-9007199254740991 <= x <= 9007199254740991Choices for a Select field. Empty for other types.
Max characters for a Text/Textarea field. Null for no field-specific limit.
-9007199254740991 <= x <= 9007199254740991Minimum for a Number field. Null for unbounded.
Maximum for a Number field. Null for unbounded.