openapi: 3.0.3 info: title: 'API documentation for DocWizOn' description: 'API documentation for docwizon webservice' version: 1.0.0 servers: - url: 'https://ocr.cap-rel.fr' paths: /api/subscriptions: get: summary: 'Display a listing of the resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints /api/ruok: get: summary: 'Display a listing of the resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints '/api/ruok/{id}': get: summary: 'Display the specified resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints parameters: - in: path name: id description: 'The ID of the ruok.' example: 19 required: true schema: type: integer /api/softwareInfos: get: summary: 'Display a listing of the resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints post: summary: 'Store a newly created resource in storage.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Endpoints '/api/softwareInfos/{id}': get: summary: 'Display the specified resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints put: summary: 'Update the specified resource in storage.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Endpoints delete: summary: 'Remove the specified resource from storage.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Endpoints parameters: - in: path name: id description: 'The ID of the softwareInfo.' example: ducimus required: true schema: type: string '/api/companyinfo/{id}': get: summary: 'Display the specified resource.' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints parameters: - in: path name: id description: 'The ID of the companyinfo.' example: 13 required: true schema: type: integer '/api/subscriptions/stats/{email}': get: summary: 'Get stats about a subscription' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 503: description: '' content: text/plain: schema: type: string example: "\n\n \n \n \n\n Service Unavailable\n\n \n \n \n\n \n\n \n \n \n
\n
\n
\n
\n 503
\n\n
\n Upgrade in progress, please retry later
\n
\n
\n
\n \n\n" tags: - Endpoints post: summary: 'Get stats about a subscription' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - Endpoints parameters: - in: path name: email description: '' example: totam required: true schema: type: string /api/register: post: summary: 'Register process (create account if this server is in "open mode")' description: '' parameters: - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'Login/Logout management' requestBody: required: true content: application/json: schema: type: object properties: firstname: type: string description: 'The firstname of the user.' example: tom name: type: string description: 'The name of the user.' example: pouce email: type: string description: 'The email of the user.' example: tom.pouce@cap-rel.fr password: type: string description: 'The password of the user.' example: molestiae password_confirmation: type: string description: 'The password (confirmation) of the user.' example: repellat required: - firstname - name - email - password - password_confirmation security: [] /api/login: post: summary: 'Login process (open session)' description: '' parameters: - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'Login/Logout management' requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: 'The email of the user.' example: toto@localhost password: type: string description: 'The password of the user.' example: aut required: - email - password security: [] /api/profile: post: summary: '' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'Login/Logout management' /api/logout: post: summary: 'Logout process (close session)' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'Login/Logout management' /api/ping: post: summary: '' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'Login/Logout management' /api/ocrcuts: post: summary: 'Start a new process for a zone of a file' description: "actions are:\n * empty/default: normal action, start extract part of the file (zone) and apply ocr process\n\nHere is the detail of the input request :\n * ocrID id returned by /ocr/ request, please have a look at \"OCR Documents\" parts of the documentation\n * ratio what is the zoom factor for this file (screen is different for each user so picture is displayed with a zoom factor)\n * rect coordinates of the zone to use and extract data in x:y:w:h form : \"x position : y position : width : height\"\n * action: a keyword to ask server to do something (rect|multicut|confirmvalues)\n - rect is for part extraction\n - multicut is for multiple parts extraction\n - confirmvalues is to confirm what user send to his soft as good values\n * lang: ISO 639-1 code to apply for this document" parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"success\": \"success message\",\n \"message\": \"other message\",\n \"meta\": \"some meta data\",\n \"ocrID\": \"id of the file\",\n \"result\": \"result of the action\",\n \"errors\": \"error message\",\n}" tags: - 'OCR "Cuts"' requestBody: required: true content: application/json: schema: type: object properties: ocrID: type: string description: 'id of the document to analyze,' example: KnXKw5Y7GbEpuNKotRvv0nCTDdeG0Gf65CICHMKi ratio: type: number description: 'what is the ratio to apply to the picture,' example: 1.2245403225806 rect: type: string description: 'coordinates of the zone where to extract data (x:y:w:h),' example: '1067:961:95:29' lang: type: string description: 'what lang to apply (ISO 639-1) "fr|de|it|en",' example: fr action: type: string description: 'what action to use, "rect",' example: extract required: - ocrID - ratio - rect - lang /api/ocrcutszones: post: summary: 'Request for interresting zones for a supplier (name or vat)' description: '' parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: { } tags: - 'OCR "Cuts"' /api/ocrs: get: summary: 'Get data from process' description: "actions are:\n * jpegDownload : download a file\n\nHere is the detail of the input request :\n * ocrID id returned by /ocr/ request, please have a look at \"OCR Documents\" parts of the documentation\n * action: a keyword to ask server to do something (jpegDownload),\n - jpegDownload is to download jpeg file (in this special case return was not a json response)" parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: application/json schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"success\": \"success message\",\n \"message\": \"other message\",\n \"meta\": \"some meta data\",\n \"ocrID\": \"id of the file\",\n \"result\": \"result of the action\",\n \"errors\": \"error message\",\n}" tags: - 'OCR Documents' requestBody: required: false content: application/json: schema: type: object properties: ocrID: type: required description: 'id of the document to analyze,' example: KnXKw5Y7GbEpuNKotRvv0nCTDdeG0Gf65CICHMKi action: type: what description: 'action to use, "jpegDownload",' example: jpegDownload post: summary: 'Start a new process for a file, that is the main worker part of this webservice' description: "actions are:\n * empty/default: normal action, start ocr process\n * storeOnly: convert pdf to jpeg and return it in json response\n * ocrFailed: store data for later analyze by cap-rel staff\n\nHere is the detail of the input request :\n * pdf object, be carefull it could be a pdf file, jpeg file or txt file (yes \"pdf\" key was a bad choice but it is)\n * action: a keyword to ask server to do something\n * lang: ISO 639-1 code to apply for this document\n * profile: what sort of profile to apply (only \"raw\" or \"invoice\" for the moment)\n raw = no local enhancements, just return raw data\n invoice or other = add some local enhancements due to profile (ex. HT amount not > TTC amount)" parameters: - in: header name: Authorization description: '' example: 'Bearer {YOUR_AUTH_KEY}' schema: type: string - in: header name: Content-Type description: '' example: multipart/form-data schema: type: string - in: header name: Accept description: '' example: application/json schema: type: string responses: 200: description: '' content: text/plain: schema: type: string example: "{\n \"success\": \"success message\",\n \"message\": \"other message\",\n \"ocrID\": \"fileId, you have to reuse this id in next ocrcuts requests\",\n \"jpeg\": \"jpeg file name\",\n \"jpegBase64\": \"base64 content of jpeg in case of 'storeOnly' action\",\n \"meta\": \"some meta data\",\n \"errors\": \"error message\",\n}" tags: - 'OCR Documents' requestBody: required: true content: multipart/form-data: schema: type: object properties: pdf: type: string format: binary description: 'The file in (PDF|JPEG|TXT) format (yes "pdf" key is bad but it was the only format when the projet starts)' lang: type: string description: 'what lang to apply (ISO 639-1) "fr|de|it|en",' example: fr profile: type: string description: 'what sort of document profile to apply (invoice|),' example: invoice action: type: what description: 'action to use (storeOnly|ocrFailed|none),' example: storeOnly yamlFilter: type: what description: 'yml filter to apply' example: qui required: - pdf - lang - profile tags: - name: Endpoints description: '' - name: 'Login/Logout management' description: "\nAPIs for managing auth process" - name: 'OCR "Cuts"' description: "\nAPIs for managing parts of documents to analyze (that is \"cuts\" : send coords of a small part of a jpeg file to analyze)" - name: 'OCR Documents' description: "\nAPIs for managing documents to analyze" components: securitySchemes: default: type: http scheme: bearer description: '' security: - default: []