Skip to content

Commit

Permalink
Merge pull request #9755 from pamil/1.1-taxons-api-docs
Browse files Browse the repository at this point in the history
[Documentation] Fix API example for creating a taxon
  • Loading branch information
pamil authored Oct 2, 2018
2 parents 1f5d48c + e8204de commit e9b97ca
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions docs/api/taxons.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ Definition
+------------------------------------+----------------+--------------------------------------+
| code | request | **(unique)** Taxon identifier |
+------------------------------------+----------------+--------------------------------------+
| translations['localeCode']['name'] | request | Taxon name |
+------------------------------------+----------------+--------------------------------------+
| translations['localeCode']['slug'] | request | **(unique)** Taxon slug |
+------------------------------------+----------------+--------------------------------------+

Example
^^^^^^^
Expand All @@ -91,7 +95,13 @@ To create new taxon use the below method:
-X POST \
--data '
{
"code": "toys"
"code": "toys",
"translations": {
"en_US": {
"name": "Toys",
"slug": "category/toys"
}
}
}
'
Expand Down Expand Up @@ -170,10 +180,6 @@ You can also create a taxon with additional (not required) fields:
+-------------------------------------------+----------------+------------------------------------+
| Parameter | Parameter type | Description |
+===========================================+================+====================================+
| translations['localeCode']['name'] | request | Name of the taxon |
+-------------------------------------------+----------------+------------------------------------+
| translations['localeCode']['slug'] | request | **(unique)** Slug |
+-------------------------------------------+----------------+------------------------------------+
| translations['localeCode']['description'] | request | Description of the taxon |
+-------------------------------------------+----------------+------------------------------------+
| parent | request | The parent taxon's code |
Expand Down

0 comments on commit e9b97ca

Please sign in to comment.