Skip to content

/campaign_mappings

/subscription_system/campaign_mappings

Target audience: Developers

1
Release version: 3.9.1

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

Required scope

1
/external/subscription_system/r

Curl Example

1
2
3
4
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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

1
2
3
4
5
6
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