{
  "openapi": "3.1.0",
  "info": {
    "title": "RouteGenie Instance API",
    "version": "1.0",
    "description": "**Who should use this API:** transportation providers. Your software, such as booking or scheduling software, connects to your RouteGenie instance.\n\nThis page lists every endpoint, field and webhook. To set up an integration, or to follow a task step by step, read the [guide](/transport-api/guide/).\n"
  },
  "servers": [
    {
      "url": "https://{instance}.routegenie.com:8000/open_api/api/v1",
      "variables": {
        "instance": {
          "default": "your-instance",
          "description": "Your RouteGenie instance name."
        }
      },
      "description": "Your RouteGenie address. Replace your-instance above with your instance name to update the code samples."
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "components": {
    "schemas": {
      "TokenRequest": {
        "type": "object",
        "description": "Form fields for the token request. Client credentials go in the HTTP Basic header.",
        "properties": {
          "grant_type": {
            "type": "string",
            "description": "The OAuth2 grant type.",
            "enum": [
              "client_credentials"
            ]
          }
        },
        "required": [
          "grant_type"
        ]
      },
      "TokenResponse": {
        "type": "object",
        "description": "An access token.",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "The bearer token. Send it on every other request."
          },
          "expires_in": {
            "type": "integer",
            "description": "Seconds until the token expires."
          },
          "token_type": {
            "type": "string",
            "description": "The token type."
          },
          "scope": {
            "type": "string",
            "description": "The scopes granted to the token."
          }
        }
      },
      "ClientAddressDetails": {
        "type": "object",
        "description": "Extra details for a client address.",
        "properties": {
          "suite": {
            "type": "string",
            "description": "Apartment or suite number."
          },
          "floor": {
            "type": "string",
            "description": "Floor."
          },
          "room": {
            "type": "string",
            "description": "Room."
          },
          "bed": {
            "type": "string",
            "description": "Bed."
          },
          "stairs": {
            "type": "integer",
            "description": "Number of stairs."
          }
        }
      },
      "ClientCreateRequest": {
        "type": "object",
        "description": "A client (passenger) profile.",
        "properties": {
          "first_name": {
            "type": "string",
            "description": "The client's first name."
          },
          "last_name": {
            "type": "string",
            "description": "The client's last name."
          },
          "phone_1": {
            "type": "string",
            "description": "The client's primary phone number."
          },
          "phone_2": {
            "type": "string",
            "description": "The client's secondary phone number."
          },
          "member_id": {
            "type": "string",
            "description": "The member number that identifies the client under the payer."
          },
          "address_1": {
            "type": "string",
            "description": "The client's primary address."
          },
          "address_1_details": {
            "$ref": "#/components/schemas/ClientAddressDetails",
            "description": "Details of the primary address."
          },
          "address_2": {
            "type": "string",
            "description": "The client's secondary address."
          },
          "address_2_details": {
            "$ref": "#/components/schemas/ClientAddressDetails",
            "description": "Details of the secondary address."
          },
          "birthday": {
            "type": "string",
            "description": "The client's date of birth in MM/DD/YYYY format."
          },
          "gender": {
            "type": "integer",
            "description": "The client's gender. 0 is male, 1 is female, 2 is unknown.",
            "enum": [
              0,
              1,
              2
            ]
          },
          "preferred_custom_trip_type": {
            "type": "integer",
            "description": "ID of the client's preferred custom trip type. Get IDs from the custom trip types list."
          },
          "extra_member_ids": {
            "type": "object",
            "description": "Member IDs for the client under other payers, as `{payer_id: member_id}`. Send it when your software creates orders for more than one payer.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "weight": {
            "type": "integer",
            "description": "The client's weight."
          }
        },
        "required": [
          "first_name",
          "last_name",
          "phone_1",
          "member_id"
        ]
      },
      "Client": {
        "type": "object",
        "description": "A client (passenger) profile.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal client ID."
          },
          "first_name": {
            "type": "string",
            "description": "The client's first name."
          },
          "last_name": {
            "type": "string",
            "description": "The client's last name."
          },
          "phone_1": {
            "type": "string",
            "description": "The client's primary phone number."
          },
          "phone_2": {
            "type": "string",
            "description": "The client's secondary phone number."
          },
          "address_1": {
            "type": "string",
            "description": "The client's primary address."
          },
          "address_1_details": {
            "$ref": "#/components/schemas/ClientAddressDetails",
            "description": "Details of the primary address."
          },
          "address_2": {
            "type": "string",
            "description": "The client's secondary address."
          },
          "address_2_details": {
            "$ref": "#/components/schemas/ClientAddressDetails",
            "description": "Details of the secondary address."
          },
          "birthday": {
            "type": "string",
            "description": "The client's date of birth in MM/DD/YYYY format."
          },
          "gender": {
            "type": "integer",
            "description": "The client's gender. 0 is male, 1 is female, 2 is unknown.",
            "enum": [
              0,
              1,
              2
            ]
          },
          "preferred_custom_trip_type": {
            "$ref": "#/components/schemas/CustomTripType",
            "description": "The client's preferred custom trip type."
          },
          "member_ids": {
            "type": "object",
            "description": "Member IDs for the client under every available payer, as `{payer_id: member_id}`.",
            "additionalProperties": {
              "type": "string"
            }
          },
          "weight": {
            "type": "integer",
            "description": "The client's weight."
          }
        }
      },
      "ClientList": {
        "type": "object",
        "description": "A page of clients.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of clients."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page.",
            "nullable": true
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page.",
            "nullable": true
          },
          "results": {
            "type": "array",
            "description": "The clients on this page.",
            "items": {
              "$ref": "#/components/schemas/Client"
            }
          }
        }
      },
      "VisitRequest": {
        "type": "object",
        "description": "A visit.",
        "properties": {
          "external_visit_id": {
            "type": "string",
            "description": "Your software's ID for the visit."
          },
          "client_member_id": {
            "type": "string",
            "description": "The member number of the client. Required if `client_internal_id` is not sent."
          },
          "client_internal_id": {
            "type": "integer",
            "description": "The internal ID of the client. Required if `client_member_id` is not sent."
          },
          "plan_start": {
            "type": "string",
            "description": "Planned start of the visit, in MM/DD/YYYY HH:MM format."
          },
          "plan_end": {
            "type": "string",
            "description": "Planned end of the visit, in MM/DD/YYYY HH:MM format."
          },
          "dispatcher": {
            "type": "integer",
            "description": "ID of the dispatcher, from the dispatchers list."
          },
          "comment": {
            "type": "string",
            "description": "A text message, up to 1000 characters.",
            "maxLength": 1000
          },
          "payer_id": {
            "type": "integer",
            "description": "Internal ID of the payer. Use it only when your software creates visits for more than one payer. If your software omits it, RouteGenie uses the default payer."
          },
          "address": {
            "type": "string",
            "description": "Address where the visit takes place.",
            "maxLength": 100
          }
        },
        "required": [
          "external_visit_id",
          "plan_start",
          "plan_end",
          "address"
        ]
      },
      "Visit": {
        "type": "object",
        "description": "A visit.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal visit ID."
          },
          "external_visit_id": {
            "type": "string",
            "description": "Your software's ID for the visit."
          },
          "plan_start": {
            "type": "string",
            "description": "Planned start of the visit, in MM/DD/YYYY HH:MM format."
          },
          "plan_end": {
            "type": "string",
            "description": "Planned end of the visit, in MM/DD/YYYY HH:MM format."
          },
          "dispatcher": {
            "type": "integer",
            "description": "ID of the dispatcher."
          }
        }
      },
      "VisitCaseManagerRequest": {
        "type": "object",
        "description": "The case manager for a visit.",
        "properties": {
          "case_manager_id": {
            "type": "integer",
            "description": "ID of the case manager, from the case managers list."
          }
        },
        "required": [
          "case_manager_id"
        ]
      },
      "Location": {
        "type": "object",
        "description": "A geographic point.",
        "properties": {
          "lat": {
            "type": "number",
            "description": "Latitude in decimal degrees."
          },
          "lng": {
            "type": "number",
            "description": "Longitude in decimal degrees."
          }
        }
      },
      "Driver": {
        "type": "object",
        "description": "The driver serving the order.",
        "properties": {
          "first_name": {
            "type": "string",
            "description": "The driver's first name."
          },
          "last_name": {
            "type": "string",
            "description": "The driver's last name."
          },
          "license": {
            "type": "string",
            "description": "The driver's license number."
          },
          "driver_custom_fields": {
            "type": "object",
            "description": "Custom driver fields as {field_name: value}. RouteGenie returns them only when your software sends include_driver_extra_info on a request for a single order."
          }
        }
      },
      "Vehicle": {
        "type": "object",
        "description": "The vehicle serving the order.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The vehicle name in RouteGenie."
          },
          "plate": {
            "type": "string",
            "description": "The plate number."
          },
          "vin": {
            "type": "string",
            "description": "The vehicle identification number (VIN)."
          },
          "make": {
            "type": "string",
            "description": "The vehicle make."
          },
          "model": {
            "type": "string",
            "description": "The vehicle model."
          },
          "color": {
            "type": "string",
            "description": "The vehicle color."
          }
        }
      },
      "ExternalReason": {
        "type": "object",
        "description": "A cancellation reason from your own reason list. RouteGenie returns it only when your software provides its own reasons and RouteGenie can match one.",
        "properties": {
          "code": {
            "type": "string",
            "description": "The reason code."
          },
          "description": {
            "type": "string",
            "description": "The reason description."
          }
        }
      },
      "IvrSettings": {
        "type": "object",
        "description": "Interactive voice response (IVR) settings of the payer.",
        "properties": {
          "passenger_can_update": {
            "type": "boolean",
            "description": "Whether a passenger can change the time or address of a trip through the automated IVR system. If false, the passenger must call the payer."
          },
          "passenger_can_cancel": {
            "type": "boolean",
            "description": "Whether a passenger can cancel an order through the automated IVR system. If false, the passenger must call the payer."
          },
          "passenger_customer_service_number": {
            "type": "string",
            "description": "The payer phone number given to passengers who must change or cancel through the payer. The IVR system redirects those calls to this number."
          }
        }
      },
      "FarePayment": {
        "type": "object",
        "description": "Payment details for the order fare.",
        "properties": {
          "paid_price": {
            "type": "number",
            "description": "The fare paid."
          },
          "payment_status": {
            "type": "integer",
            "description": "Payment status. 0 = not paid, 1 = partially paid, 2 = fully paid.",
            "enum": [
              0,
              1,
              2
            ]
          },
          "vouchers_amount": {
            "type": "number",
            "description": "The total voucher amount."
          },
          "payment_method": {
            "type": "integer",
            "description": "Payment method. 0 = account, 1 = credit card, 2 = cash, 3 = check, 4 = voucher, 5 = pass.",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5
            ]
          },
          "voucher_number": {
            "type": "string",
            "description": "The voucher or check number. RouteGenie returns it only when a voucher or check pays the full fare."
          }
        }
      },
      "OrderPayer": {
        "type": "object",
        "description": "The payer of the order.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The payer name in RouteGenie."
          }
        }
      },
      "OrderClient": {
        "type": "object",
        "description": "The client riding on the order.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The internal client ID."
          },
          "name": {
            "type": "string",
            "description": "The client's full name."
          },
          "phone_1": {
            "type": "string",
            "description": "The client's primary phone number."
          },
          "client_member_id": {
            "type": "string",
            "description": "The member ID of the client."
          }
        }
      },
      "OrderExtra": {
        "type": "object",
        "description": "An order extra on a returned order.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The internal order extra ID."
          },
          "name": {
            "type": "string",
            "description": "The extra name."
          },
          "kind": {
            "type": "integer",
            "description": "Extra kind. 0 = Text, 1 = Date, 2 = Options.",
            "enum": [
              0,
              1,
              2
            ]
          },
          "kind_value": {
            "type": "string",
            "description": "The kind as text: Text, Date or Options."
          },
          "value_date": {
            "type": "string",
            "description": "The value for kind Date. Format: MM/DD/YYYY."
          },
          "value_text": {
            "type": "string",
            "description": "The value for kind Text or Options."
          },
          "unique": {
            "type": "boolean",
            "description": "Whether the extra must be unique."
          },
          "options": {
            "type": "array",
            "description": "The choices for kind Options.",
            "items": {
              "type": "string"
            }
          },
          "show_on_driver_app": {
            "type": "boolean",
            "description": "Whether the extra is shown in the driver app."
          }
        }
      },
      "OrderExtraInput": {
        "type": "object",
        "description": "An order extra to set on an order. It must match an extra defined on the payer, by name.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The extra name."
          },
          "value_date": {
            "type": "string",
            "description": "The value for an extra of kind Date. Format: MM/DD/YYYY. Required for kind Date."
          },
          "value_text": {
            "type": "string",
            "description": "The value for an extra of kind Text or Options. Required for kind Text or Options."
          }
        },
        "required": [
          "name"
        ]
      },
      "Order": {
        "type": "object",
        "description": "An order (trip). Some fields can be empty when they do not apply to the order.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The internal order ID."
          },
          "ride_id": {
            "type": "string",
            "description": "The ID of the trip in your software."
          },
          "is_return_ride": {
            "type": "boolean",
            "description": "Whether the order is a return ride."
          },
          "trip_type": {
            "type": "integer",
            "description": "The vehicle type."
          },
          "custom_trip_type": {
            "type": "integer",
            "description": "The internal ID of the custom trip type."
          },
          "additional_seats": {
            "type": "integer",
            "description": "The number of seats besides the main client."
          },
          "comments": {
            "type": "string",
            "description": "Notes. Maximum 1000 characters."
          },
          "provide_oxygen": {
            "type": "boolean",
            "description": "Whether the vehicle must carry oxygen."
          },
          "need_wheelchair": {
            "type": "boolean",
            "description": "Whether the client needs a wheelchair."
          },
          "need_attendant": {
            "type": "boolean",
            "description": "Whether the client needs an attendant."
          },
          "two_man_assist": {
            "type": "boolean",
            "description": "Whether the client needs two assistants."
          },
          "cancellation_reason": {
            "type": "string",
            "description": "The reason the trip was canceled."
          },
          "external_reason": {
            "description": "The cancellation reason from your own reason list. See ExternalReason.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalReason"
              }
            ]
          },
          "pick_up_address": {
            "type": "string",
            "description": "The pick-up address."
          },
          "pick_up_county": {
            "type": "string",
            "description": "The pick-up county."
          },
          "pick_up_location": {
            "description": "The pick-up coordinates.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "drop_off_address": {
            "type": "string",
            "description": "The drop-off address."
          },
          "drop_off_location": {
            "description": "The drop-off coordinates.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "initial_time": {
            "type": "string",
            "description": "The pick-up time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "appointment_time": {
            "type": "string",
            "description": "The appointment time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "dispatch_before": {
            "type": "string",
            "description": "The time by which the trip must be dispatched. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "dispatch_time": {
            "type": "string",
            "description": "The time the trip was dispatched. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "assign_date": {
            "type": "string",
            "description": "The time the trip was assigned. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "leave_depot_time": {
            "type": "string",
            "description": "The time the vehicle should leave the depot to reach the pick-up on time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "Unassigned",
              "Assigning",
              "Offered",
              "Assigned",
              "Pre-Assigned",
              "In route",
              "Loaded",
              "Will Call",
              "Canceled",
              "No show",
              "Completed"
            ]
          },
          "estimated_pu_time": {
            "type": "string",
            "description": "The estimated pick-up time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "estimated_do_time": {
            "type": "string",
            "description": "The estimated drop-off time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "in_route_time": {
            "type": "string",
            "description": "The time the vehicle started toward the pick-up location. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_time": {
            "type": "string",
            "description": "The time the vehicle arrived at the pick-up location. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "load_time": {
            "type": "string",
            "description": "The time the client was loaded. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_at_drop_off_time": {
            "type": "string",
            "description": "The time the vehicle arrived at the drop-off location. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "drop_off_time": {
            "type": "string",
            "description": "The time the driver dropped off the client. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "cancel_no_show_time": {
            "type": "string",
            "description": "The time the status changed to Canceled or No show."
          },
          "current_location": {
            "description": "The location of the vehicle serving the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "arrival_location": {
            "description": "The location of the vehicle when it arrived at the pick-up.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "actual_pu_location": {
            "description": "The location of the vehicle when it picked up the client.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "arrival_at_do_location": {
            "description": "The location of the vehicle when it reached the drop-off.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "actual_do_location": {
            "description": "The location of the vehicle when it dropped off the client.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "client_name": {
            "type": "string",
            "description": "The full name of the client. Deprecated; use client."
          },
          "client_member_id": {
            "type": "string",
            "description": "The member ID of the client. Deprecated; use client."
          },
          "driver": {
            "description": "The driver serving the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Driver"
              }
            ]
          },
          "vehicle": {
            "description": "The vehicle serving the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Vehicle"
              }
            ]
          },
          "payer": {
            "description": "The payer of the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderPayer"
              }
            ]
          },
          "client": {
            "description": "The client of the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderClient"
              }
            ]
          },
          "ivr_settings": {
            "description": "The IVR settings of the payer.",
            "allOf": [
              {
                "$ref": "#/components/schemas/IvrSettings"
              }
            ]
          },
          "floor": {
            "type": "string",
            "description": "The pick-up floor."
          },
          "room": {
            "type": "string",
            "description": "The pick-up room."
          },
          "bed": {
            "type": "string",
            "description": "The pick-up bed."
          },
          "suite": {
            "type": "string",
            "description": "The pick-up suite."
          },
          "stairs": {
            "type": "integer",
            "description": "The number of stairs at the pick-up."
          },
          "do_floor": {
            "type": "string",
            "description": "The drop-off floor."
          },
          "do_room": {
            "type": "string",
            "description": "The drop-off room."
          },
          "do_bed": {
            "type": "string",
            "description": "The drop-off bed."
          },
          "do_suite": {
            "type": "string",
            "description": "The drop-off suite."
          },
          "do_stairs": {
            "type": "integer",
            "description": "The number of stairs at the drop-off."
          },
          "facility": {
            "description": "The pick-up facility.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Facility"
              }
            ]
          },
          "do_facility": {
            "description": "The drop-off facility.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Facility"
              }
            ]
          },
          "trip_purpose": {
            "description": "The trip purpose.",
            "allOf": [
              {
                "$ref": "#/components/schemas/TripPurpose"
              }
            ]
          },
          "referral_source": {
            "description": "The referral source.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ReferralSource"
              }
            ]
          },
          "signature": {
            "type": "string",
            "description": "The client signature as a Base64 data URL, for example data:image/png;base64,... RouteGenie returns it only when your software sends include_signature=yes."
          },
          "billable_mileage_to_pick_up": {
            "type": "number",
            "description": "The distance from the vehicle to the pick-up that is charged under the payer settings."
          },
          "mileage": {
            "type": "number",
            "description": "The distance charged for the trip."
          },
          "mapped_mileage": {
            "type": "number",
            "description": "The calculated distance from pick-up to drop-off. If billable_mileage_to_pick_up is not 0, subtract it from mileage."
          },
          "wait_time": {
            "type": "integer",
            "description": "The minutes the driver waited for the client at the pick-up."
          },
          "requested_wheelchair_seats": {
            "type": "integer",
            "description": "The number of wheelchairs to transport."
          },
          "will_call": {
            "type": "boolean",
            "description": "Whether the trip was ever a Will Call trip."
          },
          "created": {
            "type": "string",
            "description": "The time the trip was created. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "final_price": {
            "type": "number",
            "description": "The amount to be paid."
          },
          "on_time": {
            "type": "boolean",
            "description": "Whether the order was served on time under the payer settings."
          },
          "fare_payment_info": {
            "description": "Payment details for the fare.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FarePayment"
              }
            ]
          },
          "order_extras": {
            "type": "array",
            "description": "The order extras.",
            "items": {
              "$ref": "#/components/schemas/OrderExtra"
            }
          },
          "wait_after_prior": {
            "type": "boolean",
            "description": "Whether the trip waits after the prior trip. Defaults to false."
          }
        }
      },
      "OrderList": {
        "type": "object",
        "description": "A page of orders.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "The total number of orders."
          },
          "next": {
            "type": "string",
            "description": "The URL of the next page, or null."
          },
          "previous": {
            "type": "string",
            "description": "The URL of the previous page, or null."
          },
          "results": {
            "type": "array",
            "description": "The orders on this page.",
            "items": {
              "$ref": "#/components/schemas/Order"
            }
          }
        }
      },
      "OrderRequest": {
        "type": "object",
        "description": "The fields to create or update an order. Send either a client_member_id or a client_internal_id. Send an initial_time, an appointment_time, or both. Send either an address or coordinates for the pick-up and for the drop-off.",
        "properties": {
          "ride_id": {
            "type": "string",
            "description": "The ID of the trip in your software."
          },
          "linked_ride_ids": {
            "type": "array",
            "description": "The ride IDs of other trips for the same client on the same date.",
            "items": {
              "type": "string"
            }
          },
          "client_member_id": {
            "type": "string",
            "description": "The member ID of the client. Required if client_internal_id is not sent."
          },
          "client_internal_id": {
            "type": "integer",
            "description": "The internal client ID. Required if client_member_id is not sent."
          },
          "custom_trip_type": {
            "type": "integer",
            "description": "The internal ID of the custom trip type."
          },
          "initial_time": {
            "type": "string",
            "description": "The pick-up time. Not required if appointment_time is sent. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "appointment_time": {
            "type": "string",
            "description": "The appointment time. Not required if initial_time is sent. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "pick_up_address": {
            "type": "string",
            "description": "The pick-up address. Required if pick_up_point is not sent."
          },
          "pick_up_point": {
            "description": "The pick-up coordinates. Required if pick_up_address is not sent.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "pick_up_county": {
            "type": "string",
            "description": "The pick-up county."
          },
          "drop_off_address": {
            "type": "string",
            "description": "The drop-off address. Required if drop_off_point is not sent."
          },
          "drop_off_point": {
            "description": "The drop-off coordinates. Required if drop_off_address is not sent.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "drop_off_county": {
            "type": "string",
            "description": "The drop-off county."
          },
          "payment_method": {
            "type": "integer",
            "description": "How the payer pays. 0 = account, 1 = credit card, 2 = cash, 3 = check, 4 = voucher, 5 = pass.",
            "enum": [
              0,
              1,
              2,
              3,
              4,
              5
            ]
          },
          "additional_seats": {
            "type": "integer",
            "description": "The number of seats besides the main client."
          },
          "comment": {
            "type": "string",
            "description": "Notes. Maximum 1000 characters. Returned as comments."
          },
          "provide_oxygen": {
            "type": "boolean",
            "description": "Whether the vehicle must carry oxygen."
          },
          "need_wheelchair": {
            "type": "boolean",
            "description": "Whether the client needs a wheelchair. Valid only with the Wheelchair or Stretcher trip type."
          },
          "need_attendant": {
            "type": "boolean",
            "description": "Whether the client needs an attendant."
          },
          "two_man_assist": {
            "type": "boolean",
            "description": "Whether the client needs two assistants."
          },
          "payer_id": {
            "type": "integer",
            "description": "The internal payer ID. Use it only when your software creates orders for several payers. If your software omits it, RouteGenie uses the default payer."
          },
          "floor": {
            "type": "string",
            "description": "The pick-up floor."
          },
          "room": {
            "type": "string",
            "description": "The pick-up room."
          },
          "bed": {
            "type": "string",
            "description": "The pick-up bed."
          },
          "suite": {
            "type": "string",
            "description": "The pick-up suite."
          },
          "stairs": {
            "type": "integer",
            "description": "The number of stairs at the pick-up."
          },
          "do_floor": {
            "type": "string",
            "description": "The drop-off floor."
          },
          "do_room": {
            "type": "string",
            "description": "The drop-off room."
          },
          "do_bed": {
            "type": "string",
            "description": "The drop-off bed."
          },
          "do_suite": {
            "type": "string",
            "description": "The drop-off suite."
          },
          "do_stairs": {
            "type": "integer",
            "description": "The number of stairs at the drop-off."
          },
          "facility": {
            "type": "integer",
            "description": "The internal ID of the pick-up facility."
          },
          "do_facility": {
            "type": "integer",
            "description": "The internal ID of the drop-off facility."
          },
          "trip_purpose": {
            "type": "integer",
            "description": "The internal ID of the trip purpose."
          },
          "referral_source": {
            "type": "integer",
            "description": "The internal ID of the referral source."
          },
          "will_call": {
            "type": "boolean",
            "description": "Marks the trip as Will Call."
          },
          "amount": {
            "type": "number",
            "description": "The price. Used instead of the price RouteGenie calculates. Send either amount or mileage, not both."
          },
          "mileage": {
            "type": "number",
            "description": "The mileage. Send either amount or mileage, not both."
          },
          "order_extras": {
            "type": "array",
            "description": "The order extras. Required if the payer has Required Extra Fields for API enabled.",
            "items": {
              "$ref": "#/components/schemas/OrderExtraInput"
            }
          },
          "wait_after_prior": {
            "type": "boolean",
            "description": "Whether the trip waits after the prior trip. Defaults to false. Requires an earlier order for the same client and date. The pick-up address must match the drop-off address of that order, and the drop-off address must match its pick-up address. Cannot be combined with will_call."
          }
        },
        "required": [
          "ride_id",
          "custom_trip_type",
          "payment_method"
        ]
      },
      "BulkCreateOrdersRequest": {
        "type": "object",
        "description": "A batch of orders to create in the background.",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "A unique ID (UUID) your software chooses to track this request. RouteGenie returns it on the event webhook."
          },
          "orders": {
            "type": "array",
            "description": "The orders to create. Each has the same fields as a single create request.",
            "items": {
              "$ref": "#/components/schemas/OrderRequest"
            }
          }
        },
        "required": [
          "request_id",
          "orders"
        ]
      },
      "BulkCreateOrdersResponse": {
        "type": "object",
        "description": "The immediate acknowledgment of a bulk create.",
        "properties": {
          "result": {
            "type": "string",
            "description": "The message \"Orders are going to be created.\""
          }
        }
      },
      "OrderWebhook": {
        "type": "object",
        "description": "The order webhook body. It is one JSON object. Every body has ride_id, client_name, client_member_id, status, driver and vehicle. The other fields appear only for the statuses named in each field description.",
        "properties": {
          "ride_id": {
            "type": "string",
            "description": "The ID of the trip in your software."
          },
          "client_name": {
            "type": "string",
            "description": "The full name of the client."
          },
          "client_member_id": {
            "type": "string",
            "description": "The member ID of the client."
          },
          "status": {
            "type": "string",
            "description": "The order's status name, as `GET /order/{ride_id}/` returns it, for example `Assigned`, `In route`, `Loaded`, `Completed`, `Canceled`, `No show` or `Unassigned`. `Turn back` when the order was turned back."
          },
          "driver": {
            "description": "The driver serving the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Driver"
              }
            ]
          },
          "vehicle": {
            "description": "The vehicle serving the order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Vehicle"
              }
            ]
          },
          "estimated_pu_time": {
            "type": "string",
            "description": "The estimated pick-up time. RouteGenie sends it for Assigned, In route and vehicle arrived at pick-up. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "estimated_do_time": {
            "type": "string",
            "description": "The estimated drop-off time. RouteGenie sends it for Assigned, In route, vehicle arrived at pick-up, Loaded and vehicle arrived at drop-off. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_time": {
            "type": "string",
            "description": "The time the vehicle arrived at the pick-up. RouteGenie sends it for vehicle arrived at pick-up, Loaded and Completed. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_location": {
            "description": "The vehicle location at arrival. RouteGenie sends it for vehicle arrived at pick-up.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "actual_pu_location": {
            "description": "The vehicle location at pick-up. RouteGenie sends it for Loaded and Completed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "load_time": {
            "type": "string",
            "description": "The time the client was loaded. RouteGenie sends it for Loaded and Completed. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_at_drop_off_time": {
            "type": "string",
            "description": "The time the vehicle arrived at the drop-off. RouteGenie sends it for vehicle arrived at drop-off and Completed. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "arrival_at_do_location": {
            "description": "The vehicle location at arrival at the drop-off. RouteGenie sends it for vehicle arrived at drop-off.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "drop_off_time": {
            "type": "string",
            "description": "The time the driver dropped off the client. RouteGenie sends it for Completed. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "actual_do_location": {
            "description": "The vehicle location at drop-off. RouteGenie sends it for Completed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          },
          "signature": {
            "type": "string",
            "description": "The client signature as a Base64 data URL, for example data:image/png;base64,... RouteGenie sends it for Completed."
          },
          "cancellation_reason": {
            "type": "string",
            "description": "The reason for the cancellation or no show. RouteGenie sends it for Cancel and No show."
          },
          "external_reason": {
            "description": "The cancellation reason from your own reason list. RouteGenie sends it for Cancel and No show.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ExternalReason"
              }
            ]
          },
          "turn_back_reason": {
            "type": "string",
            "description": "The reason for the turn back. RouteGenie sends it for Turn back."
          },
          "was_dispatched": {
            "type": "boolean",
            "description": "Whether the trip was dispatched. RouteGenie sends it for Unassigned and Dispatched."
          }
        },
        "required": [
          "ride_id",
          "status"
        ]
      },
      "EventWebhookBulkCreateTrip": {
        "type": "object",
        "description": "The result for one trip of a bulk create.",
        "properties": {
          "created": {
            "type": "boolean",
            "description": "Whether the order was created."
          },
          "errors": {
            "type": "object",
            "description": "Errors by field name. Empty when the order was created. Each field maps to a list of errors; errors not tied to one field appear under non_field_errors.",
            "additionalProperties": {
              "type": "array",
              "description": "The errors for the field.",
              "items": {
                "type": "object",
                "description": "One error.",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "The error message."
                  },
                  "code": {
                    "type": "string",
                    "description": "The error code."
                  }
                }
              }
            }
          }
        }
      },
      "EventWebhookBulkCreateData": {
        "type": "object",
        "description": "The data of a bulk_create_orders event.",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "The request_id your software sent in the bulk create request."
          },
          "orders": {
            "type": "object",
            "description": "The result for each trip, keyed by ride_id.",
            "additionalProperties": {
              "$ref": "#/components/schemas/EventWebhookBulkCreateTrip"
            }
          }
        }
      },
      "EventWebhookGpsItem": {
        "type": "object",
        "description": "The position of one active trip in a gps event.",
        "properties": {
          "ride_id": {
            "type": "string",
            "description": "The ID of the trip in your software."
          },
          "estimated_pu_time": {
            "type": "string",
            "description": "The estimated pick-up time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "estimated_do_time": {
            "type": "string",
            "description": "The estimated drop-off time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "status": {
            "type": "string",
            "description": "The order status."
          },
          "current_location": {
            "description": "The current vehicle location.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Location"
              }
            ]
          }
        }
      },
      "EventWebhookPreAssignItem": {
        "type": "object",
        "description": "One pre-assigned trip in an optimize_pre_assign event.",
        "properties": {
          "ride_id": {
            "type": "string",
            "description": "The ID of the trip in your software."
          },
          "estimated_pu_time": {
            "type": "string",
            "description": "The estimated pick-up time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "estimated_do_time": {
            "type": "string",
            "description": "The estimated drop-off time. Format: MM/DD/YYYY HH:MM or ISO 8601, depending on your connection settings."
          },
          "status": {
            "type": "string",
            "description": "The order status."
          },
          "vehicle": {
            "description": "The assigned vehicle.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Vehicle"
              }
            ]
          },
          "driver": {
            "description": "The assigned driver.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Driver"
              }
            ]
          }
        }
      },
      "EventWebhook": {
        "type": "object",
        "description": "The event webhook body.",
        "properties": {
          "event": {
            "type": "string",
            "description": "The event name.",
            "enum": [
              "bulk_create_orders",
              "gps",
              "optimize_pre_assign"
            ]
          },
          "data": {
            "description": "The event data. For bulk_create_orders, an object with request_id and the result for each trip. For gps, an array with one entry per trip that is in route or loaded; RouteGenie sends it every minute. For optimize_pre_assign, an array of pre-assigned trips with their driver and vehicle; RouteGenie sends up to 100 trips per request.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EventWebhookBulkCreateData"
              },
              {
                "type": "array",
                "description": "The gps entries.",
                "items": {
                  "$ref": "#/components/schemas/EventWebhookGpsItem"
                }
              },
              {
                "type": "array",
                "description": "The pre-assigned trips.",
                "items": {
                  "$ref": "#/components/schemas/EventWebhookPreAssignItem"
                }
              }
            ]
          }
        },
        "required": [
          "event",
          "data"
        ]
      },
      "CaseManager": {
        "type": "object",
        "description": "A case manager.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the case manager."
          },
          "first_name": {
            "type": "string",
            "description": "First name."
          },
          "last_name": {
            "type": "string",
            "description": "Last name."
          }
        }
      },
      "Dispatcher": {
        "type": "object",
        "description": "A dispatcher.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the dispatcher."
          },
          "first_name": {
            "type": "string",
            "description": "First name."
          },
          "last_name": {
            "type": "string",
            "description": "Last name."
          }
        }
      },
      "CustomTripType": {
        "type": "object",
        "description": "A custom trip type.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the custom trip type. Send it as `custom_trip_type` when your software creates an order."
          },
          "name": {
            "type": "string",
            "description": "Name of the custom trip type."
          },
          "allow_zero_capacity": {
            "type": "boolean",
            "description": "If true, RouteGenie gives an order created with this trip type a default capacity of 0."
          }
        }
      },
      "Payer": {
        "type": "object",
        "description": "A payer.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the payer."
          },
          "name": {
            "type": "string",
            "description": "Name of the payer."
          },
          "account_id": {
            "type": "string",
            "description": "External ID of the payer."
          }
        }
      },
      "PayerExtra": {
        "type": "object",
        "description": "An extra defined on a payer.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the extra."
          },
          "kind": {
            "type": "integer",
            "enum": [
              0,
              1,
              2
            ],
            "description": "Kind of extra: 0 is text, 1 is date, 2 is options."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The available options. Present for kind 2."
          },
          "unique": {
            "type": "boolean",
            "description": "If true, the extra's value must be unique for each order."
          },
          "show_on_driver_app": {
            "type": "boolean",
            "description": "Whether the extra is shown on the driver app."
          }
        }
      },
      "TripPurpose": {
        "type": "object",
        "description": "A trip purpose.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the trip purpose."
          },
          "text": {
            "type": "string",
            "description": "Text of the trip purpose."
          }
        }
      },
      "Facility": {
        "type": "object",
        "description": "A facility.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the facility."
          },
          "name": {
            "type": "string",
            "description": "Name of the facility."
          }
        }
      },
      "ReferralSource": {
        "type": "object",
        "description": "A referral source.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the referral source."
          },
          "name": {
            "type": "string",
            "description": "Name of the referral source."
          },
          "contact_name": {
            "type": "string",
            "description": "Name of the contact."
          },
          "contact_phone": {
            "type": "string",
            "description": "Phone number of the contact."
          },
          "contact_email": {
            "type": "string",
            "description": "Email address of the contact."
          },
          "contact_address": {
            "type": "string",
            "description": "Address of the referral source."
          },
          "contact_address_id": {
            "type": "string",
            "description": "Google place ID of the address."
          },
          "notes": {
            "type": "string",
            "description": "Notes."
          }
        }
      },
      "User": {
        "type": "object",
        "description": "A user.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the user."
          },
          "username": {
            "type": "string",
            "description": "Username."
          }
        }
      },
      "ReportTemplate": {
        "type": "object",
        "description": "A user report template.",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Internal ID of the report template."
          },
          "name": {
            "type": "string",
            "description": "Name of the report template."
          },
          "has_period_field": {
            "type": "boolean",
            "description": "Whether the report has a period. If true, `period_from` and `period_to` are required when your software generates the report."
          }
        }
      },
      "ReportCannedTemplate": {
        "type": "object",
        "description": "A canned report template, available to all users.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the canned report template."
          },
          "code": {
            "type": "string",
            "description": "Code of the canned report template. Send it as `canned_report_template_code` when your software generates a report."
          }
        }
      },
      "ReportRequest": {
        "type": "object",
        "description": "Request to generate a report from a user report template or a canned report template.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name for the generated report."
          },
          "creator": {
            "type": "integer",
            "description": "ID of the user creating the report. The user must have access to the template and the Manage reports permission."
          },
          "template": {
            "type": "integer",
            "description": "ID of the report template. Required for user report templates."
          },
          "canned_report_template_code": {
            "type": "string",
            "description": "Code of the canned report template. Required for canned report templates."
          },
          "period_from": {
            "type": "string",
            "description": "Start of the report period, as MM/DD/YYYY. Required if the template's `has_period_field` is true."
          },
          "period_to": {
            "type": "string",
            "description": "End of the report period, as MM/DD/YYYY. Required if the template's `has_period_field` is true."
          }
        }
      },
      "ReportResult": {
        "type": "object",
        "description": "Public links to the generated report.",
        "properties": {
          "csv": {
            "type": "string",
            "description": "Public link to download the report as CSV."
          },
          "xlsx": {
            "type": "string",
            "description": "Public link to download the report as XLSX."
          },
          "pdf": {
            "type": "string",
            "description": "Public link to download the report as PDF."
          }
        }
      },
      "PayerList": {
        "type": "object",
        "description": "A page of payers.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of payers."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The payers on this page.",
            "items": {
              "$ref": "#/components/schemas/Payer"
            }
          }
        }
      },
      "CustomTripTypeList": {
        "type": "object",
        "description": "A page of custom trip types.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of custom trip types."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The custom trip types on this page.",
            "items": {
              "$ref": "#/components/schemas/CustomTripType"
            }
          }
        }
      },
      "TripPurposeList": {
        "type": "object",
        "description": "A page of trip purposes.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of trip purposes."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The trip purposes on this page.",
            "items": {
              "$ref": "#/components/schemas/TripPurpose"
            }
          }
        }
      },
      "FacilityList": {
        "type": "object",
        "description": "A page of facilities.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of facilities."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The facilities on this page.",
            "items": {
              "$ref": "#/components/schemas/Facility"
            }
          }
        }
      },
      "ReferralSourceList": {
        "type": "object",
        "description": "A page of referral sources.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of referral sources."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The referral sources on this page.",
            "items": {
              "$ref": "#/components/schemas/ReferralSource"
            }
          }
        }
      },
      "UserList": {
        "type": "object",
        "description": "A page of users.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of users."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The users on this page.",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          }
        }
      },
      "ReportTemplateList": {
        "type": "object",
        "description": "A page of report templates.",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Total number of report templates."
          },
          "next": {
            "type": "string",
            "description": "URL of the next page, or null on the last page."
          },
          "previous": {
            "type": "string",
            "description": "URL of the previous page, or null on the first page."
          },
          "results": {
            "type": "array",
            "description": "The report templates on this page.",
            "items": {
              "$ref": "#/components/schemas/ReportTemplate"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "Send the access token as `Authorization: Bearer <access_token>`.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://your-instance.routegenie.com:8000/oauth2/token/",
            "scopes": {}
          }
        }
      },
      "clientBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Your client ID and secret, used only to request a token."
      },
      "webhookApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your webhook key. RouteGenie sends it on every webhook delivery."
      }
    }
  },
  "tags": [
    {
      "name": "Authentication",
      "description": "Exchange your client credentials for an access token."
    },
    {
      "name": "Clients",
      "description": "Create, update and look up clients (passengers)."
    },
    {
      "name": "Orders",
      "description": "Create, read, update, cancel and reinstate orders. An order is a trip."
    },
    {
      "name": "Visits",
      "description": "Create visits and manage their case manager assignment and status."
    },
    {
      "name": "Reports",
      "description": "Report templates and report generation."
    },
    {
      "name": "Reference data",
      "description": "Lists maintained in your RouteGenie instance and used by order, client and visit fields: case managers, dispatchers, payers and their extras, custom trip types, trip purposes, facilities, referral sources and users."
    },
    {
      "name": "Webhooks",
      "description": "Requests RouteGenie sends to your webhook endpoint when an order changes status or an event occurs. Register the webhook URLs and a webhook key (up to 100 characters) with RouteGenie."
    }
  ],
  "paths": {
    "/oauth2/token/": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "example": {
                "grant_type": "client_credentials"
              },
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Authenticate ": {
                    "value": {
                      "access_token": "eCHbYyvykF1IUBCxDUnqg4V9y98YhQ",
                      "expires_in": 36000,
                      "token_type": "Bearer",
                      "scope": "read write"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            },
            "description": "A token."
          }
        },
        "security": [
          {
            "clientBasic": []
          }
        ],
        "servers": [
          {
            "url": "https://{instance}.routegenie.com:8000",
            "description": "Host root of your RouteGenie instance",
            "variables": {
              "instance": {
                "default": "your-instance",
                "description": "Your RouteGenie instance name."
              }
            }
          }
        ],
        "summary": "Get an access token",
        "description": "RouteGenie returns an access token that your software sends on every other request.\n\n1. Base64-encode `client_id:secret` and send it as the HTTP Basic credentials.\n2. Send `grant_type=client_credentials` as a form field.\n3. Send the returned token as `Authorization: Bearer <access_token>`."
      }
    },
    "/client/": {
      "post": {
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "first_name": "Alex",
                "last_name": "Example",
                "phone_1": "5555550100",
                "member_id": "111"
              },
              "schema": {
                "$ref": "#/components/schemas/ClientCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Client": {
                    "value": {
                      "id": 46,
                      "first_name": "Jamie",
                      "last_name": "Example",
                      "phone_1": "5555550101",
                      "birthday": "01/15/1980",
                      "phone_2": "5555550100",
                      "address_1": "100 Main St, Springfield, IL 62701, USA",
                      "address_1_details": {
                        "floor": "2",
                        "room": "212",
                        "bed": "3a",
                        "suite": "54",
                        "stairs": 77
                      },
                      "address_2": "100 Main St, Springfield, IL 62701, USA",
                      "address_2_details": {
                        "floor": "",
                        "room": "",
                        "bed": "",
                        "suite": "",
                        "stairs": 0
                      },
                      "gender": 1,
                      "preferred_custom_trip_type": {
                        "id": 3,
                        "name": "Wheelchair",
                        "allow_zero_capacity": false
                      },
                      "member_ids": {
                        "4": "14"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            },
            "description": "The client was created."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Client (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the token. It is missing, invalid or expired."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Client (with invalid set of data)": {
                    "value": {
                      "phone_1": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name."
          }
        },
        "summary": "Create a client",
        "description": "Creates a client (passenger) profile. `first_name`, `last_name`, `phone_1` and `member_id` are required. Send `extra_member_ids` when your software creates orders for more than one payer."
      },
      "get": {
        "tags": [
          "Clients"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get Clients": {
                    "value": {
                      "count": 102,
                      "next": "http://127.0.0.1:8000/open_api/api/v1/client/?page=2",
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550102"
                        },
                        {
                          "id": 2,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550103"
                        },
                        {
                          "id": 3,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550104"
                        },
                        {
                          "id": 4,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550105"
                        },
                        {
                          "id": 5,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550106"
                        },
                        {
                          "id": 6,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550107"
                        },
                        {
                          "id": 7,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550108"
                        },
                        {
                          "id": 8,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550109"
                        },
                        {
                          "id": 9,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550110"
                        },
                        {
                          "id": 10,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550111"
                        },
                        {
                          "id": 11,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550112"
                        },
                        {
                          "id": 12,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550113"
                        },
                        {
                          "id": 13,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550114"
                        },
                        {
                          "id": 14,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550115"
                        },
                        {
                          "id": 15,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550116"
                        },
                        {
                          "id": 16,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550117"
                        },
                        {
                          "id": 17,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550118"
                        },
                        {
                          "id": 18,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550119"
                        },
                        {
                          "id": 19,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550120"
                        },
                        {
                          "id": 20,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550121"
                        },
                        {
                          "id": 21,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550122"
                        },
                        {
                          "id": 22,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550123"
                        },
                        {
                          "id": 23,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550124"
                        },
                        {
                          "id": 24,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550125"
                        },
                        {
                          "id": 25,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550126"
                        },
                        {
                          "id": 26,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550127"
                        },
                        {
                          "id": 27,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550128"
                        },
                        {
                          "id": 28,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550129"
                        },
                        {
                          "id": 29,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550130"
                        },
                        {
                          "id": 30,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550131"
                        },
                        {
                          "id": 31,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550132"
                        },
                        {
                          "id": 32,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550133"
                        },
                        {
                          "id": 33,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550134"
                        },
                        {
                          "id": 34,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550135"
                        },
                        {
                          "id": 35,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550136"
                        },
                        {
                          "id": 36,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550137"
                        },
                        {
                          "id": 37,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550138"
                        },
                        {
                          "id": 38,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550139"
                        },
                        {
                          "id": 39,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550140"
                        },
                        {
                          "id": 40,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550141"
                        },
                        {
                          "id": 41,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550142"
                        },
                        {
                          "id": 42,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550143"
                        },
                        {
                          "id": 43,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550144"
                        },
                        {
                          "id": 44,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550145"
                        },
                        {
                          "id": 45,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550146"
                        },
                        {
                          "id": 46,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550147"
                        },
                        {
                          "id": 47,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550148"
                        },
                        {
                          "id": 48,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550149"
                        },
                        {
                          "id": 49,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550150"
                        },
                        {
                          "id": 50,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550151"
                        },
                        {
                          "id": 51,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550152"
                        },
                        {
                          "id": 52,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550153"
                        },
                        {
                          "id": 53,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550154"
                        },
                        {
                          "id": 54,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550155"
                        },
                        {
                          "id": 55,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550156"
                        },
                        {
                          "id": 56,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550157"
                        },
                        {
                          "id": 57,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550158"
                        },
                        {
                          "id": 58,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550159"
                        },
                        {
                          "id": 59,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550160"
                        },
                        {
                          "id": 60,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550161"
                        },
                        {
                          "id": 61,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550162"
                        },
                        {
                          "id": 62,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550163"
                        },
                        {
                          "id": 63,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550164"
                        },
                        {
                          "id": 64,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550165"
                        },
                        {
                          "id": 65,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550166"
                        },
                        {
                          "id": 66,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550167"
                        },
                        {
                          "id": 67,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550168"
                        },
                        {
                          "id": 68,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550169"
                        },
                        {
                          "id": 69,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550170"
                        },
                        {
                          "id": 70,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550171"
                        },
                        {
                          "id": 71,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550172"
                        },
                        {
                          "id": 72,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550173"
                        },
                        {
                          "id": 73,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550174"
                        },
                        {
                          "id": 74,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550175"
                        },
                        {
                          "id": 75,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550176"
                        },
                        {
                          "id": 76,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550177"
                        },
                        {
                          "id": 77,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550178"
                        },
                        {
                          "id": 78,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550179"
                        },
                        {
                          "id": 79,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550180"
                        },
                        {
                          "id": 80,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550181"
                        },
                        {
                          "id": 81,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550182"
                        },
                        {
                          "id": 82,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550183"
                        },
                        {
                          "id": 83,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550184"
                        },
                        {
                          "id": 84,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550185"
                        },
                        {
                          "id": 85,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550186"
                        },
                        {
                          "id": 86,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550187"
                        },
                        {
                          "id": 87,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550188"
                        },
                        {
                          "id": 88,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550189"
                        },
                        {
                          "id": 89,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550190"
                        },
                        {
                          "id": 90,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550191"
                        },
                        {
                          "id": 91,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550192"
                        },
                        {
                          "id": 92,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550193"
                        },
                        {
                          "id": 93,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550194"
                        },
                        {
                          "id": 94,
                          "first_name": "Avery",
                          "last_name": "Example",
                          "phone_1": "5555550195"
                        },
                        {
                          "id": 95,
                          "first_name": "Alex",
                          "last_name": "Example",
                          "phone_1": "5555550196"
                        },
                        {
                          "id": 96,
                          "first_name": "Jamie",
                          "last_name": "Example",
                          "phone_1": "5555550197"
                        },
                        {
                          "id": 97,
                          "first_name": "Morgan",
                          "last_name": "Example",
                          "phone_1": "5555550198"
                        },
                        {
                          "id": 98,
                          "first_name": "Taylor",
                          "last_name": "Example",
                          "phone_1": "5555550199"
                        },
                        {
                          "id": 99,
                          "first_name": "Casey",
                          "last_name": "Example",
                          "phone_1": "5555550100"
                        },
                        {
                          "id": 100,
                          "first_name": "Riley",
                          "last_name": "Example",
                          "phone_1": "5555550101"
                        }
                      ]
                    }
                  },
                  "Get Clients by phone number": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 58437,
                          "first_name": "Jordan",
                          "last_name": "Example",
                          "phone_1": "5555550102",
                          "birthday": "01/15/1980",
                          "phone_2": null,
                          "address_1": "200 Oak Ave, Springfield, IL 62702, USA",
                          "address_2": null,
                          "gender": 0,
                          "preferred_custom_trip_type": {},
                          "member_ids": {
                            "1": 6713394,
                            "2": 6713394,
                            "3": 6713394,
                            "4": 6713394
                          }
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ClientList"
                }
              }
            },
            "description": "A page of clients."
          }
        },
        "parameters": [
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Return only clients whose primary or secondary phone number contains this value.",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "List clients",
        "description": "Returns a paginated list of clients. A page holds at most 100 clients. Use the `next` link in the response to get the following page."
      }
    },
    "/client/{member_id}/": {
      "put": {
        "tags": [
          "Clients"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "first_name": "Avery",
                "last_name": "Example",
                "email": "alex.example@example.com",
                "phone_1": "5555550103",
                "phone_2": "5555550101",
                "address_1": "100 Main St, Springfield, IL 62701, USA",
                "address_1_id": "47277",
                "address_2": "200 Oak Ave, Springfield, IL 62702, USA",
                "address_2_id": "32742",
                "gender": 1,
                "same_gender": false,
                "birthday": "01/15/1980",
                "preferred_custom_trip_type": 3,
                "member_id": "14",
                "address_1_details": {
                  "suite": "54",
                  "floor": "2",
                  "room": "212",
                  "bed": "3a",
                  "stairs": 77
                }
              },
              "schema": {
                "$ref": "#/components/schemas/ClientCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Client": {
                    "value": {
                      "id": 46,
                      "first_name": "Alex",
                      "last_name": "Example",
                      "phone_1": "5555550104",
                      "birthday": "01/15/1980",
                      "phone_2": "5555550102",
                      "address_1": "200 Oak Ave, Springfield, IL 62702, USA",
                      "address_1_details": {
                        "bed": "3a",
                        "room": "212",
                        "floor": "2",
                        "suite": "51",
                        "stairs": 77
                      },
                      "address_2": "100 Main St, Springfield, IL 62701, USA",
                      "address_2_details": {
                        "bed": "",
                        "room": "",
                        "floor": "",
                        "suite": "",
                        "stairs": 0
                      },
                      "gender": 1,
                      "preferred_custom_trip_type": {
                        "id": 3,
                        "name": "Wheelchair",
                        "allow_zero_capacity": false
                      },
                      "member_ids": {
                        "4": "14"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            },
            "description": "The client was updated."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Client (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the token. It is missing, invalid or expired."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Client (with invalid set of data)": {
                    "value": {
                      "member_id": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name."
          }
        },
        "parameters": [
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's member ID for the client."
          }
        ],
        "summary": "Update a client",
        "description": "Updates the client identified by `member_id`. The request and response bodies are the same as for creating a client."
      },
      "get": {
        "tags": [
          "Clients"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get Client": {
                    "value": {
                      "id": 46,
                      "first_name": "Jamie",
                      "last_name": "Example",
                      "phone_1": "5555550105",
                      "birthday": "01/15/1980",
                      "phone_2": "5555550103",
                      "address_1": "100 Main St, Springfield, IL 62701, USA",
                      "address_1_details": {
                        "bed": "3a",
                        "room": "212",
                        "floor": "2",
                        "suite": "51",
                        "stairs": 77
                      },
                      "address_2": "200 Oak Ave, Springfield, IL 62702, USA",
                      "address_2_details": {
                        "bed": "",
                        "room": "",
                        "floor": "",
                        "suite": "",
                        "stairs": 0
                      },
                      "gender": 1,
                      "preferred_custom_trip_type": {
                        "id": 3,
                        "name": "Wheelchair",
                        "allow_zero_capacity": false
                      },
                      "member_ids": {
                        "4": "14"
                      }
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            },
            "description": "The client."
          }
        },
        "parameters": [
          {
            "name": "member_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's member ID for the client."
          }
        ],
        "summary": "Get a client",
        "description": "Returns the client identified by `member_id`."
      }
    },
    "/order/{ride_id}/": {
      "get": {
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get Order": {
                    "value": {
                      "id": 4189,
                      "ride_id": "15",
                      "custom_trip_type": 1,
                      "additional_seats": 2,
                      "comments": "Any comment / Any  other comment",
                      "provide_oxygen": true,
                      "need_wheelchair": false,
                      "need_attendant": false,
                      "two_man_assist": true,
                      "cancellation_reason": "",
                      "pick_up_address": "100 Main St, Springfield, IL 62701, USA",
                      "pick_up_location": {
                        "lat": 39.799,
                        "lng": -89.644
                      },
                      "drop_off_address": "100 Main St, Springfield, IL 62701, USA",
                      "drop_off_location": {
                        "lat": 39.7817,
                        "lng": -89.6501
                      },
                      "initial_time": "04/14/2021 15:00",
                      "appointment_time": "04/14/2021 15:34",
                      "status": "Unassigned",
                      "estimated_pu_time": null,
                      "estimated_do_time": null,
                      "arrival_time": null,
                      "load_time": null,
                      "drop_off_time": null,
                      "current_location": {},
                      "actual_pu_location": {},
                      "actual_do_location": {},
                      "client_name": "ALEX EXAMPLE",
                      "client_member_id": "",
                      "ivr_settings": {},
                      "driver": {},
                      "vehicle": {},
                      "payer": {
                        "name": "payer"
                      },
                      "client": {
                        "id": 68,
                        "name": "ALEX EXAMPLE",
                        "phone_1": "5555550106",
                        "client_member_id": ""
                      },
                      "floor": null,
                      "room": null,
                      "bed": null,
                      "suite": null,
                      "do_floor": null,
                      "do_room": null,
                      "do_bed": null,
                      "do_suite": null,
                      "facility": {},
                      "do_facility": {},
                      "trip_purpose": {},
                      "order_extras": [
                        {
                          "id": 1,
                          "name": "Extra Text",
                          "kind": 0,
                          "kind_value": "Text",
                          "value_date": null,
                          "value_text": "value text",
                          "unique": true,
                          "options": [],
                          "show_on_driver_app": true
                        },
                        {
                          "id": 2,
                          "name": "Extra Date",
                          "kind": 1,
                          "kind_value": "Date",
                          "value_date": "04/14/2021",
                          "value_text": null,
                          "unique": false,
                          "options": [],
                          "show_on_driver_app": true
                        },
                        {
                          "id": 3,
                          "name": "Extra Options",
                          "kind": 2,
                          "kind_value": "Options",
                          "value_date": null,
                          "value_text": "op1",
                          "unique": false,
                          "options": [
                            "op1",
                            "op2"
                          ],
                          "show_on_driver_app": false
                        }
                      ],
                      "wait_after_prior": false
                    }
                  },
                  "Get Order With Signature": {
                    "value": {
                      "id": 4191,
                      "ride_id": "17",
                      "custom_trip_type": 1,
                      "additional_seats": 2,
                      "comments": "Any comment",
                      "provide_oxygen": true,
                      "need_wheelchair": false,
                      "need_attendant": false,
                      "two_man_assist": true,
                      "cancellation_reason": "",
                      "pick_up_address": "200 Oak Ave, Springfield, IL 62702, USA",
                      "pick_up_location": {
                        "lat": 39.799,
                        "lng": -89.644
                      },
                      "drop_off_address": "200 Oak Ave, Springfield, IL 62702, USA",
                      "drop_off_location": {
                        "lat": 39.7817,
                        "lng": -89.6501
                      },
                      "initial_time": "04/14/2025 15:00",
                      "appointment_time": "04/14/2025 15:34",
                      "status": "Completed",
                      "estimated_pu_time": null,
                      "estimated_do_time": null,
                      "arrival_time": null,
                      "load_time": "04/14/2025 12:00",
                      "drop_off_time": "04/14/2025 13:00",
                      "current_location": {},
                      "actual_pu_location": {},
                      "actual_do_location": {},
                      "client_name": "ALEX EXAMPLE",
                      "client_member_id": "",
                      "ivr_settings": {},
                      "driver": {
                        "first_name": "Morgan",
                        "last_name": "Example",
                        "license": "TESTLICENSE01"
                      },
                      "vehicle": {
                        "name": "0000",
                        "make": "honda",
                        "model": "accord",
                        "color": "black",
                        "plate": "TEST123",
                        "vin": "TESTVIN0000000001"
                      },
                      "payer": {
                        "name": "payer"
                      },
                      "floor": null,
                      "room": null,
                      "bed": null,
                      "suite": null,
                      "do_floor": null,
                      "do_room": null,
                      "do_bed": null,
                      "do_suite": null,
                      "facility": {},
                      "do_facility": {},
                      "trip_purpose": {},
                      "wait_after_prior": false,
                      "signature": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="
                    }
                  },
                  "Get Order with driver extra info": {
                    "value": {
                      "id": 4191,
                      "ride_id": "17",
                      "is_return_ride": false,
                      "will_call": false,
                      "custom_trip_type": 1,
                      "additional_seats": 2,
                      "requested_wheelchair_seats": 0,
                      "comments": "Any comment",
                      "provide_oxygen": true,
                      "need_wheelchair": false,
                      "need_attendant": false,
                      "two_man_assist": true,
                      "cancellation_reason": "",
                      "pick_up_address": "100 Main St, Springfield, IL 62701, USA",
                      "pick_up_county": "Erie",
                      "pick_up_location": {
                        "lat": 39.799,
                        "lng": -89.644
                      },
                      "drop_off_address": "100 Main St, Springfield, IL 62701, USA",
                      "drop_off_location": {
                        "lat": 39.7817,
                        "lng": -89.6501
                      },
                      "status": "Completed",
                      "created": "04/13/2023 14:00",
                      "initial_time": "04/14/2025 15:00",
                      "appointment_time": "04/14/2025 15:34",
                      "dispatch_before": "04/14/2025 14:01",
                      "dispatch_time": null,
                      "assign_date": null,
                      "leave_depot_time": "04/14/2025 14:37",
                      "in_route_time": null,
                      "estimated_pu_time": null,
                      "estimated_do_time": null,
                      "arrival_time": "04/14/2025 14:55",
                      "load_time": "04/14/2025 15:03",
                      "arrival_at_drop_off_time": "04/14/2025 15:30",
                      "drop_off_time": "04/14/2025 15:34",
                      "cancel_no_show_time": null,
                      "current_location": {},
                      "actual_pu_location": {},
                      "actual_do_location": {},
                      "ivr_settings": {},
                      "driver": {
                        "first_name": "Taylor",
                        "last_name": "Example",
                        "license": "TESTLICENSE01",
                        "driver_custom_fields": {
                          "Driver Internal ID": "112344521",
                          "Plan 10 Payroll ID": "9347435141",
                          "Parallax Payroll ID": "95725185",
                          "Driver Prompt ID": "43571821112"
                        }
                      },
                      "vehicle": {
                        "name": "0000",
                        "make": "honda",
                        "model": "accord",
                        "color": "black",
                        "plate": "TEST123",
                        "vin": "TESTVIN0000000001"
                      },
                      "payer": {
                        "name": "payer"
                      },
                      "client": {
                        "id": 68,
                        "name": "ALEX EXAMPLE",
                        "phone_1": "5555550107",
                        "client_member_id": ""
                      },
                      "floor": null,
                      "room": null,
                      "bed": null,
                      "suite": null,
                      "stairs": 0,
                      "do_floor": null,
                      "do_room": null,
                      "do_bed": null,
                      "do_suite": null,
                      "do_stairs": 0,
                      "facility": {},
                      "do_facility": {},
                      "trip_purpose": {},
                      "mapped_mileage": 7.78,
                      "mileage": 7.46,
                      "billable_mileage_to_pick_up": 0,
                      "final_price": 96,
                      "wait_time": 0,
                      "wait_after_prior": false
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "The order."
          }
        },
        "parameters": [
          {
            "name": "ride_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the trip in your software."
          },
          {
            "name": "include_driver_extra_info",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "yes",
            "description": "Send yes to include the driver custom fields in driver.driver_custom_fields.",
            "required": false
          },
          {
            "name": "include_signature",
            "in": "query",
            "description": "Send yes to include the client signature in signature.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "summary": "Get an order",
        "description": "Returns one order by your software's ride_id. Optional query parameters add the client signature and custom driver fields to the response."
      },
      "put": {
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ride_id": "15",
                "client_internal_id": 68,
                "trip_type": 1,
                "custom_trip_type": 1,
                "initial_time": "04/14/2021 15:00",
                "payment_method": 1,
                "pick_up_address": "200 Oak Ave, Springfield, IL 62702, USA",
                "drop_off_address": "200 Oak Ave, Springfield, IL 62702, USA",
                "additional_seats": 2,
                "comment": "Any  other comment",
                "provide_oxygen": false,
                "need_wheelchair": false,
                "need_attendant": false,
                "two_man_assist": false
              },
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Order": {
                    "value": {
                      "id": 4189,
                      "ride_id": "15",
                      "custom_trip_type": 1,
                      "additional_seats": 2,
                      "comments": "Any comment",
                      "provide_oxygen": true,
                      "need_wheelchair": false,
                      "need_attendant": false,
                      "two_man_assist": true,
                      "cancellation_reason": "",
                      "pick_up_address": "100 Main St, Springfield, IL 62701, USA",
                      "pick_up_location": {
                        "lat": 39.799,
                        "lng": -89.644
                      },
                      "drop_off_address": "100 Main St, Springfield, IL 62701, USA",
                      "drop_off_location": {
                        "lat": 39.7817,
                        "lng": -89.6501
                      },
                      "initial_time": "04/14/2021 15:00",
                      "appointment_time": "04/14/2021 15:34",
                      "status": "Unassigned",
                      "estimated_pu_time": null,
                      "estimated_do_time": null,
                      "arrival_time": null,
                      "load_time": null,
                      "drop_off_time": null,
                      "current_location": {},
                      "actual_pu_location": {},
                      "actual_do_location": {},
                      "client_name": "ALEX EXAMPLE",
                      "client_member_id": "",
                      "ivr_settings": {},
                      "driver": {},
                      "vehicle": {},
                      "payer": {
                        "name": "payer"
                      },
                      "client": {
                        "id": 68,
                        "name": "ALEX EXAMPLE",
                        "phone_1": "5555550108",
                        "client_member_id": ""
                      },
                      "floor": null,
                      "room": null,
                      "bed": null,
                      "suite": null,
                      "do_floor": null,
                      "do_room": null,
                      "do_bed": null,
                      "do_suite": null,
                      "facility": {},
                      "do_facility": {},
                      "trip_purpose": {},
                      "wait_after_prior": false
                    }
                  },
                  "Update Order (with order extras)": {
                    "value": null
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "The updated order."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Order (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the access token. It is missing, invalid or expired."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Order (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no such order, or your software's connection cannot see it."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Order (with invalid set of data)": {
                    "value": {
                      "drop_off_address": [
                        "This field is required."
                      ]
                    }
                  },
                  "Create Order (With will_call and  wait_after_prior) Copy": {
                    "value": {
                      "non_field_errors": [
                        "Wait after prior and will call can not be set at the same time."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name."
          }
        },
        "parameters": [
          {
            "name": "ride_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the trip in your software."
          }
        ],
        "summary": "Update an order",
        "description": "Updates an order. The request and response have the same fields as Create an order. RouteGenie can unassign an order that is already assigned or offered when your software changes it."
      }
    },
    "/order/": {
      "get": {
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get a List of Orders": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 4188,
                          "ride_id": "12",
                          "custom_trip_type": 1,
                          "additional_seats": 2,
                          "comments": "Any comment",
                          "provide_oxygen": true,
                          "need_wheelchair": false,
                          "need_attendant": false,
                          "two_man_assist": true,
                          "cancellation_reason": "",
                          "pick_up_address": "200 Oak Ave, Springfield, IL 62702, USA",
                          "pick_up_location": {
                            "lat": 39.799,
                            "lng": -89.644
                          },
                          "drop_off_address": "200 Oak Ave, Springfield, IL 62702, USA",
                          "drop_off_location": {
                            "lat": 39.7817,
                            "lng": -89.6501
                          },
                          "initial_time": "04/14/2021 15:00",
                          "appointment_time": "04/14/2021 15:34",
                          "status": "Unassigned",
                          "estimated_pu_time": null,
                          "estimated_do_time": null,
                          "arrival_time": null,
                          "load_time": null,
                          "drop_off_time": null,
                          "current_location": {},
                          "actual_pu_location": {},
                          "actual_do_location": {},
                          "client_name": "ALEX EXAMPLE",
                          "client_member_id": "",
                          "ivr_settings": {},
                          "driver": {},
                          "vehicle": {},
                          "payer": {
                            "name": "payer"
                          },
                          "client": {
                            "id": 68,
                            "name": "ALEX EXAMPLE",
                            "phone": "5555550100",
                            "client_member_id": ""
                          },
                          "floor": null,
                          "room": null,
                          "bed": null,
                          "suite": null,
                          "do_floor": null,
                          "do_room": null,
                          "do_bed": null,
                          "do_suite": null,
                          "facility": {},
                          "do_facility": {},
                          "trip_purpose": {},
                          "wait_after_prior": false
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/OrderList"
                }
              }
            },
            "description": "A page of orders."
          }
        },
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The start of the range. Format: MM/DD/YYYY.",
            "required": true
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The end of the range. Format: MM/DD/YYYY.",
            "required": true
          },
          {
            "name": "client_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "Return only orders for this client ID.",
            "required": false
          },
          {
            "name": "include_signature",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "example": "yes",
            "description": "Send yes to include the client signature in each order.",
            "required": false
          },
          {
            "name": "page",
            "in": "query",
            "description": "The page number. Each page has up to 100 orders.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "List orders",
        "description": "Returns orders whose pickup time falls between start_date and end_date, up to 100 per page. Use next in the response to get the following page."
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ride_id": "17",
                "client_internal_id": 68,
                "trip_type": 1,
                "custom_trip_type": 1,
                "initial_time": "04/14/2025 15:00",
                "payment_method": 1,
                "pick_up_address": "100 Main St, Springfield, IL 62701, USA",
                "pick_up_point": {
                  "lat": 39.799,
                  "lng": -89.644
                },
                "pick_up_county": "Erie",
                "drop_off_address": "100 Main St, Springfield, IL 62701, USA",
                "drop_off_point": {
                  "lat": 39.7817,
                  "lng": -89.6501
                },
                "drop_off_county": "Erie",
                "additional_seats": 2,
                "comment": "Any comment",
                "provide_oxygen": true,
                "need_wheelchair": false,
                "need_attendant": false,
                "two_man_assist": true,
                "wait_after_prior": false
              },
              "schema": {
                "$ref": "#/components/schemas/OrderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Order (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the access token. It is missing, invalid or expired."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Order (with invalid set of data)": {
                    "value": {
                      "drop_off_address": [
                        "This field is required."
                      ]
                    }
                  },
                  "Create Order (With will_call and  wait_after_prior)": {
                    "value": {
                      "non_field_errors": [
                        "Wait after prior and will call can not be set at the same time."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name. If your software sends will_call together with wait_after_prior, RouteGenie returns a non_field_errors message."
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Order": {
                    "value": {
                      "id": 4191,
                      "ride_id": "17",
                      "custom_trip_type": 1,
                      "additional_seats": 2,
                      "comments": "Any comment",
                      "provide_oxygen": true,
                      "need_wheelchair": false,
                      "need_attendant": false,
                      "two_man_assist": true,
                      "cancellation_reason": "",
                      "pick_up_address": "200 Oak Ave, Springfield, IL 62702, USA",
                      "pick_up_location": {
                        "lat": 39.799,
                        "lng": -89.644
                      },
                      "drop_off_address": "200 Oak Ave, Springfield, IL 62702, USA",
                      "drop_off_location": {
                        "lat": 39.7817,
                        "lng": -89.6501
                      },
                      "initial_time": "04/14/2025 15:00",
                      "appointment_time": "04/14/2025 15:34",
                      "status": "Unassigned",
                      "estimated_pu_time": null,
                      "estimated_do_time": null,
                      "arrival_time": null,
                      "load_time": null,
                      "drop_off_time": null,
                      "current_location": {},
                      "actual_pu_location": {},
                      "actual_do_location": {},
                      "client_name": "ALEX EXAMPLE",
                      "client_member_id": "",
                      "ivr_settings": {},
                      "driver": {},
                      "vehicle": {},
                      "payer": {
                        "name": "payer"
                      },
                      "floor": null,
                      "room": null,
                      "bed": null,
                      "suite": null,
                      "do_floor": null,
                      "do_room": null,
                      "do_bed": null,
                      "do_suite": null,
                      "facility": {},
                      "do_facility": {},
                      "trip_purpose": {}
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "The order was created. The body is the order."
          },
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Order (with order extras)": {
                    "value": null
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            },
            "description": "The order was created. The body is the order."
          }
        },
        "summary": "Create an order",
        "description": "Creates an order under the payer of your connection. The ride_id must be new. Your software receives status changes for the order on the order webhook."
      }
    },
    "/order/bulk_create/": {
      "post": {
        "tags": [
          "Orders"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "request_id": "0e9020a2c74047879783837a74c244cb",
                "orders": [
                  {
                    "ride_id": "22",
                    "client_internal_id": 68,
                    "trip_type": 1,
                    "custom_trip_type": 1,
                    "initial_time": "04/14/2025 15:00",
                    "payment_method": 1,
                    "pick_up_address": "100 Main St, Springfield, IL 62701, USA",
                    "pick_up_point": {
                      "lat": 39.799,
                      "lng": -89.644
                    },
                    "pick_up_county": "Erie",
                    "drop_off_address": "100 Main St, Springfield, IL 62701, USA",
                    "drop_off_point": {
                      "lat": 39.7817,
                      "lng": -89.6501
                    },
                    "drop_off_county": "Erie",
                    "additional_seats": 2,
                    "comment": "Any comment",
                    "wait_after_prior": false
                  },
                  {
                    "ride_id": "23",
                    "client_internal_id": 68,
                    "trip_type": 1,
                    "custom_trip_type": 1,
                    "initial_time": "04/14/2025 17:00",
                    "payment_method": 1,
                    "pick_up_address": "200 Oak Ave, Springfield, IL 62702, USA",
                    "pick_up_point": {
                      "lat": 39.799,
                      "lng": -89.644
                    },
                    "pick_up_county": "Erie",
                    "drop_off_address": "200 Oak Ave, Springfield, IL 62702, USA",
                    "drop_off_point": {
                      "lat": 39.7817,
                      "lng": -89.6501
                    },
                    "drop_off_county": "Erie",
                    "additional_seats": 2,
                    "comment": "Any comment",
                    "wait_after_prior": false
                  }
                ]
              },
              "schema": {
                "$ref": "#/components/schemas/BulkCreateOrdersRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Orders In Bulk": {
                    "value": {
                      "result": "Orders are going to be created."
                    }
                  },
                  "Create Orders In Bulk (with order extras)": {
                    "value": null
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/BulkCreateOrdersResponse"
                }
              }
            },
            "description": "RouteGenie accepted the request. It sends the results to your event webhook endpoint."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Orders In Bulk (with invalid credentials)": {
                    "value": {
                      "non_field_errors": [
                        "For using this endpoint, there should be an event_webhook_url and a webhook_key set in order to receive the answer."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request: it is invalid, or the event webhook URL and webhook key are not set."
          }
        },
        "summary": "Create orders in bulk",
        "description": "RouteGenie creates several orders in the background and returns at once. RouteGenie sends the result for each order to your event webhook endpoint with the request_id your software sent. Your event webhook URL and webhook key must be set first, or RouteGenie returns 400."
      }
    },
    "/order/{ride_id}/cancel/": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel  Order": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The order was canceled."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel  Order (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the access token. It is missing, invalid or expired."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel  Order (if the order is not in appropriate state)": {
                    "value": {
                      "order": [
                        "Order can't be canceled."
                      ]
                    }
                  }
                }
              }
            },
            "description": "The order cannot be canceled in its current state."
          }
        },
        "parameters": [
          {
            "name": "ride_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the trip in your software."
          }
        ],
        "summary": "Cancel an order",
        "description": "Cancels an order. An order that is locked for status changes cannot be canceled."
      }
    },
    "/order/{ride_id}/reinstate/": {
      "patch": {
        "tags": [
          "Orders"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Reinstate  Order": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The order was reinstated."
          }
        },
        "parameters": [
          {
            "name": "ride_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ID of the trip in your software."
          }
        ],
        "summary": "Reinstate an order",
        "description": "Changes a canceled order back to Unassigned."
      }
    },
    "/visit/": {
      "post": {
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "external_visit_id": "131c",
                "client_member_id": "111111111",
                "plan_start": "06/08/2021 15:00",
                "plan_end": "06/08/2021 18:00",
                "address": "100 Main St, Springfield, IL 62701, USA",
                "dispatcher": 137,
                "comment": "Text message. Not more than 1000 characters. "
              },
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Visit (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the token. It is missing, invalid or expired."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Visit (with invalid set of data)": {
                    "value": {
                      "plan_start": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name."
          },
          "201": {
            "content": {
              "application/json": {
                "examples": {
                  "Create Visit": {
                    "value": {
                      "id": 16,
                      "external_visit_id": "130c",
                      "plan_start": "06/08/2021 15:00",
                      "plan_end": "06/08/2021 18:00",
                      "dispatcher": 137
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Visit"
                }
              }
            },
            "description": "The visit was created."
          }
        },
        "summary": "Create a visit",
        "description": "Creates a visit. `external_visit_id`, `plan_start`, `plan_end` and `address_str` are required. Send `client_member_id` or `client_internal_id` to identify the client."
      }
    },
    "/visit/{external_visit_id}/": {
      "put": {
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "external_visit_id": "130c",
                "client_member_id": "111111111",
                "plan_start": "06/08/2021 10:00",
                "plan_end": "06/08/2021 12:00",
                "address": "200 Oak Ave, Springfield, IL 62702, USA",
                "dispatcher": 137,
                "comment": "Text message. Not more than 1000 characters. "
              },
              "schema": {
                "$ref": "#/components/schemas/VisitRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Visit (with invalid set of data)": {
                    "value": {
                      "plan_end": [
                        "This field is required."
                      ]
                    }
                  }
                }
              }
            },
            "description": "RouteGenie rejected the request as invalid. It lists field errors by field name."
          },
          "401": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Visit (with bad or without access token)": {
                    "value": {
                      "detail": "Authentication credentials were not provided."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie did not accept the token. It is missing, invalid or expired."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Visit (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no visit with this ID, or your software's connection cannot see it."
          },
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Update Visit": {
                    "value": {
                      "id": 9,
                      "external_visit_id": "177c",
                      "plan_start": "06/08/2021 10:00",
                      "plan_end": "06/08/2021 12:00",
                      "dispatcher": 137
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/Visit"
                }
              }
            },
            "description": "The visit was updated."
          }
        },
        "parameters": [
          {
            "name": "external_visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's ID for the visit."
          }
        ],
        "summary": "Update a visit",
        "description": "Updates the visit identified by `external_visit_id`. The request and response bodies are the same as for creating a visit."
      }
    },
    "/visit/{external_visit_id}/cancel/": {
      "patch": {
        "tags": [
          "Visits"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel Visit": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The visit was canceled."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel Visit (if visit is not in appropriate state)": {
                    "value": {
                      "non_field_errors": [
                        "Visit can't be cancelled in Canceled status."
                      ]
                    }
                  }
                }
              }
            },
            "description": "The visit is not in a status that allows this action. RouteGenie returns the error under `non_field_errors`."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Cancel Visit (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no visit with this ID, or your software's connection cannot see it."
          }
        },
        "parameters": [
          {
            "name": "external_visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's ID for the visit."
          }
        ],
        "summary": "Cancel a visit",
        "description": "Cancels a visit. Your software can cancel a visit in these statuses: UNASSIGNED, OFFERED, REQUESTED, SCHEDULED and IN_ROUTE. Your software cannot cancel a visit in these statuses: IN_PROGRESS, CANCELED, NO_SHOW and COMPLETED."
      }
    },
    "/visit/{external_visit_id}/assign/": {
      "put": {
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "case_manager_id": 97
              },
              "schema": {
                "$ref": "#/components/schemas/VisitCaseManagerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Assign Visit (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no visit with this ID, or your software's connection cannot see it."
          },
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Assign Visit": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The visit was assigned."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Assign Visit (if object is not in appropriate status)": {
                    "value": {
                      "non_field_errors": [
                        "Visit can't be assigned in Offered status."
                      ]
                    }
                  }
                }
              }
            },
            "description": "The visit is not in a status that allows this action. RouteGenie returns the error under `non_field_errors`."
          }
        },
        "parameters": [
          {
            "name": "external_visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's ID for the visit."
          }
        ],
        "summary": "Assign a visit",
        "description": "Assigns a case manager to the visit. Your software can assign a visit only while it is UNASSIGNED. RouteGenie changes the visit status to OFFERED and sends the case manager a push notification about the new visit."
      }
    },
    "/visit/{external_visit_id}/schedule/": {
      "put": {
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "case_manager_id": 579
              },
              "schema": {
                "$ref": "#/components/schemas/VisitCaseManagerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Schedule Visit": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The visit was scheduled."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Schedule Visit (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no visit with this ID, or your software's connection cannot see it."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Schedule Visit (if object is not in appropriate status)": {
                    "value": {
                      "non_field_errors": [
                        "Visit can't be scheduled in Scheduled status."
                      ]
                    }
                  }
                }
              }
            },
            "description": "The visit is not in a status that allows this action. RouteGenie returns the error under `non_field_errors`."
          }
        },
        "parameters": [
          {
            "name": "external_visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's ID for the visit."
          }
        ],
        "summary": "Schedule a visit",
        "description": "Assigns a case manager and sets the visit status to SCHEDULED, skipping OFFERED. Your software can schedule a visit only while it is UNASSIGNED or OFFERED."
      }
    },
    "/visit/{external_visit_id}/unassign/": {
      "put": {
        "tags": [
          "Visits"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": ""
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Unassign Visit": {
                    "value": ""
                  }
                }
              }
            },
            "description": "The visit was unassigned."
          },
          "404": {
            "content": {
              "application/json": {
                "examples": {
                  "Unassign Visit (if object doesn't exist in RouteGenie)": {
                    "value": {
                      "detail": "Not found."
                    }
                  }
                }
              }
            },
            "description": "RouteGenie has no visit with this ID, or your software's connection cannot see it."
          },
          "400": {
            "content": {
              "application/json": {
                "examples": {
                  "Unassign Visit (if object is not in appropriate status)": {
                    "value": {
                      "non_field_errors": [
                        "Visit can't be unassigned in Unassigned status."
                      ]
                    }
                  }
                }
              }
            },
            "description": "The visit is not in a status that allows this action. RouteGenie returns the error under `non_field_errors`."
          }
        },
        "parameters": [
          {
            "name": "external_visit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Your software's ID for the visit."
          }
        ],
        "summary": "Unassign a visit",
        "description": "Sets the visit status to UNASSIGNED and removes the assigned case manager."
      }
    },
    "/case_manager/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available case managers": {
                    "value": [
                      {
                        "id": 97,
                        "first_name": "Casey",
                        "last_name": "Example"
                      }
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CaseManager"
                  }
                }
              }
            },
            "description": "The case managers."
          }
        },
        "summary": "List case managers",
        "description": "Returns all case managers as an array. This list is not paginated."
      }
    },
    "/dispatcher/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available dispatchers": {
                    "value": [
                      {
                        "id": 137,
                        "first_name": "Riley",
                        "last_name": "Example"
                      }
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Dispatcher"
                  }
                }
              }
            },
            "description": "The dispatchers."
          }
        },
        "summary": "List dispatchers",
        "description": "Returns all dispatchers as an array. This list is not paginated."
      }
    },
    "/payer/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available payers": {
                    "value": {
                      "count": 103,
                      "next": "http://127.0.0.1:8000/open_api/api/v1/payer/?page=2",
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "name": "payer",
                          "account_id": "payer"
                        },
                        {
                          "id": 2,
                          "name": "payer2",
                          "account_id": "payer2"
                        },
                        {
                          "id": 3,
                          "name": "account0",
                          "account_id": "account_id_0"
                        },
                        {
                          "id": 4,
                          "name": "account1",
                          "account_id": "account_id_1"
                        },
                        {
                          "id": 5,
                          "name": "account2",
                          "account_id": "account_id_2"
                        },
                        {
                          "id": 6,
                          "name": "account3",
                          "account_id": "account_id_3"
                        },
                        {
                          "id": 7,
                          "name": "account4",
                          "account_id": "account_id_4"
                        },
                        {
                          "id": 8,
                          "name": "account5",
                          "account_id": "account_id_5"
                        },
                        {
                          "id": 9,
                          "name": "account6",
                          "account_id": "account_id_6"
                        },
                        {
                          "id": 10,
                          "name": "account7",
                          "account_id": "account_id_7"
                        },
                        {
                          "id": 11,
                          "name": "account8",
                          "account_id": "account_id_8"
                        },
                        {
                          "id": 12,
                          "name": "account9",
                          "account_id": "account_id_9"
                        },
                        {
                          "id": 13,
                          "name": "account10",
                          "account_id": "account_id_10"
                        },
                        {
                          "id": 14,
                          "name": "account11",
                          "account_id": "account_id_11"
                        },
                        {
                          "id": 15,
                          "name": "account12",
                          "account_id": "account_id_12"
                        },
                        {
                          "id": 16,
                          "name": "account13",
                          "account_id": "account_id_13"
                        },
                        {
                          "id": 17,
                          "name": "account14",
                          "account_id": "account_id_14"
                        },
                        {
                          "id": 18,
                          "name": "account15",
                          "account_id": "account_id_15"
                        },
                        {
                          "id": 19,
                          "name": "account16",
                          "account_id": "account_id_16"
                        },
                        {
                          "id": 20,
                          "name": "account17",
                          "account_id": "account_id_17"
                        },
                        {
                          "id": 21,
                          "name": "account18",
                          "account_id": "account_id_18"
                        },
                        {
                          "id": 22,
                          "name": "account19",
                          "account_id": "account_id_19"
                        },
                        {
                          "id": 23,
                          "name": "account20",
                          "account_id": "account_id_20"
                        },
                        {
                          "id": 24,
                          "name": "account21",
                          "account_id": "account_id_21"
                        },
                        {
                          "id": 25,
                          "name": "account22",
                          "account_id": "account_id_22"
                        },
                        {
                          "id": 26,
                          "name": "account23",
                          "account_id": "account_id_23"
                        },
                        {
                          "id": 27,
                          "name": "account24",
                          "account_id": "account_id_24"
                        },
                        {
                          "id": 28,
                          "name": "account25",
                          "account_id": "account_id_25"
                        },
                        {
                          "id": 29,
                          "name": "account26",
                          "account_id": "account_id_26"
                        },
                        {
                          "id": 30,
                          "name": "account27",
                          "account_id": "account_id_27"
                        },
                        {
                          "id": 31,
                          "name": "account28",
                          "account_id": "account_id_28"
                        },
                        {
                          "id": 32,
                          "name": "account29",
                          "account_id": "account_id_29"
                        },
                        {
                          "id": 33,
                          "name": "account30",
                          "account_id": "account_id_30"
                        },
                        {
                          "id": 34,
                          "name": "account31",
                          "account_id": "account_id_31"
                        },
                        {
                          "id": 35,
                          "name": "account32",
                          "account_id": "account_id_32"
                        },
                        {
                          "id": 36,
                          "name": "account33",
                          "account_id": "account_id_33"
                        },
                        {
                          "id": 37,
                          "name": "account34",
                          "account_id": "account_id_34"
                        },
                        {
                          "id": 38,
                          "name": "account35",
                          "account_id": "account_id_35"
                        },
                        {
                          "id": 39,
                          "name": "account36",
                          "account_id": "account_id_36"
                        },
                        {
                          "id": 40,
                          "name": "account37",
                          "account_id": "account_id_37"
                        },
                        {
                          "id": 41,
                          "name": "account38",
                          "account_id": "account_id_38"
                        },
                        {
                          "id": 42,
                          "name": "account39",
                          "account_id": "account_id_39"
                        },
                        {
                          "id": 43,
                          "name": "account40",
                          "account_id": "account_id_40"
                        },
                        {
                          "id": 44,
                          "name": "account41",
                          "account_id": "account_id_41"
                        },
                        {
                          "id": 45,
                          "name": "account42",
                          "account_id": "account_id_42"
                        },
                        {
                          "id": 46,
                          "name": "account43",
                          "account_id": "account_id_43"
                        },
                        {
                          "id": 47,
                          "name": "account44",
                          "account_id": "account_id_44"
                        },
                        {
                          "id": 48,
                          "name": "account45",
                          "account_id": "account_id_45"
                        },
                        {
                          "id": 49,
                          "name": "account46",
                          "account_id": "account_id_46"
                        },
                        {
                          "id": 50,
                          "name": "account47",
                          "account_id": "account_id_47"
                        },
                        {
                          "id": 51,
                          "name": "account48",
                          "account_id": "account_id_48"
                        },
                        {
                          "id": 52,
                          "name": "account49",
                          "account_id": "account_id_49"
                        },
                        {
                          "id": 53,
                          "name": "account50",
                          "account_id": "account_id_50"
                        },
                        {
                          "id": 54,
                          "name": "account51",
                          "account_id": "account_id_51"
                        },
                        {
                          "id": 55,
                          "name": "account52",
                          "account_id": "account_id_52"
                        },
                        {
                          "id": 56,
                          "name": "account53",
                          "account_id": "account_id_53"
                        },
                        {
                          "id": 57,
                          "name": "account54",
                          "account_id": "account_id_54"
                        },
                        {
                          "id": 58,
                          "name": "account55",
                          "account_id": "account_id_55"
                        },
                        {
                          "id": 59,
                          "name": "account56",
                          "account_id": "account_id_56"
                        },
                        {
                          "id": 60,
                          "name": "account57",
                          "account_id": "account_id_57"
                        },
                        {
                          "id": 61,
                          "name": "account58",
                          "account_id": "account_id_58"
                        },
                        {
                          "id": 62,
                          "name": "account59",
                          "account_id": "account_id_59"
                        },
                        {
                          "id": 63,
                          "name": "account60",
                          "account_id": "account_id_60"
                        },
                        {
                          "id": 64,
                          "name": "account61",
                          "account_id": "account_id_61"
                        },
                        {
                          "id": 65,
                          "name": "account62",
                          "account_id": "account_id_62"
                        },
                        {
                          "id": 66,
                          "name": "account63",
                          "account_id": "account_id_63"
                        },
                        {
                          "id": 67,
                          "name": "account64",
                          "account_id": "account_id_64"
                        },
                        {
                          "id": 68,
                          "name": "account65",
                          "account_id": "account_id_65"
                        },
                        {
                          "id": 69,
                          "name": "account66",
                          "account_id": "account_id_66"
                        },
                        {
                          "id": 70,
                          "name": "account67",
                          "account_id": "account_id_67"
                        },
                        {
                          "id": 71,
                          "name": "account68",
                          "account_id": "account_id_68"
                        },
                        {
                          "id": 72,
                          "name": "account69",
                          "account_id": "account_id_69"
                        },
                        {
                          "id": 73,
                          "name": "account70",
                          "account_id": "account_id_70"
                        },
                        {
                          "id": 74,
                          "name": "account71",
                          "account_id": "account_id_71"
                        },
                        {
                          "id": 75,
                          "name": "account72",
                          "account_id": "account_id_72"
                        },
                        {
                          "id": 76,
                          "name": "account73",
                          "account_id": "account_id_73"
                        },
                        {
                          "id": 77,
                          "name": "account74",
                          "account_id": "account_id_74"
                        },
                        {
                          "id": 78,
                          "name": "account75",
                          "account_id": "account_id_75"
                        },
                        {
                          "id": 79,
                          "name": "account76",
                          "account_id": "account_id_76"
                        },
                        {
                          "id": 80,
                          "name": "account77",
                          "account_id": "account_id_77"
                        },
                        {
                          "id": 81,
                          "name": "account78",
                          "account_id": "account_id_78"
                        },
                        {
                          "id": 82,
                          "name": "account79",
                          "account_id": "account_id_79"
                        },
                        {
                          "id": 83,
                          "name": "account80",
                          "account_id": "account_id_80"
                        },
                        {
                          "id": 84,
                          "name": "account81",
                          "account_id": "account_id_81"
                        },
                        {
                          "id": 85,
                          "name": "account82",
                          "account_id": "account_id_82"
                        },
                        {
                          "id": 86,
                          "name": "account83",
                          "account_id": "account_id_83"
                        },
                        {
                          "id": 87,
                          "name": "account84",
                          "account_id": "account_id_84"
                        },
                        {
                          "id": 88,
                          "name": "account85",
                          "account_id": "account_id_85"
                        },
                        {
                          "id": 89,
                          "name": "account86",
                          "account_id": "account_id_86"
                        },
                        {
                          "id": 90,
                          "name": "account87",
                          "account_id": "account_id_87"
                        },
                        {
                          "id": 91,
                          "name": "account88",
                          "account_id": "account_id_88"
                        },
                        {
                          "id": 92,
                          "name": "account89",
                          "account_id": "account_id_89"
                        },
                        {
                          "id": 93,
                          "name": "account90",
                          "account_id": "account_id_90"
                        },
                        {
                          "id": 94,
                          "name": "account91",
                          "account_id": "account_id_91"
                        },
                        {
                          "id": 95,
                          "name": "account92",
                          "account_id": "account_id_92"
                        },
                        {
                          "id": 96,
                          "name": "account93",
                          "account_id": "account_id_93"
                        },
                        {
                          "id": 97,
                          "name": "account94",
                          "account_id": "account_id_94"
                        },
                        {
                          "id": 98,
                          "name": "account95",
                          "account_id": "account_id_95"
                        },
                        {
                          "id": 99,
                          "name": "account96",
                          "account_id": "account_id_96"
                        },
                        {
                          "id": 100,
                          "name": "account97",
                          "account_id": "account_id_97"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PayerList"
                }
              }
            },
            "description": "A page of payers."
          }
        },
        "summary": "List payers",
        "description": "Returns the payers your connection can use. Each page holds up to 100 payers.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/payer/{payer_id}/extras/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available payer extras": {
                    "value": [
                      {
                        "name": "Extra Options",
                        "kind": 2,
                        "unique": false,
                        "options": [
                          "op1",
                          "op3"
                        ],
                        "show_on_driver_app": true
                      },
                      {
                        "name": "Extra Date",
                        "kind": 1,
                        "unique": true,
                        "show_on_driver_app": true
                      },
                      {
                        "name": "Extra Text",
                        "kind": 0,
                        "unique": true,
                        "show_on_driver_app": false
                      }
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PayerExtra"
                  }
                }
              }
            },
            "description": "The payer's extras."
          }
        },
        "parameters": [
          {
            "name": "payer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Internal ID of the payer, from the payer list."
          }
        ],
        "summary": "List payer extras",
        "description": "Returns the extras defined on a payer. Returns at most 10 extras. Order extras must match these extras by name."
      }
    },
    "/custom_trip_type/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available custom trip types": {
                    "value": {
                      "count": 8,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "name": "Taxi"
                        },
                        {
                          "id": 2,
                          "name": "Ambulatory"
                        },
                        {
                          "id": 3,
                          "name": "Wheelchair"
                        },
                        {
                          "id": 4,
                          "name": "Stretcher"
                        },
                        {
                          "id": 5,
                          "name": "Bariatric Wheelchair 450lbs Max"
                        },
                        {
                          "id": 6,
                          "name": "Homeless Shuttle"
                        },
                        {
                          "id": 7,
                          "name": "Psych Gurney"
                        },
                        {
                          "id": 8,
                          "name": "Bariatric lvl I Gurney 265 to 350lbs"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/CustomTripTypeList"
                }
              }
            },
            "description": "A page of custom trip types."
          }
        },
        "summary": "List custom trip types",
        "description": "Returns the custom trip types. Use the `id` as `custom_trip_type` when your software creates an order. Each page holds up to 100 trip types.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/trip_purpose/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available trip purposes": {
                    "value": {
                      "count": 2,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "text": "Dialysis"
                        },
                        {
                          "id": 2,
                          "text": "Appointment"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/TripPurposeList"
                }
              }
            },
            "description": "A page of trip purposes."
          }
        },
        "summary": "List trip purposes",
        "description": "Returns the trip purposes. Each page holds up to 100 trip purposes.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/facility/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available facilities": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "name": "Buffalo Hospital"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/FacilityList"
                }
              }
            },
            "description": "A page of facilities."
          }
        },
        "summary": "List facilities",
        "description": "Returns the facilities. Each page holds up to 100 facilities.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/referral_source/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available referral sources": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "name": "Rehab",
                          "contact_name": "Alex Example",
                          "contact_phone": "5555550100",
                          "contact_email": "alex.example@example.com",
                          "contact_address": "100 Main St, Springfield, IL 62701, USA",
                          "contact_address_id": "EXAMPLE-PLACE-ID",
                          "notes": "Notes Test"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ReferralSourceList"
                }
              }
            },
            "description": "A page of referral sources."
          }
        },
        "summary": "List referral sources",
        "description": "Returns the referral sources. Each page holds up to 100 referral sources.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/user/": {
      "get": {
        "tags": [
          "Reference data"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of users": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "username": "user1"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/UserList"
                }
              }
            },
            "description": "A page of users."
          }
        },
        "summary": "List users",
        "description": "Returns the users. Use a user's `id` as `user_id` when your software lists report templates. Each page holds up to 100 users.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/report_template/": {
      "get": {
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of available report templates for user": {
                    "value": {
                      "count": 1,
                      "next": null,
                      "previous": null,
                      "results": [
                        {
                          "id": 1,
                          "name": "Report template 1",
                          "has_period_field": true
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ReportTemplateList"
                }
              }
            },
            "description": "A page of report templates."
          }
        },
        "parameters": [
          {
            "name": "user_id",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "example": "2",
            "description": "ID of the user, from the user list.",
            "required": true
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page number. Each page holds up to 100 records.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "summary": "List report templates",
        "description": "Returns the report templates available to a user. `user_id` is required. Each page holds up to 100 templates."
      }
    },
    "/canned_report_template/": {
      "get": {
        "tags": [
          "Reports"
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Get list of canned report templates": {
                    "value": [
                      {
                        "name": "Summary Report",
                        "code": "summary_report"
                      }
                    ]
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportCannedTemplate"
                  }
                }
              }
            },
            "description": "The canned report templates."
          }
        },
        "summary": "List canned report templates",
        "description": "Returns the canned report templates, which are available to all users. The list is returned as an array, not as a paginated object."
      }
    },
    "/report/": {
      "post": {
        "tags": [
          "Reports"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "name": "generated report",
                "creator": 2,
                "template": 1,
                "period_from": "01/01/2025",
                "period_to": "03/01/2025"
              },
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Generate report from report template": {
                    "value": {
                      "xlsx": "{{host}}api/v1/reports/shared/?token=eyJyZXBvcnRfaWQiOjEwfQ%3A1tp9NO%3AH66F9jL-dB3D8YSG3HxWDw6wwxWRxQRh30tl6v9w7lk&report_format=xlsx",
                      "pdf": "{{host}}api/v1/reports/shared/?token=eyJyZXBvcnRfaWQiOjEwfQ%3A1tp9NO%3AH66F9jL-dB3D8YSG3HxWDw6wwxWRxQRh30tl6v9w7lk&report_format=pdf",
                      "csv": "{{host}}api/v1/reports/shared/?token=eyJyZXBvcnRfaWQiOjEwfQ%3A1tp9NO%3AH66F9jL-dB3D8YSG3HxWDw6wwxWRxQRh30tl6v9w7lk&report_format=csv"
                    }
                  },
                  "Generate report from canned report template": {
                    "value": "{\n    \"xlsx\": \"{{host}}api/v1/reports/shared/?token=eyJyZXBvcnRfaWQiOjEwfQ%3A1tp9NO%3AH66F9jL-dB3D8YSG3HxWDw6wwxWRxQRh30tl6v9w7lk&report_format=xlsx\",\n}"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ReportResult"
                }
              }
            },
            "description": "Links to the generated report."
          }
        },
        "summary": "Generate a report",
        "description": "RouteGenie generates a report and returns public links to it. The links expire after 24 hours; after that the report is available only to its owner in RouteGenie. Generation time depends on report size. For XLSX and PDF, RouteGenie starts a conversion on the first request to the link, and its time depends on report size. Multi-page reports are available only as XLSX.\n\n- For a user report template, send `template`.\n- For a canned report template, send `canned_report_template_code`."
      }
    }
  },
  "webhooks": {
    "order": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "ride_id": "12511c",
                "status": "Assigned",
                "estimated_pu_time": "10:00",
                "estimated_do_time": "12:10",
                "driver": {
                  "first_name": "Jordan",
                  "last_name": "Example",
                  "license": "TESTLICENSE01"
                },
                "vehicle": {
                  "name": "3231",
                  "plate": "TEST123",
                  "vin": "TESTVIN0000000001"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/OrderWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "Order webhook": {
                    "value": null
                  },
                  "Order Dispatched webhook": {
                    "value": null
                  },
                  "Order Unassigned webhook": {
                    "value": null
                  }
                }
              }
            },
            "description": "Your webhook endpoint returns this to acknowledge the delivery."
          }
        },
        "security": [
          {
            "webhookApiKey": []
          }
        ],
        "summary": "Order status change",
        "description": "RouteGenie sends this request to your order webhook endpoint when the status of an order changes. RouteGenie sends it only for orders created through the API. The x-api-key header carries your webhook key. The fields in the body depend on the status, as listed in each field description."
      }
    },
    "event": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "event": "bulk_create_orders",
                "data": {
                  "request_id": "0e9020a2c74047879783837a74c244cb",
                  "orders": {
                    "22": {
                      "created": true,
                      "errors": {}
                    },
                    "23": {
                      "created": true,
                      "errors": {}
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/EventWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Your webhook endpoint returns this to acknowledge the delivery."
          }
        },
        "security": [
          {
            "webhookApiKey": []
          }
        ],
        "summary": "Event notification",
        "description": "RouteGenie sends this request to your event webhook endpoint for events that are not tied to one order. The request uses the same x-api-key header as the order webhook. The data field depends on the event. RouteGenie sends the gps and optimize_pre_assign events only when they are turned on for your connection."
      }
    }
  }
}