Title: Extending API&#8217;s
Last modified: May 8, 2019

---

# Extending API’s

 *  Resolved [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/extending-apis/)
 * How to extend My Orders API by getting product image with it.

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [7 years, 2 months ago](https://wordpress.org/support/topic/extending-apis/#post-11513367)
 * Hey there!
 * You can find more information about product images via the API here:
    [https://woocommerce.github.io/woocommerce-rest-api-docs/#product-images-properties](https://woocommerce.github.io/woocommerce-rest-api-docs/#product-images-properties)
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/extending-apis/#post-11516017)
 * How do I add / get product image in my orders api
 * Also to display product image in my orders page web
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/extending-apis/#post-11537286)
 * [@fernashes](https://wordpress.org/support/users/fernashes/) how could i get 
   the images array in order detail API
 * example.com/wp-json/wc/v3/orders/101?consumer_key=ck_xxxxxxx&consumer_secret=
   cs_xxxxx
 * output to get with the following in orders(particular/myOrders):
 *     ```
       "images": [
                   {
                       "id": 1296,
                       "date_created": "2019-03-25T20:37:03",
                       "date_created_gmt": "2019-03-25T10:07:03",
                       "date_modified": "2019-03-25T20:37:03",
                       "date_modified_gmt": "2019-03-25T10:07:03",
                       "src": "https://example.com/wp-content/uploads/2019/03/nestle-milkmaid.jpg",
                       "name": "-nestle-milkmaid",
                       "alt": "",
                       "position": 0
                   }
               ],
       ```
   
    -  This reply was modified 7 years, 2 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
    -  This reply was modified 7 years, 2 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Formatting
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/extending-apis/#post-11553858)
 * [@fernashes](https://wordpress.org/support/users/fernashes/) can you reply me
   on REST API extending i.e, i need to get the product image array in api
 * wp-json/wc/v2/orders/4166 –
 * “line_items”: [
    { “id”: 290, “name”: “Brooke Bond-3 Roses Tea”, “product_id”:
   21, “variation_id”: 0, “quantity”: 1, “tax_class”: “”, “subtotal”: “54.00”, “
   subtotal_tax”: “0.00”, “total”: “54.00”, “total_tax”: “0.00”, “taxes”: [], “meta_data”:[],“
   sku”: “”, “price”: 54 },
 * in this i need to get product image
 *  [dougaitken](https://wordpress.org/support/users/dougaitken/)
 * (@dougaitken)
 * Automattic Happiness Engineer
 * [7 years, 1 month ago](https://wordpress.org/support/topic/extending-apis/#post-11576815)
 * Hey [@manigopal](https://wordpress.org/support/users/manigopal/)
 * This isn’t possible out of the box through the REST API, you will want to query
   the product ID that is returned and request the thumbnail for that product.
 * This post might help – [https://stackoverflow.com/questions/30813815/show-products-image-in-orders-page-woocommerce](https://stackoverflow.com/questions/30813815/show-products-image-in-orders-page-woocommerce)
 * Thanks,
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/extending-apis/#post-11576823)
 * if we do that might be gone at future plugin updates., so if there any code like
   adding them to functions.php such like add_action()
 *  [con](https://wordpress.org/support/users/conschneider/)
 * (@conschneider)
 * Engineer
 * [7 years, 1 month ago](https://wordpress.org/support/topic/extending-apis/#post-11635204)
 * Hi there,
 * I would do the following.
 * * Write a function that gets the values for you and accepts order ID as an argument.
   *
   Register a custom endpoint for the function. [https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/](https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/)–
   make sure this checks for credentials since order data should not be publicly
   accessible.
 * Kind regards,
 *  [AJ a11n](https://wordpress.org/support/users/amandasjackson/)
 * (@amandasjackson)
 * [7 years ago](https://wordpress.org/support/topic/extending-apis/#post-11661253)
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.
 *  Thread Starter [manigopal](https://wordpress.org/support/users/manigopal/)
 * (@manigopal)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/extending-apis/#post-11776548)
 * Hi,
    but its mandatory when we develop a mobile app we do require the Product
   Images to be fetched / retrieved at the order to display in My Order page too
   at MobileApps.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Extending API’s’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 9 replies
 * 5 participants
 * Last reply from: [manigopal](https://wordpress.org/support/users/manigopal/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/extending-apis/#post-11776548)
 * Status: resolved