Skip to content

Brands Properties

Overview

Scalar properties will always be included in a response, unless otherwise specified.

Generic Properties

ID

Key Name: id

Example: "f204ed28-b230-4d0a-8c63-48e65a070f35"

A globally unique identifier for the Brands. In most circumstances, this will be a GUID.

Created At

Key Name: created_at

Example: "2018-11-02 10:37:39"

A time stamp representing when the brand was created in the CMS. Largely pointless for front end apps.

Updated At

Key Name: updated_at

Example: "2018-11-05 17:16:14"

A time stamp represented when the brand was last updated in the CMS. Largely pointless for front end apps. Note: The definition of "updated" is quite broad.

Deleted At

The name of this field is misleading

Key Name: deleted_at

Example: "2018-11-07 09:40:00" or null

This field marks whether the brand is "active" (ie visible to end users) or not. If the field is null, this means the brand is active. If the field has a date, this means the brand is inactive, and the date represents the datetime that the brand was marked as inactive.

Consolidated

More information is required

Key Name: consolidated

Example: 1 (true) or 0 (false)

An integer (1 or 0) representing if this brand is a consolidated "pseudo-merchant" or not.

When this is false (0), this brand is a "real" merchant, such as Friska or Browns.

When this is true (1), this brand does not map to a singular merchant, but is instead a placeholder for one of our consolidated huggg products. This is because the consolidated huggg should show up on the list of brands, so it has a pretend / virtual brand associated with it.

Text / UI Properties

Name

Key Name: name

Example: "Generic Coffee Co"

The name of the brand, as it should appear in app.

Website

Key Name: website

Example: "https://huggg.me"

A fully qualified URL to the merchant's website - this is displayed in certain UI forms in app.

How To

As an HTML clob, this field may be quite large

Key Name: how_to

Example: "<p>Just redeem it!</p>"

An HTML string with detailed instructions on how to redeem - the app displays this when pressing the "more information" button on the redemption screen.

Success / Purchased Text

Key Name: success

Example: "Well done! Send another?"

A message which is displayed after someone purchases (and sends) a huggg.

Share Text

More information about the usage of this is required

Key Name: share

Example: "I just bought a huggg #huggged"

A message which is used as the template for the "share huggg" button when purchasing a huggg.

Terms Text

This field is often quite large

Key Name: terms

Example: "<p>You agree to our terms and conditions</p>"

HTML representing the merchant's full terms and conditions for huggg.

Description

Key Name: description

Example: "This coffee shop is great!"

A human readable description of the brand.

Redeem Text

Key Name: redeem

Example: "Good job on redeeming - here's ya' coffee!"

A human readable message which should be displayed after redeeming a huggg for one of this brand's products.

Logo Url

Warning

Many image names end in .gif despite not actually being GIFs (many are PNG). Be wary of image formats.

Key Name: logo_url

Example: "http://api.huggg.me/images/offers/image.png"

A fully qualified link for the logo of the Brand for the UI.

Integration ID

More information could be added here

Key Name: integration_id

Example: "4"

A globally unique identifier for the brand's payment integration. The main ones are Eagle Eye, Code, or Voucher.

Location Text

Key Name: location_text

Example: "Bristol"

Human readable text representing where this brand exists.

Internal API Properties

Email

Not used on the front end, not clear if used internally

Key Name: email

Example: "hey@huggg.me"

An email address for the merchant.

Weight (Ordering)

This works in reverse order

Warning

This is used by the API to sort the data. Front end apps should not need to use this, and should instead accept data as pre-sorted.

Key Name: weight

Example: 10

An integer denoting the Brand's position in the brands list. Higher numbers are displayed first in the list.

Expiry Days

Warning

This is used by the API to calculate a huggg's expiry date. Front end apps should not need this, and should instead accept huggg expiry dates as the authority.

Key Name: expiry

Example: 365

An integer representing the number of days, after purchase that a huggg will be valid for.

User ID

This is internal API behaviour. Do not use this.

Key Name: user_id

Example: "50bbbff6-97da-4aa7-81f4-5acf41a0a5ae"

A globally unique identifier of a user on our system who we deem as the "Merchant Account". If a merchant has a Merchant Account associated with them, and that account as a stripe account associated with it, payments for hugggs will be sent directly into this account, less our commission. If not, payments will go into huggg's own stripe account and payment will be handled by the client team.

Vat

Warning

This is used by the API to calculate billing correctly for a merchant. Front end apps should not need this, and should instead take prices presented by the API as the authority.

Key Name: vat

Example: 20 (20%)

An integer representing the percentage we use for VAT for this brand. This is used when a purchase is made and huggg charges a commission on it. For each transaction we skim off the commission plus the VAT on the commission.

Commission

Warning

This is used by the API to calculate billing correctly for a merchant. Front end apps should not need this, and should instead take prices presented by the API as the authority.

Key Name: commission

Example: 15 (15%)

An integer representing our commission we use for this brand. For each purchase, huggg skims off a commission of the overall retail price.

Map Pin Url

Warning

This is used by the API to calculate map pins. The front end should not need this, and should instead take the map pin url in a store / location as the authority.

Key Name: map_pin_url

Example: "http://api.huggg.me/images/offers/some_image.png"

A fully qualified URL to an image used for map pins. Please note, this is not used directly. Instead, it is used as the fallback if a particular Store / Location for a merchant does not have an image set.