Skip to content

Get product

/products

Target audience: Developers

Release version: 4.3.5

Get product

Introduction

Returns a single campaign/package/product for an organisation

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v2/products
Production https://backend.worldoftulo.com/external/api/v2/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

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

Get by product_code

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

Response

Successful response for campaign

HTTP 200
{
  "item": {
    "id": "60253f1809c04c24149cba44",
    "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",
          "transition_period_id": "60939c6409c04c02f15e9ae6",
          "price": 210,
          "price_specification": "Inklusive moms 25%: 20.00 SEK, 10%: 10.00 SEK",
          "total_price": 210,
          "description_without_price": "första månaden, därefter 210 kr / månad",
          "localized_description": "210 kr första månaden, därefter 210 kr / månad",
          "localized_per_type_description": "210 kr / månad"
        },
        "details": {
          "type": "scheme",
          "name": "Card"
        },
        "transition_price_period_id": "60253f1809c04c24149cba3f"
      }
    ],
    "based_on_package": {
      "package_code": "package_code",
      "customer_can_cancel": false,
      "vat_code": 25,
      "id": "60253f1809c04c24149cba3d",
      "valid_from": "2020-02-12T15:28:40+01:00",
      "valid_to": "2020-02-12T15:28:40+01:00",
      "integration_code": "package_integration_code",
      "title_code": "TITLE_CODE",
      "name": "Adeprimo summer package",
      "description": "Please buy our nice summer package, it is very nice and gives you news.",
      "additional_short_description": "Nice summer package",
      "rank": 0,
      "show_price_excluding_vat": false,
      "products": [
        {
          "id": "60253f1809c04c24149cba3a",
          "product_code": "product_code",
          "name": "product_name",
          "description": "short_description"
        }
      ],
      "tags": [],
      "price_periods": [
        {
          "id": "60253f1809c04c24149cba3f",
          "payment_method": "adyen",
          "type": "recurring",
          "enabled": true,
          "iteration_type": "month",
          "iteration_length": 1,
          "price": 210,
          "price_description": {
            "period_id": "60af542709c04c52a1724a35",
            "price": 210,
            "price_specification": null,
            "localized_description": "Pris per månad",
          },
          "details": {
            "type": "scheme",
            "name": "Card"
          }
        }
      ]
    }
  }
}

Successful response for package

HTTP 200
{
  "item": {
    "product_code": "package_code",
    "customer_can_cancel": false,
    "vat_code": 25,
    "id": "6025405109c04c2660320bb9",
    "valid_from": "2020-02-12T15:33:53+01:00",
    "valid_to": "2020-02-12T15:33:53+01:00",
    "integration_code": "package_integration_code",
    "title_code": "TITLE_CODE",
    "name": "Adeprimo summer package",
    "description": "Please buy our nice summer package, it is very nice and gives you news.",
    "additional_short_description": "Nice summer package",
    "products": [
      {
        "id": "6025405109c04c2660320bb6",
        "product_code": "product_code",
        "name": "product_name",
        "description": "short_description"
      }
    ],
    "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"
        }
      }
    ]
  }
}

Successful response for product

HTTP 200
{
  "item": {
    "id": "6025408e09c04c2706627430",
    "product_code": "product_code",
    "name": "product_name",
    "description": "short_description"
  }
}

Errors

This API uses the common error conventions of the Payway API

See common error responses