🎯Challenges

This page provides an exhaustive description of all the routes available for managing challenges. Each route is explained, with its parameters, required headers, possible responses and examples of use

➑️ Get all challenges from a location

➑️ Get a location challenge

➑️ Activate location challenge

πŸ’‘ Models

Challenge

Parameter
Type
Explanation
Mandatory

id

string

Unique ID for the challenge

βœ…

fyre_id

string

Unique Location ID in Fyre system

βœ…

brand_id

string

Unique ID of the brand

βœ…

brand_name

string

Name of the brand

βœ…

title

string

Title of the challenge

βœ…

description

string

Description of the challenge

βœ…

contact_email

string

Brand contact email

βœ…

logo_url

string

Logo URL in storage

❌

banner_url

string

Banner URL in storage

❌

terms_and_conditions

Array<string>

Terms and conditions

❌

terms_and_conditions_url

string

URL to term and conditions document

❌

goal_type

Type of the goal

βœ…

goals

Challenge goal

βœ…

products

Array of product IDs for this challenge

βœ…

start_date

string

Challenge start date format ISO 8601

βœ…

end_date

string

Challenge end date format ISO 8601

βœ…

location_challenge_status

Challenge status (see LocationChallengeStatus for more informations)

βœ…

sales

{

[referential_ref: string]: LocationChallengeSalesProduct

}

A map of product level sales data for this challenge. Each key represents a product id. Each value contains the current sales progress for that specific product, including quantity and revenue during the challenge period. For uplift challenges, the object also includes the quantity and revenue from the same period last year, which serve as the baseline for calculating the uplift.

❌

accepted_at

string

Date when the challenge was accepted format ISO 8601

❌

completed_at

string

Date when the challenge was completed format ISO 8601

❌

published_at

string

Date when the challenge was published format ISO 8601

❌

created_at

string

Date when the challenge was created format ISO 8601

βœ…

updated_at

string

Date when the challenge was updated format ISO 8601

❌

ChallengeGoalType Enum

Value
Explanation

amount

The goal is to reach a specific revenue amount during the challenge period. The challenge is completed when the location generates at least the target revenue

quantity

The goal is to reach a specific quantity sold during the challenge period. The challenge is completed when the location sells at least the target number of units

uplift

The goal is to achieve growth compared to the same period from the previous year. When the challenge type is uplift, the target represents a percentage increase. The location must sell the required percentage more in quantity than it did during the same period last year. The challenge is completed when the current period quantity is at least N percent higher than the quantity from the matching period a year earlier.

ChallengeProduct

Parameter
Type
Explanation
Mandatory

referential_ref

string

ID of the product in brands system

βœ…

name

string

Name of the product

βœ…

image_url

string

Image URL of the product

❌

LocationChallengeStatus Enum

Value
Explanation

published

Challenge status is set as "published" once the brand published it

accepted

Challenge status is set as "accepted" if location has accepted to participate in a challenge

completed

Challenge status is set as "completed" if location has reached the challenge goal

expired

The challenge status is set to "expired" if the challenge has ended, the location did not meet the goal in time, or the location did not participate in the challenge.

disabled

The challenge status is set to "disabled" when the brand has published the challenge, but the location's access has been revoked.

LocationChallengeGoals

Parameter
Type
Explanation
Mandatory

quantity

number

The target quantity the location needs to reach during the challenge period. This value is used when the challenge goal type is quantity or uplift.

❌

revenue

number

The target revenue the location needs to reach during the challenge period. This value is only used when the challenge goal type is amount.

❌

LocationChallengeSalesProduct

Parameter
Type
Explanation
Mandatory

quantity

number

The total number of units sold for this product during the active challenge period

βœ…

revenue

number

The total revenue generated by this product during the active challenge period.

βœ…

previous_quantity

number

The total number of units sold for this product during the same period last year. This value is used as the baseline for uplift challenges, where the location must sell more units than this historical benchmark.

❌

previous_revenue

number

The total revenue generated by this product during the same period last year. This field can be used for analytics, visualisations, or reporting. It is not used for current challenge validation unless the challenge logic explicitly references revenue uplift.

❌

LocationChallengesFilterInput

Parameter
Type
Explanation
Mandatory

status

When provided, it will return only challenges that match the specified status.

❌

brand_id

Array<string>

When provided, it will return only challenges that were published by a speicifc brand

❌

πŸ“© Get all challenges from a location

This route enables you to retrieve the challenges linked to a specific location. It provides a detailed list of all current challenges, along with their descriptions, statuses, and other relevant details.

GET https://api.fyre.app/api/v1/locations/{fyre_id}/challenges

circle-info

Requires permission:

  • challenges.list

Route Params⬇️

Query Params

Parameter
Type
Explanation
Mandatory

filter

LocationChallengesFilterInput

If provided, it will filter the location challenges by status and/or brand.

❌

πŸ“€ Responses

chevron-right200 - Successhashtag

Retrieved challenges

Example:

chevron-right401 - Unauthorizedhashtag

Unauthorized

πŸ“– Route Params Example

πŸ“© Get a location challenge

This route allows you to retrieve details of a specific challenge linked to a location. By accessing this route, you will obtain full information on the challenge, such as its status, requirements and the results associated with the location concerned.

GET https://api.fyre.app/api/v1/locations/{fyre_id}/challenges/{challenge_id}

circle-info

Requires permission:

  • challenges.read

Route Params⬇️

πŸ“€ Responses

chevron-right200 - Successhashtag

Retrieved challenge

Example:

chevron-right401 - Unauthorizedhashtag

Unauthorized

πŸ“– Params example

πŸ“« Activate location challenge

This route allows you to accept a challenge associated with a specific location. Once accepted, the challenge will begin tracking sales for that location in real time

POSThttps://api.fyre.app/api/v1/locations/{fyre_id}/challenges/{challenge_id}/activate

circle-info

Requires permission:

  • challenges.accept

Payload ⬇️

πŸ“€ Responses

chevron-right200 - Successhashtag

Challenge accepted

Example:

chevron-right401 - Unauthorizedhashtag

Unauthorized

πŸ“– Payload example

Last updated