Create Inventory Journal Entry
POSThttps://secure.fleetio.com/api/v1/inventory_journal_entries
This endpoint provides the ability to adjust parts inventory.
Request
- application/json
Body
- anyOf
- MOD1
- MOD2
The quantity adjustment to be made to the Part
's count.
The ID of the Inventory Adjustment Reason associated with the entry.
The current quantity of the Part
after adjustments.
The ID of the Part
associated with the entry.
This ID refers to the details of the Part
at a specific Part Location
.
You can send a GET request to https://secure.fleetio.com/api/v1/parts/:id
to get any part_location_detail_id
(s) for a Part
.
The id
attribute under the part_locations
object is the value
that corresponds to this parameter.
comments_attributes object[]
The quantity adjustment to be made to the Part
's count.
The ID of the Inventory Adjustment Reason associated with the entry.
The current quantity of the Part
after adjustments.
The ID of the Part
associated with the entry.
This ID refers to the details of the Part
at a specific Part Location
.
You can send a GET request to https://secure.fleetio.com/api/v1/parts/:id
to get any part_location_detail_id
(s) for a Part
.
The id
attribute under the part_locations
object is the value
that corresponds to this parameter.
comments_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
The ID of the User
associated with the entry.
The ID of the Part
associated with the entry.
The ID of the details of this Part
at a specific Part Location
.
Not the same as part_location_id
.
The previous quantity of the Part
before any adjustments.
The current quantity of the Part
after adjustments.
The quantity adjustment made to the Part
's count.
The ID of the Work Order Part Line Item
associated with the entry.
Only applicable if the entry is associated with a Work Order
.
The ID of the Inventory Adjustment Reason associated with the entry.
How many Comments
this entry has.
The type of adjustment that triggered the entry.
Possible values: [initial
, manual
, work_order
, purchase_order
, bulk_update
, transfer
]
The ID of the Part Location
that the Part
was transferred to.
Only applicable if the entry is associated with a transfer.
The ID of the Purchase Order Line Item
associated with the entry.
Only applicable if the entry is associated with a Purchase Order
.
The ID of the Work Order
associated with the entry.
Only applicable if the entry is associated with a Work Order
.
The unit cost in cents of the Part
associated with the entry.
The total inventory value in cents of the Part
associated with the entry.
The ID of the Vendor
associated with the entry.
Only applicable if the entry is associated with a Purchase Order
.
metadata objectnullable
{
"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 (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
curl -L 'https://secure.fleetio.com/api/v1/inventory_journal_entries' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>' \
-H 'Account-Token: <Authorization>' \
-d '{
"adjustment_quantity": 0,
"inventory_adjustment_reason_id": 0,
"current_quantity": 0,
"part_id": 0,
"part_location_detail_id": 0,
"comments_attributes": [
{
"title": "string",
"comment": "string"
}
]
}'