Skip to main content

Create Purchase Order Line Item

POST 

https://secure.fleetio.com/api/v1/purchase_orders/:number/purchase_order_line_items

Creates a new Line Item for the associated Purchase Order

Request

Path Parameters

    number stringrequired

    Possible values: Value must match regular expression ^[0-9]+$

    The Purchase Order Number

Body

    part_idintegerrequired

    The Fleetio ID of the Part being purchased.

    Possible values: >= 1

    quantityintegerrequired

    How many of this Part to be purchased.

    Possible values: >= 0

    unit_costfloatrequired

    The cost of this Part (per unit).

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_idinteger
      purchase_order_idinteger
      part_idinteger

      The Fleetio ID of the Part being purchased.

      Possible values: >= 1

      quantitystringnullable

      The quantity of this Part to be purchased.

      Example: 1.23
      total_quantity_receivedstringnullable

      The quantity of this Part which was received.

      Example: 1.23
      unit_coststringnullable

      The cost of this Part (per unit).

      Example: 1.23
      subtotal_centsintegernullable

      The pre-tax subtotal amount.

      Example: 1234

    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/purchase_orders/:number/purchase_order_line_items' \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -H 'Authorization: Token <Authorization>' \
    -H 'Account-Token: <Authorization>' \
    -d '{
    "part_id": 0,
    "quantity": 0,
    "unit_cost": 0
    }'
    Request Collapse all
    Base URL
    https://secure.fleetio.com/api
    Auth
    Parameters
    — pathrequired
    Body
    {
      "part_id": 0,
      "quantity": 0,
      "unit_cost": 0
    }
    
    ResponseClear

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