Top WooCommerce & WordPress Plugins › Forums › Cost of Goods for WooCommerce › Inquiry about API Endpoint for Cost of Goods for WooCommerce Pro
- Support forum for the Cost of Goods for WooCommerce.
Tagged: Endpoint
- This topic has 2 replies, 3 voices, and was last updated 7 months ago by
Pablo.
- AuthorPosts
-
February 27, 2023 at 12:14 am #110298
Rafal Maryniak
ParticipantI am currently working on a project that involves using the Cost of Goods for WooCommerce Pro plugin to retrieve data via the WooCommerce API. Specifically, I am looking to retrieve the “profit total” and “cost total” data for a given day.
I noticed that you provided a solution in a support thread on how to retrieve this data from the plugin’s meta data using the “_alg_wc_cog_order_profit” and “_alg_wc_cog_order_cost” keys. However, I was wondering if there is an API endpoint available that would allow me to retrieve this data directly through the API.
If such an endpoint exists, could you please provide me with the endpoint URL and any necessary authentication keys or parameters that would be required to access it?
Thank you for your time and assistance.
- This topic was modified 7 months, 1 week ago by
Rafal Maryniak.
February 28, 2023 at 11:18 am #110396Hi Rafal,
Thank you for reaching out to us. We appreciate your interest in using the Cost of Goods for WooCommerce Pro plugin and your inquiry about retrieving data via the WooCommerce API.
I have escalated it to our development team. They will get back to you as soon as possible if there is any available API endpoint that can retrieve the “profit total” and “cost total” data.
Thank you for your patience and understanding.
Kind regards,
MoshtafizurMarch 6, 2023 at 8:21 pm #110779Hi Rafal,
Sorry for the long delay.
You can get it by using the WooCommerce REST API.
Example:
http://site.com/wp-json/wc/v3/orders
.And then you can access the
alg_wc_cog_order_profit
and_alg_wc_cog_order_cost
keys by checking themeta_data
node. - This topic was modified 7 months, 1 week ago by
- AuthorPosts
- You must be logged in to reply to this topic.