Skip to content

List your saved templates

GET
/templates
curl --request GET \
--url 'https://api.1up.gift/templates?offset=0&limit=100' \
--header 'Authorization: Bearer <token>'

A template is a saved send preset — gift, value, country, greeting and expiry — created in 1UP. Send one with POST /send/template. Newest first.

offset
integer format: int32
0

How many templates to skip. Defaults to 0.

limit
integer format: int32
default: 100

Templates per page, 1–200. Defaults to 100.

The matching page of templates.

Array<object>

A saved send preset: the gift, value, country, greeting and expiry to use, created in 1UP and sent with POST /send/template.

object
id

The template id.

integer format: int32
name

The template name, as shown in 1UP.

null | string
giftSelectionType

How the template picks the gift: a single product or a collection the recipient chooses from.

null | string
giftProductId

The product this template sends, when it sends a single gift.

null | integer format: int32
giftsCollectionId

The collection this template sends, when the recipient chooses.

null | integer format: int32
giftName

The name of that product or collection as it stood when the template was saved, so a caller can label the template without a second lookup.

null | string
value

The per-recipient face value the template sends at.

number format: double
currency

The ISO code of the currency Value is denominated in, so a caller can render the budget. Null for a template whose gift has since been deleted, leaving nothing to say what its value was priced in.

null | string
country

The ISO 3166-1 alpha-2 country the template sends for.

null | string
wrappingKey

The gift wrapping the template uses, unless you override it.

null | string
fromName

Who the gift is from, unless you override it.

null | string
message

The personal message, unless you override it.

null | string
expiryAfterDays

Days after claiming that gifts from this template expire, or null for the default policy.

null | integer format: int32
creationDate

When the template was created, in UTC.

string format: date-time