---
agentTools:
  projectIndex: https://marsello.readme.io/llms.txt
---

# /v1/activities/{customerId}/{token}

# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Marsello Loyalty API v1 (Azure AD B2C)",
    "description": "\n# Authorization (v1)\n\n## Get a User\n\n- You will need a user with access to your Marsello account.\n- This only works with users that have access to **exactly one Marsello account**.\n- To create new users for use with the API please invite them inside **Marsello Dashboard > Settings > Users**\n\n## Get a token\n\nReplace with your details and run the command or import into [Postman](https://www.postman.com/downloads/).\n\nUse the following client id: ea711d08-01a1-4c12-957e-9a26809372ed.\n\nUse your username and password.\n\n### Curl\n\n```curl\ncurl --location --request POST 'https://marselloexternal.b2clogin.com/marselloexternal.onmicrosoft.com/B2C_1_ROPC/oauth2/v2.0/token' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'grant_type=password' \\\n--data-urlencode 'scope=https://dev.marsello.com/scope/write.all https://dev.marsello.com/scope/read.all' \\\n--data-urlencode 'username=**YOUR USERNAME**' \\\n--data-urlencode 'password=**YOUR PASSWORD**' \\\n--data-urlencode 'client_id=ea711d08-01a1-4c12-957e-9a26809372ed'\n```\n\n### Javascript(Axios)\n\n```js\nvar axios = require('axios');\nvar qs = require('qs');\nvar data = qs.stringify({\n  'grant_type': 'password',\n  'scope': 'https://dev.marsello.com/scope/write.all https://dev.marsello.com/scope/read.all',\n  'username': '**YOUR USERNAME**',\n  'password': '**YOUR PASSWORD**',\n  'client_id': 'ea711d08-01a1-4c12-957e-9a26809372ed'\n});\nvar config = {\n  method: 'post',\n  url: 'https://marselloexternal.b2clogin.com/marselloexternal.onmicrosoft.com/B2C_1_ROPC/oauth2/v2.0/token',\n  headers: {\n    'Content-Type': 'application/x-www-form-urlencoded'\n  },\n  data : data\n};\n\naxios(config)\n.then(function (response) {\n  console.log(JSON.stringify(response.data));\n})\n.catch(function (error) {\n  console.log(error);\n});\n```\n\n## Use the token\n\nFor all requests you will need to add an **Authorization header** to each request with this token.\n\n```http\nAuthorization: Bearer **your token goes here**\n```\n\nTest your queries in the browser below by clicking the **Authorize** button then try the requests.\n",
    "termsOfService": "https://www.marsello.com/terms",
    "contact": {
      "name": "Marsello Customer Support",
      "email": "api@marsello.com"
    },
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.marsello.com"
    }
  ],
  "paths": {
    "/v1/activities/{customerId}/{token}": {
      "get": {
        "tags": [
          "Activities"
        ],
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2-AzureADB2C": {
        "type": "oauth2",
        "description": "<h3>Azure AD B2C Authentication (v1)</h3> Please use <strong>Request Body</strong> for Client credentials location.<br/> You can copy the request from your browser to use in other scenarios.<br/><br/>",
        "flows": {
          "password": {
            "tokenUrl": "https://marselloexternal.b2clogin.com/marselloexternal.onmicrosoft.com/B2C_1_ROPC/oauth2/v2.0/token",
            "refreshUrl": "https://marselloexternal.b2clogin.com/marselloexternal.onmicrosoft.com/B2C_1_ROPC/oauth2/v2.0/refresh",
            "scopes": {
              "https://dev.marsello.com/scope/write.all": "Read and write to api",
              "https://dev.marsello.com/scope/read.all": "Read from api"
            }
          }
        }
      },
      "OAuth2-Auth0": {
        "type": "oauth2",
        "description": "<h3>Auth0 OAuth 2.0 Authentication (v2)</h3> Uses Authorization Code flow with PKCE for secure authentication.<br/>Request scopes based on the operations you need to perform.<br/><br/>",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://auth.marsello.com/authorize",
            "tokenUrl": "https://auth.marsello.com/oauth/token",
            "scopes": {
              "read:customers": "Read customer data",
              "write:customers": "Create and update customers",
              "read:orders": "Read order data",
              "write:orders": "Create and update orders",
              "read:account": "Read account information",
              "read:activities": "Read activity data",
              "write:activities": "Create activities and manual adjustments",
              "read:rewards": "Read reward data",
              "write:rewards": "Redeem and manage rewards",
              "read:stores": "Read store information",
              "write:devices": "Register and manage devices"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "OAuth2-AzureADB2C": [
        "https://dev.marsello.com/scope/write.all",
        "https://dev.marsello.com/scope/read.all"
      ],
      "OAuth2-Auth0": [
        "read:customers",
        "write:customers",
        "read:orders",
        "write:orders",
        "read:account",
        "read:activities",
        "write:activities",
        "read:rewards",
        "write:rewards",
        "read:stores",
        "write:devices"
      ]
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 101,
      "1": 7,
      "2": 211,
      "3": 132,
      "4": 95,
      "5": 66,
      "6": 189,
      "7": 0,
      "8": 61,
      "9": 233,
      "10": 101,
      "11": 67
    }
  }
}
````