{
    "openapi": "3.0.3",
    "info": {
        "title": "CarLogs Vehicle Data API",
        "version": "1.0.0",
        "description": "Vehicle decode, NHTSA recalls and complaints, crash-test ratings, EPA fuel economy, market value range and cost to own. Vehicle data only — never owner information. 1 credit per successful call."
    },
    "servers": [
        {
            "url": "https://carlogs.xyz/api/v1"
        }
    ],
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key from https://carlogs.xyz/developers"
            }
        }
    },
    "paths": {
        "/vehicle/{vin}": {
            "get": {
                "summary": "Everything on record for one VIN",
                "security": [
                    {
                        "bearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "vin",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "minLength": 17,
                            "maxLength": 17
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Vehicle data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Out of credits",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "VIN could not be decoded (not charged)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit: 60 requests per minute",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/model/{make}/{model}/{year}": {
            "get": {
                "summary": "Model-year data: recalls, complaints, ratings, MPG, value",
                "security": [
                    {
                        "bearer": []
                    }
                ],
                "parameters": [
                    {
                        "name": "make",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "model",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Model-year data",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid API key",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "402": {
                        "description": "Out of credits",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Model year not on record (not charged)",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}