I have tried the orders API and I know that I have orders in 2014 but I am getting zero back. I dont know what else to do. I have reviewed the documentation at https://developer.godaddy.com/doc/endpoint/orders#/v1
I used the API it generated for me (I added my own key and secret obviously). It isnt giving any errors, just zero records. In fact, it doesnt return any results for any date range.
Anyone see anything I am doing wrong here?
My call:
C:\util\curl\curl-7.67.0-win64-mingw\bin\curl -X GET "https://api.ote-godaddy.com/v1/orders?periodStart=2014-01-01&periodEnd=2014-12-31&offset=0&sort=-createdAt" -H "accept: text/xml" -H "X-Market-Id: en-US" -H "Authorization: sso-key MYKEY:MYSECRET" -o orderstry7.xml
Results:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<pagination>
<first>https://order-phx3.api.int.ote-godaddy.com/v1/orders?periodStart=2014-01-01&periodEnd=2014-12-31&offset=0&sort=-createdAt&limit=25</first>
<last>https://order-phx3.api.int.ote-godaddy.com/v1/orders?periodStart=2014-01-01&periodEnd=2014-12-31&offset=0&sort=-createdAt&limit=25</last>
<total>0</total>
</pagination>
</response>
Solved! Go to Solution.
If you haven't already you need to create a separate set of Keys for the live API
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
When I was doing my testing - I saved the XML results to a file - I used the site I had posted in the original thread and was able to do XML to excel and it had the order details going across the columns
not elegant but at least I could then search and find things
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
Since this system marked my original help request as spam, and my trying to get that reversed as not worked, I figured a screen shot of that request may work...
From looking at the code below you are use the OTE (test environment) you need to use the live API to retrieve your orders
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
OK, thanks. I removed the "ote-" (I copied/pasted from their website that built that URL) and now I get
{"code":"UNABLE_TO_AUTHENTICATE","message":"Unauthorized : Could not authenticate API key/secret"}
I know my key/secret is correct but I will generate another and re-test after I bring my kids to school and come back and report back here...
If you haven't already you need to create a separate set of Keys for the live API
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
OK, that worked! I was able to retrieve all of my orders by creating a production key/secret. Thank you. My first time using an API like this. But this now leads to another, related, question and not sure if I should post it here. If not I will post a new question- just tell me which.
I am looking at the results from the orders API call and only see very basic info about the order items. I will assume that I needed to call the order-items API call for each of my orders. I tried successfully to retrieve one of my order ids however I have 1529 orders to check order items for! I need to somehow get these XML result files all massaged together to form one complete view of my order history?
Do you have and ideas/suggestions? Am I looking at this the wrong way?
Thanks!
Anthony
When I was doing my testing - I saved the XML results to a file - I used the site I had posted in the original thread and was able to do XML to excel and it had the order details going across the columns
not elegant but at least I could then search and find things
Once your issue is resolved,
please be sure to come back and click accept for the solution
Get Better Support on the Community Boards!
Etiquette When Asking for Help from the Community
OK, thank you so much for all of your patient help! I will try to create a script that can automate that because it will be a lot of copy/pasting, importing into excel, etc. Wow. OK, thank you! Next I am going to search for an API to manage my X.CO shortcuts. I have a couple thousand and the online interface gives me an error so maybe the API route is to go. Thank you for helping me get past the hurdle of understanding this API stuff! 🙂