{
    "openapi": "3.0.0",
    "info": {
        "title": "Mywazen Api Documentation",
        "version": "1.0.0"
    },
    "paths": {
        "/api/v1/erp/test": {
            "post": {
                "tags": [
                    "Erp"
                ],
                "summary": "Login",
                "description": "Login and create an access token",
                "operationId": "test",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "email": {
                                        "type": "string"
                                    },
                                    "password": {
                                        "type": "string"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "email": "user@email.com",
                                    "password": "password",
                                    "device": "mobile"
                                }
                            }
                        }
                    }
                },
            },
        },
        "/api/v1/erp/gas-station/customers": {
            "get": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "fetch customers",
                "description": "Get All Customers (dependent on user's company)",
                "operationId": "fetch customers",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/unpaid-invoices/{customer_id}": {
            "get": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "get unpaided invoices for specific customer",
                "description": "get unpaided invoices for specific customer",
                "operationId": "unpaid invoices",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "Acc_No": {
                                        "type": "integer"
                                    },
                                    "Brn_No": {
                                        "type": "integer"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "Acc_No": 1010301,
                                    "Brn_No": 120301
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/create-invoice": {
            "post": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Create New Invoice With Journals & Payment",
                "description": "Create New Invoice",
                "operationId": "Create New Invoice",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/delivery-voucher": {
            "post": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Create New Delivery Voucher With Journals",
                "description": "Create New Delivery Voucher",
                "operationId": "Create New Delivery Voucher",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/return-invoice": {
            "post": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Create New Invoice Return With Journals & Payment, And Update On Original Invoice",
                "description": "Create New Invoice Return",
                "operationId": "Create New Invoice Return",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/all-invoices/{type?}": {
            "get": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Fetch All (invoices, returns and delivery vouchers) ",
                "description": "Fetch All (invoices, returns and delivery vouchers) \r\n     *                      type => (13,3,16)  ",
                "operationId": "Fetch All (invoices, returns and delivery vouchers)",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/items/{id?}": {
            "get": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Fetch All Items, Or Get Only One Item (dependent on their id)",
                "description": "Fetch All Items, Or Get Only One Item (dependent on their id)",
                "operationId": "Get One Or More Items",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "branch": {
                                        "type": "integer"
                                    },
                                    "store": {
                                        "type": "integer"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "branch": 120301,
                                    "store": 12030101
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/voucher-receipts": {
            "post": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "create voucher receipts",
                "description": "create voucher receipts",
                "operationId": "voucher receipts",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/voucher-payments": {
            "post": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "create voucher payments",
                "description": "create voucher payments",
                "operationId": "voucher payments",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/gas-station/{company_id}/show-payments": {
            "get": {
                "tags": [
                    "Gas Station"
                ],
                "summary": "Show All Payments For Specific Company",
                "description": "Show All Payments For Specific Company",
                "operationId": "Show All Payments",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/client-orders/all-order": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "get all orders with its status",
                "description": "Get All orders",
                "operationId": "get all orders with its status",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/erp/client-orders/statistics": {
            "get": {
                "tags": [
                    "Orders"
                ],
                "summary": "show statistics for order states",
                "description": "show statistics",
                "operationId": "show statistics for order states",
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/whatsapp/{cmpId}/items": {
            "get": {
                "tags": [
                    "Whatsapp"
                ],
                "summary": "Fetch All Items,(dependent on their cmpId)",
                "description": "Fetch All Items",
                "operationId": "Get All Items",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {}
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/whatsapp/add-address": {
            "post": {
                "tags": [
                    "Whatsapp"
                ],
                "summary": "Add a new address",
                "description": "Add New address",
                "operationId": "Add New address",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "example": {
                                    "user_phone": "966xxxxxxxxx",
                                    "address": {
                                        "title": "My home",
                                        "long": 0,
                                        "lat": 0
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/whatsapp/submit-order": {
            "post": {
                "tags": [
                    "Whatsapp"
                ],
                "summary": "Add a new Order",
                "description": "submit Order",
                "operationId": "Add New Order",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "example": {
                                    "user_phone": "966xxxxxxxxx",
                                    "address": 1,
                                    "shift": 1,
                                    "date": "2022-01-01",
                                    "items": {
                                        "id": 1,
                                        "quantity": 5
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/login": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Login",
                "description": "Login and create an access token",
                "operationId": "login",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "email": {
                                        "type": "string"
                                    },
                                    "password": {
                                        "type": "string"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "email": "user@email.com",
                                    "password": "password",
                                    "device": "mobile"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/set-auth-company": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "Set Auth Company",
                "description": "Set The Authenticated Company",
                "operationId": "SetAuthCompany",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "company": {
                                        "type": "integer"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "company": 101
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/api/v1/logout": {
            "post": {
                "tags": [
                    "Auth"
                ],
                "summary": "logout",
                "operationId": "logout",
                "responses": {
                    "200": {
                        "description": "logout success"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "sanctum": {
                "type": "http",
                "description": "Laravel Sanctum token authentication",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        }
    }
}
