What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

get order image

get order image

752791128
Shopify Partner
3 0 0

I use this api get order
https://secret:password@shop_url/admin/api/2023-07/orders.json
How to get order->line_items images?

Replies 5 (5)

Liam
Community Manager
3108 344 895

There is a `line_items` field on the Order resource, which has properties for id and sku, title, etc, but the images don't appear to be exposed on the REST API. Images for line items are available in the GraphQL API, you can see the image field on the LineItem object in our docs here. Could you use this?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

752791128
Shopify Partner
3 0 0

Can you answer in Chinese or have other colleagues who understand Chinese answer me? 

I didn't see GraphQL API this api demo 

how to use this api? Do you have a demo example?

Look at my MP4 mouse   i just want to get this image

anonymous9
Visitor
2 0 0

i am facing the same issue what the solution to get the order image 

ShopifyDevSup
Shopify Staff
1453 238 525

Hey @anonymous9

 

To get the order line item image, you'll need to use our GraphQL API's. Liam has shared the resource here: https://shopify.dev/docs/api/admin-graphql/2024-04/objects/LineItem#field-lineitem-image 

 

Here's an example of an order query, with the line item image,: https://shopify.dev/docs/api/admin-graphql/2024-04/queries/order 

{
   order(id: "gid://shopify/Order/9749629992982") {
       lineItems(first: 10) {
           nodes {
               image {
                   id
                   src
               }
           }
       }
   }
}
 

Hope that helps 

 

- Kyle G. 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

anonymous9
Visitor
2 0 0

but i am using rest admin api . Graphql api is complex i dont know how to create order using graphql api