Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close #1296 Trips and Seat Layout Api #1297

Open
wants to merge 5 commits into
base: transit-system
Choose a base branch
from

Conversation

tykealy
Copy link
Collaborator

@tykealy tykealy commented Apr 3, 2024

Trips Search API
url: {{localhost}}api/v2/storefront/trips?origin_id=159&destination_id=162&date=2024-04-12

{
    "data": [
        {
            "id": "355",
            "type": "trip",
            "attributes": {
                "vendor_id": 107,
                "vendor_name": "Vet Airbus",
                "short_name": "SB-PP-SR",
                "route_name": "Sleeping Bus PhnomPenh to SiemReap",
                "origin_id": 159,
                "origin": "PhnomPenh",
                "destination_id": 162,
                "destination": "SiemReap",
                "total_sold": 0,
                "total_seats": 37,
                "duration": 16200,
                "vehicle_id": 4,
                "departure_time": "03:27",
                "remaining_seats": 37,
                "arrival_time": "07:57",
                "duration_in_hms": "4h 30m 0s"
            }
        }
    ]
}

Trip Detail API
url: {{localhost}}api/v2/storefront/trips/342?date=2024-12-2

{
  "data": {
    "id": "342",
    "type": "trip_layout",
    "attributes": {
      "total_sold": 1,
      "total_seats": 37,
      "remaining_seats": 37,
      "allow_seat_selection": true,
      "vehicle_type_id": 2,
      "layers": [
        {
          "name": "First Layer",
          "rows": [
            {
              "number": 1,
              "columns": [
                {
                  "number": 1,
                  "label": "F1",
                  "seat_type": "normal",
                  "is_occupied": true,
                }
              ]
            },
            {
              "number": 2,
              "columns": [
                {
                  "number": 1,
                  "label": "F5",
                  "seat_type": "normal",
                  "is_occupied": false,
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

@tykealy tykealy self-assigned this Apr 3, 2024
@tykealy tykealy added this to the Transit Api milestone Apr 3, 2024
@tykealy tykealy changed the title WIP #1296 Trips and Seat Layout Api Close #1296 Trips and Seat Layout Api Apr 29, 2024
@tykealy tykealy requested a review from channainfo April 29, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant