Create Part
POSThttps://secure.fleetio.com/api/v1/parts
Creates a new Part
Request
- 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
- 201
- 401
- 403
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (auto)
Schema
Possible values: >= 1
The date and time at which this record was created.
2023-03-14T13:46:27-06:00
The date and time at which this record was most recently updated.
2023-03-14T13:46:27-06:00
Possible values: >= 1
A description of this Part.
The part number from this Part's manufaturer.
Possible values: >= 1
A unique number for this Part. Does not have to be the same as the manufacturer's number.
Possible values: >= 1
Possible values: >= 1
The Universal Product Code for this Part.
*Full details on working with Custom Fields here.
The unit cost for this Part in cents.
The average unit cost for this Part in cents.
The number of images attached to this Part.
The number of documents attached to this Part.
The number of Comments
attached to this Part.
The date and time at which this Part was archived.
2023-03-14T13:46:27-06:00
measurement_unit objectnullable
Indicates whether this Part has any active Inventory Sets.
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"account_id": 0,
"description": "string",
"manufacturer_part_number": "string",
"measurement_unit_id": 0,
"number": "string",
"part_category_id": 0,
"part_manufacturer_id": 0,
"upc": "string",
"custom_fields": {},
"unit_cost_cents": 0,
"average_unit_cost_cents": 0,
"images_count": 0,
"documents_count": 0,
"comments_count": 0,
"archived_at": "2023-03-14T13:46:27-06:00",
"measurement_unit": {
"id": 0,
"name": "string",
"description": "string",
"symbol": "string"
},
"has_active_inventory_sets": true
}
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"
}
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