{"id":12631,"date":"2024-06-25T14:13:26","date_gmt":"2024-06-25T11:13:26","guid":{"rendered":"https:\/\/availo.app\/?post_type=documents&p=12631"},"modified":"2024-06-25T14:13:29","modified_gmt":"2024-06-25T11:13:29","slug":"create-leave","status":"publish","type":"documents","link":"https:\/\/availo.app\/en\/documents\/%d9%85%d8%b3%d8%aa%d9%86%d8%af%d8%a7%d8%aa-api\/create-leave\/","title":{"rendered":"Create Leave"},"content":{"rendered":"\n

<\/p>\n\n\n\n

<\/p>\n\n\n\n

Link: <\/strong>{Base_Url}\/<\/a>api\/leave\/Create<\/p>\n\n\n\n

Method Type: <\/strong>POST<\/p>\n\n\n\n

Content Type: <\/strong>Application\/Json<\/p>\n\n\n\n

Description<\/strong>: <\/strong>Create list of approved vacations by username (Max count 10 in List).<\/p>\n\n\n\n

<\/p>\n\n\n\n

Request object:<\/strong><\/p>\n\n\n\n

Field<\/td>Required<\/td>Type<\/td>Description<\/td><\/tr>


username<\/td>


Yes<\/td>


String<\/td>


 Username of the user in Availo system<\/td><\/tr>


dateFrom<\/td>


Yes<\/td>


Datetime<\/td>


Vacation Start Date<\/td><\/tr>


dateTo<\/td>


Yes<\/td>


Datetime<\/td>


Vacation End Date<\/td><\/tr>


typeID<\/td>

                                    No
<\/td>


  <\/em><\/strong>Int<\/td>


  <\/em><\/strong>          Vacation Type Id
          Default value = 12
** Please find the values in the image below<\/td><\/tr>

FromTime<\/td>


No<\/td>


Datetime<\/td>
<\/strong>
<\/strong>Vacation start time ex.<\/strong>“FromTime”<\/strong>: <\/strong>“12:06:00”<\/strong>,<\/strong><\/td><\/tr>

ToTime<\/td>


No<\/td>


Datetime<\/td>

<\/strong>Vacation end time ex.<\/strong>“ToTime”<\/strong>: <\/strong>“13:06:00”<\/strong>,<\/strong><\/td><\/tr>


notes<\/td>


                  No<\/td>


          String<\/td>


            Vacation <\/em><\/strong>Notes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

Type Id Values:<\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

Sample Request:<\/strong><\/p>\n\n\n\n

<\/p>\n\n\n\n

Sample request(1) :\u00a0<\/strong><\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

Sample request (2)<\/strong><\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n

<\/p>\n\n\n\n

Response object:<\/em><\/strong><\/p>\n\n\n\n


Field<\/td>

Type<\/td>

Description<\/td><\/tr>
status<\/td>Int<\/td>
True \ud83e\udc6a Added successfully 
False \ud83e\udc6a Error  <\/td><\/tr>
data<\/td>
List of Long Int<\/td>

The leaves Id’s
**(return if valid leaves)<\/td><\/tr>
message<\/td>
String<\/td>

If error will return a message<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

<\/p>\n\n\n\n

Sample Response:<\/strong><\/p>\n\n\n\n

\"\"\/<\/figure>\n\n\n\n
\"\"\/<\/figure>\n","protected":false},"excerpt":{"rendered":"

Link: {Base_Url}\/api\/leave\/Create Method Type: POST Content Type: Application\/Json Description: Create list of approved vacations by username (Max count 10 in List). Request object: Field Required Type Description username Yes String  Username of the user in Availo system dateFrom Yes Datetime Vacation Start Date dateTo Yes Datetime Vacation End Date typeID                                     No   Int             Vacation Type Id  […]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":12458,"menu_order":0,"template":"","_links":{"self":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12631"}],"collection":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents"}],"about":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/types\/documents"}],"author":[{"embeddable":true,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12631\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/documents\/12458"}],"wp:attachment":[{"href":"https:\/\/availo.app\/en\/wp-json\/wp\/v2\/media?parent=12631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}