FleetSync API

Schema

The complete schema definition file, for browsing. The same file is available for download on the overview page.

type Address {
  addressLine1: String!
  addressLine2: String!
  city: String!
  country: Country!
  format: String!
  state: String!
  toPostalAddress: AddressTypes_PostalAddress!
  zip: String!
}

type AddressTypes_PostalAddress {
  addressLines: [String!]!
  administrativeArea: String
  locality: String
  postalCode: String
  regionCode: String
}

type Branch {
  city: String!
  country: Country!
  id: ID!
  """
  True when this TLC branch runs the plate rental program. The branch rents out TLC plates and FHV licenses
  (medallions in New York) to drivers who own their own vehicles; see `Car.isPlateRental`. Always false for
  branches that are not TLC.
  """
  isPlateRental: Boolean!
  isTlc: Boolean!
  name: String!
  state: String!
  timezone: ZoneId!
}

"This enum must be sent as its integer code value."
enum BrokerEnum {
  "0"
  ABI
  "1"
  CNF
}

type ButlerRegistrationEnt_Registration {
  carBodyClass: String
  classCode: String
  color: String
  country: Country!
  engineNumber: String
  expirationDate: LocalDate!
  financePartnerId: ID
  fuelType2: String
  isExpired: Boolean!
  isTemp: Boolean!
  isTlc: Boolean!
  issueDate: LocalDate
  lienholders: [Document_Lienholder!]
  make: String
  mileage: Int
  model: String
  ownerId: ID
  plate: String!
  previousPlate: String
  purchaseDate: LocalDate
  registrantId: ID
  registrationFee: Int
  registrationNumber: String
  rfcOperator: String
  rfcOwner: String
  seatingCapacity: Int
  state: String!
  titleNumber: String
  type2: ButlerRegistrationEnt_RegistrationType2!
  vehicleClassificationCode: String
  vgmEntityId: ID
  vin: String!
  year: Int
}

"This enum must be sent as its integer code value."
enum ButlerRegistrationEnt_RegistrationType2 {
  "0"
  REGULAR
  "1"
  TEMP
  "2"
  TEMP_TAG
}

type Car {
  activePlate: Plate_CurrentCar
  bodyClass: CarBodyClass
  branch: Branch
  branchId: ID
  carLegacyStages: [CarLegacyStage!]!
  carStages: [CarStage!]!
  color: String
  dealer: Entity
  dealerId: ID
  fhv: Fhv
  fundingSource: Entity
  fundingSourceId: ID
  hd: HD
  historicalPlateInstallations: [PlateInstallation!]!
  id: ID!
  inspections: [CarInspection!]!
  installedPlate: Plate
  insurancePeriods: [CarInsurancePeriod!]!
  """
  True when the car is part of the plate rental program. The account rents out the TLC plate and the FHV license
  (the medallion in New York), while the vehicle itself is owned and driven by the renter, a driver or an external
  entity. See also `Branch.isPlateRental`.
  """
  isPlateRental: Boolean!
  "Latest odometer reading in miles, based on all available data and FleetSync mileage models."
  latestOdometer: Float
  make: String!
  makeId: ID!
  manheimValuation: CarEnt_ManheimValuation
  model: String
  modelId: ID
  plates: [Plate!]!
  purchaseDate: LocalDate
  purchasePrice: Int
  registrant: Entity
  registrations: [Registration!]!
  seatingCapacity: Int
  stage: CarStageEncoded!
  titleOwner: Entity
  titleOwnerId: ID
  titles: [Document!]!
  trim: String
  vin: String!
  wav: Boolean
  year: Int!
}

"This enum must be sent as its integer code value."
enum CarBodyClass {
  "95"
  CARGO_VAN
  "3"
  COUPE
  "8"
  CROSSOVER
  "5"
  HATCHBACK
  "62"
  INCOMPLETE_CUTAWAY
  "2"
  MINIVAN
  "60"
  PICKUP
  "13"
  SEDAN
  "7"
  SUV
  "11"
  TRUCK
  "9"
  VAN
  "15"
  WAGON
}

type CarEnt_ManheimValuation {
  retail: Int
  wholesale: Int!
  yearMonth: YearMonth!
}

type CarInspection {
  carId: ID!
  createdAt: Instant!
  gas: Int
  id: ID!
  mileage: Float
  photos: [CarInspectionPhotos_Photo!]!
  source: CarInspectionEnt_Source!
  type: CarInspection_Type
}

"This enum must be sent as its integer code value."
enum CarInspectionEnt_Source {
  "1"
  RAVIN
  "2"
  RAVIN_UNFINISHED
  "0"
  VGM_ADMIN_APP
}

type CarInspectionPhotos_Photo {
  ravinDamageType: RavinTypes_DamageType2
  ravinDescription: String
  type: CarInspectionPhotos_PhotoType!
  url: String!
}

"This enum must be sent as its integer code value."
enum CarInspectionPhotos_PhotoType {
  "0"
  DAMAGE
  "3"
  OTHER
  "2"
  REGISTRATION_AND_DMV_STICKER
  "1"
  WALKAROUND
}

"This enum must be sent as its integer code value."
enum CarInspection_Type {
  "0"
  CHECKIN
  "1"
  CHECKOUT
  "2"
  DAMAGE
  "3"
  RETURN
}

type CarInsurancePeriod {
  documentUrls: [Pair__CarInsurancePeriodEnt_InsuranceDocumentType_String!]!
  end: LocalDate!
  id: ID!
  policy: InsurancePolicy!
  policyNumber: String!
  policyType: InsuranceCalculator_PolicyType!
  registrant: Entity
  start: LocalDate!
  stateRegistered: String!
}

"This enum must be sent as its integer code value."
enum CarInsurancePeriodEnt_InsuranceDocumentType {
  "1"
  CERTIFICATE_OF_INSURANCE
  "0"
  ID_CARD
}

type CarLegacyStage {
  branchId: ID
  end: LocalDate!
  id: ID!
  stage: CarStageEnum!
  start: LocalDate!
}

type CarStage {
  branchId: ID!
  createdBy: User
  end: Instant
  id: ID!
  source: CarStageEnt_Source!
  stage: CarStageEncoded!
  start: Instant!
}

"""
JSON-encoded CarStage, sent as a String.

CarStage — JSON object with discriminator key "__t":
  -1 = Draft
  0 = Onboarding
  1 = Available
  2 = Rented { diamondRental: Boolean? }
  3 = Shop { reason: Shop.Reason }
  4 = Offboarding { offboardingId: ID<CarOffboardingEnt> }
  5 = Deployed
  6 = Retired { offboardingId: ID<CarOffboardingEnt> }
  7 = Transferring { transferId: ID<CarTransferEnt> }
  8 = Archived { reason: Archived.Reason }
  9 = IncompleteReturn

Shop.Reason — JSON object with discriminator key "__t":
  0 = Repair
  1 = Storage
  2 = DisposalHold

Archived.Reason — JSON object with discriminator key "__t":
  0 = Replaced { carId: ID<CarEnt> }
  1 = Canceled
"""
scalar CarStageEncoded

"This enum must be sent as its integer code value."
enum CarStageEnt_Source {
  "1"
  EXTERNAL
  "2"
  SCRIPT
  "0"
  USER
}

"This enum must be sent as its integer code value."
enum CarStageEnum {
  "8"
  ARCHIVED
  "1"
  AVAILABLE
  "5"
  DEPLOYED
  "16"
  DISPOSAL_HOLD
  "-1"
  DRAFT
  "9"
  INCOMPLETE_RETURN
  "4"
  OFFBOARDING
  "0"
  ONBOARDING
  "2"
  RENTED
  "6"
  RETIRED
  "3"
  SHOP
  "15"
  STORAGE
  "7"
  TRANSFERRING
}

"This enum must be sent as its string code value."
enum Country {
  "AR"
  ARGENTINA
  "AT"
  AUSTRIA
  "BE"
  BELGIUM
  "BR"
  BRAZIL
  "CA"
  CANADA
  "CN"
  CHINA
  "CO"
  COLOMBIA
  "CR"
  COSTA_RICA
  "CZ"
  CZECH_REPUBLIC
  "FR"
  FRANCE
  "DE"
  GERMANY
  "HU"
  HUNGARY
  "IN"
  INDIA
  "IT"
  ITALY
  "JP"
  JAPAN
  "MX"
  MEXICO
  "PL"
  POLAND
  "PT"
  PORTUGAL
  "RO"
  ROMANIA
  "SK"
  SLOVAKIA
  "SI"
  SLOVENIA
  "ZA"
  SOUTH_AFRICA
  "KR"
  SOUTH_KOREA
  "ES"
  SPAIN
  "SE"
  SWEDEN
  "TH"
  THAILAND
  "TR"
  TURKEY
  "GB"
  UNITED_KINGDOM
  "US"
  US
}

"""
JSON-encoded DocType2, sent as a String.

DocType2 — JSON object with discriminator key "__t":
  0 = Registration { state: String, country: Country, type: RegistrationType2 }
  1 = RegistrationBackpage
  2 = Title { state: String }
  3 = ElectronicTitle { type: ElectronicTitle.Type }
  4 = Tlc { type: Tlc.Type }
  5 = TitleBackpage { state: String }
  6 = TitleReceipt { state: String }
  7 = TitleReceiptBackpage { state: String }
  8 = LienRelease
  9 = FH1
  10 = CertificateOfLiability
  11 = Other
  12 = Mso
  13 = MsoBackpage
  14 = VehicleInspection { state: String }
  16 = Blank
  17 = CarSticker { type: CarSticker.Type, state: String }

Country — serialized as its string code:
  "US" = US
  "AR" = ARGENTINA
  "CA" = CANADA
  "MX" = MEXICO
  "JP" = JAPAN
  "KR" = SOUTH_KOREA
  "FR" = FRANCE
  "ES" = SPAIN
  "IN" = INDIA
  "TH" = THAILAND
  "CN" = CHINA
  "TR" = TURKEY
  "AT" = AUSTRIA
  "GB" = UNITED_KINGDOM
  "DE" = GERMANY
  "IT" = ITALY
  "BE" = BELGIUM
  "CZ" = CZECH_REPUBLIC
  "HU" = HUNGARY
  "PL" = POLAND
  "PT" = PORTUGAL
  "RO" = ROMANIA
  "SI" = SLOVENIA
  "SK" = SLOVAKIA
  "ZA" = SOUTH_AFRICA
  "BR" = BRAZIL
  "CR" = COSTA_RICA
  "CO" = COLOMBIA
  "SE" = SWEDEN

RegistrationType2 — serialized as its integer code:
  0 = REGULAR
  1 = TEMP
  2 = TEMP_TAG

ElectronicTitle.Type — serialized as its integer code:
  0 = ELT_TITLE_DETAIL
  1 = PRINTER_FRIENDLY_TITLE

Tlc.Type — serialized as its integer code:
  0 = NOTICE
  3 = CORRECTION
  4 = INSPECTION

CarSticker.Type — serialized as its integer code:
  0 = DMV_AND_REG
  1 = DIAMOND
"""
scalar DocType2Encoded

type Document {
  createdAt: Instant!
  document: Document1!
  files: [Document_File!]!
  financePartner: Entity
  id: ID!
  mimeType: String!
  owner: Entity
  type: DocType2Encoded!
  url: String!
}

union Document1 = Document_Other | Document_Title1

type Document_File {
  mimeType: String!
  url: String!
}

union Document_Lienholder = Document_Lienholder_Entity | Document_Lienholder_Unrecognized

type Document_Lienholder_Entity {
  dateOfLien: LocalDate
  id: ID!
}

type Document_Lienholder_Unrecognized {
  dateOfLien: LocalDate
  name: String!
}

type Document_Other {
  formFields: [Pair__String_String!]!
  type: Document_Other_Type!
  vin: String!
}

"This enum must be sent as its integer code value."
enum Document_Other_Type {
  "1"
  LIEN_RELEASE
}

type Document_Title1 {
  color: String
  dateAcquired: LocalDate
  financePartner: ID
  isNew: Boolean
  issueDate: LocalDate!
  lienholders: [Document_Lienholder!]!
  mileage: Int
  ownerId: ID!
  prevIssueDate: LocalDate
  prevState: String
  prevTitleNo: String
  state: String!
  titleNo: String!
  type: Document_Title1_Type!
  vehicleUse: String
  vin: String!
}

"This enum must be sent as its integer code value."
enum Document_Title1_Type {
  "1"
  TITLE
  "2"
  TITLE_RECEIPT
}

type Entity {
  addresses: [EntityEnt_AddressEntry!]!
  id: ID!
  isBuyer: Boolean!
  isDealer: Boolean!
  isFinancePartner: Boolean!
  isLienholder: Boolean!
  legalName: String!
  name: String!
  nickname: String
  primaryAddress: Address
}

type EntityEnt_AddressEntry {
  address: Address!
  isPrimary: Boolean!
}

type Fhv {
  entity: Entity!
  expirationDate: LocalDate
  id: ID!
  licenseNumber: String!
  plate: Plate
}

scalar HD

scalar Instant

"This enum must be sent as its integer code value."
enum InsuranceCalculator_PolicyType {
  "1"
  PERIOD_X
  "0"
  TLC
}

type InsurancePolicy {
  broker: BrokerEnum!
  end: LocalDate!
  issuerName: String
  policyNumber: String!
  policyType: InsuranceCalculator_PolicyType!
  start: LocalDate!
}

scalar LD

scalar LocalDate

scalar LocalDateTime

type Mutation {
  canBeRented(carId: ID): String
  checkCarStarterStatus(carId: ID!): WithError__LD__FlespiDeviceCommand!
  enableDisableCar(carId: ID, enable: Boolean!): WithError__ID__DeviceCommandEnt!
  generateInsuranceCard(carId: ID, driverName: String!): String
  locateCar(carId: ID!): WithError__LD__FlespiDeviceCommand!
  lockUnlockCarDoor(carId: ID!, lock: Boolean!): WithError__ID__DeviceCommandEnt!
}

type NycTlcSummons {
  car: Car!
  fhv: Fhv!
  id: ID!
  settled: NycTlcSummonsEnt_Settled!
  summons: NycTlcUpEngine_Summons!
}

union NycTlcSummonsEnt_Settled = NycTlcSummonsEnt_Settled_ByTask | NycTlcSummonsEnt_Settled_ByUser | NycTlcSummonsEnt_Settled_No

type NycTlcSummonsEnt_Settled_ByTask {
  timestamp: Instant
}

type NycTlcSummonsEnt_Settled_ByUser {
  timestamp: Instant!
  userId: ID!
}

type NycTlcSummonsEnt_Settled_No

type NycTlcSuspension {
  car: Car!
  fhv: Fhv!
  id: ID!
  settled: NycTlcSummonsEnt_Settled!
  summons: NycTlcSummons
  suspension: NycTlcUpEngine_Suspension!
}

"This enum must be sent as its integer code value."
enum NycTlcUpEngine_HearingDecision {
  "0"
  GUILTY
  "1"
  SCHEDULED_HEARING
}

"This enum must be sent as its integer code value."
enum NycTlcUpEngine_HearingStatus {
  "0"
  OPEN
}

type NycTlcUpEngine_Summons {
  amount: Int!
  hearingDateTime: LocalDateTime!
  hearingDecision: NycTlcUpEngine_HearingDecision!
  hearingLocation: String!
  hearingStatus: NycTlcUpEngine_HearingStatus!
  summonsNote: String!
  summonsNumber: String!
  violationAddress: String!
  violationCharge: String
  violationDate: LocalDate!
  violationType: NycTlcUpEngine_ViolationType!
}

type NycTlcUpEngine_Suspension {
  endDate: LocalDate
  note: String!
  payableFine: Boolean!
  reason: NycTlcUpEngine_SuspensionReason!
  startDate: LocalDate!
  status: NycTlcUpEngine_SuspensionStatus!
  summonsNumber: String
  suspensionNumber: String!
}

"This enum must be sent as its integer code value."
enum NycTlcUpEngine_SuspensionReason {
  "2"
  ACCOUNTS_RECEIVABLE
  "3"
  ENFORCEMENT
  "1"
  INQUEST_HEARING
  "4"
  REVOKED
  "0"
  TEMPORARY_SUSPENSION
}

"This enum must be sent as its integer code value."
enum NycTlcUpEngine_SuspensionStatus {
  "1"
  CLOSED
  "0"
  OPEN
}

"This enum must be sent as its integer code value."
enum NycTlcUpEngine_ViolationType {
  "0"
  ADMINISTRATIVE_SUMMONS
  "2"
  CONSUMER_COMPLAINT_SUMMONS
  "1"
  FIELD_SUMMONS
}

type Pair__CarInsurancePeriodEnt_InsuranceDocumentType_String {
  first: CarInsurancePeriodEnt_InsuranceDocumentType!
  second: String!
}

type Pair__ID__ButlerRegistrationEnt_Boolean {
  first: ID!
  second: Boolean!
}

type Pair__String_String {
  first: String!
  second: String!
}

type Plate {
  currentCar: Plate_CurrentCar
  fhv: Fhv
  fhvId: ID
  id: ID!
  plate: String!
  samePlateOtherType: Plate
  state: String!
  tlc: Boolean!
  type: Plate2Ent_Type!
}

"This enum must be sent as its integer code value."
enum Plate2Ent_CarStatus {
  "1"
  INSTALLED
  "3"
  TEMP_REPLACED
  "2"
  UNINSTALLED
}

type Plate2Ent_CurrentCar {
  carId: ID!
  installationId: ID!
  latestRegistrationId: ID!
  status: Plate2Ent_CarStatus!
}

"This enum must be sent as its integer code value."
enum Plate2Ent_Type {
  "0"
  REGULAR
  "1"
  TEMPORARY
}

type PlateInstallation {
  car: Car!
  currentCar: Plate2Ent_CurrentCar
  end: Instant!
  ent: PlateInstallation2Ent!
  id: ID!
  plate: Plate!
  start: Instant!
  type: Plate2Ent_Type!
  uninstalled: PlateInstallation_Uninstalled
}

type PlateInstallation2Ent {
  accountId: ID!
  carId: ID!
  createdAt: Instant!
  end: Instant!
  id: ID!
  installationType: Plate2Ent_Type!
  plateId: ID!
  registrations: [Pair__ID__ButlerRegistrationEnt_Boolean!]!
  start: Instant!
  uninstalled: PlateInstallation2Ent_Uninstalled
}

type PlateInstallation2Ent_Uninstalled {
  timestamp: Instant!
  userId: ID!
}

type PlateInstallation_Uninstalled {
  timestamp: Instant!
  user: User!
}

type Plate_CurrentCar {
  car: Car!
  installation: PlateInstallation!
  installationId: ID!
  latestRegistration: Registration!
  status: Plate2Ent_CarStatus!
}

type Query {
  getCar(id: ID!): Car
  getCars(cursor: String, hds: [HD!], vins: [String!]): WithCursor__Car!
  getFhvNycTlcSummonses(fhvId: ID!): [NycTlcSummons!]!
  getFhvNycTlcSuspensions(fhvId: ID!): [NycTlcSuspension!]!
  getSingleRecall(id: ID!): Recall
}

"This enum must be sent as its integer code value."
enum RavinTypes_DamageType2 {
  "10"
  ACCIDENT
  "4"
  CLEANING_REQUIRED
  "12"
  DAMAGE
  "1"
  DENT
  "3"
  DMVNREQ
  "9"
  EQUIPMENT
  "5"
  EXTERIOR_WALKAROUND
  "6"
  INTERIOR_WALKAROUND
  "7"
  MECHANICAL_ISSUES
  "11"
  MISSING
  "14"
  ODOR
  "13"
  SAND_DAMAGE
  "0"
  SCRATCH
  "2"
  SCRATCH_AND_DENT
  "8"
  WARNING_LIGHTS_APPLIES
}

type Recall {
  documents: [Recall_Document!]!
  id: ID!
  makeModelYearList: [Recall_MakeModelYear!]!
  mfrNotes: String
  mfrRecallNumber: String!
  nhtsaRecallNumber: String!
  recallDescription: String!
  remedyDescription: String!
  safetyRiskDescription: String
}

type Recall_Document {
  description: String!
  filename: String!
  mimeType: String!
  url: String!
}

type Recall_MakeModelYear {
  makeName: String!
  modelName: String!
  year: Int!
}

type Registration {
  car: Car
  createdAt: Instant!
  financePartner: Entity
  id: ID!
  isValid: Boolean!
  mimeType: String!
  owner: Entity
  registrant: Entity
  registration: ButlerRegistrationEnt_Registration!
  url: String!
}

type User {
  email: String!
  firstName: String!
  id: ID!
  lastName: String!
  profilePhotoUrl: String
}

type WithCursor__Car {
  cursor: String
  items: [Car!]!
}

type WithError_Error__ID__DeviceCommandEnt {
  message: String!
}

type WithError_Error__LD__FlespiDeviceCommand {
  message: String!
}

type WithError_Success__ID__DeviceCommandEnt {
  result: ID!
}

type WithError_Success__LD__FlespiDeviceCommand {
  result: LD!
}

union WithError__ID__DeviceCommandEnt = WithError_Error__ID__DeviceCommandEnt | WithError_Success__ID__DeviceCommandEnt

union WithError__LD__FlespiDeviceCommand = WithError_Error__LD__FlespiDeviceCommand | WithError_Success__LD__FlespiDeviceCommand

scalar YearMonth

scalar ZoneId