Core
  1. Letter Actions
Core
  • Introduction
    • What is Core
    • HTTP Statuses
    • Request
    • Responses
    • Meta
    • Limit & Pagination
    • Query Parameters
  • Quick Start
    • Letters
  • Auth
    • Sign In with Email and Password
      POST
    • Get the Current Session
      GET
    • Sign Out the Current User
      POST
  • Users
    • Get All Users
      GET
    • Create a User
      POST
    • Retrieve an Existing User
      GET
    • Delete an Existing User
      DELETE
    • Update an Existing User
      PATCH
    • Get Current User
      GET
    • Update Current User
      PATCH
    • Get Current User Devices
      GET
    • Retrieve User Devices by User ID
      GET
    • Update Own Profile Image
      POST
    • Update User Image
      POST
    • Reset User Password
      PATCH
    • Get User Login History
      GET
  • Staff
    • Get All Staff
    • Retrieve an Existing Staff
    • Create a Staff
    • Delete an Existing Staff
    • Update an Existing Staff
  • Teachers
    • Get All Teachers
    • Retrieve an Existing Teacher
    • Create a Teacher
    • Delete an Existing Teacher
    • Update an Existing Teacher
  • Students
    • Get All Students
    • Retrieve an Existing Student
    • Create a Student
    • Delete an Existing Student
    • Update an Existing Student
    • Import Bulk Students
  • Roles
    • Get All Roles
    • Create a Role
    • Retrieve an Existing Role
    • Update an Existing Role
    • Delete an Existing Role
    • Get All Eligible Users for Role
    • Get All Members of Role
    • Add Bulk Member to Role
    • Remove Bulk Members from Role
  • Classes
    • Get All Classes
    • Create a Class
    • Delete an Existing Student Copy
    • Create a Class Copy
  • Statistics
    • Teachers
      • Get Teacher Gender Stats
      • Get Teacher Religion Distribution
      • Get Teacher Employment Stats
      • Get Teacher Age Stats
    • Students
      • Get Student Gender Stats
      • Get Student Religion Distribution
      • Get Student Weight Stats
      • Get Student Height Stats
      • Get Student Age Stats
      • Get Student Transportation Stats
      • Get Student Class Stats
    • Staffs
      • Get Staffs Gender Stats
      • Get Staffs Religion Distribution
      • Get Staffs Age Stats
      • Get Staffs Employment Stats
    • Users
      • Retrieve User Summary
    • Get All Stats
  • Letters
    • Get All Letters
    • Retrieve an Existing Letter
    • Create a Letter
    • List User Letter
    • List Current User Letter
    • List Recipients
  • Letter Actions
    • Initiate a Letter Action
      POST
  • Files
    • Create a Presigned URL
  • Schemas
    • Schemas
      • Letter
        • LetterHistory
        • LetterStatus
        • LetterType
      • User
        • UserProfile
      • Address
      • Meta
      • Base
      • bloodType
      • Religion
      • Gender
      • ParentInfo
      • Error
      • GenderStats
      • ReligionDistribution
      • WeightStats
      • HeightStats
      • AgeStats
      • TransportationStats
      • ClassStats
      • EducationHistoryObject
      • EmploymentStats
      • Location
      • EconomyStats
      • Actor
    • Model
      • User
      • Teacher
      • Staff
      • Student
      • Letter
      • Class
      • Roles
    • LoginHistory
  1. Letter Actions

Initiate a Letter Action

Designing
POST
/letters/{letter_id}/actions
To initiate an action on a Letter send a POST request to /letters/{letter_id}/actions.
In the JSON body to the request, set the type attribute to on of the supported action types:
ActionDetailsAdditionally Required PermissionNoteWho
PROCESSProcesses the Letter immediately.process:letterOptionalReviewer
APPROVEApproves the Letter.process:letterOptionalReviewer
REJECTRejects the Letter.process:letterRequiredReviewer
REVISERequests a revision for the Letter.process:letterRequiredReviewer
RESUBMITResubmits the Letter after revision.create:letterOptionalApplicant
CANCELCancels the Letter.create:letterOptionalApplicant
The type attribute set in the request body will specify the action that will be taken on the Letter. Some actions will require additional attributes to be set as well.

Request

Path Params

Body Params application/json

Examples
{
    "action": "RESUBMIT",
    "subject": "Dispen Lomba Basket",
    "beginDate": "2026-01-12T07:33:46.897Z",
    "endDate": "2026-01-12T07:33:46.897Z",
    "attachment": "https://murky-widow.biz.id/",
    "reason": "Buat lomba",
    "recipientIds": [
        "c30473ac4baf4e5cfecb4f9d",
        "ef46a9ce8fb5bacdfc9ec49a"
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location --request POST 'https://sims.sman1samarinda.sch.id/api/letters/c0d6fa82d0c90de6496fd980/actions' \
--header 'Content-Type: application/json' \
--data-raw '{
    "action": "RESUBMIT",
    "subject": "Dispen Lomba Basket",
    "beginDate": "2026-01-12T07:33:46.897Z",
    "endDate": "2026-01-12T07:33:46.897Z",
    "attachment": "https://murky-widow.biz.id/",
    "reason": "Buat lomba",
    "recipientIds": [
        "c30473ac4baf4e5cfecb4f9d",
        "ef46a9ce8fb5bacdfc9ec49a"
    ]
}'

Responses

🟢200OK
application/json
Body

Example
{
    "success": true,
    "message": "OK.",
    "meta": {
        "page": 9,
        "limit": 5,
        "total": 8830
    },
    "errors": [
        {
            "code": "042",
            "field": "email",
            "message": "Email invalid"
        }
    ],
    "result": {
        "id": "68f44fb8040041adaee70c93",
        "applicant": {
            "id": "4a9bb1e7a8b58f8bc55b0a92",
            "name": "Saraswati Farhunnisa",
            "email": "Ajimin14@yahoo.com",
            "image": "https://avatars.githubusercontent.com/u/3693880"
        },
        "reviewer": null,
        "subject": "Judul Dispensasi",
        "letterType": "DISPENSATION",
        "status": "PENDING",
        "beginDate": "2026-01-12T07:35:36.616Z",
        "endDate": "2026-01-12T07:35:36.616Z",
        "attachment": "https://via.placeholder.com/347x216/4fa57c/adcdb7.jpeg",
        "reason": "Lomba",
        "recipients": [
            {
                "id": "7e10cbdf1c8cdb1aea9aca2f",
                "name": "Hartati Fara",
                "email": "Kezia_Tarihoran@yahoo.com",
                "image": "https://avatars.githubusercontent.com/u/86660607"
            },
            {
                "id": "bfd6fa0c2c1a9e333696a78d",
                "name": "Jefri Jefri Oktavian",
                "email": "Jayeng.Kusuma@yahoo.co.id",
                "image": "https://avatars.githubusercontent.com/u/43132757"
            },
            {
                "id": "94edab92ba61a3dcf5b22cd1",
                "name": "Wani Wani Suartini",
                "email": "Kemal45@gmail.co.id",
                "image": "https://avatars.githubusercontent.com/u/50676525"
            }
        ],
        "isPrinted": true,
        "letterNumber": "2570116359423895",
        "letterDate": "2026-01-12T07:35:36.620Z",
        "letterResult": "https://via.placeholder.com/518x1319/eb6ee6/b17f83.gif",
        "createdAt": "2026-01-12T07:35:36.620Z",
        "updatedAt": "2026-01-12T07:35:36.620Z"
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🔴500Server Error
Modified at 2026-01-15 10:20:29
Previous
List Recipients
Next
Create a Presigned URL
Built with