---
updatedAt: 2025-09-10T21:00:17.000Z
agentTools:
  projectIndex: https://shipcars.readme.io/llms.txt
---

# /vehicles/{id}/set_vin/

Sets the VIN number of an identified vehicle.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "CTMS",
    "description": "Ship.Cars CTMS",
    "contact": {
      "url": "https://ship.cars",
      "email": "support@ship.cars"
    },
    "version": "1.0.0"
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "oauth2",
        "flows": {
          "password": {
            "tokenUrl": "https://auth.ship.cars/auth/realms/master/protocol/openid-connect/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://ship.cars/api"
    }
  ],
  "paths": {
    "/vehicles/{id}/set_vin/": {
      "post": {
        "tags": [
          "Vehicles"
        ],
        "description": "Sets the VIN number of an identified vehicle.",
        "operationId": "vehicles_set_vin",
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Authenticates API requests with a valid access token.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique ID of the vehicle.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "vin"
                ],
                "type": "object",
                "properties": {
                  "vin": {
                    "maxLength": 20,
                    "type": "string",
                    "description": "Vehicle VIN number."
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "load"
                  ],
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": "URL of the vehicle resource.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique ID of the vehicle.",
                      "readOnly": true
                    },
                    "vehicle_sketch": {
                      "type": "string",
                      "description": "URL of the sketch for the vehicle type (used for noting damages).",
                      "format": "uri",
                      "readOnly": true
                    },
                    "attachments": {
                      "type": "array",
                      "description": "List of attached files associated with the vehicle.",
                      "readOnly": true,
                      "items": {
                        "required": [
                          "file",
                          "load",
                          "type",
                          "vehicle"
                        ],
                        "type": "object",
                        "properties": {
                          "file": {
                            "type": "string",
                            "description": "File to be attached to the specified load or vehicle.",
                            "format": "binary"
                          },
                          "load": {
                            "type": "string",
                            "description": "URL of the load to which the file is attached.",
                            "format": "uri"
                          },
                          "vehicle": {
                            "type": "string",
                            "description": "URL of the vehicle to which the file is attached.",
                            "format": "uri"
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of the attached file.",
                            "enum": [
                              "pickup_signature",
                              "delivery_signature",
                              "pickup_sketch",
                              "delivery_sketch",
                              "pickup_damages_picture",
                              "delivery_damages_picture",
                              "pickup_odometer_picture",
                              "delivery_odometer_picture",
                              "pickup_bol",
                              "delivery_bol",
                              "invoice",
                              "dispatch_sheet",
                              "scanned_document",
                              "other"
                            ]
                          },
                          "segment": {
                            "type": "string",
                            "description": "Vehicle segment to which the attached file applies.",
                            "enum": [
                              "front",
                              "back",
                              "left",
                              "right",
                              "top"
                            ]
                          },
                          "share_with_driver": {
                            "type": "boolean",
                            "description": "Indicates whether driver users can access the attached file.",
                            "default": true
                          },
                          "location": {
                            "type": "object",
                            "properties": {
                              "coordinates": {
                                "type": "array",
                                "description": "List of coordinates associated with the entry.",
                                "items": {
                                  "type": "number",
                                  "description": "Longitude and latitude of an individual point.",
                                  "format": "float"
                                }
                              },
                              "type": {
                                "type": "string",
                                "description": "Geometry type of the entry.",
                                "example": "Point"
                              }
                            },
                            "description": "GeoJSON Geometry object with the GPS coordinates of the location associated with the attached file."
                          },
                          "comments": {
                            "type": "string",
                            "description": "Additional comments about the attached file."
                          },
                          "timestamp": {
                            "type": "string",
                            "description": "Date and time when the attached file is originally created.",
                            "format": "date-time"
                          },
                          "timezone": {
                            "maxLength": 64,
                            "type": "string",
                            "description": "Time zone in which the attached file is originally created."
                          }
                        }
                      }
                    },
                    "type": {
                      "type": "string",
                      "description": "Internal name of the vehicle type.",
                      "enum": [
                        "sedan",
                        "van",
                        "suv",
                        "pickup",
                        "motorcycle",
                        "mini-van"
                      ]
                    },
                    "human_type": {
                      "type": "string",
                      "description": "Human-readable name of the vehicle type.",
                      "readOnly": true,
                      "enum": [
                        "Sedan",
                        "Van",
                        "SUV",
                        "Pickup",
                        "Motorcycle",
                        "Mini-Van"
                      ]
                    },
                    "logo": {
                      "type": "string",
                      "description": "URL of the logo of the vehicle manufacturer.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "m22_damages": {
                      "type": "array",
                      "description": "List of damages noted for the vehicle according to the M-22 standard.",
                      "readOnly": true,
                      "items": {
                        "required": [
                          "area",
                          "severity",
                          "type"
                        ],
                        "type": "object",
                        "properties": {
                          "url": {
                            "type": "string",
                            "description": "URL of the M22 damage entry resource.",
                            "format": "uri",
                            "readOnly": true
                          },
                          "id": {
                            "type": "string",
                            "description": "Unique ID of the M22 damage entry.",
                            "readOnly": true
                          },
                          "area": {
                            "type": "string",
                            "description": "Unique code of the M-22 damage area.",
                            "enum": [
                              "01",
                              "03",
                              "04",
                              "05",
                              "06",
                              "07",
                              "08",
                              "09",
                              "10",
                              "11",
                              "12",
                              "13",
                              "14",
                              "15",
                              "16",
                              "17",
                              "20",
                              "21",
                              "22",
                              "24",
                              "25",
                              "26",
                              "27",
                              "30",
                              "31",
                              "35",
                              "36",
                              "37",
                              "38",
                              "39",
                              "42",
                              "45",
                              "52",
                              "53",
                              "56",
                              "57",
                              "59",
                              "63",
                              "64",
                              "65",
                              "72",
                              "73",
                              "74",
                              "75",
                              "76",
                              "77",
                              "78",
                              "79",
                              "80",
                              "81",
                              "82",
                              "83",
                              "84",
                              "86",
                              "89",
                              "90",
                              "91",
                              "92"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "description": "Unique code of the M-22 damage type.",
                            "enum": [
                              "01",
                              "02",
                              "03",
                              "04",
                              "05",
                              "06",
                              "07",
                              "08",
                              "09",
                              "10",
                              "11",
                              "12",
                              "13",
                              "14",
                              "18",
                              "19",
                              "20",
                              "21",
                              "22",
                              "23",
                              "24",
                              "25",
                              "29",
                              "30",
                              "34",
                              "36",
                              "37",
                              "38",
                              "39"
                            ]
                          },
                          "severity": {
                            "type": "string",
                            "description": "Unique code of the M-22 damage severity.",
                            "enum": [
                              "1",
                              "2",
                              "3",
                              "4",
                              "5",
                              "6"
                            ]
                          },
                          "inspection_type": {
                            "type": "string",
                            "description": "Vehicle inspection during which the M-22 damage is noted.",
                            "readOnly": true,
                            "enum": [
                              "pickup",
                              "delivery"
                            ]
                          },
                          "vehicle": {
                            "type": "string",
                            "description": "URL of the vehicle resource for which the M-22 damage entry is noted.",
                            "format": "uri",
                            "readOnly": true
                          },
                          "vehicle_id": {
                            "type": "string",
                            "description": "ID of the vehicle for which the M-22 damage entry is noted.",
                            "readOnly": true
                          }
                        },
                        "description": "List of damage entries noted for the vehicle according to the M-22 standard."
                      }
                    },
                    "created": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is being added to the load.",
                      "readOnly": true
                    },
                    "deleting": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is being removed from the load.",
                      "readOnly": true
                    },
                    "year": {
                      "maximum": 32767,
                      "minimum": 0,
                      "type": "integer",
                      "description": "Vehicle manufacture year."
                    },
                    "make": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Vehicle make."
                    },
                    "model": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Vehicle model."
                    },
                    "color": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Vehicle color."
                    },
                    "vin": {
                      "maxLength": 20,
                      "type": "string",
                      "description": "Vehicle VIN number."
                    },
                    "buyer_number": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Vehicle buyer number."
                    },
                    "lot_number": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Vehicle LOT number."
                    },
                    "operable": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is in operable condition."
                    },
                    "shipper_vehicle_id": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Shipper's unique ID of the vehicle."
                    },
                    "specifications_data": {
                      "type": "object",
                      "properties": {
                        "weight": {
                          "type": "object",
                          "properties": {
                            "min": {
                              "type": "integer",
                              "description": "Minimum weight of the vehicle (in pounds)."
                            },
                            "max": {
                              "type": "integer",
                              "description": "Maximum weight of the vehicle (in pounds)."
                            }
                          },
                          "description": "Range of the minimum and the maximum weight of the vehicle (in pounds)."
                        },
                        "length": {
                          "type": "object",
                          "properties": {
                            "min": {
                              "type": "number",
                              "description": "Minimum length of the vehicle (in inches).",
                              "format": "decimal"
                            },
                            "max": {
                              "type": "number",
                              "description": "Maximum length of the vehicle (in inches).",
                              "format": "decimal"
                            }
                          },
                          "description": "Range of the minimum and maximum length of the vehicle (in inches)."
                        },
                        "height": {
                          "type": "object",
                          "properties": {
                            "min": {
                              "type": "number",
                              "description": "Minimum height of the vehicle (in inches).",
                              "format": "decimal"
                            },
                            "max": {
                              "type": "number",
                              "description": "Maximum height of the vehicle (in inches).",
                              "format": "decimal"
                            }
                          },
                          "description": "Range of the minimum and maximum height of the vehicle (in inches)."
                        },
                        "width": {
                          "type": "object",
                          "properties": {
                            "min": {
                              "type": "number",
                              "description": "Minimum width of the vehicle (in inches).",
                              "format": "decimal"
                            },
                            "max": {
                              "type": "number",
                              "description": "Maximum width of the vehicle (in inches).",
                              "format": "decimal"
                            }
                          },
                          "description": "Range of the minimum and maximum width of the vehicle (in inches)."
                        }
                      },
                      "description": "Specification data of the vehicle weight, length, height, and width as retrieved from the vehicle database based on YMM combination."
                    },
                    "specifications_year": {
                      "maximum": 2147483647,
                      "minimum": 0,
                      "type": "integer",
                      "description": "Vehicle manufacture year used to retrieve data from the vehicle specification database.",
                      "readOnly": true
                    },
                    "status": {
                      "type": "string",
                      "description": "Current status of the vehicle.",
                      "readOnly": true,
                      "default": "new",
                      "enum": [
                        "new",
                        "assigned",
                        "picked-up",
                        "delivered"
                      ]
                    },
                    "pickup_odometer": {
                      "type": "string",
                      "description": "Vehicle odometer reading as recorded by the driver at the time of pickup.",
                      "format": "decimal",
                      "readOnly": true
                    },
                    "delivery_odometer": {
                      "type": "string",
                      "description": "Vehicle odometer reading as recorded by the driver at the time of delivery.",
                      "format": "decimal",
                      "readOnly": true
                    },
                    "pickup_location": {
                      "type": "object",
                      "properties": {
                        "coordinates": {
                          "type": "array",
                          "description": "List of coordinates associated with the entry.",
                          "items": {
                            "type": "number",
                            "description": "Longitude and latitude of an individual point.",
                            "format": "float"
                          }
                        },
                        "type": {
                          "type": "string",
                          "description": "Geometry type of the entry.",
                          "example": "Point"
                        }
                      },
                      "description": "GeoJSON Geometry object with the GPS coordinates of the actual pickup location.",
                      "readOnly": true
                    },
                    "pickup_location_address": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Full address of the actual pickup location (as retrieved from the GPS coordinates).",
                      "readOnly": true
                    },
                    "delivery_location": {
                      "type": "object",
                      "properties": {
                        "coordinates": {
                          "type": "array",
                          "description": "List of coordinates associated with the entry.",
                          "items": {
                            "type": "number",
                            "description": "Longitude and latitude of an individual point.",
                            "format": "float"
                          }
                        },
                        "type": {
                          "type": "string",
                          "description": "Geometry type of the entry.",
                          "example": "Point"
                        }
                      },
                      "description": "GeoJSON Geometry object with the GPS coordinates of the actual delivery location.",
                      "readOnly": true
                    },
                    "delivery_location_address": {
                      "maxLength": 256,
                      "type": "string",
                      "description": "Full address of the actual delivery location (as retrieved from the GPS coordinates).",
                      "readOnly": true
                    },
                    "pickup_night": {
                      "type": "boolean",
                      "description": "Indicates whether it's dark at the time of pickup. This is specified by the driver as an inspection impediment.",
                      "readOnly": true
                    },
                    "pickup_snow": {
                      "type": "boolean",
                      "description": "Indicates whether it's snowing at the time of pickup. This is specified by the driver as an inspection impediment.",
                      "readOnly": true
                    },
                    "pickup_rain": {
                      "type": "boolean",
                      "description": "Indicates whether it's raining at the time of pickup. This is specified by the driver as an inspection impediment.",
                      "readOnly": true
                    },
                    "pickup_dirty": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is dirty at the time of pickup. This is specified by the driver as an inspection impediment.",
                      "readOnly": true
                    },
                    "pickup_full_name": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Full name of the pickup contact who signed the BOL.",
                      "readOnly": true
                    },
                    "delivery_full_name": {
                      "maxLength": 64,
                      "type": "string",
                      "description": "Full name of the delivery contact who signed the BOL.",
                      "readOnly": true
                    },
                    "delivery_exceptions": {
                      "maxLength": 1024,
                      "type": "string",
                      "description": "Additional notes about the exceptions added by the delivery contact.",
                      "readOnly": true
                    },
                    "delivery_driver_notes": {
                      "maxLength": 1024,
                      "type": "string",
                      "description": "Driver's additional notes about the vehicle at the time of delivery.",
                      "readOnly": true
                    },
                    "pickup_driver_notes": {
                      "maxLength": 1024,
                      "type": "string",
                      "description": "Driver's additional notes about the vehicle at the time of pickup.",
                      "readOnly": true
                    },
                    "pickup_date": {
                      "type": "string",
                      "description": "Date of the actual pickup of the vehicle.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "pickup_no_damages": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is picked up without noting any damages to it.",
                      "readOnly": true
                    },
                    "delivery_date": {
                      "type": "string",
                      "description": "Date of the actual delivery of the vehicle.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "delivery_no_damages": {
                      "type": "boolean",
                      "description": "Indicates whether the vehicle is delivered without noting any damages to it.",
                      "readOnly": true
                    },
                    "seen_by_driver_time": {
                      "type": "string",
                      "description": "Date and time when the driver first saw the assigned vehicle.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "create_time": {
                      "type": "string",
                      "description": "Date and time of the original creation of the vehicle resource.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "update_time": {
                      "type": "string",
                      "description": "Date and time of the latest update of the vehicle resource.",
                      "format": "date-time",
                      "readOnly": true
                    },
                    "active_change": {
                      "type": "string",
                      "description": "URL of the resource for the latest change from an active revision related to the vehicle.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "active_revision": {
                      "type": "string",
                      "description": "URL of the resource for the active revision related to the vehicle.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "load": {
                      "type": "string",
                      "description": "URL of the resource for of the load to which the vehicle belongs.",
                      "format": "uri"
                    },
                    "pickup_signature_decline_reason": {
                      "type": "string",
                      "description": "URL of the resource for the configured reason given by the pickup contact for declining to sign the BOL.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "delivery_signature_decline_reason": {
                      "type": "string",
                      "description": "URL of the resource for the configured reason given by the delivery contact for declining to sign the BOL.",
                      "format": "uri",
                      "readOnly": true
                    },
                    "driver": {
                      "type": "string",
                      "description": "URL of the user resource for the driver to whom the vehicle is assigned (as part of the load).",
                      "format": "uri",
                      "readOnly": true
                    },
                    "active_change_id": {
                      "type": "string",
                      "description": "ID of the latest change from an active revision related to the vehicle.",
                      "readOnly": true
                    },
                    "active_revision_id": {
                      "type": "string",
                      "description": "ID of the active revision related to the vehicle.",
                      "readOnly": true
                    },
                    "load_id": {
                      "type": "string",
                      "description": "ID of the load to which the vehicle belongs.",
                      "readOnly": true
                    },
                    "pickup_signature_decline_reason_id": {
                      "type": "string",
                      "description": "ID of the configured reason given by the pickup contact for declining to sign the BOL.",
                      "readOnly": true
                    },
                    "delivery_signature_decline_reason_id": {
                      "type": "string",
                      "description": "ID of the configured reason given by the delivery contact for declining to sign the BOL.",
                      "readOnly": true
                    },
                    "driver_id": {
                      "type": "string",
                      "description": "ID of the driver to whom the vehicle is assigned (as part of the load).",
                      "readOnly": true
                    }
                  }
                },
                "example": {
                  "load_id": "00x24",
                  "active_revision_id": "pp1k0",
                  "active_change_id": "64yv",
                  "load": "https://ship.cars/api/loads/00x24/",
                  "active_revision": "https://ship.cars/api/revisions/pp1k0/",
                  "active_change": "https://ship.cars/api/changes/64yv/",
                  "update_time": "2018-05-03T16:23:51.020Z",
                  "create_time": "2018-05-03T16:18:13.745Z",
                  "status": "new",
                  "shipper_vehicle_id": "201805-02-B",
                  "operable": true,
                  "vin": "3C63J7CR3GG155352",
                  "color": "Black Crystal",
                  "model": "Pickup 3500",
                  "make": "Ram",
                  "year": 2016,
                  "deleting": false,
                  "created": true,
                  "m22_damages": [],
                  "logo": "https://storage.googleapis.com/ship-cars-make-logos/ram-logo.png",
                  "human_type": "Pickup",
                  "type": "pickup",
                  "attachments": [
                    {
                      "vehicle_id": "mvv24",
                      "load_id": "00x24",
                      "vehicle": "https://ship.cars/api/vehicles/mvv24/",
                      "create_time": "2018-05-03T16:18:15.665Z",
                      "share_with_driver": true,
                      "active": true,
                      "width": 1716,
                      "height": 657,
                      "type": "pickup_sketch",
                      "converted_timestamp": "Thursday, May 3, 2018 at 11:18 AM",
                      "load": "https://ship.cars/api/loads/00x24/",
                      "damages": [],
                      "image": {
                        "full_size": "https://media.ship.cars/media/2018-05-03T111815.352486.jpg",
                        "thumbnail": "https://media.ship.cars/media/__sized__/2018-05-03T111815.352486-thumbnail-384x216-70.jpg"
                      },
                      "file": "https://media.ship.cars/media/2018-05-03T111815.352486.jpg",
                      "id": "z54zy",
                      "url": "https://ship.cars/api/attachments/z54zy/"
                    }
                  ],
                  "vehicle_sketch": "https://media.ship.cars/media/pickup.png",
                  "id": "mvv24",
                  "url": "https://ship.cars/api/vehicles/mvv24/"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "<attribute_name>": {
                      "type": "array",
                      "description": "Name of attribute with invalid or missing value in the request body.",
                      "items": {
                        "type": "string",
                        "description": "Detailed message describing the reason for the error response."
                      }
                    }
                  },
                  "description": "List of attribute names with invalid or missing values in the request body."
                },
                "example": {
                  "vin": [
                    "Ensure this field has no more than 20 characters."
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "Authentication credentials were not provided."
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "You do not have permission to perform this action."
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "detail": {
                      "type": "string",
                      "description": "Message giving details about the reason for the error response."
                    }
                  }
                },
                "example": {
                  "detail": "Not found."
                }
              }
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "cURL",
            "source": "curl --request POST \\\n--url 'https://ship.cars/api/vehicles/mvv24/set_vin/' \\\n--header 'Authorization: Bearer <<USER_ACCESS_TOKEN>>' \\\n--header 'Content-Type: application/json' \\\n--data '{\"vin\": \"3C63J7CR3GG155352\"}'\n"
          }
        ],
        "x-codegen-request-body-name": "data",
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```