Example: Get All Orders

Use the CAM REST API to get an array of all orders.

                            http://{your-server}/cam/api/v1/purchases/orders
                        

Filter the List of Orders

Use filters to limit the list of items returned.

For example, use the following request to limit the list to orders for Acrobat Reader:

                            http://{your-server}/cam/api/v1/purchases/orders?filter=description eq "Acrobat Reader"
                        

Use the following request to limit the list of orders to those made before a specific date:

                            http://{your-server}/cam/api/v1/purchases/orders?filter=date lt "2017-01-01"
                        

Use the following request to limit the list of orders to those for a specific vendor:

                            http://{your-server}/cam/api/v1/purchases/orders?filter=vendorName like "Microsoft"
                        

Shape the List of Orders

Add fields to your request to limit the data returned for each item in the list.

For example, use the following request to limit the data returned to the fields specified:

                                http://{your-server}/cam/api/v1/purchases/orders?fields=date, orderNumber, description, vendorName
                            

Sort the List of Orders

Add sorting to your request to sort the list of orders returned.

For example, use the following request to return a list of orders sorted by date in descending order:

                            http://{your-server}/cam/api/v1/purchases/orders?sort=date desc 
                        

Combine Parameters

You can combine parameters to sharp, sort, and filter the data returned.

For example, use the following request to return a list of orders with a vendor name like "Microsoft" that returns only the name, description, and vendor name, and is sorted by date in descending order:

                            https://{your-server}/cam/api/v1/purchases/orders?filter=vendorName like "Microsoft"&fields=name, description, vendorName&sort=date desc