Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] Fix API example for creating a taxon #9755

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Documentation] Fix API example for creating a taxon
  • Loading branch information
pamil committed Oct 2, 2018
commit e8204de89392cf2a43287e52ce950f1fa23e6762
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