Purchase Orders

Create Purchase Orders

Creates a new Purchase Order

post/purchase_orders

Request

Request body

descriptionstring nullable
label_liststring

A comma separated list of tags associated with this record. The only delimiter allowed is a comma (,). Please remove any commas from your labels before saving the record.

vendor_idinteger
part_location_idinteger

The Fleetio ID of the Part Location for the Part being purchased.

numberinteger required

Must be unique within the scope of your Account. You can either generate your own number or leave it blank and Fleetio will generate one for you. Fleetio will use the next number in the sequence based on your existing Purchase Orders. This becomes the unique identifier, even in endpoints. Id is never used.

discount_type'fixed' | 'percentage' nullable

The type of discount applied to this record.

discount_percentagenumber float

The discount percentage. This field should be present when discount_type is set to percentage.

discountnumber

The actual value of the discount

shippingnumber

The cost of shipping

tax_1_percentagenumber

The primary tax percentage amount. This field should be present when tax_1_type is set to percentage.

tax_1number float

The primary tax amount.

tax_1_type'fixed' | 'percentage' nullable

The type of tax to apply to this record.

tax_2_percentagenumber

The secondary tax percentage amount. This field should be present when tax_2_type is set to percentage. Note that this secondary tax must be configured in your Account Settings.

tax_2number float

The secondary tax amount. Note that this secondary tax must be configured in your Account Settings.

tax_2_type'fixed' | 'percentage' nullable

The type of tax to apply to this record.

custom_fieldsCustomFields nullable

*Full details on working with Custom Fields here.

Example request

{
  "label_list": "High Priority",
  "number": 1207
}

Response

OK

idinteger required
created_atstring date-time

The date and time at which this record was created.

updated_atstring date-time

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

discount_type'fixed' | 'percentage' nullable required

The type of discount applied to this record.

discount_percentagenumber float nullable required

The discount percentage. This field should be present when discount_type

is set to percentage.

discount_centsinteger nullable

The discount amount in cents.

tax_1_type'fixed' | 'percentage' nullable required

The type of tax to apply to this record.

tax_1_percentagenumber float nullable required

The primary tax percentage amount. This field should be present when tax_1_type is set to percentage.

tax_1_centsinteger nullable

The primary tax amount in cents.

tax_2_type'fixed' | 'percentage' nullable required

The type of tax to apply to this record.

tax_2_percentagenumber float nullable required

The secondary tax percentage amount. This field should be present when tax_2_type is set to percentage. Note that this secondary tax must be configured in your Account Settings.

tax_2_centsinteger nullable

The secondary tax amount in cents.

shipping_centsinteger nullable

The shipping amount in cents.

account_idinteger required
numberinteger required

Must be unique within the scope of your Account. You can either generate your own number or leave it blank and Fleetio will generate one for you. Fleetio will use the next number in the sequence based on your existing Purchase Orders. This becomes the unique identifier, even in endpoints. Id is never used.

descriptionstring nullable required

Open text field for Purchase Order description.

label_liststring[] required

A list of tags associated with this record.

submitted_for_approval_atstring date-time nullable required

The date and time at which this Purchase Order was submitted for approval.

rejected_atstring date-time nullable required

The date and time at which this Purchase Order was rejected.

approved_atstring date-time nullable required

The date and time at which this Purchase Order was approved.

purchased_atstring date-time nullable required

The date and time at which this Purchase Order was purchased.

received_partial_atstring date-time nullable required

The date and time at which this Purchase Order was partially received.

received_full_atstring date-time nullable required

The date and time at which this Purchase Order was fully received.

closed_atstring date-time nullable required

The date and time at which this Purchase Order was closed.

state'draft' | 'submitted_for_approval' | 'rejected' | 'approved' | 'purchased' | 'received_partial' | 'received_full' | 'closed' nullable required

See the Purchase Order Lifecycle Guide for more information about Purchase Order states and how to transition between them.

custom_fieldsCustomFields nullable required

*Full details on working with Custom Fields here.

part_location_idinteger nullable required

The ID of the Part Location associated with this Purchase Order. Optional in the draft state.

vendor_idinteger nullable required

The ID of the Vendor associated with this Purchase Order.

purchase_order_status_idinteger nullable
created_by_idinteger nullable

The ID of the Vendor associated with the User who created this Purchase Order.

rejected_by_idinteger nullable

The ID of the Vendor associated with the User who closed this Purchase Order.

submitted_for_approval_by_idinteger nullable

The ID of the Vendor associated with the User who submitted this Purchase Order for approval.

approved_by_idinteger nullable

The ID of the Vendor associated with the User who approved this Purchase Order.

purchased_by_idinteger nullable

The ID of the Vendor associated with the User who purchased this Purchase Order.

received_partial_by_idinteger nullable

The ID of the Vendor associated with the User who partially received this Purchase Order.

received_full_by_idinteger nullable

The ID of the Vendor associated with the User who fully received this Purchase Order.

closed_by_idinteger nullable

The ID of the Vendor associated with the User who closed this Purchase Order.

documents_countinteger nullable required

The number of documents attached to this Purchase Order.

comments_countinteger nullable required

The number of Comments on this Purchase Order.

subtotal_centsinteger nullable

The subtotal amount in cents.

total_amount_centsinteger nullable

The total amount in cents.

watchers_countinteger

The count of watchers associated with the record.

watchable_optionsobject

Options related to watching the record.

bulk_watch_recordboolean

Indicates if a bulk watch record is created.

skip_automatic_watchers_callbacksboolean

Indicates if automatic watchers callbacks are skipped.

Example response

{
  "created_at": "2023-03-14T13:46:27-06:00",
  "updated_at": "2023-03-14T13:46:27-06:00",
  "discount_percentage": 1.23,
  "tax_1_percentage": 1.23,
  "tax_1_cents": 123,
  "tax_2_percentage": 1.23,
  "number": 1207,
  "label_list": [
    "High Priority"
  ],
  "submitted_for_approval_at": "2023-03-14T13:46:27-06:00",
  "rejected_at": "2023-03-14T13:46:27-06:00",
  "approved_at": "2023-03-14T13:46:27-06:00",
  "purchased_at": "2023-03-14T13:46:27-06:00",
  "received_partial_at": "2023-03-14T13:46:27-06:00",
  "received_full_at": "2023-03-14T13:46:27-06:00",
  "closed_at": "2023-03-14T13:46:27-06:00"
}

Changes

No recorded changes to this operation across all 6 revisions of this API.