API Version 2
  • API V2 Overview
  • Category
    • Company
      • Customers
        • Orders
          • Pages
            • Page Templates
              • Products
                • Purchase Orders
                  • SKUs
                    • Support Tickets
                      • Tax Regions
                        • Vendors
                          • Warehouses
                            API Documentation

                            PurchaseOrders/create

                            Type Create
                            List Purchase Orders
                            URL http://{domain}/api/v2/PurchaseOrders/create.json
                            Accepts Filters No
                            Output Attributes
                            No


                            Create Purchase Orders

                            These parameters are used for creating Purchase Orders
                            Parameter Type Required Notes
                            Example
                            vendor int Yes The ID of the vendor
                            2
                            vendor_contact int Yes
                            The ID of the vendor contact 1
                            warehouse
                            int
                            Yes The ID of the warehouse
                            1
                            fob string No Freight On Board

                            terms int No The ID of the Terms & Conditions
                            3
                            po_term int No See PO Term below
                            5
                            date_issued int No

                            due_date int No

                            notes string No
                            These are some notes
                            placed int
                            No
                            871708681
                            draft boolean
                            No Set the PO to Draft status
                            true



                            Purchase Order Term
                            1 COD
                            2 Check
                            3 Credit Card
                            4 CIA
                            5 Net 15
                            6
                            Net 30
                            7
                            Net 45
                            8
                            Net 60
                            9
                            Net 90

                            Request

                            Example cURL sent
                            curl --location --request POST 'https://{yourdomain}/api/v2/PurchaseOrders/create.json' 
                            --header 'Content-Type: application/x-www-form-urlencoded' 
                            --header '{yourkey}' 
                            --data-urlencode 'data={
                               "inserts":[
                                  {
                                     "vendor":1,
                                     "vendor_contact":"1",
                                     "warehouse":"1",
                                     "products":[
                                        {
                                           "sku":"CB-100",
                                           "qty":5,
                                           "cost":5
                                        }
                                     ]
                                  }
                               ]
                            }'  
                            

                            Response

                            Example JSON returned
                            {
                                "code": "200",
                                "data": {
                                    "record": {
                                        "370": {
                                            "id": "370",
                                            "title": "Order 370 (Draft)",
                                            "tag": "D9M97ISYOTWHSZSFJC4ZSS9W6"
                                        }
                                    }
                                }
                            }
                            

                            Start your free, no-risk trial today.