Skip to content

Get campaign mappings

/subscription_system/campaign_mappings

Target audience: Developers

Release version: 3.9.1

Get campaign mappings

Introduction

Gives external applications information on how campaigns are mapped between the external subscription system and Payway. If the external campaign id is not set for the campaign in Payway it is not considered mapped and not returned in the result. In the Payway domain the external_campaign_id is also referred to as integration code. The mapping for the package which the campaign is based on is also returned. The consumer is encouraged to cache the result.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v1/subscription_system/campaign_mappings
Production https://backend.worldoftulo.com/external/api/v1/subscription_system/campaign_mappings

Requirements

Identity Scope
Yes /external/subscription_system/r

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v1/subscription_system/campaign_mappings \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token_with_identity>'

Response

Example response

HTTP 200
{
    "items": [
        {
            "payway_package_code": "one",
            "external_package_id": "external_one",
            "payway_campaign_code": "campaign_code",
            "external_campaign_id": "external_campaign_id"
        },
        {
            "payway_package_code": "two",
            "external_package_id": "external_two",
            "payway_campaign_code": "campaign_code",
            "external_campaign_id": "external_campaign_id"
        }
    ]
}

Errors

Example error response

HTTP 400 Bad Request
{
    "code": "invalid_parameter",
    "field": "account_id",
    "message": "Parameter must match format (/^[a-f\d]{24}$/)"
}

HTTP 400 Bad Request

Name Type Description
invalid_content_type_error Object The requests Content-Type header isn't set to application/json.

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side