• Resolved svr101

    (@svr101)


    Hi,

    I’m trying to list all the countries for Europe with the this endpoint: https://mysite.com/wp-json/wc/v3/data/continents/eu

    I got this as a response not the one described in the documentation:

    {
    	"code": "EU",
    	"name": "Európa",
    	"countries": [
    		{
    			"code": "AD",
    			"name": "Euro",
    			"currency_code": "EUR",
    			"currency_pos": "right_space",
    			"decimal_sep": ",",
    			"dimension_unit": "cm",
    			"num_decimals": 2,
    			"thousand_sep": ".",
    			"weight_unit": "kg",
    			"states": []
    		},
    		{
    			"code": "AL",
    			"name": "Albanian lek",
    			"currency_code": "ALL",
    			"currency_pos": "right_space",
    			"decimal_sep": ",",
    			"dimension_unit": "cm",
    			"num_decimals": 0,
    			"thousand_sep": " ",
    			"weight_unit": "kg",
    			"states": []
    		},
    		{
    			"code": "AT",
    			"name": "Euro",
    			"currency_code": "EUR",
    			"currency_pos": "left_space",
    			"decimal_sep": ",",
    			"dimension_unit": "cm",
    			"num_decimals": 2,
    			"thousand_sep": " ",
    			"weight_unit": "kg",
    			"states": []
    		},

    This is a bug or the documentation is wrong?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • @svr101

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
    
    I can also recommend <a href="https://developer.woocommerce.com/" rel="noopener" target="_blank">the WooCommerce Developer Resources Portal</a> for resources on developing for WooCommerce.
    
    You can also visit the <a href="https://www.facebook.com/groups/advanced.woocommerce/" rel="noopener" target="_blank">WooCommerce Facebook group</a> or the <code>#developers</code> channel of the <a href="https://woocommerce.com/community-slack/" rel="noopener" target="_blank">WooCommerce Community Slack</a>. We're lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.
    Thread Starter svr101

    (@svr101)

    @oaoyadeyi

    This is a quite simple topic. I’m making a request, the response is wrong.

    Even your documentation says: name string Full name of country.
    In the response I’m getting is the currency name.

    Plugin Support Sol J. a11n

    (@solstudioim)

    Hi there @svr101

    I understand your question and thanks for reporting this to us!

    I tried to GET to retrieve the list of countries via EU endpoint and I got name as the currency name, my result is here, not full name of the country as mentioned in the documentation: https://woocommerce.github.io/woocommerce-rest-api-docs/?shell#list-all-continents

    I’ve pinged our developers to confirm if that’s expected or we need to update the documentation.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

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

The topic ‘Retrieve continent data rest api endpoint response mismatch’ is closed to new replies.