Skip to main content

Create Inventory Journal Entry

POST 

https://secure.fleetio.com/api/v1/inventory_journal_entries

This endpoint provides the ability to adjust parts inventory.

Request

Body

    anyOf
    adjustment_quantityfloatrequired

    The quantity adjustment to be made to the Part's count.

    inventory_adjustment_reason_idintegerrequired

    The ID of the Inventory Adjustment Reason associated with the entry.

    current_quantityfloat

    The current quantity of the Part after adjustments.

    part_idintegerrequired

    The ID of the Part associated with the entry.

    part_location_detail_idintegerrequired

    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[]
  • Array [
  • titlestring

    The title of the comment.

    commentstring

    The comment text.

  • ]

Responses

OK

Response Headers
    Schema
      idId (integer)required

      Possible values: >= 1

      created_atdate-time

      The date and time at which this record was created.

      Example: 2023-03-14T13:46:27-06:00
      updated_atdate-time

      The date and time at which this record was most recently updated.

      Example: 2023-03-14T13:46:27-06:00
      account_idId (integer)required

      Possible values: >= 1

      user_idintegerrequired

      The ID of the User associated with the entry.

      part_idintegerrequired

      The ID of the Part associated with the entry.

      part_location_detail_idintegerrequired

      The ID of the details of this Part at a specific Part Location. Not the same as part_location_id.

      previous_quantitystringrequired

      The previous quantity of the Part before any adjustments.

      current_quantitystringrequired

      The current quantity of the Part after adjustments.

      adjustment_quantitystringrequired

      The quantity adjustment made to the Part's count.

      work_order_part_line_item_idintegernullablerequired

      The ID of the Work Order Part Line Item associated with the entry. Only applicable if the entry is associated with a Work Order.

      inventory_adjustment_reason_idintegernullablerequired

      The ID of the Inventory Adjustment Reason associated with the entry.

      comments_countintegerrequired

      How many Comments this entry has.

      adjustment_typestringrequired

      The type of adjustment that triggered the entry.

      Possible values: [initial, manual, work_order, purchase_order, bulk_update, transfer]

      transfer_part_location_idintegernullablerequired

      The ID of the Part Location that the Part was transferred to. Only applicable if the entry is associated with a transfer.

      purchase_order_line_item_idintegernullablerequired

      The ID of the Purchase Order Line Item associated with the entry. Only applicable if the entry is associated with a Purchase Order.

      work_order_idintegernullablerequired

      The ID of the Work Order associated with the entry. Only applicable if the entry is associated with a Work Order.

      unit_cost_centsstringnullable

      The unit cost in cents of the Part associated with the entry.

      total_inventory_value_centsstringnullable

      The total inventory value in cents of the Part associated with the entry.

      vendor_idintegernullablerequired

      The ID of the Vendor associated with the entry. Only applicable if the entry is associated with a Purchase Order.

      metadata objectnullable

      Additional metadata about the entry.

      idinteger

      The ID of the associated record.

      numberstring

      The number of the associated record.

      typestring

      Possible values: [PurchaseOrder, WorkOrder]

    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 '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"
    }
    ]
    }'
    Request Collapse all
    Base URL
    https://secure.fleetio.com/api
    Auth
    Body
    {
      "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"
        }
      ]
    }
    
    ResponseClear

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