Recommendations

Get All Upscribe Recommendations

GET https://api.sparkloop.app/v2/upscribes/:identifier/recommendations

Returns all recommendations for an Upscribe, including paused ones. Recommendations are ordered in descending order by created_at, meaning the first page shows the latest recommendations.

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

Query Parameters

Name
Type
Description

page

integer

Results page to return. Default is 1

per_page

integer

How many results to return per page. Default is 50

{
  "recommendations": [
    <Recommendation Object>,
    <Recommendation Object>,
    <Recommendation Object>,
  ],
  "meta": {
    "per_page": 50,
    "page": 2,
    "total_pages": 3,
    "total_recommendations": 62
  }
}

Generate recommendations

POST https://api.sparkloop.app/v2/upscribes/:identifier/recommendations

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

Request Body

Name
Type
Description

country_code

String

Subscriber's ISO3166 Alpha2 country code. Optional but VERY important. Without it, we can't generate the correct recommendations.

limit

Integer

How many recommendations you want to generate. To avoid inflating numbers, which then negatively impact your performance, always generate the number of recommendations you're going to display. If no limit is passed 1 recommendation will be returned.

{
  "recommendations": [
    <Recommendation Object>,
    <Recommendation Object>,
    <Recommendation Object>,
  ]
}

Edit Recommendation

PUT https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

Request Body

Name
Type
Description

reason*

String

This is what will be displayed in the recommendation widget.

{
  "recommendation": <Recommendation Object>
}

Pin Recommendation

PUT https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier/pin

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

{
  "recommendation": <Recommendation Object>
}

Unpin Recommendation

PUT https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier/unpin

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

{
  "recommendation": <Recommendation Object>
}

Pause Recommendation

PUT https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier/pause

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

{
  "recommendation": <Recommendation Object>
}

Unpause Recommendation

PUT https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier/unpause

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

{
  "recommendation": <Recommendation Object>
}

Delete Recommendation

DELETE https://api.sparkloop.app/v2/upscribe/:identifier/recommendations/:recommendation_identifier

Path Parameters

Name
Type
Description

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

Last updated