Request Response Catalog
General Success Format
Many endpoint return patterns:
{"data": {}}
or an empty array success helper via trait/controller base.
Key Endpoint Catalog
| Endpoints | Minimum Request | Indicative Response |
|---|---|---|
POST /membership/register | name,email,password | {"data":{}} |
POST /membership/login | valid login credentials | {"data":{"access_token":"...","user":{...}}} |
POST /membership/otp/request | email 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}/approve | none (path id) | redirect back (web) |
PUT /admin/payment/{payment}/verify | none | redirect back (web) |
Visible Error Pattern
| Condition | Pattern |
|---|---|
| Unauthorized role | HTTP 403 / abort(403) |
| Invalid PO status transition | HTTP 400 + message |
| SPB approved updated | HTTP 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.