Skip to content

Get theme

/get_theme

Target audience: Developers

Release version: 4.5.6

Get theme

Introduction

This endpoint returns all the HTML and CSS templates that are included in a given theme.

Hierarchies

This endpoint has fields that are calculated based on a hierarchy. This means that we will attempt to find the value from several points if it is not found immediately.

Field: html

Priority Case Description
1 Theme with the given ID has configured HTML templates HTML-structure found with the given ID is returned
2 Theme with the given ID has ⅔ templates configured. A default template for the third/missing type exists HTML-structure found with the given ID is returned, combined with the default (third) template
3 Theme with the given ID has no templates configured. Default templates for all types exist. HTML-structure marked as default is returned

Field: css

Priority Case Description
1 Theme with the given ID has a configured CSS template CSS-structure found with the given ID is returned
2 Theme with the given ID does not have a CSS template configured. A default template exists CSS-template marked as default is returned

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v5/marketing/get_theme
Production https://backend.worldoftulo.com/external/api/v5/marketing/get_theme

Requirements

Feature needs to be enabled by Adeprimo. Please contact support to enable.

Identity Scope
No /external/marketing/r

Parameters

Name Required Type Description
id Yes String The ID of the theme we should fetch

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v5/marketing/get_theme?id=ABBADFADFADFADFADF \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token>'

Response

HTTP 200
{
  "item": {
    "id": "ADFADFADFADFADFADF",
    "name": "My theme",
    "html": {
      "purchase_flow": null,
      "receipt": null,
      "marketplace": null
    },
    "css": null
  }
}

Errors

This API uses the common error conventions of the Payway API

See common error responses