Programmatically editing Purchasing information

Aaron
Contributor II

Hi guys,

Is there a way way via script or JAMF binary to change the values in the Purchasing tab of the computer details? I had a quick look, including the REST API, but I couldn't see anything.

Thanks!

1 REPLY 1

Hego_Damask
New Contributor

What fields explicitly do you want to modify?

You can view the purchasing xml fields by going to https://yourJSSaddress:8443/JSSResource/computers/id/1 where 1 corresponds to JSS ID 1. Obviously you can set that as a variable to do mass updates. Here is an example of the xml snippet for purchasing:

<purchasing>
<is_purchased>true</is_purchased>
<is_leased>false</is_leased>
<po_number/>
<vendor/>
<applecare_id/>
<purchase_price/>
<purchasing_account/>
<po_date/>
<po_date_epoch>0</po_date_epoch>
<po_date_utc/>
<warranty_expires/>
<warranty_expires_epoch>0</warranty_expires_epoch>
<warranty_expires_utc/>
<lease_expires/>
<lease_expires_epoch>0</lease_expires_epoch>
<lease_expires_utc/>
<life_expectancy>0</life_expectancy>
<purchasing_contact/>
<os_applecare_id/>
<os_maintenance_expires/>
<attachments/>
</purchasing>