### Create One-Stop Booking Source: https://developer.entur.org/pages-shared-mobility-client-guide Create a one-stop booking. If you want to make sure that the trip starts right away you can set autoStart to true. ```APIDOC ## POST /shared-mobility/v1/bookings/one-stop ### Description Create a one-stop booking. If you want to make sure that the trip starts right away you can set `autoStart` to true. ### Method POST ### Endpoint `/shared-mobility/v1/bookings/one-stop` ### Parameters #### Request Body * **vehicleId** (string) - Required - The ID of the vehicle to book. * **autoStart** (boolean) - Optional - If true, the trip will start immediately. ### Request Example ```json { "vehicleId": "vehicle456", "autoStart": true } ``` ### Response #### Success Response (200) * **bookingId** (string) - The ID of the created booking. * **status** (string) - The status of the booking (e.g., 'PENDING', 'ACTIVE'). #### Response Example ```json { "bookingId": "bookingABC", "status": "ACTIVE" } ``` ``` -------------------------------- ### Example Response - List Versioned Datasets Source: https://developer.entur.org/pages-timetable-partner An example JSON response structure for the 'List of versioned original datasets' endpoint, showing import keys and creation dates for the latest datasets. ```JSON [ { "importKey": "ent_2025-01-11T19_08_10.796", "creationDate": "2025-01-11T18:08:34.45Z" }, { "importKey": "ent_2025-01-11T19_40_59.93", "creationDate": "2025-01-11T18:41:18.172Z" } ] ``` -------------------------------- ### Example Response - Import Status Source: https://developer.entur.org/pages-timetable-partner An example JSON response for the 'Import status' endpoint, detailing the state, date, and filename of an import process. ```JSON {"state":"IN_PROGRESS","date":"2025-08-04T12:49:19.068+02:00","fileName":"Entur-1217-2025-08-01-netex.zip"} ``` -------------------------------- ### Authentication Header Example Source: https://developer.entur.org/pages-journeyplanner-journeyplanner Examples of the 'ET-Client-Name' header used for authenticating API consumers. This header identifies the company and application making the request, and is required for compliance with Entur's rate-limiting policies. ```http ET-Client-Name: brakar-journeyplanner ET-Client-Name: fosen_utvikling-departureboard ET-Client-Name: nor_way_bussekspress-nwy-app ``` -------------------------------- ### GET /code-pages/products Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets available personnel ticket products. Returns a list of available personnel ticket products. ```APIDOC ## GET /code-pages/products ### Description Get available personnel ticket products. ### Method GET ### Endpoint /code-pages/products ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of products. #### Response Example { "example": "" } ``` -------------------------------- ### Get Booking by Booking ID Source: https://developer.entur.org/pages-shared-mobility-client-guide Get a specific booking given its booking ID. ```APIDOC ## GET /shared-mobility/v1/bookings/{bookingId} ### Description Get a specific booking given bookingId. ### Method GET ### Endpoint `/shared-mobility/v1/bookings/{bookingId}` ### Parameters #### Path Parameters * **bookingId** (string) - Required - The ID of the booking to retrieve. ### Response #### Success Response (200) * **bookingId** (string) - The ID of the booking. * **status** (string) - The status of the booking. * **startTime** (string) - The start time of the booking (ISO 8601 format). * **endTime** (string) - The end time of the booking (ISO 8601 format). #### Response Example ```json { "bookingId": "bookingABC", "status": "ACTIVE", "startTime": "2023-10-27T10:00:00Z", "endTime": null } ``` ``` -------------------------------- ### Get Bookings by Customer ID Source: https://developer.entur.org/pages-shared-mobility-client-guide Get a list of all bookings for a given customer number. If the 'active' parameter is set to true, the endpoint returns all bookings that are not in 'FINISHED' or 'CANCELLED' state. ```APIDOC ## GET /shared-mobility/v1/bookings ### Description Get a list of all bookings given customerNumber. If you set the parameter "active" to true, the endpoint will return all bookings who is not in FINISHED or CANCELLED state. This is usually used when retrieving an active booking if the user closes the app in the middle of a trip. ### Method GET ### Endpoint `/shared-mobility/v1/bookings` ### Parameters #### Query Parameters * **customerNumber** (string) - Required - The customer's unique identifier. * **active** (boolean) - Optional - If true, returns only active bookings (not FINISHED or CANCELLED). ### Response #### Success Response (200) * **bookings** (array) - A list of bookings. * **bookingId** (string) - The ID of the booking. * **status** (string) - The status of the booking. * **startTime** (string) - The start time of the booking (ISO 8601 format). * **endTime** (string) - The end time of the booking (ISO 8601 format). #### Response Example ```json { "bookings": [ { "bookingId": "bookingABC", "status": "ACTIVE", "startTime": "2023-10-27T10:00:00Z", "endTime": null } ] } ``` ``` -------------------------------- ### Java Kafka Producer/Consumer Configuration Source: https://developer.entur.org/pages-sales-guides Example Java code demonstrating how to configure Kafka producer and consumer properties, including bootstrap servers, group ID, deserializers, schema registry URL, and security settings for SASL_SSL with SCRAM-SHA-512. ```java Properties properties = new Properties(); properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "bootstrap.test-ext.kafka.entur.io:9095"); properties.put(ConsumerConfig.GROUP_ID_CONFIG, "my-application-name"); properties.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false); properties.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest"); properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, KafkaAvroDeserializer.class); properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, KafkaAvroDeserializer.class); properties.put("specific.avro.reader", true); properties.put("schema.registry.url", "http://schema-registry.test-ext.kafka.entur.io:8001"); // Security properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SASL_SSL"); properties.put(SaslConfigs.SASL_MECHANISM, "SCRAM-SHA-512"); properties.put(SaslConfigs.SASL_JAAS_CONFIG, String.format("org.apache.kafka.common.security.scram.ScramLoginModule required\nusername=\"%s\"\npassword=\"%s\";", config.getSasl().get("username"), config.getSasl().get("password"))); producer = new KafkaConsumer<>(properties); ``` -------------------------------- ### SharedMobilityKafkaEvent Data Structure Example (JSON) Source: https://developer.entur.org/pages-shared-mobility-client-guide An example of the Avro-serialized SharedMobilityKafkaEvent object transmitted through the Kafka queue. This structure contains real-time booking updates, pricing details, and metadata for mobility services. ```json { "timestamp": 1726748821000, "bookingUpdatedKafkaEvent": { "schemaVersion": "1.0", "bookingId": "123e4567-e89b-12d3-a456-426614174000", "state": "IN_USE", "orderId": "ORD123456", "pricingPlan": { "currency": "NOK", "price": 150.0, "perMinPricing": [ { "start": 0, "end": 60, "interval": 15, "rate": 2.5 } ] }, "departureTime": 1726748821000, "arrivalTime": 1726750800000, "operator": { "id": "op123", "name": "SharedMobility Operator" }, "stateOfCharge": 80, "currentRangeKm": 120, "pricing": { "currentAmount": 100.0, "finalAmount": 150.0 }, "comment": "Real-time booking update for the user." } } ``` -------------------------------- ### Set up ClientContext in Java Source: https://developer.entur.org/pages-nod-develop-nod-clients Initializes a ClientContext with ClientID, password, and supported capabilities. The C16_DESFIRE_APDU capability is required for NOD order pickup, while C27_MESSAGE enables user feedback. Other capabilities enhance user experience. ```java ClientContext ctx = new MyClientContextImpl() { @Override public String getPassword() { return "secret"; } @Override public String getClientID() { return "ExampleClientID"; } @Override public Capabilities getCapabilities() { ArrayList caps = new ArrayList(); caps.add(Capability.C16_DESFIRE_APDU); caps.add(Capability.C22_LED_RED); caps.add(Capability.C23_LED_GREEN); caps.add(Capability.C24_LED_YELLOW); caps.add(Capability.C25_PARALLEL_EXECUTION); caps.add(Capability.C26_BUZZER); caps.add(Capability.C27_MESSAGE); caps.add(Capability.C14_KEEPALIVE); caps.add(Capability.C18_SCREEN1); Capability[] capsArray = caps.toArray(new Capability[0]); return new Capabilities(capsArray); } }; ``` -------------------------------- ### POST /v1/data-sources Source: https://developer.entur.org/personalisation_program_administration_changelog Creates a new system data source. ```APIDOC ## POST /v1/data-sources ### Description This endpoint creates a new system data source. ### Method POST ### Endpoint /v1/data-sources ### Parameters #### Request Body - **name** (string) - Required - The name of the data source. - **isProgramSpecific** (boolean) - Required - Set to `false` for system data sources. ### Request Example ```json { "name": "Inventory Levels", "isProgramSpecific": false } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the newly created data source. - **name** (string) - The name of the data source. - **isProgramSpecific** (boolean) - Indicates if the data source is program-specific. #### Response Example ```json { "id": "ds-789", "name": "Inventory Levels", "isProgramSpecific": false } ``` ``` -------------------------------- ### Getting all periods for a member Source: https://developer.entur.org/pages-personalisation-docs-personalisation-client-integration-guide Retrieve a paginated list of all periods for a member in a period-based program, including start time, end time, and associated metadata. ```APIDOC ## Getting all periods for a member ### Description Retrieves a paginated list of all periods for a member within a period-based program. Each period includes start time, end time, and metadata. The `endTime` can be used to fetch the final status for that period from the customer status endpoint. ### Method GET ### Endpoint /members/{memberId}/periods ### Parameters #### Path Parameters - **memberId** (string) - Required - The unique identifier of the member. #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **pageSize** (integer) - Optional - The number of items per page. ### Response #### Success Response (200) - **periods** (array) - A paginated list of periods. - **startTime** (string) - The start time of the period (ISO 8601 format). - **endTime** (string) - The end time of the period (ISO 8601 format). - **metadata** (object) - Any metadata associated with the period. #### Response Example ```json { "periods": [ { "startTime": "2023-01-01T00:00:00Z", "endTime": "2023-12-31T23:59:59Z", "metadata": { "level": "gold" } } ] } ``` ``` -------------------------------- ### Shared Mobility API - Get Bookings Source: https://developer.entur.org/pages-shared-mobility-client-guide Retrieve a list of bookings for a given customer ID or a specific booking ID. ```APIDOC ## GET /shared-mobility/v1/bookings ### Description Retrieves bookings associated with a customer or a specific booking. ### Method GET ### Endpoint `/shared-mobility/v1/bookings` ### Parameters #### Query Parameters - **customerId** (string) - Optional - The ID of the customer whose bookings are to be retrieved. - **bookingId** (string) - Optional - The ID of a specific booking to retrieve. *Note: Either `customerId` or `bookingId` must be provided.* ### Request Example (No explicit request body for GET requests, parameters are typically in the URL) Example for getting bookings by customer ID: `/shared-mobility/v1/bookings?customerId=some-customer-id` Example for getting a specific booking: `/shared-mobility/v1/bookings?bookingId=some-booking-id` ### Response #### Success Response (200) - **bookings** (array) - A list of booking objects. - Each booking object may contain: - **bookingId** (string) - The unique identifier for the booking. - **assetId** (string) - The identifier of the booked product. - **status** (string) - The current status of the booking. - **startTime** (string) - The start time of the booking (ISO 8601 format). - **endTime** (string) - The end time of the booking (ISO 8601 format). - **finalPrice** (number) - The final calculated price of the booking. #### Response Example (for customerId) ```json { "bookings": [ { "bookingId": "booking-123", "assetId": "asset-abc", "status": "FINISHED", "startTime": "2023-10-27T10:00:00Z", "endTime": "2023-10-27T11:00:00Z", "finalPrice": 5.50 }, { "bookingId": "booking-456", "assetId": "asset-def", "status": "ACTIVE", "startTime": "2023-10-27T14:00:00Z", "endTime": null, "finalPrice": null } ] } ``` #### Response Example (for bookingId) ```json { "bookingId": "some-booking-id", "assetId": "asset-xyz", "status": "ACTIVE", "startTime": "2023-10-27T15:00:00Z", "endTime": null, "finalPrice": null } ``` ``` -------------------------------- ### Search Entur Orders with Complex Filters Source: https://developer.entur.org/pages-sales-guides Demonstrates how to search for orders using multiple query parameters to create complex filters. All query parameters are joined by the AND operator. This example filters for orders with status DRAFT, version greater than 1, and a total amount between 100.00 and 200.00. ```http GET /sales/v1/orders?status=DRAFT&version=gt:1 &totalAmount=gte:100.00&totalAmount=lt:200.00 ``` -------------------------------- ### Change Booking State Source: https://developer.entur.org/pages-shared-mobility-client-guide Use this endpoint to change the state of a booking, including starting, pausing, resuming, finishing, or cancelling the trip. ```APIDOC ## POST /shared-mobility/v1/bookings/{bookingId}/one-stop/event ### Description Use this endpoint to change the state of a booking. ### Method POST ### Endpoint `/shared-mobility/v1/bookings/{bookingId}/one-stop/event` ### Parameters #### Path Parameters * **bookingId** (string) - Required - The ID of the booking to update. #### Request Body * **event** (string) - Required - The event to trigger (e.g., 'START', 'PAUSE', 'RESUME', 'START_FINISHING', 'FINISH', 'CANCEL'). * **fileName** (string) - Optional - The name of the file if uploading a picture for finishing the trip. * **fileType** (string) - Optional - The MIME type of the file if uploading a picture. * **fileData** (string) - Optional - The base64 encoded data of the file if uploading a picture. ### Request Example ```json { "event": "FINISH", "fileName": "photo.jpg", "fileType": "image/jpeg", "fileData": "/9j/4AAQSkZJRgABAQEASABIAAD..." } ``` ### Response #### Success Response (200) * **bookingId** (string) - The ID of the updated booking. * **status** (string) - The new status of the booking. #### Response Example ```json { "bookingId": "bookingABC", "status": "FINISHED" } ``` ``` -------------------------------- ### Get Vehicle ID by QR Code Source: https://developer.entur.org/pages-shared-mobility-client-guide Retrieve the assetId (TOMP) / vehicleId (GBFS) / bike_id (GBFS) given the scanned QR-code. ```APIDOC ## GET /shared-mobility/v1/qr/qr-code ### Description Retrieve the assetId (TOMP) / vehicleId (GBFS) /bike_id (GBFS) given the scanned QR-code. ### Method GET ### Endpoint `/shared-mobility/v1/qr/qr-code` ### Parameters #### Query Parameters * **qrCode** (string) - Required - The scanned QR code. ### Response #### Success Response (200) * **assetId** (string) - The TOMP asset identifier. * **vehicleId** (string) - The GBFS vehicle identifier. * **bike_id** (string) - The GBFS bike identifier. #### Response Example ```json { "assetId": "asset123", "vehicleId": "vehicle456", "bike_id": "bike789" } ``` ``` -------------------------------- ### Run Schema Registry UI for Production Environment Source: https://developer.entur.org/pages-sales-guides This command runs the Schema Registry UI for the production environment. It maps port 8000 locally and connects to the production schema registry URL. PROXY=true is used to enable proxying. ```docker docker run --rm -p 8000:8000 -e "SCHEMAREGISTRY_URL=http://schema-registry.prod-ext.kafka.entur.io:8001" -e "PROXY=true" landoop/schema-registry-ui http://localhost:8000 ``` -------------------------------- ### Kafkacat Client Testing Configuration Source: https://developer.entur.org/pages-sales-guides Example command using the kafkacat tool to test Kafka connectivity with SASL_SSL security protocol and SCRAM-SHA-512 mechanism. Uses environment variables for configuration parameters. ```bash BOOTSTRAP_SERVERS=bootstrap.test-ext.kafka.entur.io:9095 TOPIC=sales-transaction-summary-staging-20 SECURITY_PROTOCOL=SASL_SSL SASL_MECHANISMS=SCRAM-SHA-512 SASL_USERNAME= SASL_PASSWORD= kafkacat -C -b $BOOTSTRAP_SERVERS -t $TOPIC -X security.protocol=$SECURITY_PROTOCOL -o beginning -X sasl.mechanisms=$SASL_MECHANISMS -X sasl.username=$SASL_USERNAME -X sasl.password=$SASL_PASSWORD ``` -------------------------------- ### Shared Mobility API - Get Vehicle ID (GBFS) from QR Code Source: https://developer.entur.org/pages-shared-mobility-client-guide Retrieve the assetId/vehicleId/bike_id from a scanned QR-code to initiate the booking process. ```APIDOC ## GET /shared-mobility/v1/qr/qr-code ### Description Retrieves the asset identifier (assetId, vehicleId, or bike_id) associated with a scanned QR code. This is the first step in the sales flow when using QR code scanning. ### Method GET ### Endpoint `/shared-mobility/v1/qr/qr-code` ### Parameters #### Query Parameters - **qr_code_data** (string) - Required - The data content scanned from the QR code. ### Request Example (No explicit request body for GET requests, parameters are typically in the URL) ### Response #### Success Response (200) - **assetId** (string) - The unique identifier for the mobility product (also referred to as TOMP id). - **vehicleId** (string) - The unique identifier for the vehicle (GBFS id). - **bike_id** (string) - An alternative identifier for the vehicle (GBFS id). #### Response Example ```json { "assetId": "some-asset-id", "vehicleId": "some-vehicle-id", "bike_id": "some-bike-id" } ``` ``` -------------------------------- ### Run Schema Registry UI for Staging Environment Source: https://developer.entur.org/pages-sales-guides This command runs the Schema Registry UI for the staging environment. It maps port 8000 locally and connects to the staging schema registry URL. PROXY=true is used to enable proxying. ```docker docker run --rm -p 8000:8000 -e "SCHEMAREGISTRY_URL=http://schema-registry.test-ext.kafka.entur.io:8001" -e "PROXY=true" landoop/schema-registry-ui http://localhost:8000 ``` -------------------------------- ### Train Component Order Source: https://developer.entur.org/pages-entur-plass-scheduled-stock-api Specifies the sequential order of a carriage within a train, starting from 1. This defines the physical arrangement of the train's components. Example: 'order="1"' ```xml order="1" ``` -------------------------------- ### Create Payment Source: https://developer.entur.org/pages-penalty-fare-guide Initiates a payment process for an order. ```APIDOC ## POST /v1/payments ### Description Creates a payment initiation for an order. This is a general endpoint used for both on-site and invoice payments. ### Method POST ### Endpoint /v1/payments ### Parameters #### Request Body - **orderId** (string) - Required - The ID of the order to create a payment for. - **amount** (number) - Required - The amount to be paid. - **currency** (string) - Required - The currency of the payment (e.g., "NOK"). ### Request Example ```json { "orderId": "order456", "amount": 1000, "currency": "NOK" } ``` ### Response #### Success Response (201 Created) - **paymentId** (string) - The unique identifier for the created payment. #### Response Example ```json { "paymentId": "paymentABC" } ``` ``` -------------------------------- ### GET /code-pages/employment-types Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets types of employment. Retrieves a list of valid employment types. ```APIDOC ## GET /code-pages/employment-types ### Description Get types of employment. ### Method GET ### Endpoint /code-pages/employment-types ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of employment types. #### Response Example { "example": "" } ``` -------------------------------- ### GET /code-pages/family-relations Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets family relations available. Returns a list of available family relations. ```APIDOC ## GET /code-pages/family-relations ### Description Get family relations available. ### Method GET ### Endpoint /code-pages/family-relations ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of family relations. #### Response Example { "example": "" } ``` -------------------------------- ### Create Order Source: https://developer.entur.org/pages-penalty-fare-guide Creates a new order, linking it to a temporary customer profile. ```APIDOC ## POST /v1/orders ### Description Creates a new order, which for penalty fares, must be connected to a temporary customer profile. ### Method POST ### Endpoint /v1/orders ### Parameters #### Request Body - **contact** (string) - Required - The customer ID of the temporary profile. - **createdBy** (string) - Required - The customer ID of the temporary profile. - **orderItems** (array) - Required - A list of items in the order. - **price** (number) - Required - The price of the order item. - **description** (string) - Required - A description of the order item. ### Request Example ```json { "contact": "cust987", "createdBy": "cust987", "orderItems": [ { "price": 1000, "description": "Penalty fare for no valid ticket" } ] } ``` ### Response #### Success Response (201 Created) - **orderId** (string) - The unique identifier for the created order. #### Response Example ```json { "orderId": "order456" } ``` ``` -------------------------------- ### GET /code-pages/pay-types Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets types of pay an employee can have. Retrieves a list of valid pay types. ```APIDOC ## GET /code-pages/pay-types ### Description Get types of pay an employee can have. ### Method GET ### Endpoint /code-pages/pay-types ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of pay types. #### Response Example { "example": "" } ``` -------------------------------- ### GET /code-pages/ticket-types Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets available ticket types. Retrieves a list of valid ticket types. ```APIDOC ## GET /code-pages/ticket-types ### Description Get available ticket types. ### Method GET ### Endpoint /code-pages/ticket-types ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of ticket types. #### Response Example { "example": "" } ``` -------------------------------- ### Create and Configure NODClient in Java Source: https://developer.entur.org/pages-nod-develop-nod-clients Creates a NODClient instance, which represents a client with an identity, context, and capabilities. It also requires the URL of the NOD server. The client context can be further modified with NOD client-specific information. ```java NODClient client = new NODClient(ctx); client.setNodServerUrl("NOD URL"); ClientContext ctx = client.getClientContext(); ctx.put(ClientContext.KEY_LOCATION, 5435L); ctx.put(ClientContext.KEY_DEVICE_ID, new byte[]{(byte)0xAA,(byte)0xBB,(byte)0xCC}); ctx.put(ClientContext.KEY_SERVICEPROVIDER_ID, 3); ``` -------------------------------- ### Create a booking Source: https://developer.entur.org/pages-shared-mobility-transport-operator-guide This endpoint creates a booking for a trip. The booking is created with a list of legs, which includes information about the assets (vehicle). Pricing on the booking is not mandatory before the state of all legs are set to START_FINISHING. ```APIDOC ## POST /bookings/one-stop ### Description Creates a booking for a trip with specified legs and asset information. Pricing is optional at creation. ### Method POST ### Endpoint /bookings/one-stop ### Parameters #### Request Body - **customer** (object) - Required - Information about the customer. - **id** (string) - Required - Customer identifier. - **legs** (array) - Required - List of trip legs. - **id** (string) - Required - Unique identifier for the leg (UUID). - **departureTime** (string) - Required - Scheduled departure time. - **from** (object) - Required - Starting coordinates. - **lat** (number) - Required - Latitude. - **lon** (number) - Required - Longitude. - **to** (object) - Optional - Ending coordinates. - **lat** (number) - Required - Latitude. - **lon** (number) - Required - Longitude. - **asset** (object) - Required - Information about the asset (vehicle). - **id** (string) - Required - Unique identifier for the asset (GBFS dynamic ID). - **assetType** (object) - Required - Reference to an AssetType. - **id** (string) - Required - Asset type identifier. - **overriddenProperties** (object) - Optional - Overridden properties for the asset. - **meta** (object) - Optional. - **vehicleCode** (string) - Optional - Internal vehicle code. ### Request Example ```json { "customer": { "id": "customer-uuid-5678" }, "legs": [ { "id": "leg-uuid-9012", "departureTime": "2024-07-27T10:00:00Z", "from": { "lat": 59.9139, "lon": 10.7522 }, "asset": { "id": "asset-uuid-1234", "assetType": { "id": "scooter" }, "overriddenProperties": { "meta": { "vehicleCode": "V123" } } } } ] } ``` ### Response #### Success Response (200) - **booking_id** (string) - The unique identifier for the created booking (UUID). - **state** (string) - The initial state of the booking. - **departureTime** (string) - The scheduled departure time. - **from** (object) - Starting coordinates. - **customer** (object) - Customer information. - **legs** (array) - List of legs associated with the booking. #### Response Example ```json { "booking_id": "booking-uuid-abcd", "state": "REQUESTED", "departureTime": "2024-07-27T10:00:00Z", "from": { "lat": 59.9139, "lon": 10.7522 }, "customer": { "id": "customer-uuid-5678" }, "legs": [ { "id": "leg-uuid-9012", "state": "REQUESTED", "departureTime": "2024-07-27T10:00:00Z", "from": { "lat": 59.9139, "lon": 10.7522 }, "asset": { "id": "asset-uuid-1234", "assetType": { "id": "scooter" }, "overriddenProperties": { "meta": { "vehicleCode": "V123" } } } } ] } ``` ``` -------------------------------- ### GET /code-pages/employment-end-causes Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets causes for end of employment. Retrieves a list of valid employment end causes. ```APIDOC ## GET /code-pages/employment-end-causes ### Description Get causes for end of employment. ### Method GET ### Endpoint /code-pages/employment-end-causes ### Parameters ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (array) - List of employment end causes. #### Response Example { "example": "" } ``` -------------------------------- ### Search Response Overview Source: https://developer.entur.org/pages-offers-docs-guides-v2-search All Offers endpoints return a `SearchResponse`, which includes `OfferSummary` objects. The response may also contain components like `Recommendation`, `OptionalProduct`, and `UnavailableProduct`. ```APIDOC ## Search Response Overview ### Description This outlines the structure of the `SearchResponse` returned by Offers endpoints, detailing `OfferSummary` and other potential components. ### Response #### Success Response (200) - **SearchResponse** (object) - **offers** (Array) - A list of summarized offers. - **recommendations** (Array) - Optional recommendations. - **optionalProducts** (Array) - Optional products that can be added. - **unavailableProducts** (Array) - Products that are currently unavailable. ### OfferSummary (object) - **name** (string) - The name of the offer. - **description** (string) - A description of the offer. - **price** (object) - Pricing details for the offer. - **products** (Array) - Products included in the offer. - **geographicalValidity** (object) - Details about where the offer is valid. - **fulfillmentMethods** (Array) - Available methods to fulfill the offer. ``` -------------------------------- ### GET /family-members/{familyMemberId} Source: https://developer.entur.org/pages-personalbillett-docs-personneltickets-api Gets a family member by ID. Retrieves the details of a family member based on their unique identifier. ```APIDOC ## GET /family-members/{familyMemberId} ### Description Get a family member. ### Method GET ### Endpoint /family-members/{familyMemberId} ### Parameters #### Path Parameters - **familyMemberId** (string) - Required - The ID of the family member. ### Request Example { "example": "" } ### Response #### Success Response (200) - **(Various)** (object) - Family member details. #### Response Example { "example": "" } ``` -------------------------------- ### Search Response Overview Source: https://developer.entur.org/pages-offers-docs-search-guide-v2 All Offers endpoints return a `SearchResponse`, which can contain multiple `OfferSummary` objects and additional components like `Recommendation`, `OptionalProduct`, and `UnavailableProduct`. ```APIDOC ## Search Response Overview ### Description Offers endpoints return a `SearchResponse` which includes `OfferSummary` objects and potentially other components like `Recommendation`, `OptionalProduct`, and `UnavailableProduct`. ### Response #### Success Response (200) - **SearchResponse** (object) - The main response object. - **OfferSummary** (array) - A list of valid offers, each containing details like name, description, price, products, and validity. - **Recommendation** (object) - Recommendations related to the search (See Recommendations Guide). - **OptionalProduct** (object) - Optional products available. - **UnavailableProduct** (object) - Products that are unavailable. ``` -------------------------------- ### GET /profiles (Vipps search) Source: https://developer.entur.org/customers-changelog This endpoint adds an optional search parameter for Vipps id to the GET /profiles endpoint. ```APIDOC ## GET /profiles ### Description Gets customer profiles with optional Vipps id search parameter. ### Method GET ### Endpoint /profiles ### Parameters #### Query Parameters - **vippsId** (string) - Optional - The Vipps ID to search for. ### Request Example *No specific request example provided in the source text, assume a GET request with query parameter* ### Response #### Success Response (200) - **profiles** (array) - List of customer profiles matching the search criteria. #### Response Example { "profiles": [ { "customerId": "12345", "name": "John Doe", "vippsId": "exampleVippsId" } ] } ``` -------------------------------- ### Cersei v492 - New Endpoint for Supplement Products Source: https://developer.entur.org/sales-changelog A new endpoint `https://{host}/sales/v1/update-order/supplement-products` has been added to support adding supplement products to order lines. Currently, only products that do not modify seating are supported. ```APIDOC ## POST /sales/v1/update-order/supplement-products ### Description Adds supplement products to order lines. This endpoint is intended for products that do not involve seating modifications. ### Method POST ### Endpoint `https://{host}/sales/v1/update-order/supplement-products` ### Parameters #### Request Body - **orderId** (string) - Required - The ID of the order. - **supplementProducts** (array) - Required - A list of supplement products to add. - **productId** (string) - Required - The ID of the supplement product. - **quantity** (integer) - Required - The quantity of the product. ### Request Example ```json { "orderId": "order789", "supplementProducts": [ { "productId": "meal101", "quantity": 2 } ] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "example": { "status": "success" } } ``` ```