node-red-contrib-conta-azul-api
Version:
Conta Azul API wrapper for Node-Red
1 lines • 87.9 kB
YAML
{"swagger":"2.0","info":{"description":"API for integrating with ContaAzul","version":"1.0.0","title":"ContaAzul API"},"basePath":"/","tags":[{"name":"Product"},{"name":"Service"},{"name":"Contract-beta"},{"name":"Sale"},{"name":"Customer"},{"name":"Supplier-beta"},{"name":"Permissions"},{"name":"Plans"}],"paths":{"/v1/product-categories/{id}":{"get":{"tags":["Product"],"summary":"Get product category by id","description":"","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the product category","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Product Category found with the specified id","schema":{"$ref":"#/definitions/ProductCategory"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Product Category not found with the specified id"}}}},"/v1/product-categories":{"get":{"tags":["Product"],"summary":"List product categories","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"name","in":"query","description":"The name of the product category","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Product Categories found with the specified parameters","schema":{"type":"array","items":{"$ref":"#/definitions/ProductCategory"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul><li>A invalid search parameter was provided</li><li>No search parameters were provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}}},"/v1/products/{id}":{"get":{"tags":["Product"],"summary":"Get product by id","description":"","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the product","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Product found with the specified id","schema":{"$ref":"#/definitions/ProductResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Product not found with the specified id"}}},"put":{"tags":["Product"],"summary":"Update product","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the product to be updated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"in":"body","name":"body","description":"The product to be updated","required":true,"schema":{"$ref":"#/definitions/ProductUpdate"}}],"responses":{"200":{"description":"Product updated","schema":{"$ref":"#/definitions/ProductResponse"}},"400":{"description":"Invalid product provided in the request body"}}},"delete":{"tags":["Product"],"summary":"Delete product","description":"","operationId":"delete","parameters":[{"name":"id","in":"path","description":"The id of the product to be deleted","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Product deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Product not found with the specified id"}}}},"/v1/products":{"get":{"tags":["Product"],"summary":"List products by filters","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"name","in":"query","description":"The name of the product","required":false,"type":"string"},{"name":"code","in":"query","description":"The code of the product","required":false,"type":"string"},{"name":"barcode","in":"query","description":"The barcode of the product","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Products found with the specified parameters","schema":{"type":"array","items":{"$ref":"#/definitions/ProductResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul><li>A invalid search parameter was provided</li><li>No search parameters were provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}},"post":{"tags":["Product"],"summary":"Create product","description":"","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The product to be created","required":true,"schema":{"$ref":"#/definitions/ProductRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ProductResponse"}},"201":{"description":"Product created","schema":{"$ref":"#/definitions/ProductResponse"}},"400":{"description":"Product not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"422":{"description":"Invalid product provided. The possible reasons are : <ul><li>A product with an unknown field was provided in the request body</li><li>A field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/services/{id}":{"get":{"tags":["Service"],"summary":"Get service by id","description":"","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the service","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Service found with the specified id","schema":{"$ref":"#/definitions/ServiceResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Service not found with the specified id"}}},"put":{"tags":["Service"],"summary":"Update service","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the service to be updated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"in":"body","name":"body","description":"The service to be updated","required":true,"schema":{"$ref":"#/definitions/ServiceUpdate"}}],"responses":{"200":{"description":"Service updated","schema":{"$ref":"#/definitions/ServiceResponse"}},"400":{"description":"Invalid service provided in the request body"}}},"delete":{"tags":["Service"],"summary":"Delete service","description":"","operationId":"delete","parameters":[{"name":"id","in":"path","description":"The id of the service to be deleted","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Service deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Service not found with the specified id"}}}},"/v1/services":{"get":{"tags":["Service"],"summary":"List services by filters","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"name","in":"query","description":"The name of the service","required":false,"type":"string"},{"name":"code","in":"query","description":"The code of the service","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Services found with the specified parameters","schema":{"type":"array","items":{"$ref":"#/definitions/ServiceResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul><li>A invalid search parameter was provided</li><li>No search parameters were provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}},"post":{"tags":["Service"],"summary":"Create service","description":"","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The service to be created","required":true,"schema":{"$ref":"#/definitions/ServiceRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ServiceResponse"}},"201":{"description":"Service created","schema":{"$ref":"#/definitions/ServiceResponse"}},"400":{"description":"Service not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"422":{"description":"Invalid service provided. The possible reasons are : <ul><li>A service with a unknown field was provided in the request body</li><li>Some field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/contracts/{id}":{"get":{"tags":["Contract-beta"],"summary":"Get contract by id","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The contract id","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Contract found with the specified id","schema":{"$ref":"#/definitions/ContractResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Contract not found with the specified id"}}}},"/v1/contracts":{"post":{"tags":["Contract-beta"],"summary":"Create contract","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The contract to be created","required":true,"schema":{"$ref":"#/definitions/ContractRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ContractResponse"}},"201":{"description":"Contract created","schema":{"$ref":"#/definitions/ContractResponse"}},"400":{"description":"Contract not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"422":{"description":"Invalid contract provided. The possible reasons are : <br/><ul><li>A contract with an unknown field was provided in the request body</li><li>A field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/sales/{id}/installments/{number}":{"get":{"tags":["Sale"],"summary":"Get sale's installment by number","description":"","operationId":"get","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sale id","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"name":"number","in":"path","description":"The installment number","required":true,"type":"string","x-example":"1"}],"responses":{"200":{"description":"Installment found with the specified number","schema":{"$ref":"#/definitions/Installment"}},"400":{"description":"Invalid sale id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Installment not found with the specified number"}}},"put":{"tags":["Sale"],"summary":"Update sale's installment","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sale id","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"name":"number","in":"path","description":"The installment number","required":true,"type":"string","x-example":"1"},{"in":"body","name":"body","description":"The installment to be updated","required":true,"schema":{"$ref":"#/definitions/InstallmentUpdate"}}],"responses":{"200":{"description":"Installment updated","schema":{"$ref":"#/definitions/Installment"}},"400":{"description":"Invalid installment provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"}}}},"/v1/sales/{id}/items":{"get":{"tags":["Sale"],"summary":"List sale items by filters","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sale id","required":true,"type":"string","x-example":"3bca101e-3c3b-4293-b8a9-7fc918313572"},{"name":"Type","in":"query","description":"The type of the sale item - can be 'Product' or 'Service'","required":false,"type":"string"},{"name":"Description","in":"query","description":"The description of the sale item","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Sale items found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/NegotiationItem"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}}},"/v1/sales/{id}":{"get":{"tags":["Sale"],"summary":"Get sale by id","description":"The returned format is determined by the header passed: <br/><ul><li><pre>Accept : application/json</pre> - A json representation of the sale will be returned </li><li><pre>Accept : application/pdf</pre> - A pdf representation of the sale will be returned </li></ul><br/>When no header is passed, the sale will be returned in the default application/json format","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The sale id","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Sale found with the specified id","schema":{"$ref":"#/definitions/SaleResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Sale not found with the specified id"}}},"put":{"tags":["Sale"],"summary":"Update sale","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the sale to be updated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"in":"body","name":"body","description":"The sale to be updated","required":true,"schema":{"$ref":"#/definitions/SaleUpdate"}}],"responses":{"200":{"description":"Sale updated","schema":{"$ref":"#/definitions/SaleResponse"}},"400":{"description":"Invalid sale provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}},"delete":{"tags":["Sale"],"summary":"Delete sale","description":"","operationId":"delete","parameters":[{"name":"id","in":"path","description":"The id of the sale to be deleted","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Sale deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Sale not found with the specified id"}}}},"/v1/sales/banks":{"get":{"tags":["Sale"],"summary":"List bank accounts by filters","description":"This accepts two parameters as search filters<br/><ul><li><pre>search</pre> - Name of the bank account</li><li><pre>paymentType</pre> - The payment method of the bank account</li></ul><br/><li><b>BANKING_BILLET</b>: is equivalent to 'Boleto Bancário'</li><li><b>BANKING_TRANSFER</b>: is equivalent to 'Transferência Bancária'</li><li><b>DIGITAL_WALLET</b>: is equivalent to 'Carteira Digital'</li><li><b>CREDIT_CARD</b>: is equivalent to 'Cartão de Débito'</li>","operationId":"getBanks","produces":["application/json"],"parameters":[{"name":"search","in":"query","description":"The name of the bank account","required":false,"type":"string"},{"name":"paymentType","in":"query","description":"The payment type of the bank account","required":false,"type":"string"}],"responses":{"200":{"description":"Banks found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/SaleBankResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}}},"/v1/sales/sellers":{"get":{"tags":["Sale"],"summary":"List sellers","description":"","operationId":"listSellers","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Sales found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/Seller"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}}},"/v1/sales/{id}/pdf":{"get":{"tags":["Sale"],"summary":"Get sale PDF by id","description":"This accepts two parameters as search filters<br/><ul><li><pre>search</pre> - Name of the bank account</li><li><pre>paymentType</pre> - The payment method of the bank account</li></ul><br/><li><b>BANKING_BILLET</b>: is equivalent to 'Boleto Bancário'</li><li><b>BANKING_TRANSFER</b>: is equivalent to 'Transferência Bancária'</li><li><b>DIGITAL_WALLET</b>: is equivalent to 'Carteira Digital'</li><li><b>CREDIT_CARD</b>: is equivalent to 'Cartão de Débito'</li>","operationId":"findPdfById","produces":["application/pdf"],"parameters":[{"name":"id","in":"path","description":"The sale id","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Sale found with the specified id","schema":{"$ref":"#/definitions/SaleResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"404":{"description":"Sale not found with the specified id"}}}},"/v1/sales/totals":{"get":{"tags":["Sale"],"summary":"Get sales totals by filter","description":"This accepts two parameters as search filters: <br/><ul><li><pre>modifiedAfter</pre> - Date in \"timestamp\" format. Sales from the parameter date will be considered. </li><li><pre>textualSearch</pre> - It will filter by negotiator name if value is a text or by sale number if value is a number. If informed, the \"timestamp\" parameter will be ignored</li></ul><br/>","operationId":"getTotalsByFilter","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Returned an object with totals found","schema":{"$ref":"#/definitions/TotalStatusNegotiationPreview"}}}}},"/v1/sales":{"get":{"tags":["Sale"],"summary":"List sales by filters","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"emission_start","in":"query","description":"The sale's emission date start filter","required":false,"type":"string"},{"name":"emission_end","in":"query","description":"The sale's emission date end filter","required":false,"type":"string"},{"name":"status","in":"query","description":"The sale's status","required":false,"type":"string"},{"name":"customer_id","in":"query","description":"The sale's customer id","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Sales found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/SaleResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}},"post":{"tags":["Sale"],"summary":"Create sale","description":"","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The sale to be created","required":true,"schema":{"$ref":"#/definitions/SaleRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/SaleCreateResponse"}},"201":{"description":"Sale created","schema":{"$ref":"#/definitions/SaleCreateResponse"}},"400":{"description":"Sale not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"},"422":{"description":"Invalid sale provided. The possible reasons are : <br/><ul><li>A sale with an unknown field was provided in the request body</li><li>A field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/customers/{id}/contacts":{"get":{"tags":["Customer"],"summary":"List customer contacts","description":"","operationId":"listContacts","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer's id to retrieve contacts","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Contacts found","schema":{"$ref":"#/definitions/Contact"}},"400":{"description":"Invalid id"},"404":{"description":"Customer not found"}}}},"/v1/customers/{id}":{"get":{"tags":["Customer"],"summary":"Get customer by id","description":"","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The customer's id to search the customer","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Customer found with the specified id","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Customer not found with the specified id"}}},"put":{"tags":["Customer"],"summary":"Update customer","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the custumer to be updated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"in":"body","name":"body","description":"The customer to be updated","required":true,"schema":{"$ref":"#/definitions/CustomerUpdate"}}],"responses":{"200":{"description":"Customer updated","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Invalid customer provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"}}},"delete":{"tags":["Customer"],"summary":"Delete customer","description":"","operationId":"delete","parameters":[{"name":"id","in":"path","description":"The id of the custumer to be deleted","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Customer deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Customer not found with the specified id"}}}},"/v1/customers/inactivate/{id}":{"delete":{"tags":["Customer"],"summary":"Inactivate customer","description":"","operationId":"inactivate","parameters":[{"name":"id","in":"path","description":"The id of the custumer to be inactivated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Customer deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Customer not found with the specified id"}}}},"/v1/customers":{"get":{"tags":["Customer"],"summary":"List customers by filters","description":"","operationId":"list","produces":["application/json"],"parameters":[{"name":"search","in":"query","description":"When present, the search will be made in customer's company_name, name, email and document(CPF / CNPJ) fields, and other text parameters(company_name, name and document) will be ignored","required":false,"type":"string"},{"name":"name","in":"query","description":"The customer's name","required":false,"type":"string"},{"name":"company_name","in":"query","description":"The customer's company name","required":false,"type":"string"},{"name":"document","in":"query","description":"The customer's document number","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"},{"name":"status","in":"query","description":"This field accepts ENABLED or DISABLED status, and it was made to match with the search field. When present, it will filter only active or inactive customers. When not present, will be filtered for all customers","required":false,"type":"string"}],"responses":{"200":{"description":"Customers found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/CustomerResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li> <li>No search parameters were provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"}}},"post":{"tags":["Customer"],"summary":"Create customer","description":"","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The customer to be created","required":true,"schema":{"$ref":"#/definitions/CustomerRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/CustomerResponse"}},"201":{"description":"Customer created","schema":{"$ref":"#/definitions/CustomerResponse"}},"400":{"description":"Customer not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"422":{"description":"Invalid customer provided.The possible reasons are : <ul><li>A customer with an unknown field was provided in the request body</li><li>A field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/suppliers/{id}":{"get":{"tags":["Supplier-beta"],"summary":"Get supplier by id","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"findById","produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The supplier's id to search the supplier","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"200":{"description":"Supplier found with the specified id","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Invalid id provided - it must be a valid UUID"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Supplier not found with the specified id"}}},"put":{"tags":["Supplier-beta"],"summary":"Update supplier","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"The id of the supplier to be updated","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"},{"in":"body","name":"body","description":"The supplier to be updated","required":true,"schema":{"$ref":"#/definitions/SupplierUpdate"}}],"responses":{"200":{"description":"Supplier updated","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Invalid supplier provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"}}},"delete":{"tags":["Supplier-beta"],"summary":"Delete supplier","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"delete","parameters":[{"name":"id","in":"path","description":"The id of the supplier to be deleted","required":true,"type":"string","x-example":"48806cbb-c8f9-42f6-a286-5d4b9414a04d"}],"responses":{"204":{"description":"Supplier deleted"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"404":{"description":"Supplier not found with the specified id"}}}},"/v1/suppliers":{"get":{"tags":["Supplier-beta"],"summary":"List suppliers by filters","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"list","produces":["application/json"],"parameters":[{"name":"name","in":"query","description":"The supplier's name when NATURAL person","required":false,"type":"string"},{"name":"company_name","in":"query","description":"The supplier's company name when LEGAL person","required":false,"type":"string"},{"name":"document","in":"query","description":"The supplier's document number","required":false,"type":"string"},{"name":"page","in":"query","description":"The page of the list to be returned","required":false,"type":"string"},{"name":"size","in":"query","description":"The quantity of items in the page to be returned","required":false,"type":"string"}],"responses":{"200":{"description":"Suppliers found with the search parameters","schema":{"type":"array","items":{"$ref":"#/definitions/SupplierResponse"}}},"400":{"description":"Invalid search parameters. The possible reasons are : <ul> <li>A invalid search parameter was provided</li> <li>No search parameters were provided</li></ul>"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"}}},"post":{"tags":["Supplier-beta"],"summary":"Create supplier","description":"This endpoint is still under construction and can be modified without further warning.","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"The supplier to be created","required":true,"schema":{"$ref":"#/definitions/SupplierRequest"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/SupplierResponse"}},"201":{"description":"Supplier created","schema":{"$ref":"#/definitions/SupplierResponse"}},"400":{"description":"Supplier not provided in the request body"},"401":{"description":"Unauthorized token - it may be due to an invalid token provided or no token provided"},"422":{"description":"Invalid supplier provided.The possible reasons are : <ul><li>A supplier with an unknown field was provided in the request body</li><li>A field of the provided sale was null or with invalid values</li></ul>"}}}},"/v1/plans/current":{"get":{"tags":["Plans"],"summary":"Get current user plans","description":"","operationId":"getCurrentPlan","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Plan found for company","schema":{"$ref":"#/definitions/PlanCountRestriction"}},"404":{"description":"Subscription plan not found for this account"},"401":{"description":"Unauthorized token - it may be due to an invalid token or no token provided"}}}}},"definitions":{"ProductCategory":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"c7288c09-829d-48b9-aee2-4f744e380587","description":"The id of the product's category"},"name":{"type":"string","example":"Kitchen utensils","description":"The name of the product's category"}},"description":"A category that can be applied to a product"},"ProductResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"[c7288c09-829d-48b9-aee2-4f744e380587, 0483d282-2c22-11ec-8d3d-0242ac130003]","description":"The id of the product"},"name":{"type":"string","example":"Game Atari ET","description":"The name of the product"},"value":{"type":"number","example":100.0,"description":"The sell value of the product"},"cost":{"type":"number","example":80.0,"description":"The cost value of the product"},"code":{"type":"string","example":"Game-1","description":"The code of the product, a organization field that accepts any string"},"barcode":{"type":"string","example":"501234567890","description":"The barcode of the product - 'EAN'"},"available_stock":{"type":"number","format":"double","example":1000.0,"description":"The quantity of available products in stock"},"ncm_code":{"type":"string","example":"96140000","description":"The NCM code of the product"},"cest_code":{"type":"string","example":"0100300","description":"The CEST code of the product"},"net_weight":{"type":"number","example":10.0,"description":"The net weight of the product"},"gross_weight":{"type":"number","example":15.0,"description":"The gross weight of the product"},"category":{"description":"The category of the product","$ref":"#/definitions/ProductCategory"},"unit_measure":{"type":"string","example":"KG","description":"The symbol of the unit measure","minLength":0,"maxLength":20}},"description":"A product that can be used in negotiations"},"ProductUpdate":{"type":"object","required":["cost","name","value"],"properties":{"name":{"type":"string","example":"Game Atari ET","description":"The name of the product","minLength":0,"maxLength":100},"value":{"type":"number","example":100.0,"description":"The sell value of the product"},"cost":{"type":"number","example":80.0,"description":"The cost value of the product"},"code":{"type":"string","example":"Game-1","description":"The code of the product, a organization field that accepts any string","minLength":0,"maxLength":20},"barcode":{"type":"string","example":"501234567890","description":"The barcode of the product - 'EAN'","minLength":0,"maxLength":20},"available_stock":{"type":"number","format":"double","example":1000.0,"description":"The quantity of available products in stock"},"ncm_code":{"type":"string","example":"96140000","description":"The NCM code of the product","minLength":0,"maxLength":10},"cest_code":{"type":"string","example":"0100300","description":"The CEST code of the product","minLength":0,"maxLength":10},"net_weight":{"type":"number","example":10.0,"description":"The net weight of the product"},"gross_weight":{"type":"number","example":15.0,"description":"The gross weight of the product"},"unit_measure":{"type":"string","example":"KG","description":"The symbol of the unit measure","minLength":0,"maxLength":20},"suppliers_id":{"type":"array","example":"[c7288c09-829d-48b9-aee2-4f744e380587, 0483d282-2c22-11ec-8d3d-0242ac130003]","description":"The suppliers uuid of the product","items":{"type":"string","format":"uuid"}}},"description":"A product that can be used in negotiations"},"ProductRequest":{"type":"object","required":["cost","name","value"],"properties":{"name":{"type":"string","example":"Game Atari ET","description":"The name of the product","minLength":0,"maxLength":100},"value":{"type":"number","example":100.0,"description":"The sell value of the product"},"cost":{"type":"number","example":80.0,"description":"The cost value of the product"},"code":{"type":"string","example":"Game-1","description":"The code of the product, a organization field that accepts any string","minLength":0,"maxLength":20},"barcode":{"type":"string","example":"501234567890","description":"The barcode of the product - 'EAN'","minLength":0,"maxLength":20},"available_stock":{"type":"number","format":"double","example":1000.0,"description":"The quantity of available products in stock"},"ncm_code":{"type":"string","example":"96140000","description":"The NCM code of the product","minLength":0,"maxLength":10},"cest_code":{"type":"string","example":"0100300","description":"The CEST code of the product","minLength":0,"maxLength":10},"net_weight":{"type":"number","example":10.0,"description":"The net weight of the product"},"gross_weight":{"type":"number","example":15.0,"description":"The gross weight of the product"},"category_id":{"type":"string","format":"uuid","example":"[c7288c09-829d-48b9-aee2-4f744e380587, 0483d282-2c22-11ec-8d3d-0242ac130003]","description":"The category's id of the product, the default value will be the first category in your account configuration category list."},"unit_measure":{"type":"string","example":"KG","description":"The symbol of the unit measure","minLength":0,"maxLength":20},"suppliers_id":{"type":"array","example":"[c7288c09-829d-48b9-aee2-4f744e380587, 0483d282-2c22-11ec-8d3d-0242ac130003]","description":"The suppliers uuid of the product","items":{"type":"string","format":"uuid"}}},"description":"A product that can be used in negotiations"},"ServiceResponse":{"type":"object","required":["cost","name","type","value"],"properties":{"id":{"type":"string","format":"uuid","example":"c7288c09-829d-48b9-aee2-4f744e380587","description":"The id of the service"},"name":{"type":"string","example":"Fix car engine","description":"The name of the service","minLength":0,"maxLength":100},"type":{"type":"string","example":"PROVIDED","description":"The type of the service:<ul><li><b>PROVIDED</b>: Is equivalent to 'Prestado'</li><li><b>TAKEN</b>: Is equivalent to 'Tomado'</li><li><b>BOTH</b>: Is equivalent to 'Ambos'</li></ul>","pattern":"PROVIDED|TAKEN|BOTH"},"value":{"type":"number","example":100.0,"description":"The value of the service"},"cost":{"type":"number","example":80.0,"description":"The cost of the service"},"code":{"type":"string","example":"FIX-ENG-001","description":"The code of the service, a organization field that accepts any string"}},"description":"A service that can be used in negotiations"},"ServiceUpdate":{"type":"object","required":["cost","name","value"],"properties":{"name":{"type":"string","example":"Fix car engine","description":"The name of the service","minLength":0,"maxLength":100},"type":{"type":"string","example":"PROVIDED","description":"The type of the service:<ul><li><b>PROVIDED</b>: Is equivalent to 'Prestado'</li><li><b>TAKEN</b>: Is equivalent to 'Tomado'</li><li><b>BOTH</b>: Is equivalent to 'Ambos'</li></ul>","pattern":"PROVIDED|TAKEN|BOTH"},"value":{"type":"number","example":100.0,"description":"The value of the service"},"cost":{"type":"number","example":80.0,"description":"The cost of the service"},"code":{"type":"string","example":"FIX-ENG-001","description":"The code of the service, a organization field that accepts any string","minLength":0,"maxLength":20}},"description":"A service that can be used in negotiations"},"ServiceRequest":{"type":"object","required":["cost","name","value"],"properties":{"name":{"type":"string","example":"Fix car engine","description":"The name of the service","minLength":0,"maxLength":100},"type":{"type":"string","example":"PROVIDED","description":"The type of the service:<ul><li><b>PROVIDED</b>: Is equivalent to 'Prestado'</li><li><b>TAKEN</b>: Is equivalent to 'Tomado'</li><li><b>BOTH</b>: Is equivalent to 'Ambos'</li></ul>","pattern":"PROVIDED|TAKEN|BOTH"},"value":{"type":"number","example":100.0,"description":"The value of the service"},"cost":{"type":"number","example":80.0,"description":"The cost of the service"},"code":{"type":"string","example":"FIX-ENG-001","description":"The code of the service, a organization field that accepts any string","minLength":0,"maxLength":20}},"description":"A service that can be used in negotiations"},"ContractResponse":{"type":"object","required":["due_day","duration","emission"],"properties":{"id":{"type":"string","format":"uuid","example":"c7288c09-829d-48b9-aee2-4f744e380587","description":"The id of the contract"},"number":{"type":"integer","format":"int64","example":12,"description":"A number generated for the contract"},"emission":{"type":"string","format":"date-time","description":"The emission date of the contract"},"status":{"type":"string","description":"Status information of the contract - <ul><li><b>COMMITTED</b>: is equivalent to 'Venda'</li></ul>"},"customer_id":{"type":"string","format":"uuid","description":"The id of the customer related to the contract"},"discount":{"description":"Discount information of the contract","$ref":"#/definitions/Discount"},"due_day":{"type":"integer","format":"int32","example":5,"description":"The due day of the contract"},"duration":{"type":"integer","format":"int32","example":10,"description":"The duration of the contract"},"notes":{"type":"string","example":"Contract for house rent","description":"Additional information about the contract"},"shipping_cost":{"type":"number","example":10.0,"description":"Shipping cost of the contract"}},"description":"A contract of products and services"},"Discount":{"type":"object","properties":{"measure_unit":{"type":"string","example":"VALUE","description":"The measure unit of the discount","enum":["PERCENT","VALUE"]},"rate":{"type":"number","example":5.0,"description":"The rate of the discount"}},"description":"Discount information"},"ContractProduct":{"type":"object","required":["quantity"],"properties":{"description":{"type":"string","example":"Game Atari ET","description":"The description of the contract product","minLength":0,"maxLength":100},"quantity":{"type":"number","example":800.0,"description":"The quantity of products"},"product_id":{"type":"string","format":"uuid","description":"The product of this contract product"},"value":{"type":"number","description":"The value of the contract product"}},"description":"A product item in a contract"},"ContractRequest":{"type":"object","required":["due_day","duration","emission","status"],"properties":{"number":{"type":"integer","format":"int64","example":12,"description":"A number generated for the contract"},"emission":{"type":"string","format":"date-time","description":"The emission date of the contract"},"status":{"type":"string","description":"Status information of the contract - <ul><li><b>COMMITTED</b>: is equivalent to 'Venda'</li></ul>","pattern":"COMMITTED"},"customer_id":{"type":"string","format":"uuid","description":"The id of the customer related to the contract"},"products":{"type":"array","description":"The products of the contract","items":{"$ref":"#/definitions/ContractProduct"}},"services":{"type":"array","description":"The services of the contract","items":{"$ref":"#/definitions/ContractService"}},"discount":{"description":"Discount information of the contract","$ref":"#/definitions/Discount"},"due_day":{"type":"integer","format":"int32","example":5,"description":"The due day of the contract"},"duration":{"type":"integer","format":"int32","example":10,"description":"The duration of the contract"},"notes":{"type":"string","example":"Contract for house rent","description":"Additional information about the contract","minLength":0,"maxLength":5000},"shipping_cost":{"type":"number","example":10.0,"description":"Shipping cost of the contract"}},"description":"A contract of products and services"},"ContractService":{"type":"object","required":["quantity"],"properties":{"description":{"type":"string","example":"Exchange of Game Atari ET","description":"The description of the contract service","minLength":0,"maxLength":100},"quantity":{"type":"number","example":800.0,"description":"The quantity of services"},"service_id":{"type":"string","format":"uuid","description":"The service of this contract service"},"value":{"type":"number","description":"The value of the contract product"}},"description":"A service item in a contract"},"Installment":{"type":"object","required":["due_date","number","value"],"properties":{"number":{"type":"integer","format":"int32","example":1,"description":"The number of the installment"},"value":{"type":"number","example":305.0,"description":"The value of the installment"},"due_date":{"type":"string","format":"date-time","description":"The due date of the installment"},"status":{"type":"string","example":"PENDING","description":"The status of the installment. The possible values are: <ul><li><b>PENDING</b>: the installment is PENDING payment</li>","pattern":"^(?i)(?!ACQUITTED$).*"},"note":{"type":"string","example":"NOTE","description":"An observation about the installments"},"hasBillet":{"type":"boolean","example":true,"description":"Indicates if the billet was generated"}},"description":"A installment of a payment"},"InstallmentUpdate":{"type":"object","properties":{"status":{"type":"string","description":"The status of the installment. The possible values are: <ul><li><b>PENDING</b>: the installment is PENDING payment</li><li><b>ACQUITTED</b>: the installment has been ACQUITTED</li>"}},"description":"A installment of a payment"},"Item":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"c7288c09-829d-48b9-aee2-4f744e380587","description":"The id of the item"},"name":{"type":"string","example":"Game Atari ET","description":"The name of the item"},"value":{"type":"number","example":100.0,"description":"The sell value of the item"},"cost":{"type":"number","example":80.0,"description":"The cost value of the item"}},"description":"An item of a negotiation item"},"NegotiationItem":{"type":"object","properties":{"description":{"type":"string","example":"Game Atari ET","description":"The description of the negotiation item"},"quantity":{"type":"number","example":800.0,"description":"The quantity of items"},"item":{"description":"The item of this negotiation item","$ref":"#/definitions/Item"},"item_type":{"type":"string","example":"PRODUCT","description":"The type of the item - can be Product or Service","enum":["PRODUCT","SERVICE"]},"value":{"type":"number","description":"The value of the negotiation item"}},"description":"An item in a Sale/Contract"},"Payment":{"type":"object","required":["installments","type"],"properties":{"type":{"type":"string","description":"The type of the payment - <ul><li><b>CASH</b>: is equivalent to 'Pagamento à vista'</li><li><b>TIMES</b>: is equivalent to 'Pagamento Parcelado'</li></ul>","enum":["CASH","TIMES"]},"method":{"type":"string","description":"The method of the payment - <ul><li><b>BANKING_BILLET</b>: is equivalent to 'Boleto Bancário'</li><li><b>CREDIT_CARD</b>: is equivalent to 'Cartão de Crédito'</li><li><b>DEBIT_CARD</b>: is equivalent to 'Cartão de Débito'</li><li><b>DIGITAL_WALLET</b>: is equivalent to 'Carteira Digital'</li><li><b>CASHBACK</b>: is equivalent to 'Cashback'</li><li><b>CHECK</b>: is equivalent to 'Cheque'</li><li><b>STORE_CREDIT</b>: is equivalent to 'Credito da Loja'</li><li><b>VIRTUAL_CREDIT</b>: is equivalent to 'Crédito Virtual'</li><li><b>BANKING_DEPOSIT</b>: is equivalent to 'Depósito Bancário'</li><li><b>CASH</b>: is equivalent to 'Dinheiro'</li><li><b>OTHER</b>: is equivalent to 'Outros'</li><li><b>INSTANT_PAYMENT</b>: is equivalent to 'PIX - Pagamento Instantâneo'</li><li><b>FIDELITY_PROGRAM</b>: is equivalent to 'Programa de Fidelidade'</li><li><b>WITHOUT_PAYMENT</b>: is equivalent to 'Sem Pagamento'</li><li><b>BANKING_TRANSFER</b>: is equivalent to 'Transferência Bancária'</li><li><b>FOOD_VOUCHER</b>: is equivalent to 'Vale Alimentação'</li><li><b>FUEL_VOUCHER</b>: is equivalent to 'Vale Combustível'</li><li><b>GIFT_VOUCHER</b>: is equivalent to 'Vale Presente'</li><li><b>MEAL_VOUCHER</b>: is equivalent to 'Vale Refeição'</li></ul>","enum":["BANKING_BILLET","CREDIT_CARD","DEBIT_CARD","DIGITAL_WALLET","CASHBACK","CHECK","STORE_CREDIT","VIRTUAL_CREDIT","BANKING_DEPOSIT","CASH","OTHER","PAYMENT_LINK","INSTANT_PAYMENT","PIX_CHARGE","FIDELITY_PROGRAM","WITHOUT_PAYMENT","BANKING_TRANSFER","FOOD_VOUCHER","FUEL_VOUCHER","GIFT_VOUCHER","MEAL_VOUCHER"]},"installments":{"type":"array","description":"The list of installments of the payment","items":{"$ref":"#/definitions/Installment"}},"financial_account_id":{"type":"string","format":"uuid","description":"The id of the bank account related to the sale"},"financial_account":{"description":"The bank account related to the sale","$ref":"#/definitions/SaleBankResponse"}},"description":"A payment that can be used in sales"},"SaleBankResponse":{"type":"object","properties":{"uuid":{"type":