when create Order and Customer via API Shopify data not show in Admin panel - shopify

I have a problem with Shopify API. I use python API for Shopify. When I create a new order via API, data exists (I check via API too) but it's not shown within Shopify admin panel.

It's pretty likely that you're interacting with two different stores if you're getting 200 OKs and seeing the Orders come back through the API and not through the admin.
It's worth checking shopify.Shop.current().domain to see if it matches up with the admin that you're interacting with. If you're still seeing issues, post the contents of your request (including headers) and it will be a lot easier to give you a hand :)

Related

How do I integrate third party APIs with Shopify to find and create products?

I have created a Shopify Store which needs to contact another outside web service to send a query and then build the products based on the query response data.
Is it possible to do with Shopify?
If yes, then how should I go about implementing it?
I have tried looking into the docs but it seems like the only option is to connect with Admin API to add products. However, I don't want to store product data but instead rely on the API.
You do want to use Admin API calls. The reason is simple. They let you create products in Shopify, in bulk. Why fight the power! Using the Admin API has nothing to do with storing products, not sure why you're afraid.
So you get your product info from wherever, format it into Shopify-compatible data, inform Shopify of your data, and sit back and relax. The bulk building is really quite simple for a pattern. You can also build yourself a CSV to import where you also format the data to be compatible with Shopify. So there are two options for you right there.

Saving additional data when checkout is completed on shopify

I'm not entirely sure how to go about this so i thought i'd ask here.
Context
I have a quiz that people take on my site and when the quiz is completed, a product is recommended based on their quiz results. A customer is now able to buy this recommended product.
What i want to do is to be able to save the quiz response to my external database with the order id as a unique id for quick retrieval later. How would i go about this in Shopify?
Question
Is there a way i can make a POST request when the checkout button is pressed on the checkout page?
Would i have to create a custom checkout to get access to that area?
Thank you
If you're attempting to save to an external database then you'll need to figure out a way to send data from your Shopify frontend to an external app or API, one that will capture the product data and add it to the DB.
To answer your first question, no, you can not hijack the functionality of the checkout button (unless you do so via Javascript).
As for your second question, I don't know what you mean by 'custom checkout' but I'd say you're probably looking in the wrong area for the solution to this.
Shopify's backend is not able to be edited by the merchant themselves and can only be accessed via its various APIs.
How I would do it if I were you is to create that external app, create an endpoint that accepts the product data / adds to the DB and write code on your Shopify front-end to send the data to that endpoint.
Keep in mind that you won't be able to easily identify the customer to whom the product is recommended to unless they are logged in.

Soundcloud API returns empty

Thanks in advance for the help.
So while developing an application, I need API data and I retrieve JSON objects. Not a big deal, but with one certain account it doesn't work.
https://api.soundcloud.com/tracks/257255126?client_id=CLIENT_ID_HERE
The ID 257255126 is a track from this profile: https://soundcloud.com/discoverysounds1/.
Every track from this profile returns empty from the API while the same API link works if I insert a track ID from any other profile.
I've already notified the owner of the problem and he hasn't done anything weird or disabled API access if that's even possible.
What could be the problem here?
Thanks,
Jordan
I just tested this with a website I am developing using the API.
If I add one of the tracks to an existing playlist that I have created to test certain functionality, the track does not appear in the playist when retrieved via the /me/playlists endpoint.
When I load the playlist into the soundcloud widget, the track is visible and unrestricted (as in full duration and not a 30 second preview).
I am seeing similar behaviour with tracks that are marked as "soundcloud go" not being visible in the playlist tracks from the /me/playlists endpoint, but available via the widget when the playlist is loaded (albeit only a 30 second preview in their case).
Those items are identifiable as having a "SUB_HIGH_TIER" monetization_model
The track I loaded from your example
There seem to be various issues with the API right now related to the implementation of "soundcloud go"

Instagram api sandbox

I today get Instagram api and add my website live,
I see write:
Client Status: Sandbox Mode GO LIVE
I can't click on ''GO LIVE'' button why ?
You would need to start a submission for approval to go live, though:
Feeds for websites won't be approved; these will remain in sandbox mode and be limited to 500 requests per hour and 20 images. This doesn't sound like much especially for large clients, but if you cache your responses, it's not a problem.
The main confusion is because they have made it sound like every app/feed has to be approved and out of sandbox mode to work, where as the reality is that only fully functioning apps for phones, or a widget plugin really ever need to be.
You will no longer be able to display feeds based on hashtags, only a users own photo's. By getting a client to be a sandbox user, is how you can access their feed without their login information.
Older apps/feeds will need to be updated to use the new code before June or they may stop working.
It's mainly to stop apps hammering instagram's servers for unlimited requests on any hashtag/users they like.
Here is an example of how to fetch and cache images using WordPress's 'set_transient' - you will need to use a loop to output the data.
WordPress Instagram Gist
Here is the relevant piece of information in the dev docs:
Here are some examples of scenarios that will not be approved:
To display content for a personal website. If you are a developer and you want to showcase Instagram content on a website, then you do not need to submit your app for review. By using a client in sandbox mode, you will still be able to access the last 20 media of any sandbox user that grants you permission.
One-off projects. If you are an agency building websites or other integrations, note that we don't grant permissions to clients created for one-off projects. If you are interested in building a product, platform, or widget that will be used as a service across multiple projects, then you may submit a single client_id that you can use across multiple projects.
To use a widget. If you are installing a widget for your website, then you do not need to submit for review. Some widgets may ask you to create a new client id, but you do not need to submit it for review for the widget to work. Your client can remain in sandbox mode and the widget will have access to your last 20 media.
Hope that helps clear some confusion.

Can client side mess with my API?

I have a website that revolves around transactions between two users. Each user needs to agree to the same terms. If I want an API so other websites can implement this into their own website, then I want to make sure that the other websites cannot mess with the process by including more fields in between or things that are irrelevant to my application. Is this possible?
If I was to implement such a thing, I would allow other websites to use tokens/URLs/widgets that would link them to my website. So, for example, website X wants to use my service to agree user A and B on the same terms. Their page will have an embedded form/frame which would be generated from my website and user B will also receive an email with link to my website's page (or a page of website X with a form/frame generated from my server).
Consider how different sites use eBay to enable users to pay. You buy everything on the site but when you are paying, either you are taken to ebay page and come back after payment, or the website has a small form/frame that is directly linked to ebay.
But this is my solution, one way of doing it. Hope this helps.
It depends on how your API is implemented. It takes considerably more work, thought, and engineering to build an API that can literally take any kind of data or to build an API that can take additional, named, key/value pairs as fields.
If you have implemented your API in this manner, then it's quite possible that users of this API could use it to extend functionality or build something slightly different by passing in additional data.
However, if your API is built to where specific values must be passed and these fields are required, then it becomes much more difficult for your API to be used in a manner that differs from what you originally intended.
For example, Google has many different API's for different purposes, and each API has a very specific number of required parameters that a developer must use in order to make a successful HTTP request. While the goal of these API's are to allow developers to extend functionality, they do allow access to only very specific pieces of data.
Lastly, you can use authentication to prevent unauthorized access to your API. The specific implementation details depend largely on the platform you're working with as well as how the API will be used. For instance, if users must login to use services provided by your API, then a form of OAuth may suffice. However, if other servers will consume your API, then the authorization will have to take place in the HTTP headers.
For more information on API best practices, see 7 Rules of Thumb When You Build an API, and a slideshow from a Google Engineer titled How to Design a Good API and Why That Matters.