PAFI API
API Endpoint
https://api.webpafi.com/api/v1Halaman ini merupakan api docs dari sistem sipafi.
Authentication
The API uses oAuth2 for authentication, this means that all API calls should contain and authorization that looks like this
Authorization: Bearer API_KEY_HERE
Please see the Authentication documentation to know how to get an access token.
Headers
Make sure you have the following content type headers are set on every request:
Accept: application/json
Content-Type: application/json
Errors
The API uses conventional HTTP response codes to indicate the success or failure of an API request. The table below contains a summary of the typical response codes:
Code | Description |
---|---|
200 | Everything is ok. |
400 | Valid data was given but the request has failed. |
401 | No valid API Key was given. |
404 | The request resource could not be found. |
405 | The method is not implemented |
413 | The Body is too large |
422 | The payload has missing required parameters or invalid data was given. |
429 | Too many attempts. |
500 | Request failed due to an internal error. |
503 | API is offline for maintenance. |
Auth ¶
The auth API will allow you to work with the users registration and password management.
Tokens ¶
Headers
Content-Type: application/json
Body
{
"grant_type": "client_credentials",
"client_id": "1",
"client_secret": "isudaiusyd87a6s87atsd8a7std",
"scope": "read-kecukupan-skp"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"grant_type": {
"type": "string",
"description": "The grant type to use"
},
"client_id": {
"type": "string",
"description": "the client id"
},
"client_secret": {
"type": "string",
"description": "The client secret"
},
"scope": {
"type": "string",
"description": "Scope for role auth"
}
},
"required": [
"grant_type",
"client_id",
"client_secret",
"scope"
]
}
Headers
Content-Type: application/json
Body
{
"status_code": 200,
"token_type": "Bearer",
"expires_in": "86400",
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNDNjYTE2ZDNjZTEwYmIyZDZjYmQwYjE1ZjU0ZmY2NDhiODkxZGVlYzJmZGE4YTE3NGEzNjE3NzZlMDEzMzdmMDcyMDVjYzM2OGUzYzkwMjUiLCJpYXQiOiIxNjEwMjQ3NTUwLjkwMzEzMSIsIm5iZiI6IjE2MTAyNDc1NTAuOTAzMTM3IiwiZXhwIjoiMTYxMDMzMzk1MC41MTc3ODAiLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.YNlBKazrYQ0CSFmWIUFeOl7ODDC3Sw-fiQyZ1Behyl7-_9fp7akuhmvGXeOJCYQiS1-tsYbkckaauVRlgpfeMExcxe261-8WWEGU0HQDaHxrXcojWQr5LwsnCno_elxLsqoXRZXrKe8s70zs6wwKnqc8tZkrUDkpFt4bjHHtCF1M4xGxA8kNNFs_sqyN0P-amWt1gfuMaALWxgYeISpAAzfP6KgqWVmP3JqDWQAIMhh8NO2kEkfE6rgxQXp0zzvlvvZ7RSYc0sV8JrSnwa15z-q7-1oQ4XFqmYxv-90i_Jrf5N3gz-VON6ovt26Vh7qNeHKFkf98DwHiu5XF6cDHpiZBKwfjlFzG6-0ZPN1ROIXPt5Bk35xLlUUgB6f5kPHZMPfMTuWGneeTbFm_5igdyxwaBqEVfVnuFPnIv5oaKKbAQleyo-yt_LZe9qxFNx-LFlMHmDyAqdfKkra0HG6dCfxynV6x2RtRZHyicN6fDPekTMBs356vNlRRL1dEEzZ4Fbpft4TRZylyqarAXfGb7kCKCuuuHbO8LT6f2yk5JW3Ngc-gfb1dfTO0bfgtl0Rg6l8PWGStSnmyXqeNxLej0XKhrPuqft1JFtucUCw8gUjrcuqSmAAzvXBTbLLvb65WSTnl_tOFviaSeBF-zCJxkxD2uJ1b31YuKMkVd-9dpMs"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"status_code": {
"type": "number",
"description": "Status code response"
},
"token_type": {
"type": "string",
"description": "The token type"
},
"expires_in": {
"type": "string",
"description": "When the token expires"
},
"access_token": {
"type": "string",
"description": "The Access token"
}
}
}
Headers
Content-Type: application/json
Body
{
"message": "Unauthenticated.",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status_code": {
"type": "number"
}
}
}
Get a tokenPOST/oauth/token
Use this endpoint to get access tokens for the user, the API currently uses oAuth2 and supports 2 grants.
- Client: Use grant
client_credentials
when the client is providing client id and client secret
Kecukupan SKP API ¶
API yang berurusan dengan kecukupan SKP anggota
Kecukupan SKP resource ¶
Harus mempunyai scope untuk read / write kecukupan skp
Headers
Content-Type: application/json
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjBlOGVhOGY0YWY2Yjg3NzU0YjZjZDBjNjdkNzBmMjdhYTZkMmRjNjU3YzIwYTU0MjQ3NWRlZGU4Y2VkNTc1N2IwZDcwMWFmNTAyMGU4MGE4In0.eyJhdWQiOiIxIiwianRpIjoiMGU4ZWE4ZjRhZjZiODc3NTRiNmNkMGM2N2Q3MGYyN2FhNmQyZGM2NTdjMjBhNTQyNDc1ZGVkZThjZWQ1NzU3YjBkNzAxYWY1MDIwZTgwYTgiLCJpYXQiOjE0NzYyOTk1NTQsIm5iZiI6MTQ3NjI5OTU1NCwiZXhwIjoxNDc3NTk1NTU0LCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.gTOotTVp2eF_HvuW48ngGqdly4bocNMlvY0al0YmYPJ_tjBQYegE4AjtCH2bWUf9aUz8tQqhMr2UFae3JV6VDQC9VzoGK8gU_nulM0BkqaCCxadqrw_slcd4he9hT0FE3WshvdZKcmgaVovgrI2-sAnX3n749BiWtWLEpw6x-TdEHEVcW6uRfRWyrwKhPBfOk-hXpgbecgT8LYdBW531P1ryjSJzzi5zBEe0Ecbp9Lo-fV69AW8ZBnG1DBjzxW-hvE0rRLXXnI4-f9rbQfK6QUzfG3Dg2INexcKxu9sQ3Vn5wHhQyu4_nTNQh8rsgphdAqFnEo-FQZrRWejkKbOi_BcpQybaXNn7Qln-96QF6PAzT-2E08VmL4XeVNcSvmM1sPVwirnSXo4UIFSsHvvIdVfEYEXD8XDonlnVO74RgBDMXWs6xo7dmDNaqQxKt9J_s_xtmyM3w62C4QucKw7MY0zOqviEyXySbrYbgazO_Pl1--GXtksE8tVMW8OW6Y8fw0JE0GEd5hZVadR277A5164QAJhiGXI_mKNTtUZVNaj0JpKEQpu4tod_BJR_DxzvcpKHwc1YrfrPOul6mL4kZeafkehPe79jxrCXKgKEuGlgSFcyrXUNCtME9LxsMID6QpJ-tfx4i0jqjixd_smqpjPPYqhPuqhox3uMLcDgM6s
Headers
Content-Type: application/json
Body
{
"error": false,
"status_code": 200,
"message": "Nomor berhasil ditemukan",
"nama_anggota": "Dummy Data S.Farm",
"nik": "3206021201960046",
"tgl_lahir": "19-02-1998",
"gender": "pria",
"no_str": "12345update",
"tgl_mulai_str": "02-03-2023",
"tgl_berakhir_str": "03-03-2024",
"Pembelajaran": 24,
"Profesionalisme": 0,
"Pengabdian_Masyarakat_dan_Profesi": 28,
"Publikasi_Ilmiah": 0,
"Pengembangan_Ilmu": 0,
"Total_SKP": 52,
"nomor_surat": "28-1.3204.19021998.1.00000001",
"Status_Rekom": "Sudah Terbit",
"OP": "Persatuan Ahli Farmasi Indonesia (PAFI)"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "boolean"
},
"status_code": {
"type": "number"
},
"message": {
"type": "string"
},
"nama_anggota": {
"type": "string"
},
"nik": {
"type": "string"
},
"tgl_lahir": {
"type": "string"
},
"gender": {
"type": "string"
},
"no_str": {
"type": "string"
},
"tgl_mulai_str": {
"type": "string"
},
"tgl_berakhir_str": {
"type": "string"
},
"Pembelajaran": {
"type": "number"
},
"Profesionalisme": {
"type": "number"
},
"Pengabdian_Masyarakat_dan_Profesi": {
"type": "number"
},
"Publikasi_Ilmiah": {
"type": "number"
},
"Pengembangan_Ilmu": {
"type": "number"
},
"Total_SKP": {
"type": "number"
},
"nomor_surat": {
"type": "string"
},
"Status_Rekom": {
"type": "string"
},
"OP": {
"type": "string"
}
}
}
Headers
Content-Type: application/json
Body
{
"message": "Unauthenticated.",
"status_code": 401
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status_code": {
"type": "number"
}
}
}
Headers
Content-Type: application/json
Body
{
"message": "Forbidden",
"status_code": 403
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status_code": {
"type": "number"
}
}
}
Headers
Content-Type: application/json
Body
{
"message": "404 Not found",
"status_code": 404
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"status_code": {
"type": "number"
}
}
}
Get Kecukupan SKP by NIKGET/pengajuan/kecukupan-skp/user/{nik}
Endpoint ini untuk mendapatkan data kecukupan skp by NIK anggota
- nik
string
(required) Example: 320485435353xxxx
Generated by aglio on 20 Feb 2024