how to get image via order API - shopify

I am creating Shopify application named "Request for Quote",Is use for create quote for multiple products. in application I have added functionality to convert quote to order using order API provided by Shopify. I have got all data of product into the converted order but i haven't get image detail of order. So I am stuck in It Can anyone have idea about it or having solution of this problem, If yes then send me solution as soon as possible.
Thank You in Advance...
I tried order API but didn't get any solution.....

Related

Shopify Webhooks: Is there a way to determine whether or not an order came from Shopify POS?

I'm receiving a Webhook for every order that has been maid, but I do not know if it came from POS or from the website.
You can inspect the order, and there is indeed a property known as the source of the order. That will tell you where the order originated from. Some Apps generate orders so their source will be a number. POS is pos. You should have no trouble figuring out the source from the attribute in the order.
In GraphQL parlance, you look for the app { name } and for example you'd see something "Draft Order" or "POS". In RestAPI is it probably still just source or source_name.

How to determine if a Shopify order was placed via the Amazon channel?

I am querying the Shopify API for a specific order and I would like to know how to determine if the order was placed in our Amazon Seller channel and sent to Shopify as it is described in Shopify's documentation: https://help.shopify.com/en/manual/sell-online/amazon-sales-channel/processing-orders. On the section "Fulfilling Orders" of that page it reads:
All new orders placed through Amazon appear in your orders list and
are marked as Amazon.
A real JSON response from the Order API looks like this: https://help.shopify.com/en/api/reference/orders/order#show
I could not find any indication that the order might come via Amazon. I did find the fulfillment service (just a simple Ctrl F "amazon") but that is a different thing.
Being a Shopify Plus customer we asked their Guru Support team how they implement the "marked as Amazon" part and the response was:
Guru: Looking at all your orders you won't be able to
differentiate. When you click through to a singular order though,
you'll be able to see in its timeline that it came from Amazon instead
of your Online store.
My team: mmm so if I connect though the API
"orders.json?id=xxxx" the only way I can check it came from amazon is
though the timeline?
Guru: As far as I'm aware that's the case. I can check with our
development team to see if there's another indicator. Would I be able
to email you back with any additional findings?
Of course my team is still waiting on an answer from them but I bet someone at SO has already been in this situation before.
Some might want to know why I need to know the order source. We are sending these orders from Shopify into Netsuite via a Celigo connector. Amazon orders need to hit a different GL account than the normal Shopify orders and my task is to code the correct mapping based on some differentiating element or name/value pair from the JSON response.
When an order comes down the JSON has a field called source_name and the value should be something like this: sell-on-amazon
"source_name":"sell-on-amazon"

Get shipping method for order using BigCommerce API

Is there a way to get the shipping method for a specific order using the BigCommerce API? I've searched and the closest I came to finding an answer is this, How can I get an order "shipping method" from bigcommerce API (Ground, Express)? , unfortunately the link provided is broken. I can't even find a 'shipping_id' in the order object that I can use to determine the method based on available shipping methods in the store.
Thanks in advance for any assistance.
Here is the updated link for that https://developer.bigcommerce.com/api/v2/#order-shipping-address-object-properties
Since you are looking for the Shipping methods for an Order it will be under the Order resource in the SDK.
It's in the shipping_method field of the Shipment object:
Shipment object
You link back to the order_idon the Shipment object with the id from the Order object:
Order object

BigCommerce JavaScript API

In BigCommerce, can I access the current customer's record using JavaScript?
I want to change something on the product page based on the customer group that the current customer is in.
there is no JS SDK yet for Bigcommerce. However, because the APIs are restful, you should be able to execute a simple GET request to get a customer's record. The only challenge is that you need to get the customer ID/info when they login to the store and then get their record.
There is an example on Bigcommerce forums on using Javascript to hide pricing for customers who are not logged in.
http://forum.bigcommerce.com/f4/global-variable-for-current-user-s-group-1815/index2.html
This combined with GET request on the customer endpoint (http://developer.bigcommerce.com/api/customers) should get you moving in that direction.
Does this help? Are you looking for a code sample?
Use Javascript or jQuery to do the IF statement.
Then use Ajax to request the data that you want to display to the user.
So to answer your question, directly with Javascript you can't, but combine it with some PHP and then you use the API to do what you would like.
Hope this helps :)

Shopify ScriptTag API and custom variables

I have a question regarding ScriptTag API - http://api.shopify.com/scripttag.html, is there a way to add couple variables if code is being added into the Thank You page? I would like to collect order_id and order_amount so client can track performance etc. but looking at the API it seems that I can only specify event and source or am I missing somthing?
cheers,
/Marcin
You can only specify event and source when creating a script tag.
However, since the structure of the Thank You page is known, you can grab the order number and total from the DOM using js.
Alternatively, You can couple your js tracking on the front end with data from the Orders API to get the data you need.