Skip to main content

Request Response Catalog

General Success Format

Many endpoint return patterns:

{"data": {}}

or an empty array success helper via trait/controller base.

Key Endpoint Catalog

EndpointsMinimum RequestIndicative Response
POST /membership/registername,email,password{"data":{}}
POST /membership/loginvalid login credentials{"data":{"access_token":"...","user":{...}}}
POST /membership/otp/requestemail or phone data according to validator{"data":{}}
POST/PATCH /api/v1/project/spb/{spb}/po/{po}status, notes?, photo?success payload (success() helper)
PUT /admin/payment/{payment}/approvenone (path id)redirect back (web)
PUT /admin/payment/{payment}/verifynoneredirect back (web)

Visible Error Pattern

ConditionPattern
Unauthorized roleHTTP 403 / abort(403)
Invalid PO status transitionHTTP 400 + message
SPB approved updatedHTTP 403 JSON error object (API PM SPB update)

Example of Objective Error

{
"error": {
"code": 403,
"title": "Perubahan Tidak Diizinkan",
"message": "SPB sudah disetujui, tidak dapat diubah.",
"errors": []
}
}

Verification Notes

  • Status: Partial
  • Scope: The error format is not yet uniform between web/API controllers.
  • Action: Define a standard error contract and mark endpoints that are/are not compliant.