{
    "openapi": "3.0.3",
    "info": {
        "title": "Daftar Rekening API",
        "version": "2",
        "description": "Dokumentasi dinamis command Api_post_query."
    },
    "servers": [
        {
            "url": "https://rnd.microdata.co.id/datasoft-api/app"
        }
    ],
    "tags": [
        {
            "name": "Akuntansi"
        }
    ],
    "paths": {
        "/Api_post_query": {
            "post": {
                "tags": [
                    "Akuntansi"
                ],
                "summary": "Daftar Rekening",
                "description": "Menampilkan maksimal 500 rekening per cabang, dengan filter status dan pencarian nomor/nama.",
                "operationId": "acc_rekening_list",
                "security": [
                    {
                        "DsoApiKey": [],
                        "BasicAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/ACC_REKENING_LISTRequest"
                            },
                            "examples": {
                                "acc_rekening_list": {
                                    "summary": "Daftar Rekening",
                                    "value": {
                                        "username": "{{TENANT_USERNAME}}",
                                        "password": "{{TENANT_PASSWORD}}",
                                        "command": "ACC_REKENING_LIST",
                                        "params": {
                                            "CABANG": "0001",
                                            "KEYWORD": "Kas",
                                            "NONAKTIF": 0
                                        },
                                        "request_id": "REQ-YYYYMMDDHHMMSS"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Command berhasil",
                        "content": {
                            "application/json": {
                                "example": {
                                    "method": "post",
                                    "mode": "command",
                                    "message": "success",
                                    "data": {
                                        "success": true,
                                        "command": "ACC_REKENING_LIST",
                                        "version": 2,
                                        "request_id": "REQ-YYYYMMDDHHMMSS",
                                        "database": "dsoidcom_domain_unit",
                                        "transaction": "PARTIAL",
                                        "execution_time_ms": 12,
                                        "data": {
                                            "list_rekening": {
                                                "affected_rows": 0,
                                                "insert_id": 0,
                                                "rows": [
                                                    {
                                                        "FIELD": "value"
                                                    }
                                                ]
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "Validasi atau eksekusi gagal",
                        "content": {
                            "application/json": {
                                "example": {
                                    "method": "post",
                                    "mode": "command",
                                    "message": "failed",
                                    "data": {
                                        "success": false,
                                        "command": "ACC_REKENING_LIST",
                                        "request_id": "REQ-YYYYMMDDHHMMSS",
                                        "error": {
                                            "code": "PARAMETER_INVALID",
                                            "message": "Parameter wajib belum diisi."
                                        },
                                        "errors": [
                                            "Parameter wajib belum diisi."
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "DsoApiKey": {
                "type": "apiKey",
                "in": "header",
                "name": "DSO-API-KEY"
            },
            "BasicAuth": {
                "type": "http",
                "scheme": "basic"
            }
        },
        "schemas": {
            "ACC_REKENING_LISTParams": {
                "type": "object",
                "properties": {
                    "CABANG": {
                        "type": "string",
                        "example": "0001",
                        "maxLength": 100
                    },
                    "KEYWORD": {
                        "type": "string",
                        "example": "Kas",
                        "maxLength": 40
                    },
                    "NONAKTIF": {
                        "type": "integer",
                        "example": 0
                    }
                },
                "required": [
                    "CABANG"
                ]
            },
            "ACC_REKENING_LISTRequest": {
                "type": "object",
                "required": [
                    "username",
                    "password",
                    "command",
                    "params",
                    "request_id"
                ],
                "properties": {
                    "username": {
                        "type": "string",
                        "example": "system@unit.domain"
                    },
                    "password": {
                        "type": "string",
                        "format": "password",
                        "example": "{{TENANT_PASSWORD}}"
                    },
                    "command": {
                        "type": "string",
                        "enum": [
                            "ACC_REKENING_LIST"
                        ]
                    },
                    "params": {
                        "$ref": "#/components/schemas/ACC_REKENING_LISTParams"
                    },
                    "request_id": {
                        "type": "string",
                        "example": "REQ-YYYYMMDDHHMMSS"
                    }
                }
            }
        }
    }
}