{
    "openapi": "3.0.0",
    "info": {
        "title": "Example API",
        "description": "Example info",
        "contact": {
            "name": "Swagger API Team"
        },
        "version": "1.0"
    },
    "paths": {
        "/api/easy/orders/login": {
            "post": {
                "tags": [
                    "auth"
                ],
                "summary": "Sign in",
                "operationId": "easy_orders_login",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "": {
                                        "properties": {
                                            "email": {
                                                "type": "email"
                                            },
                                            "password": {
                                                "type": "string"
                                            }
                                        },
                                        "type": "object"
                                    }
                                },
                                "type": "object",
                                "example": {
                                    "email": "affiliate@app.com",
                                    "password": "123123123"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "You are logged in"
                                        },
                                        "data": {
                                            "type": "string",
                                            "example": {
                                                "api_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNzY3ZTQyMjI0MTY1ZGNkOTNkMmE2ZDAzZDc4Y2EwNDZmYTgxNTA3ODNhN2ViYjQyY2JiMGYwZGI5N2EyYWQ4Y2UxZmM4MzczYWU4Y2RhY2IiLCJpYXQiOjE3MDEyNjU0NDAuNjc1NTU2LCJuYmYiOjE3MDEyNjU0NDAuNjc1NTYxLCJleHAiOjE3MzI4ODc4NDAuNTk4NDI5LCJzdWIiOiI0NjM5Iiwic2NvcGVzIjpbXX0.GM_Qng2S046IwDu3Q7LzwN_CJ4VqhliymLLN91lK9tt7w2g8tvDnhuWNLWj5E5pHzmylEdBC_Mw3SpXUfDJdMqVG0LebIL10GftV2o1PXhZVfzTFPb2kpQlpnif0GSd2Agur7MYx7_HlCMLgbCACRnchv1hN3pfMoEwBABXru-L2fh-BoPmpWuKDIm1SewFi1TZoJ8kZY-kGRu_BCTmt-QGx56hyEznLGbxS37qmuGnDlTzKTLg72l4KSw1xLV151SJ1gkXu06s9Hgr4yZ9pMI7G5PsNuAst8Vi-mfnmWK7agOlqf_5UQa52_mEnV9s0ecZbp0fFFXZM7K7VW49zp08n1DIDWrENBgTH3aIN2l2Kj5XRGSfCQVofBOc3E9gQQOF4WZyqzSQhZmxdzOvqQtEpbqx4AgMwOkPxVvD7-DDU9g6bSqn751X3CkAXkK4rMjwiBF7AvBjm1ovyvpfbDTtS8p2xvcZRJDbXl5T2I5RZ27UM6O1xTKO7RW0glG_ExU0uwfuyAW0EhfsnwnD6N0kX_oMZZpVbO28RZs90mn_opn8oD4NNLpaC9Bs3XXZwCjKEGZc2bD0-h0wDC1TMGS1IzkfAixDcKdSqxq5hBqqSH3vQTYeQR-l9xC6ax93Lco3iiyJt28vg8Cl3q6qW6ZxF7ao3KvzFDxF_tV-vcAs"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 0
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "Login data is incorrect"
                                        },
                                        "data": {
                                            "type": "string",
                                            "example": null
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/categories": {
            "get": {
                "tags": [
                    "categories"
                ],
                "summary": "fetching List categories",
                "operationId": "categories",
                "parameters": [
                    {
                        "name": "lang",
                        "in": "header",
                        "description": "lang values that needed to be change language",
                        "required": true,
                        "explode": true,
                        "schema": {
                            "type": "string",
                            "default": "ar",
                            "enum": [
                                "ar",
                                "en"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "properties": {
                                                "categories": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "number",
                                                                "example": "42"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "العطور"
                                                            },
                                                            "image_path": {
                                                                "type": "string",
                                                                "example": "http://localhost/Aff-2022/public/uploads/category_images/x6DyilvtG7LvlJ26Wo5OE0mly0o38YoxuLkb4Cym.jpg"
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "more": {
                                                    "type": "string",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/api/easy/orders/cities": {
            "get": {
                "tags": [
                    "cities"
                ],
                "summary": "fetching cities and delivery cost",
                "operationId": "easy_orders_cities",
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "properties": {
                                                    "id": {
                                                        "type": "number",
                                                        "example": "1"
                                                    },
                                                    "status": {
                                                        "type": "number",
                                                        "example": 1
                                                    },
                                                    "shipping_cost": {
                                                        "type": "string",
                                                        "example": 20
                                                    },
                                                    "name_en": {
                                                        "type": "string",
                                                        "example": "cairo"
                                                    },
                                                    "name": {
                                                        "type": "string",
                                                        "example": "القاهرة"
                                                    },
                                                    "city": {
                                                        "type": "array",
                                                        "items": {
                                                            "properties": {
                                                                "id": {
                                                                    "type": "number",
                                                                    "example": "1"
                                                                },
                                                                "governorate": {
                                                                    "type": "number",
                                                                    "example": 1
                                                                },
                                                                "status": {
                                                                    "type": "number",
                                                                    "example": 1
                                                                },
                                                                "name_en": {
                                                                    "type": "string",
                                                                    "example": "Aga"
                                                                },
                                                                "name": {
                                                                    "type": "string",
                                                                    "example": "القاهرة"
                                                                }
                                                            },
                                                            "type": "object"
                                                        }
                                                    }
                                                },
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/products": {
            "get": {
                "tags": [
                    "products"
                ],
                "summary": "fetching products with pagination and filter with category's id",
                "operationId": "products",
                "parameters": [
                    {
                        "name": "category_id",
                        "in": "query",
                        "description": "lang values that needed to be change language",
                        "required": true,
                        "explode": true,
                        "schema": {
                            "type": "number",
                            "default": "1",
                            "enum": [
                                "1",
                                "2"
                            ]
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "properties": {
                                                "products": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "number",
                                                                "example": "6"
                                                            },
                                                            "name": {
                                                                "type": "string",
                                                                "example": "العطور"
                                                            },
                                                            "main_photo": {
                                                                "type": "string",
                                                                "example": "http://localhost/Aff-2022/public/storage/products_image/dxM8b19TcnulRzOLnQOu1EPaL4Jehwk8HL3PpLqX.png"
                                                            },
                                                            "seller": {
                                                                "type": "string",
                                                                "example": "Super"
                                                            },
                                                            "seller_image": {
                                                                "type": "string",
                                                                "example": "http://localhost/Aff-2022/public/storage/vendor_profile/dITAZjDMMqjajaawZMqabbvMUpB3kG82O4v1AZAI.jpg"
                                                            },
                                                            "description": {
                                                                "type": "string",
                                                                "example": "<p>easytwooo&nbsp;easytwoooeasytwooo<br></p>"
                                                            },
                                                            "purchasing_price": {
                                                                "type": "string",
                                                                "example": 180
                                                            },
                                                            "minimum_price": {
                                                                "type": "string",
                                                                "example": 160
                                                            },
                                                            "maximum_price": {
                                                                "type": "string",
                                                                "example": 200
                                                            },
                                                            "commission": {
                                                                "type": "string",
                                                                "example": 20
                                                            },
                                                            "catalog_url": {
                                                                "type": "string",
                                                                "example": "http://localhost/Aff-2022/public/easytwooo.zip"
                                                            },
                                                            "sizes": {
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "sizes": {
                                                                            "type": "number",
                                                                            "example": "Xl"
                                                                        },
                                                                        "color": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "properties": {
                                                                                    "color": {
                                                                                        "type": "number",
                                                                                        "example": "black"
                                                                                    },
                                                                                    "stock": {
                                                                                        "type": "number",
                                                                                        "example": "50"
                                                                                    }
                                                                                },
                                                                                "type": "object"
                                                                            }
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            },
                                                            "images": {
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "id": {
                                                                            "type": "number",
                                                                            "example": "1"
                                                                        },
                                                                        "image": {
                                                                            "type": "string",
                                                                            "example": "http://localhost/Aff-2022/public/storage/products_image/2162.jpg"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    }
                                                },
                                                "more": {
                                                    "type": "string",
                                                    "example": false
                                                }
                                            },
                                            "type": "object"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/api/product/{id}": {
            "get": {
                "tags": [
                    "product"
                ],
                "summary": "get all products variant in single API that contain variant ID and properties",
                "operationId": "product",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "success"
                                        },
                                        "data": {
                                            "type": "object",
                                            "example": {
                                                "id": 6,
                                                "name": "easytwooo",
                                                "main_photo": "http://localhost/Aff-2022/public/storage/products_image/dxM8b19TcnulRzOLnQOu1EPaL4Jehwk8HL3PpLqX.png",
                                                "seller": "Super",
                                                "seller_image": "http://localhost/Aff-2022/public/storage/vendor_profile/dITAZjDMMqjajaawZMqabbvMUpB3kG82O4v1AZAI.jpg",
                                                "description": "<p>easytwooo&nbsp;easytwoooeasytwooo<br></p>",
                                                "purchasing_price": 180,
                                                "minimum_price": 160,
                                                "maximum_price": 300,
                                                "commission": 20,
                                                "catalog_url": "http://localhost/Aff-2022/public/easytwooo.zip",
                                                "0": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "sizes": {
                                                                "type": "number",
                                                                "example": "Xl"
                                                            },
                                                            "color": {
                                                                "type": "array",
                                                                "items": {
                                                                    "properties": {
                                                                        "color": {
                                                                            "type": "number",
                                                                            "example": "black"
                                                                        },
                                                                        "stock": {
                                                                            "type": "number",
                                                                            "example": "50"
                                                                        }
                                                                    },
                                                                    "type": "object"
                                                                }
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "property": "sizes"
                                                },
                                                "1": {
                                                    "type": "array",
                                                    "items": {
                                                        "properties": {
                                                            "id": {
                                                                "type": "number",
                                                                "example": "1"
                                                            },
                                                            "image": {
                                                                "type": "string",
                                                                "example": "http://localhost/Aff-2022/public/storage/products_image/2162.jpg"
                                                            }
                                                        },
                                                        "type": "object"
                                                    },
                                                    "property": "images"
                                                }
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        },
        "/api/create/order": {
            "post": {
                "tags": [
                    "order"
                ],
                "summary": "API for submitting an order",
                "operationId": "create_order",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "schema": {
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "example": "client name"
                                    },
                                    "phone": {
                                        "type": "number",
                                        "example": "01028899874"
                                    },
                                    "another_phone": {
                                        "type": "number",
                                        "example": null
                                    },
                                    "governorate": {
                                        "type": "number",
                                        "example": 4
                                    },
                                    "city": {
                                        "type": "number",
                                        "example": 44
                                    },
                                    "address": {
                                        "type": "string",
                                        "example": "aga"
                                    },
                                    "modrator": {
                                        "type": "string",
                                        "example": "modrator name"
                                    },
                                    "facebook_name": {
                                        "type": "string",
                                        "example": "facebook name"
                                    },
                                    "facebook_link": {
                                        "type": "string",
                                        "example": "facebook link"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "example": "notes"
                                    },
                                    "shipping_date": {
                                        "type": "string",
                                        "format": "date",
                                        "example": "2023-04-12"
                                    },
                                    "shipping_cost": {
                                        "type": "number",
                                        "example": 45
                                    },
                                    "products": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": {
                                                "id": 1,
                                                "quantity": 1,
                                                "price": 180,
                                                "attributes": {
                                                    "size": "xl",
                                                    "color": "red"
                                                }
                                            }
                                        }
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 1
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "The order was added successfully"
                                        },
                                        "data": {
                                            "type": "object",
                                            "example": {
                                                "affiliate_id": 4639,
                                                "affiliate_name": "Affiliate aff",
                                                "teamleader_id": null,
                                                "phone": "01029999999",
                                                "another_phone": "",
                                                "modrator": "name",
                                                "full_name": "test_1",
                                                "governrate": 4,
                                                "governrate_name": "الدقهلية",
                                                "city": 77,
                                                "city_name": "الجمالية",
                                                "address": "agag",
                                                "chipping": "2023-04-12 15:20:21.139324",
                                                "notes": null,
                                                "facebook_name": "qqqqqq",
                                                "facebook_link": "qqqqqq",
                                                "status": "1",
                                                "status_name": "New",
                                                "shipping_cost": 122,
                                                "random_number": "fp9048",
                                                "affiliate_code": "ve1000",
                                                "order_type": "اوردر جديد",
                                                "amount_paid_partial": "",
                                                "customer_receive_piece_of_order": "",
                                                "new_pieces": "",
                                                "old_order_number": "",
                                                "reason_replacement": "",
                                                "receives_pieces": "",
                                                "shipping_replacement_cost": "",
                                                "vendor_code": null,
                                                "updated_at": "2023-12-03T14:44:56.000000Z",
                                                "created_at": "2023-12-03 4:44 PM",
                                                "id": 10,
                                                "total_price": 360,
                                                "commission_team_leader": 40,
                                                "commission": 40,
                                                "commission_site": 40,
                                                "submit": 1
                                            }
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "invalid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "number",
                                            "example": 0
                                        },
                                        "msg": {
                                            "type": "string",
                                            "example": "failed"
                                        },
                                        "data": {
                                            "type": "string",
                                            "example": null
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "passport": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "passport": {
                "type": "apiKey",
                "description": "Laravel passport apiKey security.",
                "in": "header",
                "name": "Authorization",
                "scheme": "https",
                "flows": {
                    "password": {
                        "authorizationUrl": "http://localhost/Aff-2022/public/oauth/authorize",
                        "tokenUrl": "http://localhost/Aff-2022/public/oauth/token",
                        "refreshUrl": "http://localhost/Aff-2022/public/token/refresh",
                        "scopes": []
                    }
                }
            }
        }
    },
    "security": [
        {
            "oauth2_security_example": [
                "read",
                "write"
            ],
            "passport": []
        }
    ]
}