Entur · Schema

PurchaseWindowRequest

A purchase window (NeTEx `PurchaseWindow`, a `UsageParameter`) defines when a product can be purchased relative to the time of travel. Products reference it through `purchaseWindowRef`; the underlying NeTEx `GenericParameterAssignment` is managed by the backend.

CompanyPublic TransportJourney PlanningMobilityOpen DataNorwayTransitGraphQL

Properties

Name Type Description
ownerOrganisationId integer 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 requ
names object
descriptions object
startDate string First day this purchase window version is valid.
endDate string Last day this purchase window version is valid (optional). Omit for an open-ended version.
status object
purchaseWhen object
latestTime string Latest time of day a purchase can be made (NeTEx `LatestTime`), formatted `HH:mm:ss`.
minimumPeriodBeforeDeparture string Minimum period before departure that a purchase must be made (NeTEx `MinimumPeriodBeforeDeparture`). ISO 8601 duration with days, hours, minutes and/or seconds.
maximumPeriodBeforeDeparture string Maximum period before departure that a purchase can be made (NeTEx `MaximumPeriodBeforeDeparture`). ISO 8601 duration with days, hours, minutes and/or seconds. Must not be shorter than `minimumPeriodB
purchaseAction object
purchaseMoments array The moments at which a purchase can be made (NeTEx `PurchaseMoment`, a list).
View JSON Schema on GitHub

JSON Schema

entur-purchase-window-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/entur/main/json-schema/entur-purchase-window-request-schema.json",
  "title": "PurchaseWindowRequest",
  "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",
  "x-generated": "2026-10-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-product-parameters-api-openapi.yml#/components/schemas/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"
    },
    "names": {
      "$ref": "#/$defs/LocalizedString"
    },
    "descriptions": {
      "$ref": "#/$defs/LocalizedString"
    },
    "startDate": {
      "type": "string",
      "description": "First day this purchase window version is valid.",
      "format": "date"
    },
    "endDate": {
      "type": "string",
      "description": "Last day this purchase window version is valid (optional). Omit for an open-ended version.",
      "format": "date"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/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"
        }
      ]
    },
    "purchaseWhen": {
      "allOf": [
        {
          "$ref": "#/$defs/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`."
    },
    "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"
    },
    "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"
    },
    "purchaseAction": {
      "allOf": [
        {
          "$ref": "#/$defs/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": "#/$defs/PurchaseMoment"
      }
    }
  },
  "$defs": {
    "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')."
          },
          "value": {
            "type": "string",
            "description": "The localized string value for the specified lang."
          }
        }
      }
    },
    "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"
      ]
    },
    "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"
      ]
    },
    "VersionStatus": {
      "type": "string",
      "enum": [
        "DRAFT",
        "PROPOSED",
        "VERSIONED",
        "DEPRECATED"
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/entur-purchase-window-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.