Working with Purchase Orders

Create a new Purchase Order

Create a new purchase order record in Anvyl by making an HTTP POST request to the “​​Create new purchase order record” endpoint.

The request should contain at least “supplier[id]”, “order_items”, and “ships_on” (Target Ship Date in the UI) fields. Under the “order_items” field, part item section is required for an order, which is indicated as the “order_items[part_id]” field. The other item could be identified as “order_items[name]” as optional. In addition, “Target Ship Date” should be set as an earlier date than “Target Delivery Date”.

An example request looks like the following:
POST /purchase_orders

📘

Please note that unit_price_micros field will be your regular price multiplied by 1000000. For example, $2 will be 2000000 for the "unit_price"micros" field.

{
   "purchase_order": {
       "order_number": "Custom PO#001",
       "supplier": {
           "id": 36307
       },
       "order_items": [
           {//Part Item
               "unit_of_measure": "units",
               "part_id": 2119496,
               "quantity": 10,
               "unit_price_micros": 2000000
           },
           {//Other Item
               "unit_of_measure": "units",
               "name": "Service Fee",
               "quantity": 1,
               "unit_price_micros": 3500000
           }
       ],
       "tags": [
           "tag_1",
           "tag_2"
       ],
       "ships_on": "2023-01-15"//Target Ship Date
   }
}

What’s Next