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

NameTypeDescription

identifier*

String

Upscribe UUID

Query Parameters

NameTypeDescription

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

NameTypeDescription

identifier*

String

Upscribe UUID

Request Body

NameTypeDescription

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

NameTypeDescription

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

Request Body

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

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

NameTypeDescription

identifier*

String

Upscribe UUID

recommendation_identifier*

String

Recommendation UUID

Last updated