Collections API
List collections
GET
/
v1
/
collections
List collections
curl --request GET \
--url https://api.oneofnone.io/v1/collections \
--header 'x-api-key: <api-key>'import requests
url = "https://api.oneofnone.io/v1/collections"
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', 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",
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"
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")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneofnone.io/v1/collections")
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{
"data": [
{
"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>"
}
],
"pagination": {}
}Authorizations
Query Parameters
Available options:
ACTIVE, DRAFT, INACTIVE Required range:
1 <= x <= 1000Available options:
asc, desc ⌘I
List collections
curl --request GET \
--url https://api.oneofnone.io/v1/collections \
--header 'x-api-key: <api-key>'import requests
url = "https://api.oneofnone.io/v1/collections"
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', 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",
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"
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")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneofnone.io/v1/collections")
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{
"data": [
{
"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>"
}
],
"pagination": {}
}