{
  "openapi": "3.1.1",
  "info": {
    "title": "ckpm-api | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api-ckpm.ultimosolution.com/"
    }
  ],
  "paths": {
    "/api/Account/Login": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Register": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Edit": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/GetList": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Delete": {
      "delete": {
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "targetId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/GetAvailableRoles": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/StartLineA": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "BatchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FirstStepStatus"
            }
          },
          {
            "name": "Notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "EndQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Material",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/StartLineB": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "BatchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FirstStepStatus"
            }
          },
          {
            "name": "Notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "EndQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Material",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateFirstStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "ProductionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FirstStepStatus"
            }
          },
          {
            "name": "Notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "StartQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "EndQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "Material",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetFirstStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateSecondStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "ProductionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/SecondStepStatus"
            }
          },
          {
            "name": "Notes",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Qty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetSecondStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateThirdStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "ProductionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ThirdStepStatus"
            }
          },
          {
            "name": "Qty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetThirdStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateFourthStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "ProductionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FourthStepStatus"
            }
          },
          {
            "name": "NgQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "HalfNgQty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetFourthStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateFifthStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "ProductionId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/FifthStepStatus"
            }
          },
          {
            "name": "Qty",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "Attachments": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/IFormFile"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetFifthStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/CreateSixthStep": {
      "post": {
        "tags": [
          "Production"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSixthStepRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSixthStepRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSixthStepRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetSixthStep": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/GetBatchDropdown": {
      "get": {
        "tags": [
          "Production"
        ],
        "parameters": [
          {
            "name": "line",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Line"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Production/Ocr": {
      "post": {
        "tags": [
          "Production"
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "image": {
                    "$ref": "#/components/schemas/IFormFile"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateSixthStepRequest": {
        "required": [
          "productionId"
        ],
        "type": "object",
        "properties": {
          "productionId": {
            "type": [
              "null",
              "string"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SixthStepStatus"
          },
          "qty": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          }
        }
      },
      "EditUserDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "profilePicturePath": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "$ref": "#/components/schemas/RegisterRoleDto"
          },
          "isActive": {
            "type": "boolean"
          },
          "newPassword": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "FifthStepStatus": {
        "enum": [
          "Running",
          "OFF",
          "Complete",
          "Cancel"
        ]
      },
      "FirstStepStatus": {
        "enum": [
          "Running",
          "OFF",
          "Complete",
          "Cancel"
        ]
      },
      "FourthStepStatus": {
        "enum": [
          "Pending",
          "Process",
          "Complete",
          "Cancel"
        ]
      },
      "GetAccountListRequest": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "filter": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "Line": {
        "enum": [
          "A",
          "B",
          null
        ]
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "userName": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "rememberMe": {
            "type": "boolean"
          }
        }
      },
      "RegisterDto": {
        "type": "object",
        "properties": {
          "userName": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "confirmPassword": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "profilePicturePath": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "$ref": "#/components/schemas/RegisterRoleDto"
          }
        }
      },
      "RegisterRoleDto": {
        "type": "object",
        "properties": {
          "supervisor": {
            "type": "boolean"
          },
          "operator": {
            "type": "boolean"
          },
          "user": {
            "type": "boolean"
          }
        }
      },
      "SecondStepStatus": {
        "enum": [
          "Pending",
          "Process",
          "Complete",
          "Cancel"
        ]
      },
      "SixthStepStatus": {
        "enum": [
          "Running",
          "OFF",
          "Complete",
          "Cancel"
        ]
      },
      "ThirdStepStatus": {
        "enum": [
          "Running",
          "OFF",
          "Complete",
          "Cancel"
        ]
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "x-displayName": "Account"
    },
    {
      "name": "Production",
      "x-displayName": "Production"
    }
  ],
  "x-tagGroups": [
    {
      "name": "API",
      "tags": [
        "Account",
        "Production"
      ]
    }
  ]
}