Book a call

Fill out the form and we will call you back as soon as possible

Emergency situation

In case of emergencies or breakdowns, you can send an SMS to our emergency hotline

On-call phone (SMS only)

+45 29 70 15 95

Send an SMS with the following information:

  • Your name and webshop
  • Description of the problem
  • Your callback phone number

Notes: This service is only for critical situations where your webshop is down or has serious problems. For regular support, please use our normal support channels.

Shoporama Apps

Below you will find information on how to develop Shoporama Apps.

1 Overview

Overall, a Shoporama app provides access to two things when a user installs it on their shop:

1.

REST-interfacet

2.

at indsætte kode på udvalgte sider

Everyone can create apps as a starting point, but in order for other shops to use your apps, it requires approval.

2 Settings

The settings options for apps are:

Field Content
Name Short name. Used in overviews and emails.
Description Extended description of what your app does. It is not possible to use HTML codes. Only a-tags for links.
Category Optional category
Access Because your app creates an api token in the shop that installs the app, you can choose whether you want write, read, or all rights to that api token.
Monthly price A monthly price that your app costs. An 80/20 split is made, with Shoporama keeping 20% and paying out the rest. Once an app is switched to active, you can no longer increase the price. Only down.
Callback URL

One URL that can receive all callbacks and events. The argument ?type={type} and&webshop_id={id} is added to all callbacks, where type is the events or hooks below, andwebshop_id is a unique ID of the webshop in question. Three events are also sent when the app is installed, the user updates settings, and when it is deleted. These are install, update, anduninstall. The latter three will contain the following json:

{
    "webshop_id": 1,
    "webshop_url": "https://www.example.com/",
    "app_token": "dcbfe5ad9e8af3495ca4582e364c1bce",
    "app_token_daily_limit": 10000,
    "app_token_current_usage": 200,
    "installed": 1692857535,
    "fields": {
    }
}

If your app uses fields where the user can enter information, this will be included in the fields field.

For events and webhooks, the call will contain the data contained in our events and webhooks. These vary whether they are events or products, orders, etc.

To validate if a callback comes from Shoporama, we add the headerx-app token: {your token} to all our calls. If that token matches your own, the callback is from Shoporama. Also, all callbacks come from localshoporama.dk, so you can also check on the ip address.

Only allow on the following shops Option to only allow the app on a series of webshops.
Webhooks Here you choose which webhooks you want to receive. You can receive webhooks when changes are made to orders (status, paid, created), products, or stock.
Events

Here you choose which events you want to receive. Events have the option to be sent more frequently than webhooks, for example, when a user adds something to the basket or goes to checkout. We have the following events:

add_to_basket update_basket view_basket view_address view_shipping view_approve view_thanks approved order_created paid add_label remove_label

3 REST access

When an app is installed in a shop, an api key is created for the app and with that key you can access ourrest interface for the shop in question. Api keys are sent to your callback url as theapp_token field. Note that the same rules apply for api access as for regular api keys in terms of usage.

In addition to accessing our regular rest interface, it is possible to pull a list of webshops that have installed your app by calling:

GET /REST/app-status HTTP/2
Host: www.shoporama.dk
Authorization: App {din token}

Note that auth-scheme is App.

4 Add code

It is possible to insert code in four places on the shops that install the app:

Efter <head>
Efter <body>
Før </head>
Før </body>

It is possible to insert code on all pages, or only products, landing pages, categories, static pages, blog posts, or on /search, /basket, /address, /shipping, /approve, /thanks, /order, and /also.

It is possible to use Smarty code in the code that is inserted and it is possible to access the values entered by the user in fields like <{$app_vars.var_name}>.

The above can be combined in any way you want, so it is possible to insert a piece of code in <head>on all pages, but on /thanks you want to add something extra.

5 Meta data

Fields allows you to create some input fields for your users to fill in when they install the app. You can create as many fields as you want. The values are included in callbacks when the user updates the settings.

We support the following field types:

text
integer
boolean
list
color
richtext
code

Eksterne felter

For både text og list felter er det muligt at bruge eksterne værdier.

Eksterne lister

For lister trækkes værdierne fra https://example.com/callback?type=field&name={name}, og skal returnere json i key:value format:

{
    "key1": "value1",
    "key2": "value2"
}

Eksterne tekstfelter

For tekstfelter hentes værdien fra samme URL som lister. Værdien vises som read-only for brugeren. Formatet kan være enten en simpel tekststreng eller JSON:

{
    "value": "tekst værdi"
}

Eller bare returner en simpel tekststreng direkte.