<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.spiffystores.com.au/kb/index.php?action=history&amp;feed=atom&amp;title=API_Province</id>
	<title>API Province - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.spiffystores.com.au/kb/index.php?action=history&amp;feed=atom&amp;title=API_Province"/>
	<link rel="alternate" type="text/html" href="https://www.spiffystores.com.au/kb/index.php?title=API_Province&amp;action=history"/>
	<updated>2026-06-09T18:29:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.spiffystores.com.au/kb/index.php?title=API_Province&amp;diff=7212&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;A Country may have a number Provinces, which represent the various states, regions or provinces that make up the country.  Each Province resource contains information about sa...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.spiffystores.com.au/kb/index.php?title=API_Province&amp;diff=7212&amp;oldid=prev"/>
		<updated>2018-05-24T00:39:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;A Country may have a number Provinces, which represent the various states, regions or provinces that make up the country.  Each Province resource contains information about sa...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A Country may have a number Provinces, which represent the various states, regions or provinces that make up the country.&lt;br /&gt;
&lt;br /&gt;
Each Province resource contains information about sales tax and shipping that may differ from the national values.&lt;br /&gt;
&lt;br /&gt;
You can use the Province resource to retrieve and update available provinces for only the countries that a store owner has already added.&lt;br /&gt;
&lt;br /&gt;
For information on accessing the tax information for an entire country, including its provinces, see the Country resource.&lt;br /&gt;
&lt;br /&gt;
== Province Properties ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;reference&amp;quot;&lt;br /&gt;
!id&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;id&amp;quot; : 1218 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
A unique numeric identifier for the province.&lt;br /&gt;
|-&lt;br /&gt;
!name&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;name&amp;quot;: &amp;quot;New South Wales&amp;quot; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The full name of the province in English.&lt;br /&gt;
|-&lt;br /&gt;
!code&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;code&amp;quot;: &amp;quot;NSW&amp;quot; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The international province code.&lt;br /&gt;
|-&lt;br /&gt;
!country_id&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;country_id&amp;quot;: 113 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
A unique numeric identifier for the province&amp;#039;s country.&lt;br /&gt;
|-&lt;br /&gt;
!tax&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;tax&amp;quot;: 0.0 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The provincial sales tax rate applied to orders made by customers from that province.&lt;br /&gt;
|-&lt;br /&gt;
!tax_percentage&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;tax_percentage&amp;quot;: 0.0 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The provincial sales tax rate applied to orders made by customers from that province. This is expressed as a percentage.&lt;br /&gt;
|-&lt;br /&gt;
!tax_name&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;tax_name&amp;quot;: &amp;quot;GST&amp;quot; }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The name of the provincial sales tax.&lt;br /&gt;
|-&lt;br /&gt;
!free_shipping&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;free_shipping&amp;quot;: true }&amp;lt;/pre&amp;gt;&lt;br /&gt;
Indicates that the province is eligible for free shipping.&lt;br /&gt;
|-&lt;br /&gt;
!handling_fee&lt;br /&gt;
|&amp;lt;pre&amp;gt;{ &amp;quot;handling_fee&amp;quot;: 0.0 }&amp;lt;/pre&amp;gt;&lt;br /&gt;
The default handling fee that is added to the cost of shipping to the province.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Endpoints ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;GET /api/countries/COUNTRY_ID/provinces.json&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieve a list of all provinces for the country.&lt;br /&gt;
&lt;br /&gt;
==== Optional Parameters ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;reference&amp;quot;&lt;br /&gt;
!limit&lt;br /&gt;
|Number of results returned. The default is 30, with a maximum of 50 in a single request.&lt;br /&gt;
|-&lt;br /&gt;
!page&lt;br /&gt;
|The number of the page to return. The number of results per page is set by the &amp;lt;code&amp;gt;limit&amp;lt;/code&amp;gt; parameter. If more results are required, then submit the request again, increasing the page number each time.&lt;br /&gt;
|-&lt;br /&gt;
!since_id&lt;br /&gt;
|Limit the results to only include objects which have an id greater than the given value.&lt;br /&gt;
|-&lt;br /&gt;
!fields&lt;br /&gt;
|A comma-separated list of fields to return in the response.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Request and Response ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /api/countries/113/provinces.json&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;provinces&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;id&amp;quot;: 1218,&lt;br /&gt;
      &amp;quot;name&amp;quot;: &amp;quot;Australian Capital Territory&amp;quot;,&lt;br /&gt;
      &amp;quot;code&amp;quot;: &amp;quot;ACT&amp;quot;,&lt;br /&gt;
      &amp;quot;country_id&amp;quot;: 113,&lt;br /&gt;
      &amp;quot;tax&amp;quot;: 0.0,&lt;br /&gt;
      &amp;quot;tax_percentage&amp;quot;: 0.0,&lt;br /&gt;
      &amp;quot;tax_name&amp;quot;: &amp;quot;GST&amp;quot;,&lt;br /&gt;
      &amp;quot;free_shipping&amp;quot;: true,&lt;br /&gt;
      &amp;quot;handling_fee&amp;quot;: 0.0&lt;br /&gt;
    }, ...&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Examples using filters&lt;br /&gt;
&lt;br /&gt;
GET /api/countries/113/provinces.json?fields=id,name,tax_name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;GET /api/countries/COUNTRY_ID/provinces/count.json&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Return a count of the number of provinces for the country.&lt;br /&gt;
&lt;br /&gt;
==== Example Request and Response ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /api/countries/113/provinces/count.json&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;count&amp;quot;: 6&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;GET /api/countries/COUNTRY_ID/provinces/PROVINCE_ID.json&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Retrieves a single province by ID.&lt;br /&gt;
&lt;br /&gt;
==== Optional Parameters ====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;reference&amp;quot;&lt;br /&gt;
!fields&lt;br /&gt;
|A comma-separated list of fields to return in the response.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example Request and Response ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET /api/countries/113/provinces/1218.json&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;province&amp;quot;: {&lt;br /&gt;
    &amp;quot;id&amp;quot;: 1218,&lt;br /&gt;
    &amp;quot;name&amp;quot;: &amp;quot;Australian Capital Territory&amp;quot;,&lt;br /&gt;
    &amp;quot;code&amp;quot;: &amp;quot;ACT&amp;quot;,&lt;br /&gt;
    &amp;quot;country_id&amp;quot;: 113,&lt;br /&gt;
    &amp;quot;tax&amp;quot;: 0.0,&lt;br /&gt;
    &amp;quot;tax_percentage&amp;quot;: 0.0,&lt;br /&gt;
    &amp;quot;tax_name&amp;quot;: &amp;quot;GST&amp;quot;,&lt;br /&gt;
    &amp;quot;free_shipping&amp;quot;: true,&lt;br /&gt;
    &amp;quot;handling_fee&amp;quot;: 0.0&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;PUT /api/countries/COUNTRY_ID/provinces/PROVINCE_ID.json&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Updates a store province.&lt;br /&gt;
&lt;br /&gt;
==== Example Request and Response ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PUT /api/countries/113/provinces/1218.json&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;province&amp;quot;: {&lt;br /&gt;
    &amp;quot;id&amp;quot;: 1213,&lt;br /&gt;
    &amp;quot;free_shipping&amp;quot;: false&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Further Reference ==&lt;br /&gt;
&lt;br /&gt;
* [[An Introduction to the Spiffy Stores API]]&lt;br /&gt;
* [[Creating Private API Keys]]&lt;br /&gt;
* [[Using the API]]&lt;br /&gt;
* [[API Reference]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>