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

Felix commented on Shopify Recurring Charge Api Not Working

$
0
0

Whats the error?

Can you print the result of $paymentoption?

I recently had the issue, that I got no response at all for recurring application charges when I supplied a price of 0.00 (but I'm using https://github.com/phpclassic/php-shopify)


Automatically apply gift card using cart URL by Will Jones

$
0
0

Hi there,

Per this topic it's now clearly possible to apply discount codes using a few ways, including adding a paramter to the cart URL, so that the user doesn't have to input this manually. Is it possible to also achieve this with gift cards?

I'd like to be able to generate a URL that automatically applies the gift card for the customer to make spending it easier.

Thanks in advance!

Problems creating and installing an app by franbisc

$
0
0

Hi, let's start from the beginning. I'd like to build a public Shopify app. Since it's the first time I downloaded the GitHub skeleton and went with it (though I read a lot of other people had problems with it because appearently there are things no longer supported or different).

In the creation phase I chose a name and I put as URL https://{myServerIP}/shopify/admin/install. After that I was able to get the API key and the secret key, and I put them in the conf.php.

In the app info dashboard page I set the urls as follows:

App URL: https://{myServerIP}/shopify/admin/oauth/authorize?client_id={key}&scope=read_content&redirect_uri=http://{myServerIP}/shopify/get_products.php

AND 

http://{myServerIP}/shopify/get_products.php

as a whitelisted redirection URL

 

When I visit the URL https://{myShop}.myshopify.com/admin/api/auth?api_key={key} and I press the Install button it goes on ERR_CONNECTION_TIMED_OUT.

 

The strangest thing happens when I try to make a Postman GET request to https://{shop}.myshopify.com/admin/shop.json

I use the basic auth inserting the keys (API key and secret key) and using as url and it returns: ""errors": "[API] Invalid API key or access token (unrecognized login or wrong password)""

 

How to make a payment with Shopify API from mobile application by Michael

$
0
0

We are building a mobile application and we want to use custom dialogs for all steps of checkout - products in cart/user info/shipping/credit card.

We have Shopify Payments (by Stripe) enabled in payment settings '/admin/settings/payments'.

We need all payments to be in the store admin panel, so that our client could check/accept/refund any payment with UI.

How to proceed a payment without using a web browser component from mobile SDK, because it doesn’t look and feel good with our design? Could you give step-by-step instructions and links to documentation? Does it require server-side support? Will it be easier to use Stripe directly?

Josh Wheeler commented on Unable to test dev checkout - Checkout System disabled: Merchant's trial period expired.

$
0
0

Hey again Horas, 

That would really depend on the urgency I'd say, or the mood you happened to be in that day - but they're available by phone, chat, or e-mail so you can take your pick. Check out the contact page here for more details! 

Ryan O commented on Trying to download Shopify order data through API

$
0
0

it should be

import shopify

not

import Shopify

 

Ryan O commented on Automatically apply gift card using cart URL

$
0
0

Hi Will, this is not currently something that we support but I will pass on your request.

 

Cheers,

Ryan

Josh Wheeler commented on Products endpoint results: published_at column is sometimes earlier than the created column

$
0
0

Hey again Harrison, 

Thanks for the extra info! This one proved to be quite interesting. It turns out that this is possible on the platform and we'll allow it, though I can't say I've seen it before.

You can assign whatever 'published_at' date that you'd like when you create a product (I'm sure other resources as well) via the API which would result in products like the ones that you listed above. 

A potential use-case for something like this would be when migrating from another platform to Shopify, and wanting to keep the original date for record keeping.

Or in the case of a blog post, you might want to change the `published_at` date to fine-tune where an article is showing up in your index if you're writing about something that you had actually done a while ago. 

Hope that helps clarify things well enough for you! 

Cheers, 

Josh Wheeler

 

 


Shopify API Call returns a HTTP 400 Error with HTML from Google by Nuls

$
0
0

Right, 

so I'm not exactly sure how to properly explain this problem, but I'll try. I have developed a private App that is currently used by 30+ Shops. I have tried adding it to a brand new shopify store and I'm getting an absolute weird behaviour. 

 

My call:

https://xxxxx:xxxxx@xxxx.myshopify.com/admin/orders.json - it's a GET, parameters page = 1, limit = 100

The Response:

string(1555) "<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 400 (Bad Request)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>400.</b> <ins>That’s an error.</ins>
  <p>Your client has issued a malformed or illegal request.  <ins>That’s all we know.</ins>
"

The weird part: It works with all other api keys used, just not this particular one. All permissions are set, and I'm either completely blind or something is seriously wrong. I have replaced the current api keys with keys from other shops and that call works flawlessly.

Any ideas? 

techemilio commented on Trying to download Shopify order data through API

$
0
0

Awesome, got it to work. Now I am able to see how many orders are up and it is functioning . Here is my code incase anyone else can find this useful.

import shopify
API_KEY = 'xxxxxxxxxxxxxxxxxxx'
PASSWORD = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
SHOP_NAME = 'xxxxxxxxxxxxxxx'
shop_url = "https://%s:%s@%s.myshopify.com/admin" % (API_KEY, PASSWORD, SHOP_NAME)
shopify.ShopifyResource.set_site(shop_url)
shop = shopify.Shop.current()

#The following code prints the amount of orders up in your shopify store in command prompt window

order = shopify.Order()
num = order.count()
if num == 1:
    print "There is %s order currently in your %s shopify store" % (num, SHOP_NAME)
else:
    print "There are %s orders currently in your %s shopify store" % (num, SHOP_NAME)
 

 

I have a new question though, if I want to see order data such as what specific product is being sold, who the buyer is, what is the buyers info ect. Do you know a code that is able to extract this data? I cannot emphasize enough how helpful you have been to me Ryan, I truly appreciate your responses . 

Joel commented on Questions about Shopify Billing API

Horas commented on Unable to test dev checkout - Checkout System disabled: Merchant's trial period expired.

$
0
0

Okay, thank you for the info.

Hope that we don't hit that checkout limit again :-)

Thank you!

Ryan O commented on Trying to download Shopify order data through API

$
0
0

Hey there!  Thanks for posting your code for others to see.  

I want to see order data such as what specific product is being sold, who the buyer is, what is the buyers info ect. Do you know a code that is able to extract this data?

If you aren't familiar with ActiveResource it might be worth looking into as we use pyActiveResource for the ShopifyAPI.

With the order object you can access any of the properties for order as per the API reference.

And for specific use-case examples you can check out the tests section of the Shopify Python API

 

Hope this helps!

Ryan

Nuls commented on Shopify API Call returns a HTTP 400 Error with HTML from Google

$
0
0

I have also raised a ticket for that issue (ID 7411888) - it contains the problematic credentials as well as other credentials that work just fine. 

Accessing to custom line item attributes in email confirmation by arco

$
0
0

Hi!
Can I access to attributes (customAttributes) of each line item from email confirmation templates?

I tried to search that in documentation but there is only 'attributes' property for order, not for line items.
I tried to search other topics, but also withot success.

Can someone please help?

Thank you!


Alex Richter commented on How to make a payment with Shopify API from mobile application

Ryan O commented on Trying to download Shopify order data through API

$
0
0

Here are a few fast examples using order object you were using:

order = shopify.Order.find(1111111111) #the id of the order
a = order.email
b = order.id
c = order.name
d = order.line_item
print a, b, c, d

Cheers.

Josh Wheeler commented on Carrier Service API - shipping rate request custom info

$
0
0

Hey there, 

There won't be any way to add information to the existing requests that we send - those are pre-defined on our end and aren't editable. 

At best some sort of workaround like you had mentioned above would be required here since we don't have any conventional way to accomplish this. I'll let some other developers step and share any methods they've had success with though since I haven't implemented something like this myself.

Alex Richter commented on Problems creating and installing an app

$
0
0

Hey,

Are you 100% sure you're not using two auth schemes at once? I've run into this personally by forgetting I was sending an x-shopify-access-token header at the same time as trying to use basic auth.

I don't know which PHP library you're using by my help here might be quite limited due to that. It might be worth creating an issue in the repository?

If you want me to check out logs, you can provide me with a request-id which would have been provided in a response header, and I can check and see if anything more of note was going on from that perspective.

Cheers.

T commented on Carrier Service API - shipping rate request custom info

$
0
0

Thanks Josh, I thought that'd probably be the case. I'll have to continue on with the product switch outs I think. Thanks for the reply.

Viewing all 25503 articles
Browse latest View live


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