Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all 25503 articles
Browse latest View live

404 Not Found When Store Account Is Past Due by Carson Reinke

$
0
0

Is only me or does using a 404 for response from the API from this seem like a bad idea?  Could this not be a status code of something like "402 Payment Required" or something else?

Is there some other way to see if the store is past due or some indiction of this?


Cloning shopify products, customer, order by Silky

$
0
0

Hi

 

I have to clone shopify products, customers and orders from one store to another using API. I am able to do this successfully for products and customers. But order feed has customer and product Id. 

My new store has own product Id and i don't know how to relate new products and customers to orders

Can someone please guide me on this.

Thanks 

Embedded App, Expiring Sessions by RaitzeR

$
0
0

Hi,

I'm developing an embedded app and I just cannot seem to get over this problem. In my app I need to store the users data in a session. If the user just leaves the app open and goes away for hours or even a day or more, there is a good probability that the session will have expired in that time. So when this happens and the guy tries to come back and use the app, the app breaks since there is no session data.

I have no way of reauthorizing the user because I need the hmac and all that jazz from Shopify. I have no way of redirecting the user to the auth flow, since the app is in an iframe and cross domain refresh doesn't work. The embedded app SDK has a nice redirect method, but the sdk needs to be initialized with the shop parameter, which I cannot have if the session has expired.

Am I just missing something super obvious or is literally the only way just to have long expiration times and an emergency page which says "sorry we don't know who you are, please press that refresh button up there"?

Cheers everybody,

Ville

Eugene Matoussov commented on Shopify Secure Requests

$
0
0

Thanks for these guides Jason, it helped.

Our final question is this:

we have a third party api that needs to be called and we need to pass basic auth information as part of the request...we are looking into using app proxy to do this. can you please tell us how to add basic auth with app proxy?

Exact URL to post to by ALower

$
0
0
Set objXmlHttpMain = CreateObject("Msxml2.ServerXMLHTTP")

objXmlHttpMain.SetOption 2, objXmlHttpMain.GetOption(2) - SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS
objXmlHttpMain.open "POST", "https://" & APIKey & ":" & SecretKey & "@myshop.shopify.com/admin/recurring_application_charges.json", False

objXmlHttpMain.setRequestHeader "X-Shopify-Access-Token", ShopToken
objXmlHttpMain.setRequestHeader "Content-Type", "application/json"
objXmlHttpMain.setRequestHeader "client_id", APIKey
objXmlHttpMain.setRequestHeader "client_secret", SecretKey

objXmlHttpMain.send sendJSON

Hi,

I've now setup the installation of my app. Once installed, I want to setup a recurring charge but I'm not fully understanding the way in which I do that. Do I post to https://{{APIKey}}:{{SecretKey}}@myshop.shopify.com/admin/recurring_application_charges.json? If not, please could you let me know how it's supposed to be structured?

I get {"errors":"Not Found"} back at the moment. Using classic ASP, which probably won't be a common language but here is my code should it help. Thanks in adcance.

 

 

Ryan Lee commented on Create Draft order via Order API

Jamie D. commented on Exact URL to post to

Jamie D. commented on 404 Not Found When Store Account Is Past Due

$
0
0

Hey Carson,

You can subscribe to the shop/update webhooks in order to determine if a shop's plan has been frozen. The shop's plan will be reported as frozen in this case. You'll receive another webhook notification when the shop has been unfrozen. You can view the webhook API reference for more details.

 


Jamie D. commented on 406 - Not Acceptable error on create fulfillment request

$
0
0

Hey Raj,

Is it possible to post the raw HTTP request that your application is generating? This will be easier to debug.

Jamie D. commented on Migrate orders with original order numbers

$
0
0

Hi Joshua,

It's not possible to modify the ID or order number for an order. Order numbers for a shop always start at #1001, and the ID is generated programatically to be unique across every Shopify store.

I would suggest adding a metafield or order note with the original order number.

Jamie D. commented on Shopify re-send webhook message enquiry

$
0
0

Hi,

Shopify will send a webhook twenty times over 48 hours if your application does not respond with 200 OK. If your application responds with 200 OK, the webhook will not be re-sent. See this documentation section for more information.

Help with Python code for Shopify by Phil Lavery

$
0
0

Hi
I am trying to develop an app for Shopify using the Python API, (I am a novide at Python and totally new to Shopify). I have gone through the forum and got enough ideas and code snippets to be able to access my "shop" and do the basic queries of "count orders" and "count products". I can also list the ids of products and orders.
But I am unable to get the details of products or orders, could anyone please provide an example of the code (in Python) that would let me access those details? e.g.
1. Code that would get all order details for a particular order 
2. Code that would get "shipping Details" for a particular order
I think that those two examples will enable me to work out the rest.

This is the code I am using to get the number of orders and their ids
_______________
import shopify
shop_url = "https://0abcdfghba92d67f64caa74e64:5fd0eabcdefg07c9f326cdfc90b2353e@MYSHOP.myshopify.com/admin" (modified, use your details).

shopify.ShopifyResource.set_site(shop_url)
shop = shopify.Shop.current()

#How many orders & list them
order = shopify.Order()
num = order.count()
print num
success = order.find()
print success
_____________
There are comments on the forum about a lack of examples for Python, when I work this out I will put some example code snippets (found in the forum) up to help others.
Any assistance would be appreciated
Thanks
Phil

One Time Password (OTP) creation tools with shopify. by Rathindra Nath Sarma Mondal

$
0
0

How can I create an OTP option for customer mobile number verififation.Soppose I have a "cash on delivery" option on my payment option.I want a tool that can verify customer mobile number by SMS or by Call before order confirmation in chek out.

James Brindle commented on ActiveResource::MissingPrefixParam (order_id prefix_option is missing)

$
0
0

I'm just learning to use this and the thing I can only think of is that :prefix_options is required because that's the way it forms the URL to call.

So the endpoint is something like POST /orders/:order_id/fulfillments.json

:prefix_options => { :order_id => xxxxxxxx } fills in :order_id in the URL.

Bit odd as it should probably take it from the fulfillment.order_id attribute.

I thought i'd place the code i'm using to fulfill an order:

o = ShopifyAPI::Order.find 1234567
f = ShopifyAPI::Fulfillment.new
f.order_id = o.id
f.prefix_options[:order_id] = o.id
f.line_items = o.line_items.map { |item| { id: item.id } }
f.tracking_company = "XXXXXXX"
f.tracking_numbers = [ "ABC111222333XX" ]
f.save
o.close

Seems to work fine for me.

I would have thought that there would have been `#add_fulfillment` similar to `Product#add_metafield`

Custom Form by JT

$
0
0

Hello,

I would like to have a custom form on my Shopify website.  It is in addition to the registration and contact forms.  When the user submits, I want to have the contents of the form emailed to me.  What are my options?

Thanks,

-JT


Create order then redirect user to payment page by HurricaneDevelopment

$
0
0

I have a website were customers can design what they are going to buy (like add text to a custom sock).  I want to use the Orders API to attatch their custom settings to an order.

But how do I then redirect them to the checkout page on shopify, where they can enter payment info, and complete order submission?

I can use the JS Buy SDK, but how do I attatch custom notes about what options my customers select?

I just need some way to associate custom data with a purchase and I have been looking at the documentation for hours.  I cannot find anything.  Please help.

Get a list of specific products by Badr

$
0
0

Hello,

help please.

i use ruby on rails to develop an app and i need to get a list of specific products using the shopify ruby gem

Thanks

Jason commented on Create order then redirect user to payment page

Jason commented on Get a list of specific products

RaitzeR commented on Embedded App, Expiring Sessions

$
0
0

I ended up just creating a super long-lasting encrypted cookie with a backup of "Sorry we dont know who you are, please open the App again"-page. So now the only way to lose the session status is if the user leaves the app open for a long time and manually cleares cookies from their browser.

Viewing all 25503 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>