{"openapi":"3.0.0","info":{"title":"API SISWEB SMARTPOS","description":"API para SMARTPOS","version":"1.0.0","contact":{"email":"braulio@lemarq.com.br"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"Metodos","description":"Operations available to regular developers"}],"paths":{"/produto":{"get":{"tags":["developers"],"summary":"Retrieve list of products","operationId":"getProducts","responses":{"200":{"description":"List of products","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Produto"}}}}}}}},"/modalidade":{"get":{"tags":["developers"],"summary":"Retrieve list of modalidades","operationId":"getModalidades","responses":{"200":{"description":"List of modalidades","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Modalidade"}}}}}}}},"/condicao-pagamento":{"get":{"tags":["developers"],"summary":"Retrieve list of payment conditions","operationId":"getCondicoesPagamento","responses":{"200":{"description":"List of payment conditions","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CondicaoPagamento"}}}}}}}},"/sales":{"post":{"tags":["developers"],"summary":"Send sales data","operationId":"sendSales","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sale"}}}},"responses":{"201":{"description":"Sale created successfully"},"400":{"description":"Invalid input"}}}},"/sales/{id_ped}":{"get":{"tags":["developers"],"summary":"Retrieve sale by order ID","operationId":"getSaleByIdPed","parameters":[{"name":"id_ped","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Sale details by order ID","content":{"application/json":{"schema":{"type":"object","properties":{"dt_ped":{"type":"string","format":"date"},"cl_cli":{"type":"string"},"cd_vend":{"type":"string"},"vl_ped":{"type":"number","format":"double"},"tx_desc":{"type":"number","format":"double"},"vl_desc":{"type":"number","format":"double"},"nm_obs":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"Id":{"type":"integer","example":0},"id_ped":{"type":"integer","example":0},"cd_prod":{"type":"string","example":""},"un_prod":{"type":"string","example":""},"qt_prod":{"type":"number","format":"double","example":0},"vl_unit":{"type":"number","format":"double","example":0},"tx_desc":{"type":"number","format":"double","example":0},"vl_desc":{"type":"number","format":"double","example":0},"vl_total":{"type":"number","format":"double","example":0},"nr_loja":{"type":"string","example":"0"},"nr_dispositivo":{"type":"string","example":"0"},"qt_emb":{"type":"number","format":"double","example":0},"nm_obs":{"type":"string","example":""},"nr_item":{"type":"integer","example":0}}}}}}}}}}}},"/auth/login":{"post":{"tags":["developers"],"summary":"User login with email and password","operationId":"loginUser","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email","description":"User email address"},"password":{"type":"string","format":"password","description":"User password"}}}}}},"responses":{"200":{"description":"User logged in successfully","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Authentication token"}}}}}},"401":{"description":"Unauthorized - invalid email or password"}}}}},"components":{"schemas":{"InventoryItem":{"type":"object","required":["id","name","manufacturer","releaseDate"],"properties":{"id":{"type":"string","format":"uuid","example":"d290f1ee-6c54-4b01-90e6-d701748f0851"},"name":{"type":"string","example":"Widget Adapter"},"releaseDate":{"type":"string","format":"date-time","example":"2016-08-29T09:12:33.001Z"},"manufacturer":{"$ref":"#/components/schemas/Manufacturer"}}},"Manufacturer":{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"ACME Corporation"},"homePage":{"type":"string","format":"url","example":"https://www.acme-corp.com"},"phone":{"type":"string","example":"408-867-5309"}}},"Produto":{"type":"object","required":["id","cd_prod"],"properties":{"id":{"type":"integer","format":"int32","description":"Product ID"},"cd_prod":{"type":"string","maxLength":14,"default":"","description":"Product code"},"nm_prod":{"type":"string","maxLength":55,"default":"","description":"Product name"},"un_prod":{"type":"string","maxLength":2,"default":"","description":"Unit of product"},"nm_abrev":{"type":"string","maxLength":20,"default":"","description":"Abbreviated name"},"vl_unit":{"type":"number","format":"double","default":0.0,"description":"Unit price"},"vl_prazo":{"type":"number","format":"double","default":0.0,"description":"Price for term payment"},"vl_oferta":{"type":"number","format":"double","default":0.0,"description":"Offer price"},"qt_estoque":{"type":"number","format":"double","default":0.0,"description":"Stock quantity"},"tx_desc":{"type":"number","format":"double","default":0.0,"description":"Discount rate"},"qt_emb":{"type":"number","format":"double","default":1.0,"description":"Packaging quantity"},"nm_imagemmobile":{"type":"string","nullable":true,"description":"Mobile image name or path"}}},"Modalidade":{"type":"object","properties":{"cd_modal":{"type":"string","maxLength":3,"default":"","description":"Modal code"},"nm_modal":{"type":"string","maxLength":30,"default":"","description":"Modal name"}}},"CondicaoPagamento":{"type":"object","properties":{"cd_pag":{"type":"string","maxLength":3,"default":"","description":"Payment condition code"},"descricao":{"type":"string","maxLength":30,"default":"","description":"Description of payment condition"}}},"Sale":{"type":"object","required":["Id","id_ped","nr_dispositivo"],"properties":{"Id":{"type":"integer","description":"Sale ID"},"id_ped":{"type":"integer","default":0,"description":"Order ID"},"dt_ped":{"type":"string","format":"date","nullable":true,"description":"Order date"},"cd_cli":{"type":"string","maxLength":14,"default":"","nullable":true,"description":"Client code"},"cd_vend":{"type":"string","maxLength":3,"default":"","nullable":true,"description":"Vendor code"},"cd_pag":{"type":"string","maxLength":3,"default":"","nullable":true,"description":"Payment condition code"},"cd_modal":{"type":"string","maxLength":3,"default":"","nullable":true,"description":"Modal code"},"vl_ped":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Order value"},"tx_desc":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Discount rate"},"vl_desc":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Discount value"},"vl_saldo":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Balance value"},"encerrado":{"type":"integer","default":0,"nullable":true,"description":"Closed flag"},"cancelado":{"type":"integer","default":0,"nullable":true,"description":"Cancelled flag"},"transmitido":{"type":"integer","default":0,"nullable":true,"description":"Transmitted flag"},"nr_loja":{"type":"string","maxLength":3,"default":"0","nullable":true,"description":"Store number"},"nr_dispositivo":{"type":"string","maxLength":3,"default":"0","description":"Device number"},"dt_ent":{"type":"string","format":"date","nullable":true,"description":"Entry date"},"nm_obs":{"type":"string","maxLength":150,"default":"","nullable":true,"description":"Observations"},"dt_envio":{"type":"string","format":"date-time","nullable":true,"description":"Send date/time"},"latitude":{"type":"string","maxLength":50,"nullable":true,"description":"Latitude coordinate"},"longitude":{"type":"string","maxLength":50,"nullable":true,"description":"Longitude coordinate"},"items":{"type":"array","description":"Items of the order","items":{"$ref":"#/components/schemas/SaleItem"}}}},"SaleItem":{"type":"object","required":["Id","id_ped","nr_dispositivo","nr_item"],"properties":{"Id":{"type":"integer","description":"Item ID"},"id_ped":{"type":"integer","default":0,"description":"Order ID"},"cd_prod":{"type":"string","maxLength":14,"default":"","nullable":true,"description":"Product code"},"un_prod":{"type":"string","maxLength":2,"default":"","nullable":true,"description":"Unit of product"},"qt_prod":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Quantity of product"},"vl_unit":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Unit price"},"tx_desc":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Discount rate"},"vl_desc":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Discount value"},"vl_total":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Total value"},"nr_loja":{"type":"string","maxLength":3,"default":"0","nullable":true,"description":"Store number"},"nr_dispositivo":{"type":"string","maxLength":3,"default":"0","description":"Device number"},"qt_emb":{"type":"number","format":"double","default":0.0,"nullable":true,"description":"Packaging quantity"},"nm_obs":{"type":"string","maxLength":50,"default":"","nullable":true,"description":"Observations"},"nr_item":{"type":"integer","format":"int32","description":"Item number within the order"}}}}}}