purchase_order

Create Purchase Order

Create a new purchase order.

post/purchase-orders

Request

  • Base URL: https://app.zenventory.com/rest
  • URL: https://app.zenventory.com/rest/purchase-orders
  • Auth: none declared

Request body

supplierIdinteger required

Id of the supplier that is being ordered from.

supplierNamestring required

Name of the supplier that is being ordered from. Ignored if supplierId is provided.

warehouseIdinteger

Id of the warehouse the items will be delivered to. If no warehouse parameters are given, then the user's current warehouse will be used.

warehouseNamestring

Name of the warehouse the items will be delivered to. Ignored if warehouseId is provided.

clientIdinteger

Id of the client that the purchase order is for. Defaults to the user's client id.

clientNamestring

Name of the client that the purchase order is for. Ignored if clientId is provided and is nonzero.

orderNumberstring

Order number for the purchase order. If blank, one will automatically be generated.

draftboolean

True if the purchase order should be created as a draft to allow future editing.

requiredByDatestring date
projectNumberstring
notesstring
shipMethodstring
termsstring
userField1string
userField2string
userField3string
purchasedForClientboolean

Can only be true if the purchase order is for a client.

Response

Success

idinteger
orderNumberstring
draftboolean
completedboolean
deletedboolean
createdDatestring date-time
preparedDatestring date-time
requiredByDatestring date
projectNumberstring
notesstring
shipMethodstring
termsstring
userField1string
userField2string
userField3string

Example response

{
  "id": 333,
  "orderNumber": "PO#375",
  "supplier": {
    "id": 35,
    "name": "Gift"
  },
  "warehouse": {
    "id": 1,
    "name": "Main Warehouse"
  },
  "client": {
    "id": 3,
    "name": "Hardware Store"
  },
  "user": {
    "id": 1,
    "name": "Mr Sparks"
  },
  "draft": true,
  "createdDate": "2020-12-02T10:24:26-07:00",
  "requiredByDate": "2020-12-02",
  "items": [
    {
      "id": 456,
      "itemId": 2306,
      "sku": "FumoFumo-002",
      "description": "Marisa Kirisame",
      "quantity": 10,
      "uom": "Each",
      "unitCost": 20
    },
    {
      "id": 457,
      "itemId": 2330,
      "sku": "FumoFumo-006",
      "description": "Alice Margatroid",
      "quantity": 10,
      "uom": "Each",
      "unitCost": 20
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.