Create Inventory Journal Entry
This endpoint provides the ability to adjust parts inventory.
- application/json
Request Body
- MOD1
- MOD2
- adjustment_quantity float required
The quantity adjustment to be made to the
Part
's count. - inventory_adjustment_reason_id integer required
The ID of the Inventory Adjustment Reason associated with the entry.
- current_quantity float
The current quantity of the
Part
after adjustments. - part_id integer required
The ID of the
Part
associated with the entry. - part_location_detail_id integer required
This ID refers to the details of the
Part
at a specificPart Location
. You can send a GET request tohttps://secure.fleetio.com/api/v1/parts/:id
to get anypart_location_detail_id
(s) for aPart
. Theid
attribute under thepart_locations
object is the value that corresponds to this parameter. comments_attributes object[]
title stringThe title of the comment.
comment stringThe comment text.
- adjustment_quantity float
The quantity adjustment to be made to the
Part
's count. - inventory_adjustment_reason_id integer required
The ID of the Inventory Adjustment Reason associated with the entry.
- current_quantity float required
The current quantity of the
Part
after adjustments. - part_id integer required
The ID of the
Part
associated with the entry. - part_location_detail_id integer required
This ID refers to the details of the
Part
at a specificPart Location
. You can send a GET request tohttps://secure.fleetio.com/api/v1/parts/:id
to get anypart_location_detail_id
(s) for aPart
. Theid
attribute under thepart_locations
object is the value that corresponds to this parameter. comments_attributes object[]
title stringThe title of the comment.
comment stringThe comment text.
- 201
- 401
- 403
- 422
- 500
OK
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- id integer
Possible values:
>= 1
- created_at date-time
The date and time at which this record was created.
- updated_at date-time
The date and time at which this record was most recently updated.
- account_id integer
Possible values:
>= 1
- user_id integer
The ID of the
User
associated with the entry. - part_id integer
The ID of the
Part
associated with the entry. - part_location_detail_id integer
The ID of the details of this
Part
at a specificPart Location
. Not the same aspart_location_id
. - previous_quantity string
The previous quantity of the
Part
before any adjustments. - current_quantity string
The current quantity of the
Part
after adjustments. - adjustment_quantity string
The quantity adjustment made to the
Part
's count. - work_order_part_line_item_id integer
The ID of the
Work Order Part Line Item
associated with the entry. Only applicable if the entry is associated with aWork Order
. - inventory_adjustment_reason_id integer
The ID of the Inventory Adjustment Reason associated with the entry.
- comments_count integer
How many
Comments
this entry has. - adjustment_type string
Possible values: [
initial
,manual
,work_order
,purchase_order
,bulk_update
,transfer
]The type of adjustment that triggered the entry.
- transfer_part_location_id integer
The ID of the
Part Location
that thePart
was transferred to. Only applicable if the entry is associated with a transfer. - purchase_order_line_item_id integer
The ID of the
Purchase Order Line Item
associated with the entry. Only applicable if the entry is associated with aPurchase Order
. - work_order_id integer
The ID of the
Work Order
associated with the entry. Only applicable if the entry is associated with aWork Order
. - unit_cost_cents string
The unit cost in cents of the
Part
associated with the entry. - total_inventory_value_cents string
The total inventory value in cents of the
Part
associated with the entry. - vendor_id integer
The ID of the
Vendor
associated with the entry. Only applicable if the entry is associated with aPurchase Order
. metadata object
Additional metadata about the entry.
id integerThe ID of the associated record.
number stringThe number of the associated record.
type stringPossible values: [
PurchaseOrder
,WorkOrder
]
{
"id": 0,
"created_at": "2023-03-14T13:46:27-06:00",
"updated_at": "2023-03-14T13:46:27-06:00",
"account_id": 0,
"user_id": 0,
"part_id": 0,
"part_location_detail_id": 0,
"previous_quantity": "string",
"current_quantity": "string",
"adjustment_quantity": "string",
"work_order_part_line_item_id": 0,
"inventory_adjustment_reason_id": 0,
"comments_count": 0,
"adjustment_type": "initial",
"transfer_part_location_id": 0,
"purchase_order_line_item_id": 0,
"work_order_id": 0,
"unit_cost_cents": "string",
"total_inventory_value_cents": "string",
"vendor_id": 0,
"metadata": {
"id": 0,
"number": "string",
"type": "PurchaseOrder"
}
}
Request could not be authenticated
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
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.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
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 (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
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.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
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 (from schema)
- Example
Schema
errors object
typeitems string
{
"errors": {}
}
{
"errors": {
"field1": [
"error1",
"error2"
],
"field2": [
"error3"
]
}
}
Something unexpected happened
- application/json
- Schema
- Example (from schema)
Schema
- status integer
Possible values:
>= 400
and<= 599
- title string
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.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- instance string
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"
}