Skip to content

Commit

Permalink
[Documentation] Fix API example for creating a taxon
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Oct 2, 2018
1 parent 0d03f29 commit 8184d60
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 8184d60

Please sign in to comment.