{
  "openapi": "3.1.1",
  "info": {
    "title": "Product Parameters",
    "description": "**This API specification is a draft and is not yet implemented. Endpoints, schemas, and\nbehavior are subject to change without notice.**\n\nThis API provides services to read and maintain the parameters that apply to public transport\nproducts — for example when a product can be purchased (purchase window).\n",
    "contact": {
      "name": "Team Produkt",
      "email": "teamprodukt@entur.org"
    },
    "version": "2026.10.0",
    "x-stability-level": "draft"
  },
  "servers": [
    {
      "url": "https://api.entur.io/products",
      "description": "Production environment"
    },
    {
      "url": "https://api.staging.entur.io/products",
      "description": "Staging environment"
    },
    {
      "url": "https://api.dev.entur.io/products",
      "description": "Development environment"
    }
  ],
  "security": [
    {
      "jwt": []
    }
  ],
  "tags": [
    {
      "name": "Purchase window",
      "description": "A purchase window defines when a product can be purchased relative\nto the time of travel — for example up to 90 days before and at least one hour before\ndeparture, or only until the day before travel. Products reference it through\n`purchaseWindowRef`.\n"
    },
    {
      "name": "Version",
      "description": "Version management endpoints"
    }
  ],
  "paths": {
    "/v3/parameters/purchase-windows": {
      "get": {
        "tags": [
          "Purchase window"
        ],
        "summary": "List purchase windows with their current versions",
        "description": "Returns a paginated list of purchase windows, ordered by id. Each entry is a light summary\n(`VersionedElementSummary`, shared with other element types) with the purchase window id\nand the versions that are relevant today:\n\n- VERSIONED versions valid today or in the future (no end date, or an end date after today)\n- DRAFT and PROPOSED versions, regardless of date\n- with `includeDeprecated=true`, also the most recent DEPRECATED version (latest start date)\n\nVersions are ordered by status (DRAFT, PROPOSED, VERSIONED, DEPRECATED) and then by start date,\nnewest first. Purchase windows without any such version are left out. Paging is per purchase\nwindow, so the versions of one purchase window are never split across pages.\n\nAll versions of a single purchase window are available through\n`GET /v3/parameters/purchase-windows/{id}/versions`, and the full content of a version through\n`GET /v3/parameters/purchase-windows/{id}/{version}`.\n",
        "operationId": "listPurchaseWindows",
        "parameters": [
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/size"
          },
          {
            "name": "includeDeprecated",
            "in": "query",
            "description": "Also include the most recent DEPRECATED version of each purchase window.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "examples": {
              "default": {
                "value": false
              }
            }
          },
          {
            "name": "ownerOrganisationId",
            "in": "query",
            "description": "Only return purchase windows owned by this internal organisation id.",
            "required": false,
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "examples": {
              "default": {
                "value": 1
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of purchase window summaries",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowListResponse"
                },
                "examples": {
                  "withDeprecated": {
                    "$ref": "#/components/examples/withDeprecated"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "post": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Create a new purchase window",
        "description": "Create a new purchase window. A new version is created together with it.\n",
        "operationId": "createPurchaseWindow",
        "requestBody": {
          "description": "Purchase window to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseWindowRequest"
              },
              "examples": {
                "advance": {
                  "$ref": "#/components/examples/advance"
                },
                "untilPreviousDay": {
                  "$ref": "#/components/examples/untilPreviousDay"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Purchase window created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowResponse"
                },
                "examples": {
                  "advance": {
                    "$ref": "#/components/examples/advance-2"
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request is invalid — either a schema violation, or a well-formed request that\ncannot be processed, such as an invalid ISO 8601 duration or a\n`maximumPeriodBeforeDeparture` shorter than `minimumPeriodBeforeDeparture`.\n",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "schemaViolation": {
                    "summary": "Request does not match schema",
                    "value": {
                      "type": "https://developer.entur.org/errors/bad-request",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "Field 'startDate' is required."
                    }
                  },
                  "minAfterMax": {
                    "summary": "Minimum period exceeds maximum period",
                    "value": {
                      "type": "https://developer.entur.org/errors/bad-request",
                      "title": "Bad Request",
                      "status": 400,
                      "detail": "maximumPeriodBeforeDeparture (PT1H) must not be shorter than minimumPeriodBeforeDeparture (P1D)."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/parameters/purchase-windows/{id}": {
      "get": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Get the active version of a purchase window",
        "description": "Retrieve the version of the purchase window that is active on the given date.\nDefaults to the version active today when no date is given.\n",
        "operationId": "getPurchaseWindow",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/validOnDate"
          }
        ],
        "responses": {
          "200": {
            "description": "The purchase window version active on the given date.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowResponse"
                },
                "examples": {
                  "advance": {
                    "$ref": "#/components/examples/advance-2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Purchase window not found, or no version is active on the given date",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Purchase window not found",
                    "value": {
                      "type": "https://developer.entur.org/errors/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "PurchaseWindow 'ENT:PurchaseWindow:90days' not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "post": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Create a new version of an existing purchase window",
        "description": "Create a new version of an existing purchase window. Products referencing the\npurchase window are not modified: they point at its id, and the effective version\nis resolved by validity period.\n",
        "operationId": "createPurchaseWindowVersion",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "requestBody": {
          "description": "The new purchase window version.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseWindowRequest"
              },
              "examples": {
                "advance": {
                  "$ref": "#/components/examples/advance"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Purchase window version created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowResponse"
                },
                "examples": {
                  "advance": {
                    "$ref": "#/components/examples/advance-2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/parameters/purchase-windows/{id}/versions": {
      "get": {
        "tags": [
          "Purchase window"
        ],
        "summary": "List versions of a purchase window",
        "description": "Retrieve all versions of a purchase window by its NeTEx ID, including drafts and\nproposals.\n",
        "operationId": "getPurchaseWindowVersions",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "List of purchase window versions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionResponse"
                  }
                },
                "examples": {
                  "versionHistory": {
                    "$ref": "#/components/examples/versionHistory"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Purchase window not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Purchase window not found",
                    "value": {
                      "type": "https://developer.entur.org/errors/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "PurchaseWindow 'ENT:PurchaseWindow:90days' not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/parameters/purchase-windows/{id}/{version}": {
      "get": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Get a specific purchase window version",
        "description": "Retrieve a specific version of a purchase window, identified by NeTEx version id or\nversion number.\n",
        "operationId": "getPurchaseWindowVersion",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "200": {
            "description": "The purchase window version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowResponse"
                },
                "examples": {
                  "advance": {
                    "$ref": "#/components/examples/advance-2"
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Purchase window or version not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Purchase window version not found",
                    "value": {
                      "type": "https://developer.entur.org/errors/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "PurchaseWindow version not found: ENT:PurchaseWindow:90days (ENT:Version:8f1b2c3d)"
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "put": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Update an existing purchase window version",
        "description": "Update a purchase window version in place. Only DRAFT versions can be updated.\n",
        "operationId": "updatePurchaseWindowVersion",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "requestBody": {
          "description": "The updated purchase window version. The existing data in the version is replaced by this one.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurchaseWindowRequest"
              },
              "examples": {
                "advance": {
                  "$ref": "#/components/examples/advance"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Purchase window version updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurchaseWindowResponse"
                },
                "examples": {
                  "advance": {
                    "$ref": "#/components/examples/advance-2"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequestError"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Purchase window or version not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Purchase window version not found",
                    "value": {
                      "type": "https://developer.entur.org/errors/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "PurchaseWindow version not found: ENT:PurchaseWindow:90days (ENT:Version:8f1b2c3d)"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The version is not a DRAFT and cannot be updated",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notDraft": {
                    "summary": "Version is not a DRAFT",
                    "value": {
                      "type": "https://developer.entur.org/errors/conflict",
                      "title": "Conflict",
                      "status": 409,
                      "detail": "PurchaseWindow 'ENT:PurchaseWindow:90days' cannot be modified because version 'ENT:Version:8f1b2c3d' has status VERSIONED; only DRAFT versions may be modified. Create a new version to update."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "delete": {
        "tags": [
          "Purchase window"
        ],
        "summary": "Delete a purchase window version",
        "description": "Delete a purchase window version. Only DRAFT versions can be deleted.\n",
        "operationId": "deletePurchaseWindowVersion",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/version"
          }
        ],
        "responses": {
          "204": {
            "description": "Purchase window version deleted"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Purchase window or version not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Purchase window version not found",
                    "value": {
                      "type": "https://developer.entur.org/errors/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "PurchaseWindow version not found: ENT:PurchaseWindow:90days (ENT:Version:8f1b2c3d)"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "The version is not a DRAFT and cannot be deleted",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notDraft": {
                    "summary": "Version is not a DRAFT",
                    "value": {
                      "type": "https://developer.entur.org/errors/conflict",
                      "title": "Conflict",
                      "status": 409,
                      "detail": "PurchaseWindow 'ENT:PurchaseWindow:90days' cannot be deleted because version 'ENT:Version:8f1b2c3d' has status VERSIONED; only DRAFT versions may be deleted."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/versions/{id}": {
      "get": {
        "tags": [
          "Version"
        ],
        "summary": "Get a version by ID",
        "description": "Retrieve a specific version by its netex ID.",
        "operationId": "getVersionById",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Version found successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                },
                "examples": {
                  "draftVersion": {
                    "$ref": "#/components/examples/draftVersion"
                  },
                  "versionedVersion": {
                    "$ref": "#/components/examples/versionedVersion"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "invalidTransition": {
                    "summary": "Invalid ID format",
                    "value": {
                      "type": "https://example.com/probs/illegal-transition",
                      "title": "Illegal status transition",
                      "status": 400,
                      "detail": "Invalid netex ID format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Version not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Version not found",
                    "value": {
                      "type": "https://example.com/probs/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "Version ENT:Version:001 not found."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "put": {
        "tags": [
          "Version"
        ],
        "summary": "Update an existing version",
        "description": "Update an existing version. Can be used to change status (e.g., from DRAFT to PROPOSED or PROPOSED to VERSIONED) or modify dates.",
        "operationId": "updateVersion",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "requestBody": {
          "description": "The request body must include the new status and startDate. The endDate is optional. Valid status transitions are:\n  - DRAFT -> PROPOSED\n  - PROPOSED -> VERSIONED\n  - DRAFT -> DEPRECATED\n  - PROPOSED -> DEPRECATED\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionRequest"
              },
              "examples": {
                "draft": {
                  "$ref": "#/components/examples/draft"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Version updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                },
                "examples": {
                  "draftVersion": {
                    "$ref": "#/components/examples/draftVersion"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid data or illegal status transition",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "invalidTransition": {
                    "summary": "Illegal status transition",
                    "value": {
                      "type": "https://example.com/probs/illegal-transition",
                      "title": "Illegal status transition",
                      "status": 400,
                      "detail": "Invalid status transition: DRAFT -> $to"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "404": {
            "description": "Version not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "notFound": {
                    "summary": "Version not found",
                    "value": {
                      "type": "https://example.com/probs/not-found",
                      "title": "Not Found",
                      "status": 404,
                      "detail": "Version ENT:Version:001 not found."
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict - Version already exists or overlaps with existing version",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "conflict": {
                    "summary": "Version already exists",
                    "value": {
                      "type": "https://example.com/probs/conflict",
                      "title": "Conflict",
                      "status": 409,
                      "detail": "Version ENT:Version:001 exists already."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/versions": {
      "post": {
        "tags": [
          "Version"
        ],
        "summary": "Create a new version",
        "description": "Create a new version in DRAFT status. The version will be assigned the current date as startDate if not provided.",
        "operationId": "createVersion",
        "requestBody": {
          "description": "The request body must include the netex ID and status (must be DRAFT). The startDate is optional and will default to the current date if not provided. The endDate is also optional.\n",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VersionRequest"
              },
              "examples": {
                "draft": {
                  "$ref": "#/components/examples/draft"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Version created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                },
                "examples": {
                  "draftVersion": {
                    "$ref": "#/components/examples/draftVersion"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "invalidStatus": {
                    "summary": "Illegal status",
                    "value": {
                      "type": "https://example.com/probs/illegal-transition",
                      "title": "Illegal status for new version",
                      "status": 400,
                      "detail": "Invalid version status VERSIONED. New versions must be created with status DRAFT."
                    }
                  },
                  "invalidDate": {
                    "summary": "Illegal date",
                    "value": {
                      "type": "https://example.com/probs/illegal-transition",
                      "title": "Illegal date for new version",
                      "status": 400,
                      "detail": "Invalid version dates: endDate must be strictly after startDate."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "conflict": {
                    "summary": "Version already exists",
                    "value": {
                      "type": "https://example.com/probs/conflict",
                      "title": "Conflict",
                      "status": 409,
                      "detail": "Version ENT:Version:001 exists already."
                    }
                  },
                  "inProgress": {
                    "summary": "Version already in progress",
                    "value": {
                      "type": "https://example.com/probs/conflict",
                      "title": "Conflict with other in progress",
                      "status": 409,
                      "detail": "Cannot create new version: ENT:Version:001 are already in PROPOSED (only one in-progress version allowed)."
                    }
                  }
                }
              }
            }
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:endre"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    },
    "/v3/versions/history/{id}": {
      "get": {
        "tags": [
          "Version"
        ],
        "summary": "Get version history for a versionable element by ID",
        "description": "Retrieve the list for all version that is related to the given versionable element.",
        "operationId": "getVersionHistoryById",
        "parameters": [
          {
            "$ref": "#/components/parameters/id"
          }
        ],
        "responses": {
          "200": {
            "description": "Version history found successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/VersionResponse"
                  }
                },
                "examples": {
                  "versionHistory": {
                    "$ref": "#/components/examples/versionHistory"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                },
                "examples": {
                  "invalidTransition": {
                    "summary": "Invalid ID format",
                    "value": {
                      "type": "https://example.com/probs/illegal-transition",
                      "title": "Illegal status transition",
                      "status": 400,
                      "detail": "Invalid NetEx ID format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenError"
          }
        },
        "x-entur-permissions": {
          "value": "product-api-access:les"
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/ET-Client-Name"
        },
        {
          "$ref": "#/components/parameters/X-Correlation-Id"
        }
      ]
    }
  },
  "components": {
    "schemas": {
      "PageInfo": {
        "required": [
          "page",
          "size",
          "totalCount"
        ],
        "type": "object",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of elements matching the query.",
            "examples": [
              5
            ]
          },
          "page": {
            "type": "integer",
            "description": "Current zero-based page number.",
            "examples": [
              0
            ]
          },
          "size": {
            "type": "integer",
            "description": "Requested page size.",
            "examples": [
              100
            ]
          }
        },
        "description": "Paging information shared by all paginated list responses."
      },
      "LocalizedString": {
        "type": "array",
        "items": {
          "required": [
            "lang",
            "value"
          ],
          "type": "object",
          "properties": {
            "lang": {
              "pattern": "^[a-z]{2}-[A-Z]{2}$",
              "type": "string",
              "description": "BCP-47 language tag (e.g., 'nb-NO', 'en-GB').",
              "examples": [
                "nb-NO"
              ]
            },
            "value": {
              "type": "string",
              "description": "The localized string value for the specified lang."
            }
          }
        }
      },
      "VersionStatus": {
        "type": "string",
        "enum": [
          "DRAFT",
          "PROPOSED",
          "VERSIONED",
          "DEPRECATED"
        ]
      },
      "VersionSummary": {
        "required": [
          "names",
          "startDate",
          "status",
          "versionId"
        ],
        "type": "object",
        "properties": {
          "versionId": {
            "pattern": "^([A-Z]{3}):Version:([0-9A-Za-z_\\-]*)$",
            "type": "string",
            "description": "NeTEx id of the version.",
            "examples": [
              "ENT:Version:8f1b2c3d"
            ]
          },
          "versionNumber": {
            "type": "integer",
            "description": "Sequence number of the version, when assigned.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "names": {
            "$ref": "#/components/schemas/LocalizedString"
          },
          "startDate": {
            "type": "string",
            "description": "First day the version is valid.",
            "format": "date",
            "examples": [
              "2026-08-01"
            ]
          },
          "endDate": {
            "type": "string",
            "description": "First day the version is no longer valid (optional).",
            "format": "date",
            "examples": [
              "2026-12-31"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VersionStatus"
          }
        },
        "description": "A light summary of one version of a versioned element, as shown in lists. Shared by the list\nendpoints of all element types.\n"
      },
      "VersionedElementSummary": {
        "required": [
          "id",
          "ownerOrganisationId",
          "versions"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^([A-Z]{3}):([A-Za-z]+):([0-9A-Za-z_\\-]*)$",
            "type": "string",
            "description": "NeTEx id of the element.",
            "examples": [
              "ENT:PurchaseWindow:90days"
            ]
          },
          "ownerOrganisationId": {
            "type": "integer",
            "description": "Internal organisation id owning the element.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VersionSummary"
            }
          }
        },
        "description": "A versioned element with the versions relevant today, as shown in lists. Shared by the list\nendpoints of all element types. The versions are:\n\n- VERSIONED versions valid today or in the future (no end date, or an end date after today)\n- DRAFT and PROPOSED versions, regardless of date\n- when deprecated versions are requested, the most recent DEPRECATED version (latest start date)\n\nordered by status (DRAFT, PROPOSED, VERSIONED, DEPRECATED) and then by start date, newest first.\n"
      },
      "PurchaseWindowListResponse": {
        "description": "A page of purchase windows, each with the versions relevant today.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PageInfo"
          },
          {
            "required": [
              "purchaseWindows"
            ],
            "type": "object",
            "properties": {
              "purchaseWindows": {
                "type": "array",
                "description": "The purchase windows on this page, ordered by id.",
                "items": {
                  "$ref": "#/components/schemas/VersionedElementSummary"
                }
              }
            }
          }
        ]
      },
      "ProblemDetails": {
        "required": [
          "detail",
          "status",
          "title",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "A URI reference that identifies the problem type.",
            "format": "uri",
            "examples": [
              "https://developer.entur.org/errors/bad-request"
            ]
          },
          "title": {
            "type": "string",
            "description": "Short, human-readable summary of the problem type.",
            "examples": [
              "Bad Request"
            ]
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code.",
            "format": "int32",
            "examples": [
              400
            ]
          },
          "detail": {
            "type": "string",
            "description": "Human-readable explanation specific to this occurrence.",
            "examples": [
              "The supplied ruleId is not a valid UUID."
            ]
          },
          "instance": {
            "type": "string",
            "description": "A URI reference that identifies the specific occurrence.",
            "format": "uri",
            "examples": [
              "https://api.example.com/requests/12345"
            ]
          }
        },
        "description": "RFC 9457 Problem Details"
      },
      "PurchaseWhen": {
        "type": "string",
        "description": "When a purchase can be made relative to the time of travel.\n\n- **ADVANCE_ONLY** - Only in advance of the day of travel.\n- **UNTIL_PREVIOUS_DAY** - Until the end of the day before travel.\n- **DAY_OF_TRAVEL_ONLY** - Only on the day of travel.\n- **ADVANCE_AND_DAY_OF_TRAVEL** - In advance or on the day of travel.\n- **TIME_OF_TRAVEL_ONLY** - Only at the time of travel.\n- **SUBSCRIPTION_CHARGE_MOMENT** - At the charge moment of a subscription.\n- **OTHER** - Other rule.\n",
        "enum": [
          "ADVANCE_ONLY",
          "UNTIL_PREVIOUS_DAY",
          "DAY_OF_TRAVEL_ONLY",
          "ADVANCE_AND_DAY_OF_TRAVEL",
          "TIME_OF_TRAVEL_ONLY",
          "SUBSCRIPTION_CHARGE_MOMENT",
          "OTHER"
        ]
      },
      "PurchaseAction": {
        "type": "string",
        "description": "The type of purchase action the window applies to.\n",
        "enum": [
          "PURCHASE",
          "ORDER_WITHOUT_PAYMENT",
          "RESERVE",
          "PAY_FOR_PREVIOUS_ORDER",
          "SUBSCRIBE",
          "PAY_INSTALLMENT",
          "OTHER"
        ]
      },
      "PurchaseMoment": {
        "type": "string",
        "description": "A moment at which a purchase can be made.\n",
        "enum": [
          "ON_RESERVATION",
          "IN_ADVANCE",
          "IN_ADVANCE_ONLY",
          "BEFORE_BOARDING",
          "BEFORE_BOARDING_ONLY",
          "ON_BOARDING",
          "ON_BOARDING_ONLY",
          "AFTER_BOARDING",
          "ON_CHECK_IN",
          "ON_CHECK_OUT",
          "SUBSCRIPTION_ONLY",
          "NO_TICKET_REQUIRED",
          "OTHER"
        ]
      },
      "PurchaseWindowRequest": {
        "required": [
          "names",
          "startDate",
          "status"
        ],
        "type": "object",
        "properties": {
          "ownerOrganisationId": {
            "minimum": 1,
            "type": "integer",
            "description": "Internal id of the organisation that owns this element. Omit it to use the organisation in the access token, which is what a caller acting for itself should do. Supplying a different organisation requires permission to act on behalf of that organisation.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "names": {
            "$ref": "#/components/schemas/LocalizedString"
          },
          "descriptions": {
            "$ref": "#/components/schemas/LocalizedString"
          },
          "startDate": {
            "type": "string",
            "description": "First day this purchase window version is valid.",
            "format": "date",
            "examples": [
              "2026-08-01"
            ]
          },
          "endDate": {
            "type": "string",
            "description": "Last day this purchase window version is valid (optional). Omit for an open-ended version.",
            "format": "date",
            "examples": [
              "2026-12-31"
            ]
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionStatus"
              },
              {
                "description": "Status of the purchase window version. Required; on create only DRAFT or\nPROPOSED is accepted — a new version cannot be published directly.\n",
                "examples": [
                  "DRAFT"
                ]
              }
            ]
          },
          "purchaseWhen": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PurchaseWhen"
              },
              {
                "description": "When a purchase can be made relative to the time of travel. Optional: when omitted, the\npurchase window sets no restriction on when the purchase can be made, only the periods\nbefore departure (if set) apply.\n"
              }
            ]
          },
          "latestTime": {
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$",
            "type": "string",
            "description": "Latest time of day a purchase can be made (NeTEx `LatestTime`), formatted `HH:mm:ss`.",
            "examples": [
              "23:59:59"
            ]
          },
          "minimumPeriodBeforeDeparture": {
            "type": "string",
            "description": "Minimum period before departure that a purchase must be made (NeTEx\n`MinimumPeriodBeforeDeparture`). ISO 8601 duration with days, hours, minutes and/or seconds.\n",
            "examples": [
              "PT1H"
            ]
          },
          "maximumPeriodBeforeDeparture": {
            "type": "string",
            "description": "Maximum period before departure that a purchase can be made (NeTEx\n`MaximumPeriodBeforeDeparture`). ISO 8601 duration with days, hours, minutes and/or seconds.\nMust not be shorter than `minimumPeriodBeforeDeparture`.\n",
            "examples": [
              "P90D"
            ]
          },
          "purchaseAction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PurchaseAction"
              },
              {
                "description": "The purchase action this window applies to (NeTEx `PurchaseAction`).\n"
              }
            ]
          },
          "purchaseMoments": {
            "uniqueItems": true,
            "type": "array",
            "description": "The moments at which a purchase can be made (NeTEx `PurchaseMoment`, a list).\n",
            "items": {
              "$ref": "#/components/schemas/PurchaseMoment"
            }
          }
        },
        "description": "A purchase window (NeTEx `PurchaseWindow`, a `UsageParameter`) defines when a product can be\npurchased relative to the time of travel. Products reference it through `purchaseWindowRef`;\nthe underlying NeTEx `GenericParameterAssignment` is managed by the backend.\n"
      },
      "PurchaseWindowResponse": {
        "required": [
          "id",
          "names",
          "ownerOrganisationId",
          "startDate",
          "status",
          "versionId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^([A-Z]{3}):PurchaseWindow:([0-9A-Za-z_\\-]*)$",
            "type": "string",
            "description": "NeTEx id of the purchase window.",
            "examples": [
              "ENT:PurchaseWindow:90days"
            ]
          },
          "versionId": {
            "pattern": "^([A-Z]{3}):Version:([0-9A-Za-z_\\-]*)$",
            "type": "string",
            "description": "NeTEx id of this purchase window version.",
            "examples": [
              "ENT:Version:8f1b2c3d"
            ]
          },
          "versionNumber": {
            "type": "integer",
            "description": "Sequence number of this version, when assigned.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "ownerOrganisationId": {
            "type": "integer",
            "description": "Internal organisation id owning this purchase window.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "names": {
            "$ref": "#/components/schemas/LocalizedString"
          },
          "descriptions": {
            "$ref": "#/components/schemas/LocalizedString"
          },
          "startDate": {
            "type": "string",
            "description": "First day this purchase window version is valid.",
            "format": "date",
            "examples": [
              "2026-08-01"
            ]
          },
          "endDate": {
            "type": "string",
            "description": "Last day this purchase window version is valid (optional).",
            "format": "date",
            "examples": [
              "2026-12-31"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VersionStatus"
          },
          "purchaseWhen": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PurchaseWhen"
              },
              {
                "description": "When a purchase can be made relative to the time of travel. Absent when the purchase\nwindow sets no restriction on when the purchase can be made.\n"
              }
            ]
          },
          "latestTime": {
            "type": "string",
            "description": "Latest time of day a purchase can be made (NeTEx `LatestTime`), formatted `HH:mm:ss`.",
            "examples": [
              "23:59:59"
            ]
          },
          "minimumPeriodBeforeDeparture": {
            "type": "string",
            "description": "Minimum period before departure (NeTEx `MinimumPeriodBeforeDeparture`). ISO 8601 duration.",
            "examples": [
              "PT1H"
            ]
          },
          "maximumPeriodBeforeDeparture": {
            "type": "string",
            "description": "Maximum period before departure (NeTEx `MaximumPeriodBeforeDeparture`). ISO 8601 duration.",
            "examples": [
              "P90D"
            ]
          },
          "purchaseAction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PurchaseAction"
              },
              {
                "description": "The purchase action this window applies to (NeTEx `PurchaseAction`).\n"
              }
            ]
          },
          "purchaseMoments": {
            "type": "array",
            "description": "The moments at which a purchase can be made (NeTEx `PurchaseMoment`).\n",
            "items": {
              "$ref": "#/components/schemas/PurchaseMoment"
            },
            "default": []
          }
        }
      },
      "VersionResponse": {
        "required": [
          "changed",
          "created",
          "id",
          "startDate",
          "status"
        ],
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^([A-Z]{3}):Version:([0-9A-Za-z_\\-]*)$",
            "type": "string",
            "description": "The netex id reference to the object.",
            "examples": [
              "EXA:Version:001"
            ]
          },
          "number": {
            "type": "integer",
            "description": "Version number of the version. Only present when versionStatus is VERSIONED. Starts at 1 for a new product and is incremented by 1 for each new version.",
            "format": "int64",
            "examples": [
              1
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VersionStatus"
          },
          "startDate": {
            "type": "string",
            "description": "The start date of the version.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "The end date of the version.",
            "format": "date"
          },
          "published": {
            "type": "string",
            "description": "Timestamp for when the version was published (set to status VERSIONED).",
            "format": "date-time"
          },
          "created": {
            "type": "string",
            "description": "Created datetime",
            "format": "date-time"
          },
          "changed": {
            "type": "string",
            "description": "Changed datetime",
            "format": "date-time"
          }
        }
      },
      "VersionRequest": {
        "required": [
          "startDate",
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VersionStatus"
              },
              {
                "description": "Must be DRAFT for new versions."
              }
            ]
          },
          "startDate": {
            "type": "string",
            "description": "The start date of the version. Defaults to current date if not provided.",
            "format": "date"
          },
          "endDate": {
            "type": "string",
            "description": "The end date of the version (optional).",
            "format": "date"
          },
          "ownerOrganisationId": {
            "minimum": 1,
            "type": "integer",
            "description": "Internal id of the organisation that owns this element. Omit it to use the organisation in the access token, which is what a caller acting for itself should do. Supplying a different organisation requires permission to act on behalf of that organisation.",
            "format": "int64"
          }
        }
      }
    },
    "responses": {
      "BadRequestError": {
        "description": "Bad request - Invalid data or schema violation",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "schemaViolation": {
                "summary": "Request does not match schema",
                "value": {
                  "type": "https://developer.entur.org/errors/bad-request",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "Field 'name' is required."
                }
              },
              "purchaseWindowNotFound": {
                "summary": "Referenced purchase window not found",
                "value": {
                  "type": "https://developer.entur.org/errors/bad-request",
                  "title": "Bad Request",
                  "status": 400,
                  "detail": "PurchaseWindow with id 'ENT:PurchaseWindow:120days' not found."
                }
              }
            }
          }
        }
      },
      "UnauthorizedError": {
        "description": "Unauthorized - Authentication required",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "unauthorized": {
                "summary": "Authentication required",
                "value": {
                  "type": "https://example.com/probs/unauthorized",
                  "title": "Unauthorized",
                  "status": 401,
                  "detail": "Authentication credentials were missing or invalid."
                }
              }
            }
          }
        }
      },
      "ForbiddenError": {
        "description": "Forbidden - Insufficient permissions",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "forbidden": {
                "summary": "Access forbidden",
                "value": {
                  "type": "https://example.com/probs/forbidden",
                  "title": "Forbidden",
                  "status": 403,
                  "detail": "You do not have permission to access this resource."
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "page": {
        "name": "page",
        "in": "query",
        "description": "Zero-based page number. Defaults to 0.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "minimum": 0,
          "type": "integer",
          "default": 0
        },
        "examples": {
          "default": {
            "value": 0
          }
        }
      },
      "size": {
        "name": "size",
        "in": "query",
        "description": "Number of instances per page. Defaults to 100.",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "maximum": 1000,
          "minimum": 1,
          "type": "integer",
          "default": 100
        },
        "examples": {
          "default": {
            "value": 100
          }
        }
      },
      "id": {
        "name": "id",
        "in": "path",
        "description": "The netex ID of the element to retrieve",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "pattern": "^([A-Z]{3}):([A-Za-z]*):([0-9A-Za-z_\\-]*)$",
          "type": "string"
        },
        "examples": {
          "default": {
            "value": "ENT:PreassignedFareProduct:001"
          }
        }
      },
      "validOnDate": {
        "name": "validOnDate",
        "in": "query",
        "description": "The date that the element should be valid for, e.g. the travel date.\nDefaults to the current date.\n",
        "required": false,
        "style": "form",
        "explode": true,
        "schema": {
          "type": "string",
          "format": "date"
        },
        "examples": {
          "default": {
            "value": "2026-12-01"
          }
        }
      },
      "version": {
        "name": "version",
        "in": "path",
        "description": "The netex ID or sequence number of the version to retrieve",
        "required": true,
        "style": "simple",
        "explode": false,
        "schema": {
          "pattern": "^(([A-Z]{3}):Version:([0-9A-Za-z_\\-]*)|[1-9][0-9]*)$",
          "type": "string"
        },
        "examples": {
          "default": {
            "value": "ENT:Version:001"
          }
        }
      },
      "ET-Client-Name": {
        "name": "ET-Client-Name",
        "in": "header",
        "description": "Entur 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>`.",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      },
      "X-Correlation-Id": {
        "name": "X-Correlation-Id",
        "in": "header",
        "description": "Correlation id",
        "required": false,
        "style": "simple",
        "explode": false,
        "schema": {
          "type": "string"
        }
      }
    },
    "examples": {
      "withDeprecated": {
        "summary": "List with includeDeprecated=true",
        "value": {
          "purchaseWindows": [
            {
              "id": "ENT:PurchaseWindow:48H",
              "ownerOrganisationId": 1,
              "versions": [
                {
                  "versionId": "ENT:Version:PW-48H-3",
                  "names": [
                    {
                      "lang": "nb-NO",
                      "value": "Kjøpsvindu 48 timer"
                    }
                  ],
                  "startDate": "2023-01-01",
                  "status": "DRAFT"
                },
                {
                  "versionId": "ENT:Version:PW-48H-2",
                  "versionNumber": 2,
                  "names": [
                    {
                      "lang": "nb-NO",
                      "value": "Kjøpsvindu 48 timer"
                    }
                  ],
                  "startDate": "2024-04-05",
                  "status": "VERSIONED"
                },
                {
                  "versionId": "ENT:Version:PW-48H-1",
                  "versionNumber": 1,
                  "names": [
                    {
                      "lang": "nb-NO",
                      "value": "Kjøpsvindu 48 timer"
                    }
                  ],
                  "startDate": "2019-04-01",
                  "endDate": "2024-03-14",
                  "status": "DEPRECATED"
                }
              ]
            },
            {
              "id": "ENT:PurchaseWindow:c5d7e80d",
              "ownerOrganisationId": 1,
              "versions": [
                {
                  "versionId": "ENT:Version:c5d7e80d-1",
                  "versionNumber": 1,
                  "names": [
                    {
                      "lang": "nb-NO",
                      "value": "120 dager"
                    }
                  ],
                  "startDate": "2024-09-25",
                  "status": "VERSIONED"
                }
              ]
            },
            {
              "id": "MAL:PurchaseWindow:80d9a2c3",
              "ownerOrganisationId": 2,
              "versions": [
                {
                  "versionId": "MAL:Version:80d9a2c3-1",
                  "versionNumber": 1,
                  "names": [
                    {
                      "lang": "nb-NO",
                      "value": "90 dager før avgang"
                    }
                  ],
                  "startDate": "2022-01-10",
                  "endDate": "2022-02-06",
                  "status": "DEPRECATED"
                }
              ]
            }
          ],
          "totalCount": 3,
          "page": 0,
          "size": 100
        }
      },
      "advance": {
        "summary": "Purchase up to 90 days before, at least 1 hour before departure",
        "value": {
          "ownerOrganisationId": 1,
          "names": [
            {
              "lang": "nb-NO",
              "value": "Inntil 90 dager før avgang"
            }
          ],
          "startDate": "2026-08-01",
          "status": "DRAFT",
          "purchaseWhen": "ADVANCE_AND_DAY_OF_TRAVEL",
          "minimumPeriodBeforeDeparture": "PT1H",
          "maximumPeriodBeforeDeparture": "P90D"
        }
      },
      "untilPreviousDay": {
        "summary": "Purchase until the day before travel",
        "value": {
          "ownerOrganisationId": 1,
          "names": [
            {
              "lang": "nb-NO",
              "value": "Opp til en dag før reisen"
            }
          ],
          "startDate": "2026-08-01",
          "status": "DRAFT",
          "purchaseWhen": "UNTIL_PREVIOUS_DAY",
          "latestTime": "23:59:59"
        }
      },
      "advance-2": {
        "summary": "Purchase up to 90 days before, at least 1 hour before departure",
        "value": {
          "id": "ENT:PurchaseWindow:90days",
          "versionId": "ENT:Version:8f1b2c3d",
          "versionNumber": 1,
          "ownerOrganisationId": 1,
          "names": [
            {
              "lang": "nb-NO",
              "value": "Inntil 90 dager før avgang"
            }
          ],
          "startDate": "2026-08-01",
          "status": "VERSIONED",
          "purchaseWhen": "ADVANCE_AND_DAY_OF_TRAVEL",
          "minimumPeriodBeforeDeparture": "PT1H",
          "maximumPeriodBeforeDeparture": "P90D",
          "purchaseMoments": []
        }
      },
      "versionHistory": {
        "summary": "Example version history",
        "value": [
          {
            "id": "EXA:Version:853a7d14-794e-4af5-b569-301711a26e26",
            "status": "VERSIONED",
            "startDate": "2025-01-01",
            "endDate": "2025-12-31",
            "created": "2024-12-01T10:00:00Z",
            "changed": "2024-12-01T10:00:00Z",
            "published": "2024-12-30T10:00:00Z",
            "number": 1
          },
          {
            "id": "EXA:Version:e7104d26-16a5-4db5-aa42-b32ae0a3f684",
            "status": "VERSIONED",
            "startDate": "2026-01-01",
            "created": "2025-12-01T10:00:00Z",
            "changed": "2025-12-01T10:00:00Z",
            "published": "2025-12-01T13:00:00Z",
            "number": 2
          },
          {
            "id": "EXA:Version:6be856a5-dd98-496b-b3f2-ad9939270ec3",
            "status": "PROPOSED",
            "startDate": "2026-07-01",
            "created": "2026-06-01T10:00:00Z",
            "changed": "2026-06-01T10:00:00Z"
          }
        ]
      },
      "draftVersion": {
        "summary": "Draft version",
        "value": {
          "id": "EXA:Version:bf4d317a-8e61-49fd-b095-906b79c05872",
          "status": "DRAFT",
          "startDate": "2025-01-01",
          "created": "2025-01-01T10:00:00Z",
          "changed": "2025-01-01T10:00:00Z"
        }
      },
      "versionedVersion": {
        "summary": "Versioned version",
        "value": {
          "id": "EXA:Version:d88d0af0-4fe1-4457-a3a6-dbe1db5b3005",
          "status": "VERSIONED",
          "startDate": "2025-01-01",
          "endDate": "2025-12-31",
          "created": "2025-01-01T10:00:00Z",
          "changed": "2025-01-01T10:00:00Z",
          "published": "2025-01-15T10:00:00Z",
          "number": 1
        }
      },
      "draft": {
        "summary": "Create a new version in DRAFT",
        "value": {
          "id": "EXA:Version:7775e5aa-eb05-4190-9330-25c7f62b0b53",
          "status": "DRAFT",
          "startDate": "2025-01-01"
        }
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}