API docsAPI docs
  • English
  • zh-CN
  • English
  • zh-CN
    • Overview
    • Request & Response
    • Get Auth Token
    • Use Auth Token
    • Api Example
    • Area
    • Department
    • Position
    • Employee
    • Resign
    • Device
    • Transaction
    • Transaction Report

Resign

List

Request

  • Method: GET
  • Url: /personnel/api/resigns/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Query Parameters
ParameterDescription
pageWhich page is displayed
page_sizeShow the number of data on this page
employeeUse this field to query
resign_typeUse this field to query
resign_dateUse this field to query

Response

{
    "count": 5,
    "next": null,
    "previous": null,
    "msg": "",
    "code": 0,
    "data": [
        {
            "id": 5,
            "resign_date": "2020-06-04",
            "resign_type": 1,
            "disableatt": true,
            "employee": {
                "id": 3,
                "emp_code": "11111122",
                "first_name": "aaabb",
                "last_name": ""
            },
            "first_name": "aaabb",
            "last_name": ""
        },
        ......
    ]
}

Read

Request

  • Method: GET

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

ParameterDescription
idrequired

Response

  • Url: /personnel/api/resigns/5/
{
    "id": 5,
    "resign_date": "2020-06-04",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

Create

  • Method: POST
  • Url: /personnel/api/resigns/
  • Headers:
    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Request Body
{
    "employee": 3,
    "disableatt": true,
    "resign_type": 1,
    "resign_date": "2020-06-01",
    "reason": ""
}

|Parameter|Required|Type| Description | | ----- | ----- |---------------------------------------------| |resign_type|Y|Integer| default value:1, can input(1-5)five options | |disableatt|Y|Bool| true or false | |resign_date|Y|String| format: yyyy-mm-dd | |employee|Y|Integer| emp ID | |reason|N|String| max length:200 char |

Response

{
    "id": 5,
    "resign_date": "2020-06-01",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

Update

Request

  • Method: PUT

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

ParameterDescription
idrequired
  • Request Body
{
    "resign_date": "2020-06-02"
}
ParameterRequiredTypeDescription
resign_typeNIntegerdefault value:1, can input(1-5)five options
disableattNBooltrue or false
disableattNStringformat: yyyy-mm-dd
reasonNStringmax length:200 char

Response

  • Url: /personnel/api/resigns/5/
{
    "id": 5,
    "resign_date": "2020-06-02",
    "resign_type": 1,
    "disableatt": true,
    "employee": {
        "id": 3,
        "emp_code": "11111122",
        "first_name": "aaabb",
        "last_name": ""
    },
    "first_name": "aaabb",
    "last_name": ""
}

Delete

Request

  • Method: DELETE

  • Url: /personnel/api/resigns/{id}/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Path Parameters

ParameterDescription
idrequired

Response

None

Reinstatement

Request

  • Method: POST

  • Url: /personnel/api/resigns/reinstatement/

  • Headers:

    • Content-Type: application/json
    • Authorization: "JWT ey.........oQi98"
  • Request Body

{
    "resigns": [1]
}
ParameterRequiredTypeDescription
resignsYListresign id list example: [1, 2, 3, ...]
Prev
Employee