MyMagento Logo
stable

README

  • About MyMagento
    • Main Components
    • Available Endpoints
  • Installation
  • QuickStart: Login with MyMagento
    • Setting the Login Credentials
    • Getting a Client
      • Option 1: Initialize a Client Directly
      • Option 2: Call get_api()
    • Getting an ACCESS_TOKEN
  • Interacting with the API
    • Performing a search()
    • Search Results: The Model Classes
    • Building Custom Search Queries
    • Making Authorized Requests
      • Example: Making a get() Request
      • Example: Making a post() Request

Documentation

  • The magento Package
    • get_api()
    • The clients module
      • Client
        • Client.__init__()
        • Client.BASE_URL
        • Client.USER_CREDENTIALS
        • Client.ACCESS_TOKEN
        • Client.domain
        • Client.scope
        • Client.user_agent
        • Client.logger
        • Client.store
        • Client.new()
        • Client.load()
        • Client.from_json()
        • Client.from_dict()
        • Client.url_for()
        • Client.search()
        • Client.orders
        • Client.order_items
        • Client.invoices
        • Client.categories
        • Client.products
        • Client.product_attributes
        • Client.get()
        • Client.post()
        • Client.put()
        • Client.delete()
        • Client.authenticate()
        • Client.validate()
        • Client.request()
        • Client.get_logger()
        • Client.headers
        • Client.token
        • Client.to_pickle()
        • Client.to_json()
        • Client.to_dict()
        • Client.view_config()
      • Store
        • Store.__init__()
        • Store.is_single_store
        • Store.active
        • Store.configs
        • Store.views
        • Store.all_product_attributes
        • Store.store_view_product_attributes
        • Store.website_product_attributes
        • Store.global_product_attributes
        • Store.website_attribute_codes
        • Store.filter_website_attrs()
        • Store.refresh()
    • The search module
      • Available Endpoints
        • SearchQuery
        • OrderSearch
        • OrderItemSearch
        • InvoiceSearch
        • ProductSearch
        • ProductAttributeSearch
        • CategorySearch
    • The exceptions module
      • MagentoError
        • MagentoError.DEFAULT_MSG
        • MagentoError.__init__()
        • MagentoError.parse()
      • AuthenticationError
        • AuthenticationError.DEFAULT_MSG
        • AuthenticationError.__init__()
    • The utils module
      • ItemManager
        • ItemManager.__init__()
        • ItemManager.add()
        • ItemManager.get_attrs()
        • ItemManager.sum_attrs()
      • LoggerUtils
        • LoggerUtils.get_handler_names()
        • LoggerUtils.get_stream_handlers()
        • LoggerUtils.get_file_handlers()
        • LoggerUtils.get_log_files()
        • LoggerUtils.get_handler_by_log_file()
        • LoggerUtils.clear_handlers()
        • LoggerUtils.clear_stream_handlers()
        • LoggerUtils.clear_file_handlers()
        • LoggerUtils.map_handlers_by_name()
      • MagentoLogger
        • MagentoLogger.PREFIX
        • MagentoLogger.PACKAGE_LOG_NAME
        • MagentoLogger.CLIENT_LOG_NAME
        • MagentoLogger.HANDLER_NAME
        • MagentoLogger.LOG_MESSAGE
        • MagentoLogger.FORMATTER
        • MagentoLogger.__init__()
        • MagentoLogger.setup_logger()
        • MagentoLogger.format_msg()
        • MagentoLogger.debug()
        • MagentoLogger.info()
        • MagentoLogger.error()
        • MagentoLogger.warning()
        • MagentoLogger.critical()
        • MagentoLogger.handlers
        • MagentoLogger.handler_names
        • MagentoLogger.handler_map
        • MagentoLogger.file_handlers
        • MagentoLogger.stream_handlers
        • MagentoLogger.log_files
        • MagentoLogger.log_path
        • MagentoLogger.get_magento_handlers()
        • MagentoLogger.clear_magento_handlers()
        • MagentoLogger.clear_magento_file_handlers()
        • MagentoLogger.clear_magento_stdout_handlers()
        • MagentoLogger.owns_handler()
        • MagentoLogger.get_package_handler()
        • MagentoLogger.add_request_logging()
      • get_agents()
      • get_agent()
      • get_package_file_handler()
  • The magento.models subpackage
    • The model module
      • Model
        • Model.DOCUMENTATION
        • Model.IDENTIFIER
        • Model.__init__()
        • Model.set_attrs()
        • Model.excluded_keys
        • Model.uid
        • Model.data_endpoint()
        • Model.query_endpoint()
        • Model.parse()
        • Model.refresh()
        • Model.unpack_attributes()
        • Model.pack_attributes()
        • Model.encode()
        • Model.cached
        • Model.clear()
        • Model.get_scope_name()
      • APIResponse
        • APIResponse.IDENTIFIER
        • APIResponse.__init__()
        • APIResponse.excluded_keys
        • APIResponse.uid
        • APIResponse.data_endpoint()
    • The product module
      • Product
        • Product.STATUS_ENABLED
        • Product.STATUS_DISABLED
        • Product.VISIBILITY_NOT_VISIBLE
        • Product.VISIBILITY_CATALOG
        • Product.VISIBILITY_SEARCH
        • Product.VISIBILITY_BOTH
        • Product.DOCUMENTATION
        • Product.IDENTIFIER
        • Product.__init__()
        • Product.excluded_keys
        • Product.update_stock()
        • Product.update_status()
        • Product.update_price()
        • Product.update_special_price()
        • Product.update_name()
        • Product.update_description()
        • Product.update_metadata()
        • Product.update_attributes()
        • Product.update_custom_attributes()
        • Product.get_orders()
        • Product.get_order_items()
        • Product.get_invoices()
        • Product.delete()
        • Product.get_children()
        • Product.children
        • Product.categories
        • Product.media_gallery_entries
        • Product.thumbnail
        • Product.thumbnail_link
        • Product.get_media_by_id()
        • Product.encoded_sku
        • Product.option_skus
        • Product.stock
        • Product.stock_item
        • Product.stock_item_id
        • Product.description
        • Product.special_price
      • MediaEntry
        • MediaEntry.MEDIA_TYPES
        • MediaEntry.DOCUMENTATION
        • MediaEntry.IDENTIFIER
        • MediaEntry.__init__()
        • MediaEntry.query_endpoint()
        • MediaEntry.excluded_keys
        • MediaEntry.is_enabled
        • MediaEntry.is_thumbnail
        • MediaEntry.link
        • MediaEntry.disable()
        • MediaEntry.enable()
        • MediaEntry.add_media_type()
        • MediaEntry.remove_media_type()
        • MediaEntry.set_media_types()
        • MediaEntry.set_position()
        • MediaEntry.set_alt_text()
        • MediaEntry.update()
      • ProductAttribute
        • ProductAttribute.DOCUMENTATION
        • ProductAttribute.IDENTIFIER
        • ProductAttribute.__init__()
        • ProductAttribute.excluded_keys
        • ProductAttribute.options
    • The category module
      • Category
        • Category.DOCUMENTATION
        • Category.IDENTIFIER
        • Category.__init__()
        • Category.excluded_keys
        • Category.custom_attributes
        • Category.subcategories
        • Category.subcategory_ids
        • Category.subcategory_names
        • Category.all_subcategories
        • Category.all_subcategory_ids
        • Category.products
        • Category.product_ids
        • Category.skus
        • Category.all_products
        • Category.all_product_ids
        • Category.all_skus
        • Category.get_products()
        • Category.get_orders()
        • Category.get_order_items()
        • Category.get_invoices()
    • The order module
      • Order
        • Order.DOCUMENTATION
        • Order.IDENTIFIER
        • Order.__init__()
        • Order.excluded_keys
        • Order.id
        • Order.number
        • Order.items
        • Order.item_ids
        • Order.products
        • Order.get_invoice()
        • Order.shipping_address
        • Order.bill_to
        • Order.bill_to_address
        • Order.ship_to
        • Order.ship_to_address
        • Order.payment
        • Order.net_tax
        • Order.net_total
        • Order.item_refunds
        • Order.total_qty_invoiced
        • Order.total_qty_shipped
        • Order.total_qty_refunded
        • Order.total_qty_canceled
        • Order.total_qty_outstanding
        • Order.net_qty_ordered
      • OrderItem
        • OrderItem.DOCUMENTATION
        • OrderItem.IDENTIFIER
        • OrderItem.__init__()
        • OrderItem.excluded_keys
        • OrderItem.order
        • OrderItem.product
        • OrderItem.product_id
        • OrderItem.extension_attributes
        • OrderItem.qty_outstanding
        • OrderItem.net_qty_ordered
        • OrderItem.net_tax
        • OrderItem.net_total
        • OrderItem.net_refund
        • OrderItem.total_canceled
    • The invoice module
      • Invoice
        • Invoice.DOCUMENTATION
        • Invoice.IDENTIFIER
        • Invoice.__init__()
        • Invoice.excluded_keys
        • Invoice.id
        • Invoice.number
        • Invoice.order
        • Invoice.items
      • InvoiceItem
        • InvoiceItem.DOCUMENTATION
        • InvoiceItem.IDENTIFIER
        • InvoiceItem.__init__()
        • InvoiceItem.data_endpoint()
        • InvoiceItem.query_endpoint()
        • InvoiceItem.excluded_keys
        • InvoiceItem.order
        • InvoiceItem.order_item
        • InvoiceItem.product
        • InvoiceItem.product_id

Examples

  • Get a Magento 2 REST API Token With MyMagento
    • Setting the Login Credentials
    • Getting a Client
    • Setting Environment Variables
  • Add discount on each product based on product price
    • Solution Using MyMagento

Extras

  • Changelog
    • v2.1.0
  • Table Of Contents
MyMagento
  • Table Of Contents
  • Edit on GitHub
Next

Table Of Contents

README

  • About MyMagento
    • Main Components
    • Available Endpoints
  • Installation
  • QuickStart: Login with MyMagento
    • Setting the Login Credentials
    • Getting a Client
      • Option 1: Initialize a Client Directly
      • Option 2: Call get_api()
    • Getting an ACCESS_TOKEN
  • Interacting with the API
    • Performing a search()
    • Search Results: The Model Classes
    • Building Custom Search Queries
    • Making Authorized Requests
      • Example: Making a get() Request
      • Example: Making a post() Request

Documentation

  • The magento Package
    • get_api()
    • The clients module
      • Client
      • Store
    • The search module
      • Available Endpoints
    • The exceptions module
      • MagentoError
      • AuthenticationError
    • The utils module
      • ItemManager
      • LoggerUtils
      • MagentoLogger
      • get_agents()
      • get_agent()
      • get_package_file_handler()
  • The magento.models subpackage
    • The model module
      • Model
      • APIResponse
    • The product module
      • Product
      • MediaEntry
      • ProductAttribute
    • The category module
      • Category
    • The order module
      • Order
      • OrderItem
    • The invoice module
      • Invoice
      • InvoiceItem

Examples

  • Get a Magento 2 REST API Token With MyMagento
    • Setting the Login Credentials
    • Getting a Client
    • Setting Environment Variables
  • Add discount on each product based on product price
    • Solution Using MyMagento

Extras

  • Changelog
    • v2.1.0
  • Table Of Contents

Indices and tables

  • Index

  • Module Index

  • Full Table of Contents

Next

© Copyright 2023, Adam Korn. Revision bc4d744a.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: stable
Versions
latest
stable
v2.1.1
v2.1.0
v2.0.1
v2.0.0
dev
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds