Skip to content

Commit

Permalink
IVIS-46: - Update API chapter (applicationformsteps).
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanPopenko committed Oct 26, 2016
1 parent 4434a6f commit 650e5c0
Showing 1 changed file with 108 additions and 54 deletions.
162 changes: 108 additions & 54 deletions docs/api/applicationformsteps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

``(implementation of ApplicationFormStep entity)``

Provides following methods for `API <index.html>`_ calls:
Provides following method for `API <index.html>`_ calls:

* `Get applicationFormStep`_
* `Get applicationFormSteps`_
* `Save applicationFormStep`_
* `Save applicationFormSteps`_
* `Update applicationFormStep`_
* `Delete applicationFormStep`_
* `Get applicationFormStep or applicationFormSteps by personal id`_
* `Get applicationFormStep or applicationFormSteps by name`_

.. _`Get applicationFormStep`:

Expand All @@ -33,38 +36,36 @@ Parameters response:
*Object*

*With properties:*
#. id (Number)
#. name (String)
#. text (String)
#. sort_order (Number)
#. question_groups (Array)
#. application_form (Object)

.. note::

sort_order represent unique number according to sort purpose

question_groups relates to ApplicationFormStepGroup entity

application_form relates to ApplicationForm entity
#. id(NUMBER)
#. name(STRING)
#. sort_order(NUMBER)
#. text(STRING)
#. question_groups(ARRAY)
type of `ApplicationFormQuestionGroup <http://docs.ivis.se/en/latest/api/applicationformquestiongroup.html>`_
#. application_form(OBJECT)
type of `ApplicationForm <http://docs.ivis.se/en/latest/api/applicationform.html>`_

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json
{
"id":1,
"name":"Name",
"text":"Definition",
"sort_order":1,
"question_groups":[],
"application_form":{}
"id" : 0,
"name" : "",
"sort_order" : 0,
"text" : "",
"question_groups" : [ ],
"application_form" : {
"id" : null,
"name" : null,
"version" : null
}
}
.. _`Get applicationFormSteps`:
.. _`Get applicationformsteps`:

Get applicationFormSteps
Get applicationformsteps
------------------------

URL:
Expand All @@ -84,21 +85,8 @@ Parameters response:
*Array*

.. seealso::
Array consists of objects from `Get applicationFormStep`_ method

Example of response:
~~~~~~~~~~~~~~~~~~~~

.. code-block:: json

[
{},
{},
...
{}
]
.. _`Save applicationFormStep`:
Array consists of objects from `Get applicationFormStep`_ method

Save applicationFormStep
------------------------
Expand All @@ -113,20 +101,39 @@ Method:

Parameters request:
~~~~~~~~~~~~~~~~~~~
*Object*
*OBJECT(ApplicationFormStep)*

*With properties what you want to create, except id*
Parameters response:
~~~~~~~~~~~~~~~~~~~~
*OBJECT(ApplicationFormStep)*

.. seealso::
Whole properties list you can see at `Get applicationFormStep`_
Null properties:
~~~~~~~~~~~~~~~~
*id*

Save applicationformsteps
-------------------------

URL:
~~~~
*/applicationformsteps*

Method:
~~~~~~~
*POST*

Parameters request:
~~~~~~~~~~~~~~~~~~~
*Array(ApplicationFormStep)*

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*Object*
*Array(ApplicationFormStep)*
Null properties of every object in array:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*id*

*On server fill id*

.. _`Update applicationFormSteps`:
.. _`Update applicationFormStep`:

Update applicationFormStep
--------------------------
Expand All @@ -141,18 +148,17 @@ Method:

Parameters request:
~~~~~~~~~~~~~~~~~~~
*Object*

*With properties what you want to update, except id*

.. seealso::
Whole properties list you can see at `Get applicationFormStep`_
*OBJECT(ApplicationFormStep)*

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*Object*
*OBJECT(ApplicationFormStep)*

.. note::

property will be updated, if you don't want update property it need set null

.. _`Delete applicationFormSteps`:
.. _`Delete applicationFormStep`:

Delete applicationFormStep
--------------------------
Expand All @@ -171,5 +177,53 @@ Parameters request:

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*Object*
*OBJECT(ApplicationFormStep)*

.. note::

you receive deleted object

.. _`Get applicationFormStep or applicationFormSteps by personal id`:

Get applicationFormStep or applicationFormSteps by personal id
-----------------------------------------------------------

URL:
~~~~
*/applicationformsteps*

Method:
~~~~~~~
*GET*

Parameters request:
~~~~~~~~~~~~~~~~~~~
*personalId(STRING)*
and optional *first(BOOLEAN)*

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*ARRAY or OBJECT (ApplicationFormStep)*

.. _`Get applicationFormStep or applicationFormSteps by name`:

Get applicationFormStep or applicationFormSteps by name
-------------------------------------------------------

URL:
~~~~
*/applicationformsteps*

Method:
~~~~~~~
*GET*

Parameters request:
~~~~~~~~~~~~~~~~~~~
*name(STRING)*
and optional *first(BOOLEAN)*

Parameters response:
~~~~~~~~~~~~~~~~~~~~
*ARRAY or OBJECT (ApplicationFormStep)*

0 comments on commit 650e5c0

Please sign in to comment.