Skip to main content

Update Part

PATCH 

https://secure.fleetio.com/api/v1/parts/:id

Update a Part

Request

Path Parameters

    id stringrequired

    Possible values: Value must match regular expression ^[0-9]+$

    The id of the relevant record

Body

    descriptionstring
    manufacturer_part_numberstring

    The part number from this Part's manufacturer.

    Possible values: <= 255 characters

    measurement_unit_idId (integer)

    Possible values: >= 1

    measurement_unit_namestring

    The name of the measurement unit. If the measurement unit does not exist, it will be ignored.

    numberstring

    The part number to be used for this Part within Fleetio. Must be unique. Does not have to be the same as the manufacturer's part number.

    Possible values: <= 255 characters

    part_category_idId (integer)

    Possible values: >= 1

    part_category_namestring

    The name of the part category. If the part category does not exist, it will be created.

    Possible values: <= 255 characters

    part_manufacturer_idId (integer)

    Possible values: >= 1

    part_manufacturer_namestring

    The name of the part manufacturer. If the part manufacturer does not exist, it will be created.

    Possible values: <= 255 characters

    unit_costnumber

    The cost per unit of this Part, which will be interpreted as dollars, or dollars and cents. May be sent as a string, integer, or float. Value may be up to two decimal places.

    upcstring

    The Universal Product Code for this Part. Must be unique.

    Possible values: <= 255 characters

    tire_config_attributes object

    :::info tire_config_attributes are available to accounts on Premium plans :::

    Parts that have a Part Category where tire_category is true can have a TireConfg which are tire-specific Part attributes.

    aspect_ratiofloat

    Aspect ratio of tire.

    rim_diameterfloat

    Rim diameter of tire.

    load_indexfloat

    Load index of tire.

    metric_typestring

    Metric type of tire.

    Possible values: [EU, P, HL, T, LT, C, ST]

    widthfloat

    Width of tire.

    constructionstring

    Construction type of tire.

    Possible values: [B, R, D]

    speed_ratingstring

    Speed rating of tire.

    Possible values: [A1, A2, A3, A4, A5, A6, A7, A8, B, C, D, E, F, G, H, J, K, L, M, N, P, Q, R, S, T, U, V, W, Y]

    factory_tread_depthfloat

    factory_tread_depth support is currently in private beta.

    Tread depth of tire in /32" when new, as specified by the manufacturer.

    minimum_tread_depthfloat

    minimum_tread_depth support is currently in private beta.

    The legal minimum tread depth, in /32".

    life_expectancyinteger

    life_expectancy support is currently in private beta.

    The Life Expectancy or “Warranty” of a tire is the expected meter range, usually measured in miles, of a given tire as specified by the manufacturer.

    custom_fieldsobjectnullable

    *Full details on working with Custom Fields here.

    documents_attributes object[]

    An array of one or more document objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain file_url.

  • Array [
  • namestring

    The name to give the file which will be shown in the UI.

    Possible values: <= 255 characters

    file_urlstring

    The URL obtained from our storage provider that points to the file.

    Possible values: <= 255 characters

    file_mime_typestring

    The MIME type of the file. For example, application/pdf.

    Possible values: <= 255 characters

    file_namestring

    The name of the file.

    Possible values: <= 255 characters

    file_sizeinteger

    The size of the file in bytes.

  • ]
  • images_attributes object[]

    An array of one or more image objects to add to the record. Follow our Attaching Documents and Images guide to upload to our third party storage provider in order to obtain file_url.

  • Array [
  • namestring

    The name to give the image which will be shown in the UI.

    Possible values: <= 255 characters

    file_urlstring

    The URL obtained from our storage provider that points to the image.

    Possible values: <= 255 characters

    file_mime_typestring

    The MIME type of the image. For example, image/png.

    Possible values: <= 255 characters

    file_namestring

    The name of the image.

    Possible values: <= 255 characters

    file_sizeinteger

    The size of the image file in bytes.

  • ]

Responses

OK

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: Prefix the value with "Token", for example: "Token 76cbe06c49a64".
You can generate a new API key [here](https://secure.fleetio.com/api_keys).
name: Account-Tokentype: apiKeyin: headerdescription: You can find your Account-Token [here](https://secure.fleetio.com/api_keys)
curl -L -X PATCH 'https://secure.fleetio.com/api/v1/parts/:id' \
-H 'Content-Type: application/json' \
-H 'Authorization: <Authorization>' \
-H 'Account-Token: <Authorization>' \
-d '{
"description": "string",
"manufacturer_part_number": "string",
"measurement_unit_id": 0,
"measurement_unit_name": "string",
"number": "string",
"part_category_id": 0,
"part_category_name": "string",
"part_manufacturer_id": 0,
"part_manufacturer_name": "string",
"unit_cost": 0,
"upc": "string",
"tire_config_attributes": {
"aspect_ratio": 0,
"rim_diameter": 0,
"load_index": 0,
"metric_type": "EU",
"width": 0,
"construction": "B",
"speed_rating": "A1",
"factory_tread_depth": 0,
"minimum_tread_depth": 0,
"life_expectancy": 0
},
"custom_fields": {},
"documents_attributes": [
{
"name": "string",
"file_url": "string",
"file_mime_type": "string",
"file_name": "string",
"file_size": 0
}
],
"images_attributes": [
{
"name": "string",
"file_url": "string",
"file_mime_type": "string",
"file_name": "string",
"file_size": 0
}
]
}'
Request Collapse all
Base URL
https://secure.fleetio.com/api
Auth
Parameters
— pathrequired
Body
{
  "description": "string",
  "manufacturer_part_number": "string",
  "measurement_unit_id": 0,
  "measurement_unit_name": "string",
  "number": "string",
  "part_category_id": 0,
  "part_category_name": "string",
  "part_manufacturer_id": 0,
  "part_manufacturer_name": "string",
  "unit_cost": 0,
  "upc": "string",
  "tire_config_attributes": {
    "aspect_ratio": 0,
    "rim_diameter": 0,
    "load_index": 0,
    "metric_type": "EU",
    "width": 0,
    "construction": "B",
    "speed_rating": "A1",
    "factory_tread_depth": 0,
    "minimum_tread_depth": 0,
    "life_expectancy": 0
  },
  "custom_fields": {},
  "documents_attributes": [
    {
      "name": "string",
      "file_url": "string",
      "file_mime_type": "string",
      "file_name": "string",
      "file_size": 0
    }
  ],
  "images_attributes": [
    {
      "name": "string",
      "file_url": "string",
      "file_mime_type": "string",
      "file_name": "string",
      "file_size": 0
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!