Skip to content

Get campaigns

/products/campaign/search

Target audience: Developers

Release version: 4.3.11

Get campaigns

Introduction

Used for fetching multiple campaigns.

URI

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

Requirements

Identity Scope
No /external/product/r

Parameters

Name Type Description Required
title_code String Title code a title.
Size range: 1..15 Allowed values: "/^[a-zA-Z-_0-9]+$/"
Yes
page_size Integer Size of result set
Size range: 1..25 Allowed values: Integer Default: 25
No
page_number Integer Skip given result sets
Size range: 1..1000 Allowed values: Integer Default: 1
No
tags String Retrieve only product for specific tags (case sensitive).
Size range: 1..100 Allowed values: "/^([a-zA-Z0-9]+,?\s*)+$/"
No
include_inactive Boolean Includes inactive products Allowed values: true/false Default: false No

Curl Example

Forth page with page size 3

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v2/products/campaign/search?page_size=3&page_number=4&title_code=TITLE_CODE \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \

Response

Successful response with page size 3 and page number 4 and title code TITLE_CODE

HTTP 200
{
  "page_info": {
    "page_size": 3,
    "page_number": 4,
    "more_results_available": true
  },
  "items": [
    {
      "id": "60af542709c04c52a1724a32",
      "valid_from": "2020-05-27T10:11:19+02:00",
      "valid_to": "2022-05-27T10:11:19+02:00",
      "expired": false,
      "product_code": "12",
      "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,
      "image_url": "https://cdn_url/Image/adeprimo/12",
      "vat_code": 25,
      "type": "campaign",
      "transform_to_package": true,
      "customer_can_cancel": false,
      "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": "package_tag",
          "type": "package"
        },
        {
          "name": "campaign_tag",
          "type": "package"
        }
      ],
      "price_periods": [
        {
          "id": "60af542709c04c52a1724a35",
          "payment_method": "adyen",
          "type": "recurring",
          "enabled": true,
          "iteration_type": "month",
          "iteration_length": 3,
          "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": "60af542609c04c52a17249d9"
        }
      ],
      "based_on_package": {
        "id": "60af542609c04c52a17249d6",
        "valid_from": "2020-05-27T10:11:18+02:00",
        "valid_to": "2022-05-27T10:11:18+02:00",
        "expired": false,
        "product_code": "package_code",
        "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",
        "image_url": "https://cdn_url/Image/adeprimo/package_code",
        "vat_code": 25,
        "type": "package",
        "customer_can_cancel": false,
        "rank": 0,
        "show_price_excluding_vat": false,
        "products": [
          {
            "id": "60af542609c04c52a17249d3",
            "product_code": "product_code",
            "type": "product",
            "name": "product_name",
            "description": "short_description",
            "image_url": "https://cdn_url/Image/organisation/product_code",
            "print_product": false
          }
        ],
        "tags": [
          {
            "name": "package_tag",
            "type": "package"
          }
        ],
        "price_periods": [
          {
            "id": "60af542609c04c52a17249d9",
            "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"
            }
          }
        ]
      }
    },
    {
      "id": "60af542709c04c52a1724a39",
      "valid_from": "2020-05-27T10:11:19+02:00",
      "valid_to": "2022-05-27T10:11:19+02:00",
      "expired": false,
      "product_code": "13",
      "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,
      "image_url": "https://cdn_url/Image/adeprimo/13",
      "vat_code": 25,
      "type": "campaign",
      "transform_to_package": true,
      "customer_can_cancel": false,
      "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": "package_tag",
          "type": "package"
        },
        {
          "name": "campaign_tag",
          "type": "package"
        }
      ],
      "price_periods": [
        {
          "id": "60af542709c04c52a1724a3c",
          "payment_method": "adyen",
          "type": "recurring",
          "enabled": true,
          "iteration_type": "month",
          "iteration_length": 3,
          "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": "60af542609c04c52a17249d9"
        }
      ],
      "based_on_package": {
        "id": "60af542609c04c52a17249d6",
        "valid_from": "2020-05-27T10:11:18+02:00",
        "valid_to": "2022-05-27T10:11:18+02:00",
        "expired": false,
        "product_code": "package_code",
        "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",
        "image_url": "https://cdn_url/Image/adeprimo/package_code",
        "vat_code": 25,
        "type": "package",
        "customer_can_cancel": false,
        "rank": 0,
        "show_price_excluding_vat": false,
        "products": [
          {
            "id": "60af542609c04c52a17249d3",
            "product_code": "product_code",
            "type": "product",
            "name": "product_name",
            "description": "short_description",
            "image_url": "https://cdn_url/Image/organisation/product_code",
            "print_product": false
          }
        ],
        "tags": [
          {
            "name": "package_tag",
            "type": "package"
          }
        ],
        "price_periods": [
          {
            "id": "60af542609c04c52a17249d9",
            "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"
            }
          }
        ]
      }
    },
    {
      "id": "60af542709c04c52a1724a40",
      "valid_from": "2020-05-27T10:11:19+02:00",
      "valid_to": "2022-05-27T10:11:19+02:00",
      "expired": false,
      "product_code": "14",
      "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,
      "image_url": "https://cdn_url/Image/adeprimo/14",
      "vat_code": 25,
      "type": "campaign",
      "transform_to_package": true,
      "customer_can_cancel": false,
      "rank": 0,
      "show_price_excluding_vat": false,
      "tags": [
        {
          "name": "package_tag",
          "type": "package"
        },
        {
          "name": "campaign_tag",
          "type": "package"
        }
      ],
      "price_periods": [
        {
          "id": "60af542709c04c52a1724a43",
          "payment_method": "adyen",
          "type": "recurring",
          "enabled": true,
          "iteration_type": "month",
          "iteration_length": 3,
          "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": "60af542609c04c52a17249d9"
        }
      ],
      "based_on_package": {
        "id": "60af542609c04c52a17249d6",
        "valid_from": "2020-05-27T10:11:18+02:00",
        "valid_to": "2022-05-27T10:11:18+02:00",
        "expired": false,
        "product_code": "package_code",
        "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",
        "image_url": "https://cdn_url/Image/adeprimo/package_code",
        "vat_code": 25,
        "type": "package",
        "customer_can_cancel": false,
        "rank": 0,
        "show_price_excluding_vat": false,
        "products": [
          {
            "id": "60af542609c04c52a17249d3",
            "product_code": "product_code",
            "type": "product",
            "name": "product_name",
            "description": "short_description",
            "image_url": "https://cdn_url/Image/organisation/product_code",
            "print_product": false
          }
        ],
        "tags": [
          {
            "name": "package_tag",
            "type": "package"
          }
        ],
        "price_periods": [
          {
            "id": "60af542609c04c52a17249d9",
            "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"
            }
          }
        ]
      }
    }
  ]
}

Errors

This API uses the common error conventions of the Payway API

See common error responses