curl --request GET \
--url https://api.swoogo.com/api/v1/sponsors/field/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swoogo.com/api/v1/sponsors/field/{field_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swoogo.com/api/v1/sponsors/field/{field_id}', 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.swoogo.com/api/v1/sponsors/field/{field_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.swoogo.com/api/v1/sponsors/field/{field_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.swoogo.com/api/v1/sponsors/field/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swoogo.com/api/v1/sponsors/field/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allow_html": false,
"attribute": "level",
"choices": [
{
"id": 47,
"name": "Gold",
"sort": 0
},
{
"id": 48,
"name": "update choice name",
"sort": 1
},
{
"id": 49,
"name": "Bronze",
"sort": 2
},
{
"id": 68,
"name": "Platinum",
"sort": 4
},
{
"id": 137,
"name": "new choices of level",
"sort": 6
},
{
"id": 138,
"name": "new choices of level",
"sort": 7
},
{
"id": 139,
"name": "new choices of level",
"sort": 8
},
{
"id": 140,
"name": "new choices of level",
"sort": 9
},
{
"id": 141,
"name": "new choices of level",
"sort": 10
},
{
"id": 142,
"name": "new choices of level",
"sort": 11
}
],
"id": 27,
"name": "new level of sponsorship 1",
"required": false,
"settings": null,
"sort": 4,
"type": "dropDownList",
"visible": true
}{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401
}{
"name": "Forbidden",
"message": "You do not have access to that resource.",
"code": 0,
"status": 403
}{
"name": "Not Found",
"message": "The requested resource does not exist.",
"code": 0,
"status": 404
}{
"name": "Internal Server Error",
"message": "An error occurred while processing your request.",
"code": 0,
"status": 500
}Get One Field
Returns the full details of a single sponsor custom field definition by field_id, including its type, name, attribute key, sort order, visibility, required flag, and available choices (for dropdown or multi-select fields).
curl --request GET \
--url https://api.swoogo.com/api/v1/sponsors/field/{field_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.swoogo.com/api/v1/sponsors/field/{field_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swoogo.com/api/v1/sponsors/field/{field_id}', 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.swoogo.com/api/v1/sponsors/field/{field_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.swoogo.com/api/v1/sponsors/field/{field_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.swoogo.com/api/v1/sponsors/field/{field_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.swoogo.com/api/v1/sponsors/field/{field_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"allow_html": false,
"attribute": "level",
"choices": [
{
"id": 47,
"name": "Gold",
"sort": 0
},
{
"id": 48,
"name": "update choice name",
"sort": 1
},
{
"id": 49,
"name": "Bronze",
"sort": 2
},
{
"id": 68,
"name": "Platinum",
"sort": 4
},
{
"id": 137,
"name": "new choices of level",
"sort": 6
},
{
"id": 138,
"name": "new choices of level",
"sort": 7
},
{
"id": 139,
"name": "new choices of level",
"sort": 8
},
{
"id": 140,
"name": "new choices of level",
"sort": 9
},
{
"id": 141,
"name": "new choices of level",
"sort": 10
},
{
"id": 142,
"name": "new choices of level",
"sort": 11
}
],
"id": 27,
"name": "new level of sponsorship 1",
"required": false,
"settings": null,
"sort": 4,
"type": "dropDownList",
"visible": true
}{
"name": "Unauthorized",
"message": "Your request was made with invalid credentials.",
"code": 0,
"status": 401
}{
"name": "Forbidden",
"message": "You do not have access to that resource.",
"code": 0,
"status": 403
}{
"name": "Not Found",
"message": "The requested resource does not exist.",
"code": 0,
"status": 404
}{
"name": "Internal Server Error",
"message": "An error occurred while processing your request.",
"code": 0,
"status": 500
}Authorizations
OAuth 2.0 bearer token obtained from POST /oauth2/token. Tokens expire after 30 minutes. Include in the Authorization header as Bearer {access_token}.
Path Parameters
integer - required - The ID of the field you want to get
1
Query Parameters
string - optional - Comma separated list of fields you want to return
"id,attribute,name,s_hint,type,visible,required,sort,allow_html,s_url_display_format,s_button_text,s_url_image_id,s_max_links,s_link_collection_fields"
Response
Get Sponsor Field
false
"level"
Show child attributes
Show child attributes
[
{ "id": 47, "name": "Gold", "sort": 0 },
{
"id": 48,
"name": "update choice name",
"sort": 1
},
{ "id": 49, "name": "Bronze", "sort": 2 },
{ "id": 68, "name": "Platinum", "sort": 4 },
{
"id": 137,
"name": "new choices of level",
"sort": 6
},
{
"id": 138,
"name": "new choices of level",
"sort": 7
},
{
"id": 139,
"name": "new choices of level",
"sort": 8
},
{
"id": 140,
"name": "new choices of level",
"sort": 9
},
{
"id": 141,
"name": "new choices of level",
"sort": 10
},
{
"id": 142,
"name": "new choices of level",
"sort": 11
}
]
27
"new level of sponsorship 1"
false
4
"dropDownList"
true