Skip to content

Get

/marketing_permissions/get_marketing_permissions

Target audience: Developers

Get marketing permissions

Introduction

This endpoint returns all configured marketing permissions, including marketing permissions that are product-specific. Read more on this behaviour here.

If you would only like to fetch non-product specific marketing permissions, we recommend the usage of the Get Marketing Permissions V1 endpoint instead.

URI

Environment URI
Stage https://payway-api.stage.adeprimo.se/external/api/v2/marketing_permissions/get_marketing_permissions
Production https://backend.worldoftulo.com/external/api/v2/marketing_permissions/get_marketing_permissions

Requirements

Identity Scope
No /external/marketing_permission/r

Parameters

Name Required Type Description
active Optional Boolean Fetch active or inactive permissions. Leave empty to fetch both.
filter Optional String Filter by name.
Size range: ..1024

Curl Example

curl --request GET \
  --url https://payway-api.stage.adeprimo.se/external/api/v2/marketing_permissions/get_marketing_permissions?active=true&filter=sms \
  --header 'accept: application/json' \
  --header 'authorization: Bearer <access_token_with_identity>'

Response

Example response: Active true

HTTP 200
{
  "items": [
      {
            "id": "5b9707e317c0f859830000c3",
            "name": "Email",
            "type": "email",
            "active": true,
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id tellus commodo, vestibulum eros quis, tempus erat. Ut tincidunt dictum sagittis.",
            "created": "2018-09-11T00:10:11Z",
            "checked_default": false,
            "general_communication": false,
            "non_product_only": false,
            "my_account_only": false,
            "titles": [],
            "product_ids": [],
            "meta_data": [
              {
                "key": "foo", 
                "value": "bar",
              },
              {
                "key": "foo2",
                "value": "bar2",
              }
            ]
        },
        {
            "id": "5b9707e317c0f859830000c7",
            "name": "Sms",
            "type": "sms",
            "active": true,
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id tellus commodo, vestibulum eros quis, tempus erat. Ut tincidunt dictum sagittis.",
            "created": "2018-09-11T00:10:11Z"
            "checked_default": false,
            "general_communication": false,
            "non_product_only": false,
            "my_account_only": false,
            "titles": [],
            "product_ids": [],
            "meta_data": [
              {
                "key": "foo",
                "value": "bar",
              },
              {
                "key": "foo2",
                "value": "bar2",
              }
            ]
        },
        {
            "id": "5b9707e317c0f859830000cb",
            "name": "Smoke signals",
            "type": "smoke_signals",
            "active": true,
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id tellus commodo, vestibulum eros quis, tempus erat. Ut tincidunt dictum sagittis.",
            "created": "2018-09-11T00:10:11Z"
            "checked_default": false,
            "general_communication": false,
            "non_product_only": false,
            "my_account_only": false,
            "titles": [],
            "product_ids": [],
            "meta_data": []
        }
    ]
}

Errors

Example error response

HTTP 500 Internal Server Error
{
  "code": "internal_server_error",
  "message": "Ooops something unexpected happened"
}

HTTP 500 Internal Server Error

Name Type Description
internal_server_error Object Something unexpected happened server side