Skip to content

Instantly share code, notes, and snippets.

@kunbud1989
Last active June 29, 2020 07:59
Show Gist options
  • Save kunbud1989/fbc5e491474314a9891dda372e094dd5 to your computer and use it in GitHub Desktop.
Save kunbud1989/fbc5e491474314a9891dda372e094dd5 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: API ARMS Insurance
version: '1.0'
description: 'ARMS Insurance for Registration, Claim and Check Paid '
contact:
name: Dedy Purbaya
servers:
- url: 'https://portalarms.com/apidev/api'
description: Development
- url: 'https://portalarms.com/apisapdit/api'
description: Production
paths:
/debitur:
get:
summary: Get Debitur ALL
operationId: get-debitur
responses:
'200':
description: OK
headers: {}
content:
application/json:
schema:
type: object
properties:
status:
type: boolean
example: 'true'
data:
type: array
items:
type: object
properties:
id:
type: string
nm_debitur:
type: string
alamat:
type: string
no_ktp:
type: string
jns_kelamin:
type: string
tmp_lahir:
type: string
tgl_lahir:
type: string
pekerjaan:
type: string
nilai_pertanggungan:
type: string
start_date:
type: string
end_date:
type: string
premi_asuransi:
type: string
no_perjanjian:
type: string
aging_hari_perjanjian:
type: string
file:
type: string
sisa_pokok_pinjaman:
type: string
status_aging:
type: string
jumlah_pencairan_dana:
type: string
tgl_bayar:
type: string
status_bayar:
type: string
no_sertifikat:
type: string
tgl_transaksi:
type: string
status_verifikasi:
type: string
status_macet:
type: string
status_klaim:
type: string
user:
type: string
examples:
Example Result:
value:
status: true
data:
- id: '1782'
nm_debitur: Kun Budiharta
alamat: 'Jl. Penerangan I No. 41A, Grogol Petamburan, Jakarta Barat'
no_ktp: '3501040411890002'
jns_kelamin: Laki-Laki
tmp_lahir: Pacitan
tgl_lahir: '1989-11-04'
pekerjaan: Pegawai Swasta
nilai_pertanggungan: '1000000'
instansi: Swasta
start_date: '2020-01-01'
end_date: '2020-01-10'
premi_asuransi: '25000'
no_perjanjian: P0ID200205000200
aging_hari_perjanjian: '0'
file: '-'
sisa_pokok_pinjaman: '3000000'
status_aging: '-'
jumlah_pencairan_dana: '0'
tgl_bayar: '0000-00-00'
status_bayar: ''
no_sertifikat: CFUT0000000038
tgl_transaksi: '2020-06-29'
status_verifikasi: '1'
status_macet: '0'
status_klaim: '1'
user: '-'
'403':
description: Invalid API Key
content:
application/json:
schema:
$ref: '#/components/schemas/Invalid'
examples:
Example Result:
value:
status: false
error: 'Invalid API key '
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Invalid'
examples:
Example Invalid:
value:
status: false
message: id tidak ada di database
security:
- key: []
parameters:
- schema:
type: string
in: query
name: id
description: ID Debitur
tags:
- Debitur
description: |
For selection spesific ID, add **id** to params
Example:
**?id=**{`id_debitur`} # for spesific id
post:
summary: Register Debitur
operationId: post-debitur
responses:
'201':
description: Created
content:
application/json:
schema:
type: object
properties:
status:
type: boolean
message:
type: string
examples:
Example Created:
value:
status: true
message: new debitur has been created
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
examples:
Example Invalid API Key:
value:
status: false
error: 'Invalid API key '
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/Invalid'
examples:
Example Exist:
value:
status: false
message: 'maaf data sudah ada...!'
description: 'Registrasi Debitur '
security:
- key: []
requestBody:
content:
application/json:
schema:
type: object
properties:
nm_debitur:
type: string
alamat:
type: string
no_ktp:
type: string
jns_kelamin:
type: string
tmp_lahir:
type: string
tgl_lahir:
type: string
pekerjaan:
type: string
nilai_pertanggungan:
type: string
start_date:
type: string
end_date:
type: string
premi_asuransi:
type: string
no_perjanjian:
type: string
aging_hari_perjanjian:
type: string
file:
type: string
sisa_pokok_pinjaman:
type: string
status_aging:
type: string
jumlah_pencairan_dana:
type: string
tgl_bayar:
type: string
status_bayar:
type: string
no_sertifikat:
type: string
tgl_transaksi:
type: string
status_verifikasi:
type: string
status_macet:
type: string
status_klaim:
type: string
user:
type: string
required:
- nm_debitur
- alamat
- no_ktp
- jns_kelamin
- tmp_lahir
- tgl_lahir
- pekerjaan
- nilai_pertanggungan
- start_date
- end_date
- no_perjanjian
examples:
Example Register:
value:
nm_debitur: Kun Budiharta
alamat: 'Jl. Penerangan I No. 41A, Grogol Petamburan, Jakarta Barat'
no_ktp: '3501040411890002'
jns_kelamin: Laki-Laki
tmp_lahir: Pacitan
tgl_lahir: '1989-11-04'
pekerjaan: Pegawai Swasta
nilai_pertanggungan: '1000000'
instansi: Swasta
start_date: '2020-01-01'
end_date: '2020-01-10'
premi_asuransi: ''
no_perjanjian: P0ID200205000200
aging_hari_perjanjian: ''
file: ''
sisa_pokok_pinjaman: ''
status_aging: ''
jumlah_pencairan_dana: ''
tgl_bayar: ''
status_bayar: ''
no_sertifikat: ''
tgl_transaksi: ''
status_verifikasi: ''
status_macet: ''
status_klaim: ''
user: ''
description: ''
tags:
- Debitur
parameters: []
parameters: []
/klaim:
post:
summary: Claim Insurance
operationId: post-klaim
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
examples:
Example Result:
value:
status: true
message: 'klaim data diterima..!'
'400':
description: Bad Request
content:
application/json:
schema:
type: object
properties: {}
examples:
Example Bad Request:
value:
status: false
message: 'klaim data diterima..!'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Invalid'
examples:
Example Invalid API Key:
value:
status: false
error: 'Invalid API key '
security:
- key: []
requestBody:
content:
application/json:
schema:
type: object
properties: {}
examples:
Example Klaim:
value:
no_perjanjian: P0ID200205000200
sisa_pokok_pinjaman: '3000000'
tags:
- Klaim
description: Endpoint Claim Insurance
parameters: []
/paid:
post:
summary: Paid Insurance
operationId: post-paid
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties: {}
examples:
Example Result:
value:
status: false
message: 'Debitur blm dibayar asuransi..!'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Invalid'
examples:
Example Invalid API Key:
value:
status: false
error: 'Invalid API key '
security:
- key: []
tags:
- Paid
description: Check Paid Status
requestBody:
content:
application/json:
schema:
type: object
properties: {}
examples:
Example Input:
value:
no_perjanjian: P0ID200205000200
parameters: []
components:
schemas:
Invalid:
title: Invalid
type: object
x-examples:
Example Invalid:
status: false
error: 'Invalid API key '
properties:
status:
type: boolean
error:
type: string
Error:
title: Error
type: object
properties:
status:
type: boolean
error:
type: string
x-examples:
Example Klaim:
status: false
message: 'klaim data diterima..!'
Example Register Debitur:
status: false
message: 'maaf data sudah ada...!'
securitySchemes:
key:
type: apiKey
in: header
name: key
description: API Key yang di-generate oleh tim ARMS
tags:
- name: Debitur
description: Documentation debitur
- name: Klaim
description: Documentation claim
- name: Paid
description: Documentation paid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment