Skip to main content

Data

The data API allows you to view all types of data available.

List all data

This API lets you retrieve and view a simple list of available data endpoints.

GET /wp-json/wc/v3/data
curl https://example.com/wp-json/wc/v3/data \
-u consumer_key:consumer_secret

Data properties

AttributeTypeDescription
slugstringData resource ID. READ-ONLY
descriptionstringData resource description. READ-ONLY

List all continents

This API helps you to view all the continents.

GET /wp-json/wc/v3/data/continents
curl https://example.com/wp-json/wc/v3/data/continents \
-u consumer_key:consumer_secret

Continents properties

AttributeTypeDescription
codestring2 character continent code. READ-ONLY
namestringFull name of continent. READ-ONLY
countriesarrayList of countries on this continent. See Continents - Countries properties READ-ONLY
Continents - Countries properties
AttributeTypeDescription
codestringISO3166 alpha-2 country code. READ-ONLY
currency_codestringDefault ISO4127 alpha-3 currency code for the country. READ-ONLY
currency_posstringCurrency symbol position for this country. READ-ONLY
decimal_sepstringDecimal separator for displayed prices for this country. READ-ONLY
dimension_unitstringThe unit lengths are defined in for this country. READ-ONLY
namestringFull name of country. READ-ONLY
num_decimalsintegerNumber of decimal points shown in displayed prices for this country. READ-ONLY
statesarrayList of states in this country. See Continents - Countries - States properties READ-ONLY
thousand_sepstringThousands separator for displayed prices in this country. READ-ONLY
weight_unitstringThe unit weights are defined in for this country. READ-ONLY
Continents - Countries - States properties
AttributeTypeDescription
codestringState code. READ-ONLY
namestringFull name of state. READ-ONLY

Retrieve continent data

This API lets you retrieve and view a continent data.

GET /wp-json/wc/v3/data/continents/<location>
curl https://example.com/wp-json/wc/v3/data/continents/eu \
-u consumer_key:consumer_secret

Continent properties

See list of continents properties.

List all countries

This API helps you to view all the countries.

GET /wp-json/wc/v3/data/countries
curl https://example.com/wp-json/wc/v3/data/countries \
-u consumer_key:consumer_secret

Countries properties

AttributeTypeDescription
codestringISO3166 alpha-2 country code. READ-ONLY
namestringFull name of country. READ-ONLY
statesarrayList of states in this country. See Countries - States properties READ-ONLY
Countries - States properties
AttributeTypeDescription
codestringState code. READ-ONLY
namestringFull name of state. READ-ONLY

Retrieve country data

This API lets you retrieve and view a country data.

GET /wp-json/wc/v3/data/countries/<location>
curl https://example.com/wp-json/wc/v3/data/countries/br \
-u consumer_key:consumer_secret

Country properties

See list of countries properties.

List all currencies

This API helps you to view all the currencies.

GET /wp-json/wc/v3/data/currencies
curl https://example.com/wp-json/wc/v3/data/currencies \
-u consumer_key:consumer_secret

Currencies properties

AttributeTypeDescription
codestringISO4217 currency code. READ-ONLY
namestringFull name of currency. READ-ONLY
symbolstringCurrency symbol. READ-ONLY

Retrieve currency data

This API lets you retrieve and view a currency data.

GET /wp-json/wc/v3/data/currencies/<currency>
curl https://example.com/wp-json/wc/v3/data/currencies/brl \
-u consumer_key:consumer_secret

Currency properties

See list of currencies properties.

Retrieve current currency

This API lets you retrieve and view store's current currency data.

GET /wp-json/wc/v3/data/currencies/current
curl https://example.com/wp-json/wc/v3/data/currencies/current \
-u consumer_key:consumer_secret

Currency properties

See list of currencies properties.