{
  "openapi": "3.1.1",
  "info": {
    "title": "Personalisation Client Integration",
    "description": "Integrate personalisation in clients, for example show a customers status in programs.",
    "contact": {
      "name": "Team Personalisering",
      "email": "team.personalisering@entur.org"
    },
    "version": "2026.05.1"
  },
  "externalDocs": {
    "description": "Entur Developer Documentation",
    "url": "https://developer.entur.org/pages-personalisation-docs-personalisation-client-integration-guide"
  },
  "servers": [
    {
      "url": "https://api.staging.entur.io/personalisation"
    }
  ],
  "security": [
    {
      "jwt": []
    }
  ],
  "tags": [
    {
      "name": "Programs",
      "description": "\nGet information about a program.\n"
    },
    {
      "name": "Members",
      "description": "\nInformation and management of members in a program.\n"
    },
    {
      "name": "Customers",
      "description": "\nFind information about memberships and status a customer might have in programs.\n"
    },
    {
      "name": "Orders",
      "description": "Information and management of orders that are or should be processed by a program."
    }
  ],
  "paths": {
    "/v1/transactions": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Get all transactions for orderId",
        "description": "Get all transactions created by an order ID in all available programs.",
        "operationId": "findTransactionsByOrderId",
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": true,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TransactionByOrder"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/customer-memberships": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Query program memberships of a customer",
        "description": "\nQuery the memberships of a customer using customer ID. Returns list of program memberships,\nwith the member ID and any member data that is stored in each program.\n",
        "operationId": "queryCustomerMemberships",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerMembershipsQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CustomerMembership"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}": {
      "get": {
        "tags": [
          "Programs"
        ],
        "summary": "Get program",
        "description": "Get information about a program",
        "operationId": "getActiveProgram",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Program"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation.programs.program:les",
              "personalisation.admin.programs:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/current-level-summaries": {
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Current status of a customer",
        "description": "\nCurrent Level Summary contains information about the current status of a customer in a program, with information about\nhow many points the customer has, what level on the reward ladder they're at, the rewards they have achieved and any suspensions\nthey might have.\n\nBy default, the endpoint will return the customers status at the time the request was made. However, you can specify \nthe request parameter statusAt to set which time to query the status for.\n\nReturns a list of summaries, one for each program the customer is a member of. You can choose to filter on programs, using the program reference.\nWill return empty list if customer is not a member of any programs.\n",
        "operationId": "queryCurrentLevelSummaries",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CurrentLevelSummaryQuery"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CurrentLevelSummary"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get members",
        "description": "Returns a paged list of all members in a program.  Default page size is 20, maximum page size is 100.",
        "operationId": "getMembers",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "customerId",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageMember"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/reward-ladder": {
      "post": {
        "tags": [
          "Programs"
        ],
        "summary": "Get reward ladder for a potential member",
        "description": "\nReward ladder for a potential member shows the levels available, what is required to achieve each level \nand what rewards are given in each level with the specified member specification. For reis and skyss reiserabatt, no request body is required.\nFor other programs, the member specification should be provided in the body, and it should be a JSON object with keys and values matching the member metadata definitions configured for the program.\nIn these cases, request access to the programs custom generated spec.\nThe member specification is used to determine which levels are relevant for the potential member and what rewards they would get in each level.\n        ",
        "operationId": "getRewardLadder",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {
                  "type": "object"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberRewardLadder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": "personalisation.programs.program:les"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get member",
        "description": "Get a member by member ID in a program.",
        "operationId": "getMember",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/deferred-registration": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Deferred registration",
        "description": "\nReplays the events for a given order ID and order line ID to manually register potential points for a given customer ID.\nReturns `422 Unprocessable Entity` if no points could be given to the customer.\nReturns `200 OK` with details about the points given if successful.\n",
        "operationId": "deferredRegistrationForProgram",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeferredRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PointsGivenResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoPointsGivenResult"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": "personalisation-customerdata-global:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/transactions": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get all transactions for a member",
        "description": "Paged list of all transactions for a member, sorted by `validFrom` descending. Default page size is 20, maximum page size is 100.",
        "operationId": "getTransactions",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pointDefinitionReference",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageTransaction"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/point-periods": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Point periods for member",
        "description": "\nPaged list of all point periods for a member in a program. It's ordered by the `startAt` field of the period, with the \nmost recent first. Default page size is 20, maximum page size is 100.\n",
        "operationId": "findPointPeriodsForMember",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagePointPeriod"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/reward-ladder": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get reward ladder for a member",
        "description": "\nReward ladder for a member shows the levels available for a member, what is required to achieve each level \nand what rewards are given in each level. \n        ",
        "operationId": "getMemberRewardLadder",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberRewardLadder"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/points-history": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get points history for a member",
        "description": "Returns a paged list of points earned and consumed by a member in a program, ordered by created at descending.  Default page size is 20, maximum page size is 100.",
        "operationId": "getMemberPointsHistory",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pointDefinitionReference",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pointEventType",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "EARNED",
                "CONSUMED"
              ]
            }
          },
          {
            "name": "createdAfter",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdBefore",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageMemberPoints"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/suspension-periods": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get suspension periods",
        "description": "Paged list of all suspension periods for a member, sorted by `startAt` descending. Default page size is 20, maximum page size is 100.",
        "operationId": "getSuspensionPeriods",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "perPage",
            "in": "query",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "maximum": 200,
              "minimum": 1,
              "type": "integer",
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageSuspensionPeriod"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v1/programs/{programId}/members/{memberId}/point-periods/{pointPeriodId}": {
      "get": {
        "tags": [
          "Members"
        ],
        "summary": "Get point period",
        "description": "Get a point period for a member in a program by the point period ID.",
        "operationId": "findPointPeriodForMemberById",
        "parameters": [
          {
            "name": "programId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "pointPeriodId",
            "in": "path",
            "required": true,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PointPeriod"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          }
        },
        "x-entur-permissions": {
          "value": {
            "any": [
              "personalisation-customerdata:les",
              "personalisation-customerdata-global:les"
            ]
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "required": [
          "correlationId",
          "message",
          "status",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "examples": [
              "An error occurred"
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ],
            "description": "The main error message.",
            "examples": [
              "An error occurred"
            ]
          },
          "errors": {
            "type": [
              "array",
              "null"
            ],
            "description": "Validation error on a specific field.",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          },
          "status": {
            "type": "integer",
            "description": "The http status code.",
            "format": "int32",
            "examples": [
              400
            ]
          },
          "message": {
            "type": "string",
            "description": "The main error message.",
            "examples": [
              "An error occurred"
            ]
          },
          "correlationId": {
            "type": "string",
            "description": "The unique correlation id for the request.",
            "examples": [
              "b5d4960d-7ab2-43d6-a8f3-113da042a288"
            ]
          }
        }
      },
      "Member": {
        "required": [
          "createdAt",
          "customerId",
          "id",
          "organisationId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Metadata needed for the processing of events"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "customerId": {
            "type": "string",
            "description": "Customer id"
          },
          "organisationId": {
            "type": "integer",
            "description": "The organisation this member belongs to",
            "format": "int64"
          }
        },
        "description": "A member"
      },
      "Program": {
        "required": [
          "active",
          "administratorOrganisations",
          "createdAt",
          "id",
          "name",
          "organisationId",
          "organisationsWithAccess",
          "preset",
          "programVersionId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "The name of the program",
            "examples": [
              "Entur+"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "\nIf program is active. Inactive programs are excluded from triggering effects.\n",
            "examples": [
              true
            ]
          },
          "preset": {
            "type": "string",
            "enum": [
              "CAMPAIGN_CODE_PROGRAM",
              "CUSTOM"
            ]
          },
          "infoLink": {
            "type": [
              "string",
              "null"
            ],
            "description": "A link to information about the program",
            "examples": [
              "https://selskap.test/theprogram/"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nUnique reference for the program. Meant to be used to identify which program this is, across different environments\nwhere the id might be different. This enables clients of the api to more easily identify the program, for example to\nenrich the presentation, beyond what this api delivers (for example with an icon, or more descriptive text).\n",
            "examples": [
              "reis"
            ]
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "organisationId": {
            "type": "integer",
            "description": "Id of organisation owning the program",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "programVersionId": {
            "type": "integer",
            "format": "int64"
          },
          "organisationsWithAccess": {
            "type": "array",
            "description": "A list of organisations that can consume the program",
            "items": {
              "type": "integer",
              "description": "A list of organisations that can consume the program",
              "format": "int64"
            },
            "examples": [
              [
                1,
                2
              ]
            ]
          },
          "administratorOrganisations": {
            "type": "array",
            "description": "A list of organisations that can administrate the program",
            "items": {
              "type": "integer",
              "description": "A list of organisations that can administrate the program",
              "format": "int64"
            },
            "examples": [
              [
                1,
                2,
                3
              ]
            ]
          }
        },
        "description": "Information about a program"
      },
      "FieldError": {
        "required": [
          "field",
          "message"
        ],
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "description": "Validation error on a specific field."
      },
      "PageMember": {
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "All items for this page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Member"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total items which could be returned",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          }
        },
        "description": "Paged content"
      },
      "LevelStatus": {
        "required": [
          "levelId",
          "rewards"
        ],
        "type": "object",
        "properties": {
          "levelId": {
            "type": "integer",
            "description": "Id of the level in the reward ladder",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "rewards": {
            "type": "array",
            "description": "Rewards for this level",
            "items": {
              "$ref": "#/components/schemas/LevelStatusReward"
            }
          }
        },
        "description": "The current level in the reward ladder the member has achieved"
      },
      "PointPeriod": {
        "required": [
          "endAt",
          "id",
          "startAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The ID of the point period",
            "format": "int64"
          },
          "endAt": {
            "type": "string",
            "description": "The end time of the point period",
            "format": "date-time"
          },
          "startAt": {
            "type": "string",
            "description": "The start time of the point period",
            "format": "date-time"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "object",
              "description": "Metadata for a point period. Example:\n```\n{\"userType\": \"ADULT\",\n    \"stationPair\": {\n        \"to\": \"NSR:StopPlace:337\",\n        \"from\": \"NSR:StopPlace:11\"\n    }\n}\n```"
            },
            "description": "Metadata for a point period. Example:\n```\n{\"userType\": \"ADULT\",\n    \"stationPair\": {\n        \"to\": \"NSR:StopPlace:337\",\n        \"from\": \"NSR:StopPlace:11\"\n    }\n}\n```"
          }
        },
        "description": "The core information about a point period",
        "readOnly": true
      },
      "PointsGiven": {
        "required": [
          "amount",
          "pointDefinitionReference"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The amount of points given"
          },
          "pointPeriodId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ID of the point period the points were given in, if applicable",
            "format": "int64"
          },
          "transactionId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ID of the transaction for the given points. Null if the points given amount is 0.",
            "format": "int64"
          },
          "pointDefinitionReference": {
            "type": "string",
            "description": "Reference to the point definition given point for"
          }
        },
        "description": "List of points given per point definition"
      },
      "Transaction": {
        "required": [
          "amount",
          "createdAt",
          "id",
          "pointDefinitionId",
          "programId",
          "validFrom"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Generated identifier",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "amount": {
            "type": "number",
            "description": "The number of points of the definition this transaction gives"
          },
          "expireAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction expires. If null, the transaction never expires.",
            "format": "date-time"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Metadata for the transaction"
          },
          "createdAt": {
            "type": "string",
            "description": "The date and time when the transaction was created",
            "format": "date-time"
          },
          "programId": {
            "type": "integer",
            "description": "The id of the program this transaction belongs to",
            "format": "int64"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction was last updated",
            "format": "date-time"
          },
          "validFrom": {
            "type": "string",
            "description": "The date and time the transaction is valid from.",
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction was cancelled. If not null, the transaction is valid until this time.",
            "format": "date-time"
          },
          "referenceId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique reference for this transaction. Populated from the event that created the transaction, based on the effect configuration."
          },
          "pointDefinitionId": {
            "type": "integer",
            "description": "The id of the point definition this transaction gives points of",
            "format": "int64"
          },
          "pointDefinitionReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reference of the point definition this transaction gives points of"
          }
        },
        "description": "A transaction"
      },
      "MemberPoints": {
        "required": [
          "amount",
          "createdAt",
          "id",
          "memberId",
          "pointDefinitionReference",
          "programId",
          "sourceId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "memberId": {
            "type": "integer",
            "format": "int64"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "sourceId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "programId": {
            "type": "integer",
            "format": "int64"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "pointDefinitionReference": {
            "type": "string"
          }
        },
        "discriminator": {
          "propertyName": "@type",
          "mapping": {
            "EARNED": "#/components/schemas/MemberPointsEarnedResponse",
            "CONSUMED": "#/components/schemas/MemberPointsConsumedResponse"
          }
        }
      },
      "MemberReward": {
        "required": [
          "@type",
          "description",
          "rewardId"
        ],
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          },
          "rewardId": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          }
        },
        "description": "Rewards when the level is reached",
        "discriminator": {
          "propertyName": "@type",
          "mapping": {
            "MemberFeatureReward": "#/components/schemas/MemberFeatureReward",
            "MemberPercentDiscountedProductReward": "#/components/schemas/MemberPercentDiscountedProductReward"
          }
        }
      },
      "CappingStatus": {
        "required": [
          "cappingAmount",
          "isReached"
        ],
        "type": "object",
        "properties": {
          "isReached": {
            "type": "boolean",
            "description": "Whether the capping amount has been reached by the member",
            "examples": [
              true
            ]
          },
          "cappingAmount": {
            "type": "number",
            "description": "The amount that this point definition is capped at",
            "examples": [
              100
            ]
          }
        },
        "description": "The capping status for this point definition, if capping is enabled"
      },
      "CurrentReward": {
        "required": [
          "@type",
          "description",
          "rewardId"
        ],
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          },
          "rewardId": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          }
        },
        "description": "The current rewards the member has achieved in the program",
        "discriminator": {
          "propertyName": "@type",
          "mapping": {
            "CurrentFeatureReward": "#/components/schemas/CurrentFeatureReward",
            "CurrentPercentDiscountedProductReward": "#/components/schemas/CurrentPercentDiscountedProductReward"
          }
        }
      },
      "PagePointPeriod": {
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "All items for this page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/PointPeriod"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total items which could be returned",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          }
        },
        "description": "Paged content"
      },
      "PageTransaction": {
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "All items for this page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total items which could be returned",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          }
        },
        "description": "Paged content"
      },
      "PageMemberPoints": {
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "All items for this page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/MemberPoints"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total items which could be returned",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          }
        },
        "description": "Paged content"
      },
      "SuspensionPeriod": {
        "required": [
          "@type",
          "createdAt",
          "endAt",
          "id",
          "referenceId",
          "startAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Generated identifier",
            "format": "int64"
          },
          "@type": {
            "type": "string"
          },
          "endAt": {
            "type": "string",
            "description": "When the suspension period ends",
            "format": "date-time"
          },
          "startAt": {
            "type": "string",
            "description": "When the suspension period starts",
            "format": "date-time"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Metadata for the suspension period"
          },
          "createdAt": {
            "type": "string",
            "description": "The date and time when the period was created",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "The date and time when the period was last updated",
            "format": "date-time"
          },
          "cancelledAt": {
            "type": "string",
            "description": "When the suspension period was cancelled from.",
            "format": "date-time"
          },
          "referenceId": {
            "type": "string",
            "description": "\n        Id to match multiple suspension periods.\n        Can for example be the id of the ticket, so that all periods for that ticket gets the same suspensionId.\n        Used for cancelling suspensions. See the CancelSuspensions effect.\n    "
          }
        },
        "description": "\nA SuspensionPeriod is a mechanism for temporarily blocking/pausing various features in personalisation for a member.\nA SuspensionPeriod has several subtypes that determines which feature is being suspended.\n    ",
        "discriminator": {
          "propertyName": "@type",
          "mapping": {
            "EffectSuspensionPeriod": "#/components/schemas/EffectSuspensionPeriod",
            "RewardsSuspensionPeriod": "#/components/schemas/RewardsSuspensionPeriod"
          }
        }
      },
      "SuspensionStatus": {
        "required": [
          "endAt",
          "referenceId",
          "startAt",
          "suspensionType"
        ],
        "type": "object",
        "properties": {
          "endAt": {
            "type": "string",
            "description": "When the suspension will end",
            "format": "date-time"
          },
          "startAt": {
            "type": "string",
            "description": "When the suspension started",
            "format": "date-time"
          },
          "referenceId": {
            "type": "string",
            "description": "The reference id of the suspension"
          },
          "suspensionType": {
            "$ref": "#/components/schemas/SuspensionStatusType"
          }
        },
        "description": "Status of a suspension"
      },
      "LevelStatusReward": {
        "required": [
          "@type",
          "description",
          "rewardId"
        ],
        "type": "object",
        "properties": {
          "@type": {
            "type": "string"
          },
          "rewardId": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          }
        },
        "description": "Rewards for this level",
        "discriminator": {
          "propertyName": "@type",
          "mapping": {
            "LevelStatusFeatureReward": "#/components/schemas/LevelStatusFeatureReward",
            "LevelStatusPercentDiscountedProductReward": "#/components/schemas/LevelStatusPercentDiscountedProductReward"
          }
        }
      },
      "PointsGivenResult": {
        "required": [
          "pointsGiven"
        ],
        "type": "object",
        "properties": {
          "pointsGiven": {
            "type": "array",
            "description": "List of points given per point definition",
            "items": {
              "$ref": "#/components/schemas/PointsGiven"
            }
          }
        },
        "description": "Points given to a customer as a result of deferred registration"
      },
      "RewardRequirement": {
        "required": [
          "pointDefinitionId",
          "requiredAmount"
        ],
        "type": "object",
        "properties": {
          "requiredAmount": {
            "type": "number",
            "description": "Required amount to reach a program level"
          },
          "pointDefinitionId": {
            "type": "integer",
            "description": "Id of the point definition",
            "format": "int64"
          },
          "pointDefinitionReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Point definition reference"
          }
        },
        "description": "Requirements for reaching the level"
      },
      "CustomerMembership": {
        "required": [
          "memberId",
          "programId"
        ],
        "type": "object",
        "properties": {
          "memberId": {
            "type": "integer",
            "description": "The ID for the customer's membership in the program",
            "format": "int64"
          },
          "programId": {
            "type": "integer",
            "format": "int64"
          },
          "memberMetadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "type": "object",
              "description": "Metadata about the member"
            },
            "description": "Metadata about the member"
          },
          "programReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nUnique reference for the program.\n",
            "examples": [
              "reis"
            ]
          }
        },
        "description": "Information about a customers membership in a program"
      },
      "MemberLevelSummary": {
        "required": [
          "name",
          "requirementsNeeded",
          "rewardRequirements",
          "rewards"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Level name"
          },
          "rewards": {
            "type": "array",
            "description": "Rewards when the level is reached",
            "items": {
              "$ref": "#/components/schemas/MemberReward"
            }
          },
          "requirementsNeeded": {
            "type": "string",
            "description": "Whether any or all requirements need to be fulfilled",
            "enum": [
              "ALL",
              "ANY"
            ],
            "examples": [
              "ALL"
            ]
          },
          "rewardRequirements": {
            "type": "array",
            "description": "Requirements for reaching the level",
            "items": {
              "$ref": "#/components/schemas/RewardRequirement"
            }
          }
        },
        "description": "Requirements and rewards for each membership level of a specific program"
      },
      "MemberRewardLadder": {
        "required": [
          "rewardLadder"
        ],
        "type": "object",
        "properties": {
          "rewardLadder": {
            "type": "array",
            "description": "Program level details, including the specific requirements and rewards for each level in the program",
            "items": {
              "$ref": "#/components/schemas/MemberLevelSummary"
            }
          }
        },
        "description": "Information about the current reward ladder for a program member",
        "readOnly": true
      },
      "TransactionByOrder": {
        "required": [
          "amount",
          "createdAt",
          "id",
          "memberId",
          "pointDefinitionId",
          "programId",
          "validFrom"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Generated identifier",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "amount": {
            "type": "number",
            "description": "The number of points of the definition this transaction gives"
          },
          "expireAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction expires. If null, the transaction never expires.",
            "format": "date-time"
          },
          "memberId": {
            "type": "integer",
            "description": "The ID of the member in the program this transaction belongs to",
            "format": "int64"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "Metadata for the transaction"
          },
          "createdAt": {
            "type": "string",
            "description": "The date and time when the transaction was created",
            "format": "date-time"
          },
          "programId": {
            "type": "integer",
            "description": "The id of the program this transaction belongs to",
            "format": "int64"
          },
          "updatedAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction was last updated",
            "format": "date-time"
          },
          "validFrom": {
            "type": "string",
            "description": "The date and time the transaction is valid from.",
            "format": "date-time"
          },
          "cancelledAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The date and time when the transaction was cancelled. If not null, the transaction is valid until this time.",
            "format": "date-time"
          },
          "pointPeriodId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The id of the point period this transaction belongs to, if applicable",
            "format": "int64"
          },
          "pointDefinitionId": {
            "type": "integer",
            "description": "The id of the point definition this transaction gives points of",
            "format": "int64"
          },
          "pointDefinitionReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The reference of the point definition this transaction gives points of"
          }
        },
        "description": "A transaction"
      },
      "CurrentLevelSummary": {
        "required": [
          "currentRewards",
          "memberId",
          "pointDefinitionStatuses",
          "programId",
          "suspensionStatuses"
        ],
        "type": "object",
        "properties": {
          "memberId": {
            "type": "integer",
            "description": "\nId of the member within the program. Can be used to look up more information about the member.\n    ",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "programId": {
            "type": "integer",
            "description": "\nId of the program.\nWARNING: Don't use this for matching with a specific program, since it may vary across environments. \nUse \"programReference\" instead.\n    ",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "currentLevel": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/LevelStatus"
              }
            ]
          },
          "currentRewards": {
            "type": "array",
            "description": "The current rewards the member has achieved in the program",
            "items": {
              "$ref": "#/components/schemas/CurrentReward"
            }
          },
          "programReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "\nReference to the program.\nThis is a unique reference that is the same in all environments, and can be used to identify the program.\nNullable for backwards compatibility reasons. Should be filled out in most cases.\n    ",
            "examples": [
              "flexiticket"
            ]
          },
          "suspensionStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SuspensionStatus"
            }
          },
          "pointDefinitionStatuses": {
            "type": "array",
            "description": "The current status of each point definition in the program",
            "items": {
              "$ref": "#/components/schemas/PointDefinitionStatus"
            }
          }
        },
        "description": "Summary of the current level of a member",
        "readOnly": true
      },
      "CurrentPointsPeriod": {
        "required": [
          "startOfPeriod"
        ],
        "type": "object",
        "properties": {
          "endOfPeriod": {
            "type": [
              "string",
              "null"
            ],
            "description": "The end of the period for which the current points are valid",
            "format": "date-time"
          },
          "startOfPeriod": {
            "type": "string",
            "description": "The start of the period for which the current points are valid",
            "format": "date-time"
          }
        },
        "description": "\nThe period for which the current points are valid. Only filled out if the point definition is periodic.\nCan return the first active period after the queried time if there is no period active at that point.\n"
      },
      "MemberFeatureReward": {
        "required": [
          "description",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/MemberReward"
          }
        ]
      },
      "NoPointsGivenResult": {
        "required": [
          "reason",
          "status",
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "examples": [
              "An error occurred"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Reason why no points were given",
            "enum": [
              "ORDER_DOES_NOT_BELONG_TO_CUSTOMER",
              "CONDITIONS_NOT_SATISFIED",
              "CUSTOMER_NOT_MEMBER",
              "CUSTOMER_ID_NOT_FOUND_IN_EVENT",
              "MEMBER_SUSPENDED",
              "TICKET_CANCELLED",
              "AMOUNT_EVALUATED_TO_ZERO",
              "ORDER_ALREADY_REGISTERED"
            ],
            "examples": [
              "ORDER_DOES_NOT_BELONG_TO_CUSTOMER"
            ]
          },
          "status": {
            "type": "integer",
            "description": "The http status code.",
            "format": "int32",
            "examples": [
              400
            ]
          }
        },
        "description": "Result of deferred registration where no points were given"
      },
      "CurrentFeatureReward": {
        "required": [
          "description",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/CurrentReward"
          }
        ]
      },
      "DeferredRegistration": {
        "required": [
          "customerId",
          "orderId",
          "orderLineId"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "The order ID for which to register"
          },
          "customerId": {
            "type": "string",
            "description": "The customer ID for which to register the order"
          },
          "orderLineId": {
            "type": "string",
            "description": "The order line ID for which to register"
          }
        },
        "description": "Request deferred registration for a customer ID and order ID"
      },
      "PageSuspensionPeriod": {
        "required": [
          "items",
          "totalItems",
          "totalPages"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "All items for this page",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/SuspensionPeriod"
            }
          },
          "totalItems": {
            "type": "integer",
            "description": "Total items which could be returned",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32",
            "readOnly": true,
            "examples": [
              1
            ]
          }
        },
        "description": "Paged content"
      },
      "SuspensionStatusType": {
        "type": "string",
        "description": "\n        The type of suspension:\n        - Rewards: Member is suspended from receiving rewards\n        - GivePointsEffect: Member is suspended from being given points\n        - ConsumePointsEffect: Member is suspended from using points\n        - UpdateMemberMetadata: Member is suspended from updating their metadata. \n        - SuspendRewardsEffect: Member is suspended from being put into reward suspension\n        - SuspendEffectEffect: Member is suspended from being put into effect suspension\n    ",
        "enum": [
          "Rewards",
          "GivePointsEffect",
          "SuspendRewardsEffect",
          "SuspendEffectEffect",
          "ConsumePointsEffect"
        ]
      },
      "PointDefinitionStatus": {
        "required": [
          "currentPoints",
          "pendingPoints",
          "pointDefinitionId",
          "pointDefinitionPluralName",
          "pointDefinitionReference",
          "pointDefinitionSingularName"
        ],
        "type": "object",
        "properties": {
          "cappingStatus": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CappingStatus"
              }
            ]
          },
          "currentPoints": {
            "type": "number",
            "description": "The amount of points the member currently has of this point definition",
            "examples": [
              15
            ]
          },
          "pendingPoints": {
            "type": "number",
            "description": "\nThe amount of points the member has received, but are not valid yet.\nIf the point definition is periodic, this field will only contain the pending points in the current point period.\n",
            "examples": [
              15
            ]
          },
          "pointDefinitionId": {
            "type": "integer",
            "description": "Id of the point definition",
            "format": "int64"
          },
          "currentPointsPeriod": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrentPointsPeriod"
              }
            ]
          },
          "pointDefinitionReference": {
            "type": "string",
            "description": "\nUnique reference for the point. Meant to be used to identify what kind of point this is, across different environments\nwhere the id might be different. This enables clients of the api to enrich the presentation of the point definition,\nbeyond what this api delivers (for example giving the point definition an icon, or more descriptive text).\n",
            "examples": [
              "trips_done"
            ]
          },
          "pointDefinitionPluralName": {
            "type": "string",
            "description": "Plural name of the point definition",
            "examples": [
              "reiser"
            ]
          },
          "pointDefinitionSingularName": {
            "type": "string",
            "description": "Singular name of the point definition",
            "examples": [
              "reise"
            ]
          }
        },
        "description": "The current status of a point definition in a program for a member"
      },
      "EffectSuspensionPeriod": {
        "required": [
          "@type",
          "createdAt",
          "effectType",
          "endAt",
          "id",
          "referenceId",
          "startAt"
        ],
        "type": "object",
        "description": "\nA type of suspension period that prevents any effects to be executed on the member within the period.\nFor example, this can prevent the member for receiving any points, by blocking the GivePoint effect.\n",
        "allOf": [
          {
            "$ref": "#/components/schemas/SuspensionPeriod"
          },
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "Metadata for the suspension period"
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The date and time when the period was last updated",
                "format": "date-time"
              },
              "effectType": {
                "type": "string",
                "description": "The type of effect that this period suspends",
                "enum": [
                  "AddMember",
                  "UpdateMemberMetadata",
                  "GivePoint",
                  "RefundPoints",
                  "ConsumePoints",
                  "SuspendRewards",
                  "SuspendEffect",
                  "CancelSuspensions",
                  "RevokePoint",
                  "ResetPoints",
                  "ResetSuspensions",
                  "AddIntent",
                  "CancelIntent",
                  "RemoveMember"
                ]
              },
              "cancelledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the suspension period was cancelled from.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "RewardsSuspensionPeriod": {
        "required": [
          "@type",
          "createdAt",
          "endAt",
          "id",
          "referenceId",
          "startAt"
        ],
        "type": "object",
        "description": "A type of suspension period used to prevent the member from receiving any rewards in the period.",
        "allOf": [
          {
            "$ref": "#/components/schemas/SuspensionPeriod"
          },
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": true,
                "description": "Metadata for the suspension period"
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The date and time when the period was last updated",
                "format": "date-time"
              },
              "cancelledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "When the suspension period was cancelled from.",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "CurrentLevelSummaryQuery": {
        "required": [
          "customerId"
        ],
        "type": "object",
        "properties": {
          "statusAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Get current level summary at a given date and time. Defaults to now if not set.",
            "format": "date-time",
            "examples": [
              "2023-10-01T12:00:00.567Z"
            ]
          },
          "programId": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Id of the program to query. If null, will return summary of all programs the customer is enrolled in.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "customerId": {
            "type": "string",
            "description": "Customer id of the member",
            "examples": [
              "29582738"
            ]
          },
          "programReference": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reference to the program to query. Better to use than programId, since programId might vary in different environments.",
            "examples": [
              "flexiticket"
            ]
          },
          "programReferences": {
            "type": [
              "array",
              "null"
            ],
            "description": "List of reference to the programs to query. If given then it overrides the programReference parameter.",
            "items": {
              "type": "string",
              "description": "List of reference to the programs to query. If given then it overrides the programReference parameter.",
              "examples": [
                "[\"flexiticket\",\"reis\"]"
              ]
            },
            "examples": [
              [
                "flexiticket",
                "reis"
              ]
            ]
          }
        },
        "description": "Status query for a member",
        "writeOnly": true
      },
      "CustomerMembershipsQuery": {
        "required": [
          "customerId"
        ],
        "type": "object",
        "properties": {
          "customerId": {
            "type": "string",
            "description": "Customer id of the member",
            "examples": [
              "29582738"
            ]
          },
          "programReferences": {
            "type": [
              "array",
              "null"
            ],
            "description": "List of reference to the programs to query.",
            "items": {
              "type": "string",
              "description": "List of reference to the programs to query.",
              "examples": [
                "[\"flexiticket\",\"reis\"]"
              ]
            },
            "examples": [
              [
                "flexiticket",
                "reis"
              ]
            ]
          }
        },
        "description": "Program memberships for a customer",
        "writeOnly": true
      },
      "LevelStatusFeatureReward": {
        "required": [
          "description",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/LevelStatusReward"
          }
        ]
      },
      "MemberPointsEarnedResponse": {
        "required": [
          "amount",
          "createdAt",
          "id",
          "memberId",
          "pointDefinitionReference",
          "programId",
          "sourceId",
          "validFrom"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/MemberPoints"
          },
          {
            "type": "object",
            "properties": {
              "expireAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "object"
                }
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "validFrom": {
                "type": "string",
                "format": "date-time"
              },
              "cancelledAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        ]
      },
      "MemberPointsConsumedResponse": {
        "required": [
          "amount",
          "consumedAt",
          "createdAt",
          "id",
          "memberId",
          "pointDefinitionReference",
          "programId",
          "sourceId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/MemberPoints"
          },
          {
            "type": "object",
            "properties": {
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": {
                  "type": "object"
                }
              },
              "updatedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "consumedAt": {
                "type": "string",
                "format": "date-time"
              },
              "refundedAt": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        ]
      },
      "MemberPercentDiscountedProductReward": {
        "required": [
          "description",
          "percentDiscount",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/MemberReward"
          },
          {
            "type": "object",
            "properties": {
              "percentDiscount": {
                "type": "number",
                "description": "The percentage discount this reward gives",
                "examples": [
                  5
                ]
              }
            }
          }
        ]
      },
      "CurrentPercentDiscountedProductReward": {
        "required": [
          "description",
          "percentDiscount",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/CurrentReward"
          },
          {
            "type": "object",
            "properties": {
              "percentDiscount": {
                "type": "number",
                "description": "The percentage discount this reward gives",
                "examples": [
                  5
                ]
              }
            }
          }
        ]
      },
      "LevelStatusPercentDiscountedProductReward": {
        "required": [
          "description",
          "percentDiscount",
          "rewardId"
        ],
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/LevelStatusReward"
          },
          {
            "type": "object",
            "properties": {
              "percentDiscount": {
                "type": "number",
                "description": "The percentage discount this reward gives",
                "examples": [
                  5
                ]
              }
            }
          }
        ]
      }
    },
    "responses": {
      "Error400": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error401": {
        "description": "Unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error403": {
        "description": "Forbidden",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error404": {
        "description": "Not found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error500": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "parameters": {
      "ET-Client-Name": {
        "in": "header",
        "name": "ET-Client-Name",
        "description": "\nEntur Client Header.\nIt is required that all consumers identify themselves by using this header.\nEntur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.\nThe structure of ET-Client-Name should be: `<company>-<application>` for companies, and `<personal name>-<application>` for individuals.",
        "schema": {
          "type": "string"
        }
      },
      "X-Correlation-Id": {
        "in": "header",
        "name": "X-Correlation-Id",
        "description": "Correlation id",
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}