Update Part
PATCHhttps://secure.fleetio.com/api/v1/parts/:id
Update a Part
Request
Path Parameters
Possible values: Value must match regular expression ^[0-9]+$
The id of the relevant record
- application/json
Body
The part number from this Part's manufacturer.
Possible values: <= 255 characters
Possible values: >= 1
The name of the measurement unit. If the measurement unit does not exist, it will be ignored.
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
Possible values: >= 1
The name of the part category. If the part category does not exist, it will be created.
Possible values: <= 255 characters
Possible values: >= 1
The name of the part manufacturer. If the part manufacturer does not exist, it will be created.
Possible values: <= 255 characters
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.
The Universal Product Code for this Part. Must be unique.
Possible values: <= 255 characters
tire_config_attributes object
*Full details on working with Custom Fields here.
documents_attributes object[]
images_attributes object[]
Responses
- 204
- 401
- 403
- 404
- 422
- 500
OK
Request could not be authenticated
- application/json
- Schema
- Example (auto)
Schema
Possible values: >= 400
and <= 599
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Insufficient permission to perform this operation
- application/json
- Schema
- Example (auto)
Schema
Possible values: >= 400
and <= 599
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
The requested resource could not be located
- application/json
- Schema
- Example (auto)
Schema
Possible values: >= 400
and <= 599
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
Unprocessable Entity
- application/json
- Schema
- Example (auto)
- Example
Schema
errors object
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (auto)
Schema
Possible values: >= 400
and <= 599
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.
A human-readable explanation specific to this occurrence of the problem.
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
{
"status": 0,
"title": "string",
"detail": "string",
"instance": "string"
}
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
- ruby
- python
- csharp
- go
- java
- nodejs
- php
- CURL
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
}
]
}'