This article will guide you through deleting a time code via BioStar 2 API.

 

* API for Time Attendance has been added with BioStar 2.8.13. * 

For a more general introduction to TA API (including how to access the TA Swagger), please refer to the link below:

 [BioStar 2 TA API] Introduction to BioStar 2 TA API 

For other articled related to BioStar 2 TA Time Codes:

[BioStar 2 TA API] CreateTime Codes

[BioStar 2 TA API] Search Time Codes

[BioStar 2 TA API] Modify Time Codes

 

 

[DELETE]     /tna/pay_codes/{id}

{id} - id of the time code that you'd like to delete

 

Example via Postman

*You must log-in to T&A to use [PUT] /tna/pay_codes/<id>

*Unlike be-session-id for AC New Local API, bs-ta-session-id is sent in the Cookie automatically once you log-in via TA log-in API. So there's no need for you to save and update it separately. 

 

Before calling the API, you can see two time codes - "a", "TESTING-modified". 

Let's call the API to delete "TESTING-modified" time code which has id : 6.

After calling the API, you can see that "TESTING-modified" time code has been deleted.


[Response: Fail example : When entered Time Code does not exist]

{

    "message": "PayCode not found.",

    "message_key": "NOT_FOUND",

    "language": "en",

    "status_code": "NOT_FOUND"

}