cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted
Helper I

Problem receiving data via API

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&amp;periodEnd=2014-12-31&amp;offset=0&amp;sort=-createdAt&amp;limit=25</first>
<last>https://order-phx3.api.int.ote-godaddy.com/v1/orders?periodStart=2014-01-01&amp;periodEnd=2014-12-31&amp;offset=0&amp;sort=-createdAt&amp;limit=25</last>
<total>0</total>
</pagination>
</response>

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III
Solution

Re: Problem receiving data via API

@mojo 

If you haven't already you need to create a separate set of Keys for the live API 



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

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

View solution in original post

Highlighted
Super User III
Super User III
Solution

Re: Problem receiving data via API

@mojo 

 

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



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

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

View solution in original post

7 REPLIES 7
Highlighted
Helper I

Re: Problem receiving data via API

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...  

mojo_0-1580729320799.png

 




Highlighted
Super User III
Super User III

Re: Problem receiving data via API

@mojo 

 

From looking at the code below you are use the OTE (test environment) you need to use the live API to retrieve your orders



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

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

Highlighted
Helper I

Re: Problem receiving data via API

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...

Highlighted
Super User III
Super User III
Solution

Re: Problem receiving data via API

@mojo 

If you haven't already you need to create a separate set of Keys for the live API 



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

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

View solution in original post

Highlighted
Helper I

Re: Problem receiving data via API

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

Highlighted
Super User III
Super User III
Solution

Re: Problem receiving data via API

@mojo 

 

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



I am a GoDaddy End User - Just Like You
Check out my site! | I currently manage over 300 WordPress Websites
* Please note that I offer free advice on this forum. Thank You Info If you would like personalized help, please contact me. Otherwise, please ask your question in the proper forum so the answer can assist EVERYONE in the community and not just you. Thanks! *

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

View solution in original post

Highlighted
Helper I

Re: Problem receiving data via API

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!  🙂