Check out this article and the comments:
https://jamfnation.jamfsoftware.com/article.html?id=26
Even if you got it working right now, sounds like things will be changing in August.
@johnklimeck I do not believe you will get the PO date back from Apple consistently. I know I haven't. If you already have the PO date and machine serial number in an Excel file, or in some other format, and can get it to CSV, you can use the API to add it to the computers. I was able to add Lease End dates to all of my machines in this method. I posted about it here:
API Put
Hope that gives you a starting point.
PO and warranty date are very consistent for us. Applecare ID is usually blank until the machine is a year or so old, then all of a sudden that starts filling in if we do another lookup on the machine.
August is going to be miserable.
Steve,
Thanks, I adapted your script, and I have that Warranty Expiring info now showing in the JSS. I suppose I can use this info to extrapolate when the Mac was purchased, since it would be 3 years prior, with AppleCare, and 1 year prior, if Apple was not purchased (or purchased and never registered).
But you are also saying if I was able to ascertain an Excel / CSV file of all of my Macs (I believe Apple can provide this), I can input this info into the JSS under the PO Date, that would be awesome, using your script (modding it), I can do that.
Thanks again,
John