An Autotrader API library for Dart developers


[x] Authentication [x] Vehicle info with valuations


import 'package:chopper/chopper.dart';
import 'package:dart_autotrader/dart_autotrader.dart';

Future<void> main() async {
  final chopper = ChopperClient(
    baseUrl: Uri.parse(""),
    converter: MapperConverter(),

  final at = Autotrader.create(chopper);

  final tokenResponse =
      await at.authenticate(key: 'my-api-key', secret: 'my-secret');

  final token = tokenResponse.body?.accessToken;

  if (!tokenResponse.isSuccessful || token == null) {
    throw Exception('Failed to get token');

  final response = await at.getServiceStockManagementVehicleValuation(
    registration: 'AB12CDE',
    odometerReadingMiles: 8000,
    token: "Bearer $token",

  if (response.isSuccessful) {
  } else {
    print('Error (${response.statusCode}): ${response.error}');

Additional information

Issues and feature requests can be filed here.

API was created according to the official Autotrader API documentation


View Github