{
    "openapi": "3.0.0",
    "info": {
        "title": "Widi Suite API",
        "description": "API dokumentasi lengkap dengan autentikasi Sanctum dan Swagger UI",
        "version": "1.0.0"
    },
    "paths": {
        "/api/v1/incoming-material-submit": {
            "post": {
                "tags": [
                    "ciesa40"
                ],
                "summary": "Submit Material Incoming With JSON Format",
                "description": "Menerima raw JSON berisi data header (tMaterialIncoming_h), detail (tMaterialIncoming_d), dan bea (TE_BEACXH). Endpoint ini memerlukan autentikasi Bearer Token.",
                "operationId": "46a405b3f1c8df09bbbbfffdbb39e5ac",
                "requestBody": {
                    "description": "Body JSON data material incoming dan TE_BEACXH",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "tMaterialIncoming_h": {
                                        "type": "array",
                                        "items": {
                                            "required": [
                                                "busines_unit",
                                                "Incoming_number",
                                                "supplier_code"
                                            ],
                                            "properties": {
                                                "busines_unit": {
                                                    "type": "string",
                                                    "example": "VI"
                                                },
                                                "Incoming_number": {
                                                    "type": "string",
                                                    "example": "MR-202500030"
                                                },
                                                "incoming_date": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-10-10"
                                                },
                                                "incoming_type": {
                                                    "type": "string",
                                                    "example": "02"
                                                },
                                                "supplier_code": {
                                                    "type": "string",
                                                    "example": "0000200011"
                                                },
                                                "WareHouse_code": {
                                                    "type": "string",
                                                    "example": "WHM01"
                                                },
                                                "currency": {
                                                    "type": "string",
                                                    "example": "USD"
                                                },
                                                "rate": {
                                                    "type": "number",
                                                    "example": 1
                                                },
                                                "amount": {
                                                    "type": "number",
                                                    "example": 1
                                                },
                                                "Invoice": {
                                                    "type": "string",
                                                    "example": "001/PP-SL/DEL-RTN/09-2025"
                                                },
                                                "BeaType": {
                                                    "type": "integer",
                                                    "example": 50
                                                },
                                                "beaDate": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-10-10"
                                                },
                                                "AwbDate": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-10-10"
                                                },
                                                "user_id": {
                                                    "type": "string",
                                                    "example": "chandra"
                                                },
                                                "type_id": {
                                                    "type": "string",
                                                    "example": "INS"
                                                },
                                                "comp_id": {
                                                    "type": "string",
                                                    "example": "JUPITER"
                                                },
                                                "date_id": {
                                                    "type": "string",
                                                    "format": "date",
                                                    "example": "2025-10-10"
                                                },
                                                "tMaterialIncoming_d": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "Incoming_seq": {
                                                                "type": "integer",
                                                                "example": 1
                                                            },
                                                            "material_code": {
                                                                "type": "string",
                                                                "example": "0201A0101403"
                                                            },
                                                            "unit_code": {
                                                                "type": "string",
                                                                "example": "Kgm"
                                                            },
                                                            "unit_price": {
                                                                "type": "number",
                                                                "example": 0.98635
                                                            },
                                                            "conv_price": {
                                                                "type": "number",
                                                                "example": 0.98635
                                                            },
                                                            "rec_qty": {
                                                                "type": "number",
                                                                "example": 17
                                                            },
                                                            "supplier_code": {
                                                                "type": "string",
                                                                "example": "0000200011"
                                                            },
                                                            "po_seq": {
                                                                "type": "integer",
                                                                "example": 0
                                                            },
                                                            "gross": {
                                                                "type": "number",
                                                                "example": 0
                                                            },
                                                            "netto": {
                                                                "type": "number",
                                                                "example": 0
                                                            },
                                                            "qty_pack": {
                                                                "type": "number",
                                                                "example": 0
                                                            },
                                                            "unit_stoc": {
                                                                "type": "string",
                                                                "example": "Kgm"
                                                            },
                                                            "unit_conv": {
                                                                "type": "number",
                                                                "example": 1
                                                            },
                                                            "qty_conv": {
                                                                "type": "number",
                                                                "example": 17
                                                            },
                                                            "cif_amount": {
                                                                "type": "number",
                                                                "example": 0
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "TE_BEACXH": {
                                        "type": "array",
                                        "items": {
                                            "properties": {
                                                "BUSS_CODE": {
                                                    "type": "string",
                                                    "example": "VI"
                                                },
                                                "BEAC_TYPE": {
                                                    "type": "integer",
                                                    "example": 502
                                                },
                                                "BEAC_NMBR": {
                                                    "type": "string",
                                                    "example": "MR-202500030"
                                                },
                                                "AJUN_NMBR": {
                                                    "type": "string",
                                                    "example": "00002731315520250917000494"
                                                },
                                                "DAFT_NMBR": {
                                                    "type": "integer",
                                                    "example": 508991
                                                },
                                                "KTRX_ASAL": {
                                                    "type": "string",
                                                    "example": "040300"
                                                },
                                                "ASAL_NAMA": {
                                                    "type": "string",
                                                    "example": "PT. Pampas Electric"
                                                }
                                            },
                                            "type": "object"
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "JSON berhasil dibaca dan diproses.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "JSON berhasil dibaca dan diproses"
                                        },
                                        "summary": {
                                            "properties": {
                                                "header_count": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "detail_count": {
                                                    "type": "integer",
                                                    "example": 1
                                                },
                                                "bea_count": {
                                                    "type": "integer",
                                                    "example": 1
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Body JSON kosong atau format tidak valid."
                    },
                    "401": {
                        "description": "Token tidak valid atau tidak diberikan."
                    },
                    "500": {
                        "description": "Kesalahan internal server."
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    }
                ]
            }
        },
        "/api/v1/get-token": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Login user",
                "description": "Autentikasi pengguna menggunakan username dan password.",
                "operationId": "cf9e49ea30c692a35f5f2dbd61f2d536",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "username",
                                    "password"
                                ],
                                "properties": {
                                    "username": {
                                        "type": "string",
                                        "example": "vay432"
                                    },
                                    "password": {
                                        "type": "string",
                                        "format": "password",
                                        "example": "secret"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Login berhasil, mengembalikan token JWT.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "access_token": {
                                            "type": "string"
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "example": "bearer"
                                        },
                                        "expires_in": {
                                            "type": "integer",
                                            "example": 3600
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Login gagal. Username atau password salah."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "bearerFormat": "JWT",
                "scheme": "bearer"
            }
        }
    },
    "tags": [
        {
            "name": "ciesa40",
            "description": "ciesa40"
        },
        {
            "name": "Auth",
            "description": "Auth"
        }
    ]
}