Collections API
Get collection
GET
/
v1
/
collections
/
{id}
Get collection
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.oneofnone.io/v1/collections/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.oneofnone.io/v1/collections/{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.oneofnone.io/v1/collections/{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 => [
"x-api-key: <api-key>"
],
]);
$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.oneofnone.io/v1/collections/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.oneofnone.io/v1/collections/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneofnone.io/v1/collections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"slug": "<string>",
"created_at": "<string>",
"type": "<string>",
"description": "<string>",
"quantity": 123,
"keywords": "<unknown>",
"redirect_type": "<string>",
"redirect_url": "<string>",
"layout_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_id": 123,
"redirect_conditions": [
{
"id": "<string>",
"conditions": {
"type": "group",
"conditions": [
{
"type": "condition",
"field": "date",
"value": {
"date": "<string>",
"time": {
"hour": 6,
"minute": 29
},
"timezone": "<string>"
}
}
]
},
"onTrue": {
"type": "redirect",
"redirectUrl": "<string>",
"layoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layoutTitle": "<string>"
},
"title": "<string>",
"onFalse": {
"type": "redirect",
"redirectUrl": "<string>",
"layoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layoutTitle": "<string>"
}
}
],
"registration_form_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"registration_settings": {},
"activity_settings": {},
"image": {
"url": "<string>"
},
"video": {
"url": "<string>",
"poster_url": "<string>"
},
"share_image": {
"url": "<string>"
},
"gallery": [
{
"url": "<string>",
"file_type": "<string>",
"poster_url": "<string>",
"order": 123,
"tags": "<unknown>",
"variants": "<unknown>"
}
],
"product_name_template": "<string>",
"retail_settings": {},
"launch_date": "<string>",
"attributes": "<unknown>",
"variants": "<unknown>",
"updated_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Path Parameters
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Get collection
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.oneofnone.io/v1/collections/{id}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.oneofnone.io/v1/collections/{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.oneofnone.io/v1/collections/{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 => [
"x-api-key: <api-key>"
],
]);
$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.oneofnone.io/v1/collections/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.oneofnone.io/v1/collections/{id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneofnone.io/v1/collections/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"status": "<string>",
"slug": "<string>",
"created_at": "<string>",
"type": "<string>",
"description": "<string>",
"quantity": 123,
"keywords": "<unknown>",
"redirect_type": "<string>",
"redirect_url": "<string>",
"layout_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"app_id": 123,
"redirect_conditions": [
{
"id": "<string>",
"conditions": {
"type": "group",
"conditions": [
{
"type": "condition",
"field": "date",
"value": {
"date": "<string>",
"time": {
"hour": 6,
"minute": 29
},
"timezone": "<string>"
}
}
]
},
"onTrue": {
"type": "redirect",
"redirectUrl": "<string>",
"layoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layoutTitle": "<string>"
},
"title": "<string>",
"onFalse": {
"type": "redirect",
"redirectUrl": "<string>",
"layoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"layoutTitle": "<string>"
}
}
],
"registration_form_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"registration_settings": {},
"activity_settings": {},
"image": {
"url": "<string>"
},
"video": {
"url": "<string>",
"poster_url": "<string>"
},
"share_image": {
"url": "<string>"
},
"gallery": [
{
"url": "<string>",
"file_type": "<string>",
"poster_url": "<string>",
"order": 123,
"tags": "<unknown>",
"variants": "<unknown>"
}
],
"product_name_template": "<string>",
"retail_settings": {},
"launch_date": "<string>",
"attributes": "<unknown>",
"variants": "<unknown>",
"updated_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"details": {}
}