{
    "swagger": "2.0",
    "info": {
        "title": "Autonomy Phyron API",
        "description": "API details for Phyron interacting with Autonomy admin system.",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://my.getautonomy.co.uk",
            "description": "Production server"
        },
        {
            "url": "https://my.autonomystage.mtcserver.com",
            "description": "Test server"
        }
    ],
    "basePath": "\/",
    "consumes": [
        "application\/json"
    ],
    "produces": [
        "application\/json"
    ],
    "paths": {
        "\/api\/v1\/phyron\/sites": {
            "get": {
                "summary": "List sites available",
                "description": "Provides a list of sites with endpoints for each of the sites vehicle list",
                "deprecated": false,
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "site": {
                                            "type": "string",
                                            "description": "Site identifier"
                                        },
                                        "stock_endpoint": {
                                            "type": "string",
                                            "description": "URL to stock listing for site"
                                        },
                                        "vdp_endpoint": {
                                            "type": "string",
                                            "description": "URL to VDP endpoint for site"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "Invalid Auth token"
                    }
                },
                "parameters": [
                    {
                        "in": "body",
                        "name": "body",
                        "description": "",
                        "schema": {
                            "type": "object",
                            "required": [
                                "api_token",
                                "site",
                                "vehicle_id"
                            ],
                            "properties": {
                                "api_token": {
                                    "type": "string",
                                    "description": "API Auth token"
                                }
                            }
                        }
                    }
                ]
            }
        },
        "\/api\/v1\/phyron\/notification": {
            "post": {
                "summary": "Vehicle media notification",
                "description": "Provide details of vehicle media (images/video) to Autonomy",
                "deprecated": false,
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "description": "receive confirmation"
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "in": "body",
                        "name": "body",
                        "description": "",
                        "schema": {
                            "type": "object",
                            "required": [
                                "api_token",
                                "site",
                                "vehicle_id"
                            ],
                            "properties": {
                                "api_token": {
                                    "type": "string"
                                },
                                "site": {
                                    "type": "string"
                                },
                                "video": {
                                    "type": "string"
                                },
                                "images": {
                                    "type": "array",
                                    "items": {
                                        "type": "string"
                                    }
                                },
                                "vehicle_id": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                ]
            }
        },
        "\/api\/v1\/phyron\/{site}\/stock": {
            "get": {
                "summary": "Stock listing for site",
                "description": "Contains basic details of vehicles",
                "deprecated": false,
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dealer_id": {
                                            "type": "string",
                                            "description": "Vehicle dealership assignment"
                                        },
                                        "vehicle_id": {
                                            "type": "string",
                                            "description": "Vehicle UUID"
                                        },
                                        "full_registration": {
                                            "type": "string",
                                            "description": "Vehicle registration number"
                                        },
                                        "make": {
                                            "type": "string",
                                            "description": "Name of vehicle make"
                                        },
                                        "model": {
                                            "type": "string",
                                            "description": "Name of vehicle model"
                                        },
                                        "variant": {
                                            "type": "string",
                                            "description": "Vehicle variant name"
                                        },
                                        "image_count": {
                                            "type": "number",
                                            "description": "Number of images vehicle is assigned"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "site",
                        "type": "string",
                        "required": true,
                        "description": "Site identifier"
                    },
                    {
                        "in": "path",
                        "name": "api_token",
                        "type": "string",
                        "required": true,
                        "description": "API Auth token"
                    }
                ]
            }
        },
        "\/api\/v1\/phyron\/{site}\/vdp": {
            "get": {
                "summary": "Vehicle Detail list for site",
                "description": "Provides list of vehicles with full details",
                "deprecated": false,
                "responses": {
                    "403": {
                        "description": "Invalid Auth token"
                    },
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "dealer_ID": {
                                            "type": "string",
                                            "description": "Vehicle dealership assignment"
                                        },
                                        "Vehicle_ID": {
                                            "type": "string",
                                            "description": "Vehicle UUID"
                                        },
                                        "FullRegistration": {
                                            "type": "string",
                                            "description": "Vehicle registration number"
                                        },
                                        "Colour": {
                                            "type": "string",
                                            "description": "Colour of the vehicle"
                                        },
                                        "FuelType": {
                                            "type": "string",
                                            "description": "Fuel type of vehicle"
                                        },
                                        "Year": {
                                            "type": "string",
                                            "description": "Manufacture year of vehicle"
                                        },
                                        "Mileage": {
                                            "type": "string",
                                            "description": "Odometer reading in miles"
                                        },
                                        "Bodytype": {
                                            "type": "string",
                                            "description": "Body type"
                                        },
                                        "Doors": {
                                            "type": "string",
                                            "description": "Door count"
                                        },
                                        "Make": {
                                            "type": "string",
                                            "description": "Name of vehicle make"
                                        },
                                        "Model": {
                                            "type": "string",
                                            "description": "Name of vehicle model"
                                        },
                                        "Variant": {
                                            "type": "string",
                                            "description": "Vehicle variant name"
                                        },
                                        "EngineSize": {
                                            "type": "string",
                                            "description": "Engine size in cc"
                                        },
                                        "Price": {
                                            "type": "string",
                                            "description": "Vehicle price"
                                        },
                                        "Transmission": {
                                            "type": "string",
                                            "description": "Transmission type"
                                        },
                                        "FourWheelDrive": {
                                            "type": "string",
                                            "description": "Y/N whether vehicle has four wheel drive"
                                        },
                                        "Images": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "List of images"
                                        },
                                        "Options": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            },
                                            "description": "Features/specs of the vehicle"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "in": "path",
                        "name": "site",
                        "type": "string",
                        "required": true,
                        "description": "Site Identifier"
                    },
                    {
                        "in": "path",
                        "name": "api_token",
                        "type": "string",
                        "required": true,
                        "description": "API Auth token"
                    }
                ]
            }
        }
    }
}
