List the collections you can send
const url = 'https://api.1up.gift/collections';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.1up.gift/collections \ --header 'Authorization: Bearer <token>'A collection lets the recipient choose their own gift from a set. You get the global curated collections plus any custom ones built for your account. Collections are country- and currency-specific.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”ISO 3166-1 alpha-2 country filter.
Only return collections priced in this currency.
Only return collections that can be sent for this amount or less.
Responses
Section titled “Responses”The matching collections.
A set of gifts the recipient chooses from: enough to identify it, price it and present it in a picker.
object
The collection id. Pass it as collectionId when sending.
The collection name.
“curated” (a global, banded collection) or “custom” (this customer’s own, fixed-value collection).
The ISO 3166-1 alpha-2 country this collection sends for.
The ISO code of the currency this collection is priced in.
The currency’s display prefix (e.g. “£”), so a caller can format values the same prefix-only way the Label does.
A custom collection’s fixed per-recipient value; null for curated collections (which send at one of their value points, or a custom amount).
Whether the caller must supply a value to send this collection. True for curated collections (the sender chooses the band/amount); false for custom collections, which carry their own fixed value.
Whether a curated collection accepts any positive amount (rather than only its fixed value points).
A curated collection’s value points (the bands it can be sent at), ascending. Empty for custom.
The value points as ready-to-display picker choices: canonical numeric value mapped to its prefix- formatted label. Null when there’s nothing to pick from (custom, or a curated collection that takes any amount).
The bounds of a curated collection’s value points, for a range hint when any amount is allowed.
A ready-to-display label combining the name with its value context, for a picker.
A set of gifts the recipient chooses from: enough to identify it, price it and present it in a picker.
object
The collection id. Pass it as collectionId when sending.
The collection name.
“curated” (a global, banded collection) or “custom” (this customer’s own, fixed-value collection).
The ISO 3166-1 alpha-2 country this collection sends for.
The ISO code of the currency this collection is priced in.
The currency’s display prefix (e.g. “£”), so a caller can format values the same prefix-only way the Label does.
A custom collection’s fixed per-recipient value; null for curated collections (which send at one of their value points, or a custom amount).
Whether the caller must supply a value to send this collection. True for curated collections (the sender chooses the band/amount); false for custom collections, which carry their own fixed value.
Whether a curated collection accepts any positive amount (rather than only its fixed value points).
A curated collection’s value points (the bands it can be sent at), ascending. Empty for custom.
The value points as ready-to-display picker choices: canonical numeric value mapped to its prefix- formatted label. Null when there’s nothing to pick from (custom, or a curated collection that takes any amount).
The bounds of a curated collection’s value points, for a range hint when any amount is allowed.
A ready-to-display label combining the name with its value context, for a picker.
Examplegenerated
[ { "id": 1, "name": "example", "kind": "example", "country": "example", "currency": "example", "currencyPrefix": "example", "value": 1, "requiresValue": true, "allowCustomValue": true, "valuePoints": [ 1 ], "valueChoices": "example", "minValue": 1, "maxValue": 1, "label": "example" }]A set of gifts the recipient chooses from: enough to identify it, price it and present it in a picker.
object
The collection id. Pass it as collectionId when sending.
The collection name.
“curated” (a global, banded collection) or “custom” (this customer’s own, fixed-value collection).
The ISO 3166-1 alpha-2 country this collection sends for.
The ISO code of the currency this collection is priced in.
The currency’s display prefix (e.g. “£”), so a caller can format values the same prefix-only way the Label does.
A custom collection’s fixed per-recipient value; null for curated collections (which send at one of their value points, or a custom amount).
Whether the caller must supply a value to send this collection. True for curated collections (the sender chooses the band/amount); false for custom collections, which carry their own fixed value.
Whether a curated collection accepts any positive amount (rather than only its fixed value points).
A curated collection’s value points (the bands it can be sent at), ascending. Empty for custom.
The value points as ready-to-display picker choices: canonical numeric value mapped to its prefix- formatted label. Null when there’s nothing to pick from (custom, or a curated collection that takes any amount).
The bounds of a curated collection’s value points, for a range hint when any amount is allowed.
A ready-to-display label combining the name with its value context, for a picker.
Examplegenerated
[ { "id": 1, "name": "example", "kind": "example", "country": "example", "currency": "example", "currencyPrefix": "example", "value": 1, "requiresValue": true, "allowCustomValue": true, "valuePoints": [ 1 ], "valueChoices": "example", "minValue": 1, "maxValue": 1, "label": "example" }]