#API Anymarket
#Installation
To install this library, use pip:
`pip install Anymarket`
#How to import
Example:
`from anymarket import *|<modules>`
#Modules
* Pedido
###github project
https://github.com/pablobelmiro/anymarket
#Usage
Below is a description of the static methods provided by the library. These methods allow for easy interaction with the Anymarket API without the need to instantiate the classes.
tests Class:
##`tests.test()`
#Pedido Class
##`getPedidos(token, createdAfter=None, createdBefore=None, marketplaceId=None, offset=0, marketplace=None, status=None, days=7)`
##Example:
`from anymarket import Pedido
token = "your-token"
dictOrders = Pedido.getPedidos(token)`
Retrieves a list of orders from Anymarket within the specified date range and other optional parameters.
* token: Your Anymarket API token.
* createdAfter: Start date for retrieving orders (format: 'YYYY/MM/DD').
* createdBefore: End date for retrieving orders (format: 'YYYY/MM/DD').
* marketplaceId: ID of the marketplace.
* offset: Offset for pagination.
* marketplace: Name of the marketplace.
* status: Status of the orders.
* days: Number of days to retrieve orders for.
##`getPedido(token, idOrder)`
##Example:
`from anymarket import Pedido
token = "your-token"
dictOrder = Pedido.getPedido(token, idOrder=1234)`
Retrieves a specific order by its ID.
* token: Your Anymarket API token.
* idOrder: ID of the order to retrieve.
##`getXmlNfe(token, idOrder, type='sale')`
##Example:
`from anymarket import Pedido
token = "your-token"
dictOrder = Pedido.getXmlNfe(token, idOrder=1234, type='sale')`
#param type is OPTIONAL
Retrieves the XML of a specific invoice (NFE) for an order.
* token: Your Anymarket API token.
* idOrder: ID of the order.
* type: OPTIONAL Type of the NFE (default is 'sale').
##`postOrder(token, payload=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
payload = {}
dictOrder = Pedido.postOrder(token, payload=payload)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/8cfa11486184a-orders
Creates a new order with the given payload.
* token: Your Anymarket API token.
* payload: Dictionary containing the order data.
##`putOrderPago(token, idOrder=0)`
##Example:
`from anymarket import Pedido
token = "your-token"
dictOrder = Pedido.putOrderPago(token, idOrder=1234)`
Marks an order as paid.
* token: Your Anymarket API token.
* idOrder: ID of the order to mark as paid.
##`Pedido.putOrderFaturado(token, idOrder=0, payload=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
payload = {}
dictOrder = Pedido.putOrderFaturado(token, idOrder=1234, payload=payload)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/40f4fe2a8d1a6-orders-id-faturado
Marks an order as invoiced.
* token: Your Anymarket API token.
* idOrder: ID of the order to mark as invoiced.
* payload: Dictionary containing the invoicing data.
##`putOrderEmTransito(token, idOrder=0, payload=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
payload = {}
dictOrder = Pedido.putOrderEmTransito(token, idOrder=1234, payload=payload)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/79a198e2f0b5b-orders-id-enviado-em-transito
Marks an order as in transit.
* token: Your Anymarket API token.
* idOrder: ID of the order to mark as in transit.
* payload: Dictionary containing the transit data.
##`putOrderConcluido(token, idOrder=0, payload=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
payload = {}
dictOrder = Pedido.putOrderConcluido(token, idOrder=1234, payload=payload)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/e8078db411b0d-orders-id-concluido
Marks an order as completed.
* token: Your Anymarket API token.
* idOrder: ID of the order to mark as completed.
* payload: Dictionary containing the completion data.
##`putOrderCancelado(token, idOrder=0, cancelDescription=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
description = 'canceled'
dictOrder = Pedido.putOrderCancelado(token, idOrder=1234, cancelDescription=description)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/b34a24800a053-orders-id-cancelado
Cancels an order with the given description.
* token: Your Anymarket API token.
* idOrder: ID of the order to cancel.
* cancelDescription: Description for the cancellation.
##`ordersPutEnviaXml(token, idOrder=0, xml=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
xml = ''
dictOrder = Pedido.ordersPutEnviaXml(token, idOrder=1234, xml=xml)`
###Payload documentation: https://developers.anymarket.com.br/api/v2/54b16092d1776-orders-id-nfe
Sends the XML of an NFE for an order.
* token: Your Anymarket API token.
* idOrder: ID of the order.
* xml: XML data to send.
##`ordersPostfiscalDocument(token, idOrder=0, fiscalDocument=None)`
##Example:
`from anymarket import Pedido
token = "your-token"
file = ''
dictOrder = Pedido.ordersPostfiscalDocument(token, idOrder=1234, fiscalDocument=file)`
###boundary=---011000010111000001101001
###Payload documentation: https://developers.anymarket.com.br/api/v2/q4xx466onjupg-orders-id-fiscal-document
Posts a fiscal document for an order.
* token: Your Anymarket API token.
* idOrder: ID of the order.
* fiscalDocument: Fiscal document data to send.
#License
This project is licensed under the MIT License. See the LICENSE file for details.
#Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Contact
For any issues or inquiries, please contact [dev.pablobelmiro@gmail.com].
Raw data
{
"_id": null,
"home_page": null,
"name": "Anymarket",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, API, Anymarket, Ecommerce",
"author": "Pablo Belmiro",
"author_email": "dev.pablobelmiro@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cc/de/e2dac321bea6d1808887ca05376a977f1493cfe9f165301f4f0ba58d6255/anymarket-0.0.5.tar.gz",
"platform": null,
"description": "\r\n#API Anymarket\r\n\r\n\r\n\r\n\r\n\r\n#Installation\r\n\r\nTo install this library, use pip:\r\n\r\n\r\n\r\n`pip install Anymarket`\r\n\r\n\r\n\r\n#How to import\r\n\r\nExample:\r\n\r\n`from anymarket import *|<modules>`\r\n\r\n\r\n\r\n#Modules\r\n\r\n * Pedido\r\n\r\n\r\n\r\n###github project\r\n\r\nhttps://github.com/pablobelmiro/anymarket\r\n\r\n\r\n\r\n#Usage\r\n\r\nBelow is a description of the static methods provided by the library. These methods allow for easy interaction with the Anymarket API without the need to instantiate the classes.\r\n\r\ntests Class: \r\n\r\n##`tests.test()`\r\n\r\n\r\n\r\n#Pedido Class\r\n\r\n##`getPedidos(token, createdAfter=None, createdBefore=None, marketplaceId=None, offset=0, marketplace=None, status=None, days=7)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\ndictOrders = Pedido.getPedidos(token)`\r\n\r\n\r\n\r\n\r\n\r\nRetrieves a list of orders from Anymarket within the specified date range and other optional parameters.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * createdAfter: Start date for retrieving orders (format: 'YYYY/MM/DD').\r\n\r\n * createdBefore: End date for retrieving orders (format: 'YYYY/MM/DD').\r\n\r\n * marketplaceId: ID of the marketplace.\r\n\r\n * offset: Offset for pagination.\r\n\r\n * marketplace: Name of the marketplace.\r\n\r\n * status: Status of the orders.\r\n\r\n * days: Number of days to retrieve orders for.\r\n\r\n\r\n\r\n##`getPedido(token, idOrder)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\ndictOrder = Pedido.getPedido(token, idOrder=1234)`\r\n\r\n\r\n\r\nRetrieves a specific order by its ID.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to retrieve.\r\n\r\n\r\n\r\n##`getXmlNfe(token, idOrder, type='sale')`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\ndictOrder = Pedido.getXmlNfe(token, idOrder=1234, type='sale')`\r\n\r\n#param type is OPTIONAL\r\n\r\n\r\n\r\nRetrieves the XML of a specific invoice (NFE) for an order.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order.\r\n\r\n * type: OPTIONAL Type of the NFE (default is 'sale').\r\n\r\n\r\n\r\n##`postOrder(token, payload=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\npayload = {}\r\n\r\ndictOrder = Pedido.postOrder(token, payload=payload)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/8cfa11486184a-orders\r\n\r\n\r\n\r\n\r\n\r\nCreates a new order with the given payload.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * payload: Dictionary containing the order data.\r\n\r\n\r\n\r\n##`putOrderPago(token, idOrder=0)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\ndictOrder = Pedido.putOrderPago(token, idOrder=1234)`\r\n\r\n\r\n\r\nMarks an order as paid.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to mark as paid.\r\n\r\n\r\n\r\n##`Pedido.putOrderFaturado(token, idOrder=0, payload=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\npayload = {}\r\n\r\ndictOrder = Pedido.putOrderFaturado(token, idOrder=1234, payload=payload)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/40f4fe2a8d1a6-orders-id-faturado\r\n\r\n\r\n\r\nMarks an order as invoiced.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to mark as invoiced.\r\n\r\n * payload: Dictionary containing the invoicing data.\r\n\r\n\r\n\r\n##`putOrderEmTransito(token, idOrder=0, payload=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\npayload = {}\r\n\r\ndictOrder = Pedido.putOrderEmTransito(token, idOrder=1234, payload=payload)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/79a198e2f0b5b-orders-id-enviado-em-transito\r\n\r\n\r\n\r\nMarks an order as in transit.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to mark as in transit.\r\n\r\n * payload: Dictionary containing the transit data.\r\n\r\n\r\n\r\n##`putOrderConcluido(token, idOrder=0, payload=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\npayload = {}\r\n\r\ndictOrder = Pedido.putOrderConcluido(token, idOrder=1234, payload=payload)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/e8078db411b0d-orders-id-concluido\r\n\r\n\r\n\r\n\r\n\r\nMarks an order as completed.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to mark as completed.\r\n\r\n * payload: Dictionary containing the completion data.\r\n\r\n\r\n\r\n##`putOrderCancelado(token, idOrder=0, cancelDescription=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\ndescription = 'canceled'\r\n\r\ndictOrder = Pedido.putOrderCancelado(token, idOrder=1234, cancelDescription=description)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/b34a24800a053-orders-id-cancelado\r\n\r\n\r\n\r\nCancels an order with the given description.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order to cancel.\r\n\r\n * cancelDescription: Description for the cancellation.\r\n\r\n\r\n\r\n##`ordersPutEnviaXml(token, idOrder=0, xml=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\nxml = ''\r\n\r\ndictOrder = Pedido.ordersPutEnviaXml(token, idOrder=1234, xml=xml)`\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/54b16092d1776-orders-id-nfe\r\n\r\n\r\n\r\nSends the XML of an NFE for an order.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order.\r\n\r\n * xml: XML data to send.\r\n\r\n\r\n\r\n##`ordersPostfiscalDocument(token, idOrder=0, fiscalDocument=None)`\r\n\r\n##Example:\r\n\r\n`from anymarket import Pedido\r\n\r\ntoken = \"your-token\"\r\n\r\nfile = ''\r\n\r\ndictOrder = Pedido.ordersPostfiscalDocument(token, idOrder=1234, fiscalDocument=file)`\r\n\r\n###boundary=---011000010111000001101001\r\n\r\n###Payload documentation: https://developers.anymarket.com.br/api/v2/q4xx466onjupg-orders-id-fiscal-document\r\n\r\n\r\n\r\nPosts a fiscal document for an order.\r\n\r\n\r\n\r\n * token: Your Anymarket API token.\r\n\r\n * idOrder: ID of the order.\r\n\r\n * fiscalDocument: Fiscal document data to send.\r\n\r\n\r\n\r\n#License\r\n\r\nThis project is licensed under the MIT License. See the LICENSE file for details.\r\n\r\n\r\n\r\n#Contributing\r\n\r\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\r\n\r\n\r\n\r\nContact\r\n\r\nFor any issues or inquiries, please contact [dev.pablobelmiro@gmail.com].\r\n\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Anymarket API",
"version": "0.0.5",
"project_urls": null,
"split_keywords": [
"python",
" api",
" anymarket",
" ecommerce"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "064e41552bde76771b362678342b50629f00222436c8ba55ccbd93dfe1528015",
"md5": "98ad94093d97b0ae5f221e7d1cc48306",
"sha256": "580e531169d4183248f184131c9f166885c752dc04c522e7f5d43fc276d69334"
},
"downloads": -1,
"filename": "Anymarket-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "98ad94093d97b0ae5f221e7d1cc48306",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5928,
"upload_time": "2024-06-04T00:40:43",
"upload_time_iso_8601": "2024-06-04T00:40:43.687198Z",
"url": "https://files.pythonhosted.org/packages/06/4e/41552bde76771b362678342b50629f00222436c8ba55ccbd93dfe1528015/Anymarket-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ccdee2dac321bea6d1808887ca05376a977f1493cfe9f165301f4f0ba58d6255",
"md5": "3227163ededa8bbdfd56223fe7614823",
"sha256": "c30e0d5c07e84271448d92d6e22c303b30c7a3492708a859b6db23189bc4d1e2"
},
"downloads": -1,
"filename": "anymarket-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "3227163ededa8bbdfd56223fe7614823",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6051,
"upload_time": "2024-06-04T00:40:45",
"upload_time_iso_8601": "2024-06-04T00:40:45.572370Z",
"url": "https://files.pythonhosted.org/packages/cc/de/e2dac321bea6d1808887ca05376a977f1493cfe9f165301f4f0ba58d6255/anymarket-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-04 00:40:45",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "anymarket"
}