UltraCart / rest_api_v2_sdk_php

UltraCart REST API PHP Client
Apache License 2.0
3 stars 4 forks source link

Accessing API using another PHP client (Httpful) #2

Closed him-developer closed 7 years ago

him-developer commented 7 years ago

Hello Perry,

Today we have started to test this new API and got one question:

As this is a REST API can we use http://phphttpclient.com/ as our client instead of swagger client? I have tried calling https://secure.ultracart.com/rest/v2/auto_order/auto_orders with Httpful client with "x-ultracart-simple-key" query parameter and got permission denied message.

Further we ran into issue while fetching auto orders using swaggerClient. We called autoOrderAutoOrdersGet and passed email & _expand parameters. We have received the auto orders for email that have been placed as Guest but auto orders that have been placed after logging in is not available.

Looking to hear from you on this.

Thanks Himanshu Saini

perrytew commented 7 years ago

Hello Himanshu,

Yes, you may access the API via any http client you wish.

If you can provide examples, I can help with troubleshooting.
The x-ultracart-simple-key is a header, not a query parameter. I'm not sure if that was a typo in your github comment above, but double check your code to ensure you're sending it as a header.

The auto order query results are concerning. If you can provide me with code that I can replicate your call, I'll trace the call and investigate.

Regards.

him-developer commented 7 years ago

Okay I am able to access the api while passing x-ultracart-simple-key as header info.

And please ignore the auto order reported issue, that was my bad. I have double checked the records and they are good.

Thank you very much for the prompt response.

Thanks Himanshu

perrytew commented 7 years ago

Excellent! Glad you're making progress!