Thrust Carbon

Invalid segment codes

Reference of validation error codes returned in the invalid_segments property, by segment type.

Introduction

Listed below are the possible error codes that you might see in the invalid_segments property.

Some error messages name the wrong field

A handful of segment types return an error message whose text names a different field than the one it's attached to (for example, a passengers error whose message talks about "distance"). Treat the JSON property key as authoritative, not the wording of the message.

General

{
    "type": [
        "The type field is required.",
        "The selected type is invalid."
    ]
}

Air

{
    "aircraft_type": [
        "The aircraft type may not be greater than 4 characters."
    ],
    "carrier": [
        "The carrier may not be greater than 2 characters."
    ],
    "locations": [
        "The locations must be an array."
    ],
    "passengers": [
        "The passengers must be an integer."
    ],
    "travel_class": [
        "The selected travel class is invalid."
    ]
}

Carbon

{
    "quantity": [
        "The quantity must be a number.",
        "The quantity field is required."
    ]
}

Car mileage

{
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "passengers": [
        "The passengers must be a number.",
        "The passengers must be at least 1."
    ],
    "car_type": [
        "The car type may not be greater than 250 characters."
    ],
    "car_group": [
        "The selected car group is invalid."
    ],
    "car_segment": [
        "The selected car segment is invalid."
    ],
    "car_fuel_type": [
        "The selected car fuel type is invalid."
    ],
    "is_company_car": [
        "The is company car field must be true or false."
    ]
}

Car

{
    "quantity": [
        "The quantity must be an integer."
    ],
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "car_type": [
        "The car type may not be greater than 250 characters."
    ],
    "days": [
        "The days must be a number."
    ],
    "supplier": [
        "The supplier may not be greater than 250 characters."
    ],
    "car_group": [
        "The selected car group is invalid."
    ],
    "car_segment": [
        "The selected car segment is invalid."
    ],
    "car_fuel_type": [
        "The selected car fuel type is invalid."
    ]
}

Charter Jet

{
    "fuel_burn_tonnes": [
        "The fuel burn tonnes field is required.",
        "The fuel burn tonnes must be a number."
    ],
    "passengers": [
        "The passengers must be an integer.",
        "The passengers must be at least 1."
    ],
    "aircraft_type": [
        "The aircraft type may not be greater than 4 characters."
    ]
}

Coach

{
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "passengers": [
        "The passengers must be an integer.",
        "The passengers must be at least 1."
    ]
}

Digital Meeting

{
    "hours": [
        "The hours must be a number.",
        "The distance must be at least 0."
    ],
    "virtual_attendee_count": [
        "The virtual attendee count must be at least 0.",
        "The virtual attendee count must be an integer."
    ]
}

Ferry

{
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "passengers": [
        "The distance must be a number.",
        "The passengers must be at least 1."
    ],
    "ferry_passenger_type": [
        "The selected ferry passenger type is invalid."
    ]
}

Hotel

{
    "rooms": [
        "The distance must be a number.",
        "The rooms must be at least 1."
    ],
    "nights": [
        "The distance must be a number.",
        "The nights must be at least 1."
    ],
    "chain_code": [
        "The chain code must be a string.",
        "The chain code may not be greater than 3 characters."
    ],
    "rating": [
        "The rating must be an integer.",
        "The rating must be at least 1.",
        "The rating may not be greater than 5."
    ],
    "is_full_service": [
        "The is full service field must be true or false."
    ],
    "includes_breakfast": [
        "The includes breakfast field must be true or false."
    ],
    "is_resort": [
        "The is resort field must be true or false."
    ]
}

Rail

{
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "passengers": [
        "The distance must be a number.",
        "The passengers must be at least 1."
    ],
    "rail_type": [
        "The rail type format is invalid."
    ],
    "supplier": [
        "The supplier may not be greater than 250 characters."
    ]
}

Taxi

{
    "distance": [
        "The distance must be a number.",
        "The distance must be at least 0."
    ],
    "passengers": [
        "The distance must be a number.",
        "The passengers must be at least 1."
    ],
    "taxi_type": [
        "The rail type format is invalid."
    ]
}

Vacation Rental

{
    "nights": [
        "The distance must be a number.",
        "The nights must be at least 1."
    ],
    "travellers": [
        "The travellers must be an integer.",
        "The travellers must be at least 1."
    ]
}

On this page