Skip to content

Get product

/products

Target audience: Developers

1
Release version: 4.5.9

Get product

Introduction

Returns a single campaign/package/product for an organisation

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v4/products
Production https://backend.worldoftulo.com/external/api/v4/products

Requirements

Identity Scope
No /external/product/r

Parameters

Name Type Description
id String Id of a product. Cannot be used together with product_code.
Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i"
product_code String The product code for a product/package/campaign. Cannot be used together with id.
Size range: 1..50 Allowed values: "/^[a-zA-Z-_0-9]+$/"

Curl Example

Get by id

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v4/products?product_id=52a781d6400e06897c00000f \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \

Get by product_code

1
2
3
4
curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v4/products?product_code=adeprimo_digital \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \

Response

Successful response for campaign

1
HTTP 200
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
{
  "item": {
    "id": "60253f1809c04c24149cba44",
    "expired": false,
    "image_url": null,
    "valid_from": "2020-02-12T15:28:40+01:00",
    "valid_to": "2020-02-12T15:28:40+01:00",
    "product_code": "trial",
    "integration_code": "campaign_integration_code",
    "title_code": "TITLE_CODE",
    "name": "Adeprimo summer campaign",
    "description": "Please buy our nice summer campaign, it is very nice and gives you news.",
    "additional_short_description": null,    
    "transform_to_campaign_package": true,
    "customer_can_cancel": false,
    "vat_code": 25,
    "rank": 0,
    "show_price_excluding_vat": false,
    "allow_gift_purchase": false,
    "allow_only_gift_purchase": false,
    "allow_voucher_purchase": false,
    "allow_only_voucher_purchase": false,
    "tags": [
      {
        "name": "campaign_tag",
        "type": "package"
      }
    ],
    "price_periods": [
      {
        "id": "60253f1809c04c24149cba47",
        "payment_method": "adyen",
        "type": "recurring",
        "enabled": true,
        "iteration_type": "month",
        "iteration_length": 1,
        "iterations": 1,
        "price": 210,
        "price_description": {
          "period_id": "60af542709c04c52a1724a35",
          "price_details": [
            {
                "name": "Combo campaign",
                "total_price": 210.0,
                "price_excluding_vat": 157.5,
                "vat": 25,
                "price_specification": "",
                "description_without_price": "första månaden, därefter avslutas prenumerationen",
                "description_without_price_excluding_vat": "första månaden, därefter avslutas prenumerationen",
                "localized_description": "210 första månaden, därefter avslutas prenumerationen",
                "localized_description_excluding_vat": "157.5 kr första månaden, därefter avslutas prenumerationen",
                "localized_per_type_description": "210 kr / månad",
                "localized_per_type_description_excluding_vat": "157.5 kr / månad"
            }
          ],

          # Recursive object
          "transition_period": {
            "id": "60af542709c04c52a1724a35",
            "product_id": "529jfa98jfda9jfad98dfja",
            "product_code": "my_first_transition",
            "payment_method": "adyen",
            "type": "recurring",
            "enabled": true,
            "iteration_type": "month",
            "iteration_length": 3,
            "iterations": 1,
            "price": 210,
            "price_excluding_vat": 197.4,
            "vat": 6,
            "details": {
              "type": "scheme",
              "name": "Card"
            },
            "transition_period": {
              "id": "60af542709c04c52a1724b73",
              "product_id": "529jfa98jfda9jfad98dfja",
              "product_code": "my_second_transition",
              "payment_method": "adyen",
              "type": "recurring",
              "enabled": true,
              "iteration_type": "month",
              "iteration_length": 3,
              "iterations": 1,
              "price": 210,
              "price_excluding_vat": 197.4,
              "vat": 6,
              "details": {
                "type": "scheme",
                "name": "Card"
              },
              "transition_period": null
            }
          },
        },
        "details": {
          "type": "scheme",
          "name": "Card"
        },
      }
    ],
    "based_on_package": {
      "id": "513513oimkoidfgdosafjksdoijf",
      "valid_from": "2014-04-10T02:00:00+02:00",
      "valid_to": "2015-04-10T02:00:00+02:00",
      "expired": false,
      "product_code": "package_code",
      "integration_code": "integration_code",
      "title_code": "title_code",
      "name": "Adeprimo package",
      "description": "Lorem ipsum",
      "additional_short_description": "",
      "rank": 0,
      "vat_code": 6,
      "type": "package",
      "show_price_excluding_vat": false,
      "customer_can_cancel": false,
      "products": [
        {
          "id": "60af490709c04c3b4cccb981",
          "product_code": "product_code_14",
          "type": "product",
          "name": "product_name",
          "description": "short_description",
          "image_url": "https://cdn_url/Image/adeprimo/product_code_14",
          "print_product": false
        }
      ],
      "tags": [],
      "price_periods": [
        {
          "id": "6025405109c04c2660320bbb",
          "payment_method": "adyen",
          "type": "recurring",
          "enabled": true,
          "iteration_type": "month",
          "iteration_length": 1,
          "price": 210,
          "details": {
            "type": "scheme",
            "name": "Card"
          },
          "price_description": {
            "period_id": "5346662f400e06f713000026",
            "price_details": [
              {
                "name": "product_name",
                "total_price": 210.0,
                "price_excluding_vat": 197.4,
                "vat": 6,
                "price_specification": "",
                "localized_description": "Pris per månad"
              }
            ]
          }
        }
      ]
    }
  }
}

Successful response for package

1
HTTP 200
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  "item": {
    "id": "513513oimkoidfgdosafjksdoijf",
    "valid_from": "2014-04-10T02:00:00+02:00",
    "valid_to": "2015-04-10T02:00:00+02:00",
    "expired": false,
    "product_code": "package_code",
    "integration_code": "integration_code",
    "title_code": "title_code",
    "name": "Adeprimo package",
    "description": "Lorem ipsum",
    "additional_short_description": "",
    "rank": 0,
    "vat_code": 6,
    "type": "package",
    "show_price_excluding_vat": false,
    "customer_can_cancel": false,
    "products": [
      {
        "id": "60af490709c04c3b4cccb981",
        "product_code": "product_code_14",
        "type": "product",
        "name": "product_name",
        "description": "short_description",
        "image_url": "https://cdn_url/Image/adeprimo/product_code_14",
        "print_product": false
      }
    ],
    "tags": [],
    "price_periods": [
      {
        "id": "6025405109c04c2660320bbb",
        "payment_method": "adyen",
        "type": "recurring",
        "enabled": true,
        "iteration_type": "month",
        "iteration_length": 1,
        "price": 210,
        "details": {
          "type": "scheme",
          "name": "Card"
        },
        "price_description": {
          "period_id": "5346662f400e06f713000026",
          "price_details": [
            {
              "name": "product_name",
              "total_price": 210.0,
              "price_excluding_vat": 197.4,
              "vat": 6,
              "price_specification": "",
              "localized_description": "Pris per månad"
            }
          ]
        }
      }
    ]
  }
}

Successful response for product

1
HTTP 200
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "item": {
    "id": "60af490709c04c3b4cccb981",
    "product_code": "product_code_14",
    "type": "product",
    "name": "product_name",
    "description": "short_description",
    "image_url": "https://cdn_url/Image/adeprimo/product_code_14",
    "print_product": false
  }
}

Errors

This API uses the common error conventions of the Payway API

See common error responses