### Get User Information Source: https://www.mozello.com/developers/apps-api Example JSON response containing basic user information. ```json { "user": { "email": "example@example.org", "email_confirmed": false } } ``` -------------------------------- ### Get Website Information Source: https://www.mozello.com/developers/apps-api Example JSON response containing basic website information. ```json { "website": { "url": "https://www.example.org/", "brandname": "example" } } ``` -------------------------------- ### App Manifest Example Source: https://www.mozello.com/developers/apps-api A JSON example of a structured data manifest for a Mozello App. ```APIDOC ## App Manifest Example This is an example of the JSON manifest required for your Mozello App. ### Request Body ```json { "app_type": "APP", "app_title": "Hello World", "app_icon": "https://www.example-app.org/icons/app.png", "app_version": "1.0.0", "app_description_short": { "en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, "app_description_full": { "en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pretium nulla a tincidunt hendrerit. Nullam lacinia, leo quis vestibulum pretium, mauris metus laoreet sem, vitae bibendum justo eros porta neque. Praesent semper sit amet magna bibendum convallis. Proin non lorem id enim imperdiet maximus sed ut turpis." }, "app_screenshots": { "en": "https://www.example-app.org/icons/screenshot.png" }, "app_vendor": { "company_name": "Company", "support_email": "support@example.org", "support_phone": "+1 555 0101 1234", "developer_email": "developer@example.org", "company_url": "https://www.example-app.org", "support_url": "https://www.example-app.org/support/", "privacy_url": "https://www.example-app.org/privacy/", "tos_url": "https://www.example-app.org/tos/" }, "app_permissions": ["FULL"], "app_tab_mode": "blank", "app_install_url": "https://www.example-app.org/install.php", "app_settings_url": "https://www.example-app.org/settings.php", "app_secret": "RYdabN4UPtjG2YJMxJGX1qhRKTexBgMf" } ``` ``` -------------------------------- ### List orders response example Source: https://www.mozello.com/developers/store-api Example structure of the response returned when listing store orders. ```json { "orders": [ ... ], "next_page_uri": "/store/orders/?page_size=20&archived=true&page_start=id:222" } ``` -------------------------------- ### Apps API - Example Request with AuthCode Source: https://www.mozello.com/developers/apps-api Example of a GET request to the languages endpoint, including the required `authCode` query parameter. ```APIDOC ## GET /apps/languages/?authCode=xxxxx ### Description Example GET request to retrieve website languages, demonstrating the inclusion of the `authCode` query parameter. ### Method GET ### Endpoint /v1/apps/languages/ ### Query Parameters - **authCode** (string) - Required - Authorization code obtained during the installation process. ### Request Example ```http GET /v1/apps/languages/?authCode=xxxxx HTTP/1.1 Host: api.mozello.com ``` ### Response #### Success Response (200) - **languages** (array) - An array of strings, where each string is a language code. #### Response Example ```json { "languages": ["en", "de", "fr"] } ``` ``` -------------------------------- ### Get Website Languages Source: https://www.mozello.com/developers/apps-api Example JSON response containing a list of languages used on the website. ```json { "languages": ["en", "de", "fr"] } ``` -------------------------------- ### Apps API - Mark as Installed Source: https://www.mozello.com/developers/apps-api Marks an installed app instance as finished installing. This method must be called to complete the app installation process. ```APIDOC ## POST /apps/installed/ ### Description Marks installed app instance as finished installing. This method must be called to finish the app installation process. ### Method POST ### Endpoint /apps/installed/ ### Parameters none ### Request Example (No request body specified) ### Response #### Success Response (200) (No specific success response fields defined) #### Response Example (No specific response example provided) ``` -------------------------------- ### Get order response example Source: https://www.mozello.com/developers/store-api Detailed structure of an order object returned by the API. ```json { "order_id": "MZ-1234567-123456", "created_at": "2020-12-30 15:25:33", "payment_status": "pending", "dispatched": false, "archived": false, "name": "John Smith", "company": "Universal Exports LTD", "vat_id": "LV40001234567", "company_id": "40001234567", "email": "johnsmith@example.com", "phone": "+371 22222222", "country_name": "Latvia", "country_code": "lv", "address": "Summer street 10", "city": "Riga", "province_code": "", "zip": "LV-1000", "shipping": { "country_name": "Latvia", "country_code": "lv", "address": "Summer street 10", "city": "Riga", "province_code": "", "zip": "LV-1000", "pickup_point_id": "" }, "notes": "", "payment_method": "paypal", "shipping_method": "omniva-latvija", "shipping_tracking_code": "AA111111111111EE", "shipping_tracking_url": "", "currency": "EUR", "subtotal": 100, "shipping_price": 10, "shipping_tax_inclusive_percent": 21, "shipping_tax_exclusive_percent": null, "taxes": 23.1, "total": 133.1, "discount_code": "", "discount_amount": 0, "cart": [ { "product_handle": "uid-1234567890", "product_name": "Trousers, Red, XXL, TR-12345", "product_variant": ["Red", "XXL"], "product_variant_handle": "uid-1024", "product_price": 50, "product_price_discounted": null, "product_sku": "TR-12345", "product_quantity": 1, "product_value": 50, "weight": 700, "tax_inclusive_percent": 21, "tax_exclusive_percent": null }, { "product_name": "Sweater", "product_price": 50, "product_price_discounted": null, "product_quantity": 1, "product_value": 50, "weight": 400, "tax_inclusive_percent": 21, "tax_exclusive_percent": null } ], "print_url": "https://www.mozello.com/m/invoice/333444555/" } ``` -------------------------------- ### Example Mozello App Manifest Source: https://www.mozello.com/developers/apps-api This JSON object represents a complete example of a Mozello App manifest. It includes all necessary fields for app configuration, vendor information, and permissions. ```json { "app_type": "APP", "app_title": "Hello World", "app_icon": "https://www.example-app.org/icons/app.png", "app_version": "1.0.0", "app_description_short": { "en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }, "app_description_full": { "en": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pretium nulla a tincidunt hendrerit. Nullam lacinia, leo quis vestibulum pretium, mauris metus laoreet sem, vitae bibendum justo eros porta neque. Praesent semper sit amet magna bibendum convallis. Proin non lorem id enim imperdiet maximus sed ut turpis." }, "app_screenshots": { "en": "https://www.example-app.org/icons/screenshot.png" }, "app_vendor": { "company_name": "Company", "support_email": "support@example.org", "support_phone": "+1 555 0101 1234", "developer_email": "developer@example.org", "company_url": "https://www.example-app.org", "support_url": "https://www.example-app.org/support/", "privacy_url": "https://www.example-app.org/privacy/", "tos_url": "https://www.example-app.org/tos/" }, "app_permissions": ["FULL"], "app_tab_mode": "blank", "app_install_url": "https://www.example-app.org/install.php", "app_settings_url": "https://www.example-app.org/settings.php", "app_secret": "RYdabN4UPtjG2YJMxJGX1qhRKTexBgMf" } ``` -------------------------------- ### Example Return Data for Pickup Points Source: https://www.mozello.com/developers/delivery-api This is an example of the JSON structure returned when listing pickup points for a delivery method. The actual content will be an array of pickup point objects. ```json { "pickup_points": [ ... ] } ``` -------------------------------- ### Get store notifications response Source: https://www.mozello.com/developers/store-api Example response showing the configured webhook URL and enabled notification events. ```json { "notifications_url": "https://www.example.com/notifications.php", "notifications_wanted": [ "ORDER_CREATED", "ORDER_DELETED", "PAYMENT_CHANGED", "DISPATCH_CHANGED", "PRODUCT_CHANGED", "PRODUCT_DELETED", "STOCK_CHANGED" ] } ``` -------------------------------- ### GET Request for Languages Source: https://www.mozello.com/developers/apps-api Example of a GET request to retrieve website languages, including the authCode. ```http GET /v1/apps/languages/?authCode=xxxxx HTTP/1.1 Host: api.mozello.com ``` -------------------------------- ### Order Return Data Example Source: https://www.mozello.com/developers/delivery-api Example of the JSON structure returned for order-related API requests. ```json { "fields": { "field_name": "ABC", "some_other_field_name": "DEF" } } ``` -------------------------------- ### Example Return Data for Get Delivery Method Source: https://www.mozello.com/developers/delivery-api This JSON object represents the detailed data for a single delivery method, including its handle, name, reference, titles in different languages, and country availability. ```json { "handle": "uid-1234567890", "name": "api-1234567890", "reference": "fancypost-courier", "title": { "en": "Fancypost courier", "de": "Fancypost Kurierdienst" }, "available_countries_from": ["US", "UK", "DE", "LV", "LT"], "available_countries_to": ["US", "UK", "DE", "LV", "LT", "EE", "PL", "FR"], "print_label_url": null } ``` -------------------------------- ### Reseller Settings Response Source: https://www.mozello.com/developers/reseller-api Example JSON response containing reseller account details and configuration. ```json { "error": false, "resellerID": 77, "company": "Acme Developer Inc.", "contactName": "John Smith", "contactWebsite": "http://www.example.com", "contactEmail": "john@example.com", "contactPhone": "", "addrAddress": "742 Evergreen Terrace", "addrCity": "Springfield", "addrRegion": "", "addrPostal": "", "addrCountry": "us", "supportEmail": "support@example.com", "supportPhone": "", "buyLink": "http://www.example.com/buy.php", "logoLink": "http://www.example.com/logo.png", "faviconLink": "http://www.example.com/favicon.ico", "notifyLink": "http://www.example.com/notify.php", "termsLink": "http://www.example.com/terms.php", "privacyLink": "http://www.example.com/privacy.php", "tlds": "com,net,org", "creditLimit": 50 } ``` -------------------------------- ### Update Settings Request Source: https://www.mozello.com/developers/reseller-api Example HTTP GET request to update reseller account settings. ```http GET /api/settings/set/?apiToken=63ed7df0b8d8577321e95346e5e1364d&supportEmail=customers@example.com HTTP/1.1 ``` -------------------------------- ### GET /store/product// Source: https://www.mozello.com/developers/store-api Retrieves detailed information for a specific product using its handle. ```APIDOC ## GET /store/product// ### Description Returns detailed data for a specific product identified by its handle. ### Method GET ### Endpoint `/store/product//` ### Path Parameters - **product-handle** (string) - Required - The unique identifier for the product. ### Request Headers - **Authorization** (string) - Required - API Key for authentication. Example: `ApiKey MZL-d4fcd4c02c88eafaeaef7f87f6796f12` ### Response #### Success Response (200) - **(Product Object)** - Contains detailed information about the product. #### Response Example ```json { "error": false, "product_data": { ... } } ``` ``` -------------------------------- ### GET /store/products/ Source: https://www.mozello.com/developers/store-api Retrieves a list of products from the store with support for pagination, sorting, and filtering. ```APIDOC ## GET /store/products/ ### Description Returns a list of product data. Supports pagination, reverse sorting, and filtering. ### Method GET ### Endpoint `/store/products/` ### Query Parameters - **page_size** (integer) - Optional - Specifies the number of items to return per page. - **desc** (integer) - Optional - Set to `1` for reverse sorting. Default is ascending. - **filter** (string) - Optional - Filters returned items. Format: ``. Example: `created_at%3E%3D2022-03-07%2008%3A45%3A10`. - Allowed expressions: `>`, `<`, `=`, `<=`, `>=`, `<>`. - Supported fields for filtering: `created_at`, `modified_at`. ### Request Example ```http GET /v1/store/products/?filter=created_at%3E%3D2022-03-07%2008%3A45%3A10&desc=1&page_size=5 HTTP/1.1 Host: api.mozello.com Authorization: ApiKey MZL-d4fcd4c02c88eafaeaef7f87f6796f12 ``` ### Response #### Success Response (200) - **products** (array) - A list of product objects. - **next_page_uri** (string) - A URI to fetch the next page of results, if available. #### Response Example ```json { "error": false, "products": [], "next_page_uri": "/store/products/?page_size=20&page_start=id:222" } ``` ``` -------------------------------- ### Apps API - Get Website Info Source: https://www.mozello.com/developers/apps-api Retrieves basic information about the website where the app is installed. ```APIDOC ## GET /apps/website/ ### Description Gets basic website info. ### Method GET ### Endpoint /apps/website/ ### Response #### Success Response (200) - **website** (object) - An object containing website information. - **url** (string) - The URL of the website. - **brandname** (string) - The brand name of the website. #### Response Example ```json { "website": { "url": "https://www.example.org/", "brandname": "example" } } ``` ``` -------------------------------- ### Example Return Data for List Delivery Methods Source: https://www.mozello.com/developers/delivery-api This is a sample structure for the JSON response when listing delivery methods. The 'delivery_methods' array will contain objects representing each method. ```json { "delivery_methods": [ ... ] } ``` -------------------------------- ### List Products Response Structure Source: https://www.mozello.com/developers/store-api Example of the JSON structure returned when listing products, including pagination metadata. ```json { "products": [ ... ], "next_page_uri": "/store/products/?page_size=20&page_start=id:222" } ``` -------------------------------- ### Settings: Get Source: https://www.mozello.com/developers/reseller-api Retrieves the reseller account data. ```APIDOC ## GET /api/settings/ ### Description Retrieves reseller account data. ### Method GET ### Endpoint /api/settings/ ### Parameters #### Query Parameters - **apiToken** (string) - Required - API token ### Response #### Success Response (200) - **error** (boolean) - Indicates if an error occurred. - **resellerID** (integer) - The reseller's unique identifier. - **company** (string) - The name of the company. - **contactName** (string) - The name of the contact person. - **contactWebsite** (string) - The contact person's website URL. - **contactEmail** (string) - The contact person's email address. - **contactPhone** (string) - The contact person's phone number. - **addrAddress** (string) - The street address. - **addrCity** (string) - The city. - **addrRegion** (string) - The region or state. - **addrPostal** (string) - The postal code. - **addrCountry** (string) - The country code. - **supportEmail** (string) - The support email address. - **supportPhone** (string) - The support phone number. - **buyLink** (string) - URL for purchasing services. - **logoLink** (string) - URL for the company logo. - **faviconLink** (string) - URL for the favicon. - **notifyLink** (string) - URL for notifications. - **termsLink** (string) - URL for terms and conditions. - **privacyLink** (string) - URL for the privacy policy. - **tlds** (string) - Comma-separated list of supported TLDs. - **creditLimit** (integer) - The credit limit for the reseller account. ### Response Example ```json { "error": false, "resellerID": 77, "company": "Acme Developer Inc.", "contactName": "John Smith", "contactWebsite": "http://www.example.com", "contactEmail": "john@example.com", "contactPhone": "", "addrAddress": "742 Evergreen Terrace", "addrCity": "Springfield", "addrRegion": "", "addrPostal": "", "addrCountry": "us", "supportEmail": "support@example.com", "supportPhone": "", "buyLink": "http://www.example.com/buy.php", "logoLink": "http://www.example.com/logo.png", "faviconLink": "http://www.example.com/favicon.ico", "notifyLink": "http://www.example.com/notify.php", "termsLink": "http://www.example.com/terms.php", "privacyLink": "http://www.example.com/privacy.php", "tlds": "com,net,org", "creditLimit": 50 } ``` ``` -------------------------------- ### Update Notifications Configuration Source: https://www.mozello.com/developers/store-api Example of how to configure notification URLs and the types of notifications you wish to receive. ```APIDOC ### Example Update notifications. ```json { "notifications_url": "https://www.example.com/notifications.php", "notifications_wanted": ["ORDER_CREATED", "ORDER_DELETED", "PAYMENT_CHANGED", "DISPATCH_CHANGED", "PRODUCT_CHANGED", "PRODUCT_DELETED", "STOCK_CHANGED"] } ``` ``` -------------------------------- ### List Products with Modifiers Source: https://www.mozello.com/developers/store-api Example of a LIST request using filter, sort, and pagination parameters, followed by the response. ```http LIST /v1/store/products/?**filter=created_at%3E%3D2022-03-07%2008%3A45%3A10&desc=1&page_size=5** HTTP/1.1 Host: api.mozello.com ``` ```json { "error": false, "products": [] } ``` -------------------------------- ### Product Data Structure Example Source: https://www.mozello.com/developers/store-api Represents the JSON structure of a product, including categories, options, variants, and image handles. ```json { "handle": "uid-1234567890", "category": { "path": [ { "en": "Gadgets", "de": "Geräte" }, { "en": "Smartphones", "de": "Smartphones" } ] }, "category_handle": "uid-123", "title": { "en": "Apple iPhone 12 Pro", "de": null }, "description": { "en": "A rather good phone.", "de": "Ein ziemlich gutes Telefon." }, "url": { "en": "apple-iphone-12-pro", "de": null }, "options": [ { "option_name": { "en": "Memory", "de": "Speicher" }, "display_style": "list", "values": [ { "value_name": "128 GB", "value_handle": "uid-5011" }, { "value_name": "256 GB", "value_handle": "uid-5012" } ] }, { "option_name": { "en": "Color", "de": "Farbe" }, "display_style": "colors", "values": [ { "value_name": { "en": "Space Grey", "de": "Space Grau" }, "value_handle": "uid-5021", "color_code": "#333333" }, { "value_name": { "en": "Pacific Blue", "de": "Pazifik Blau" }, "value_handle": "uid-5022", "color_code": "#003366" } ] } ], "variants": [ { "variant_no": 1, "variant_handle": "uid-1024", "option_value_handle1": "uid-5011", "option_value_handle2": "uid-5021", "option_value_handle3": null, "picture_handle": "uid-101", "price": null, "sale_price": null, "sku": "WHATEVR1", "stock": 1 }, { "variant_no": 2, "variant_handle": "uid-1025", "option_value_handle1": "uid-5012", "option_value_handle2": "uid-5022", "option_value_handle3": null, "picture_handle": "uid-102", "price": null, "sale_price": null, "sku": "WHATEVR2", "stock": 5 } ], "pictures": [ { "handle": "uid-100001", "url": "https://example.mozfiles.com/phone1.jpg" }, { "handle": "uid-100002", "url": "https://example.mozfiles.com/phone2.jpg" } ], "variant_pictures": [ { "handle": "uid-101", "url": "https://example.mozfiles.com/phone_gray.jpg" }, { "handle": "uid-102", "url": "https://example.mozfiles.com/phone_blue.jpg" } ], "price": 100.5, "sale_price": 95, "sku": null, "stock": null, "visible": true, "featured": false, "tax": null, "vendor": "Apple", "model": "iPhone 12 Pro", "weight": 189 } ``` -------------------------------- ### Financial Balance Response Source: https://www.mozello.com/developers/reseller-api Example JSON response for financial information including balance and billing thresholds. ```json { "error": false, "premiumWebsites": 3, "currentBalance": "EUR 5.06", "billingThreshold": "EUR 100.00" } ``` -------------------------------- ### Error Response Example Source: https://www.mozello.com/developers/apps-api Example of a JSON response indicating an error, such as unauthorized access. ```json { "error": true, "error_code": 401, "error_message": "Unauthorized" } ``` -------------------------------- ### Balance: Get Source: https://www.mozello.com/developers/reseller-api Retrieves financial information for the reseller account. ```APIDOC ## GET /api/balance/ ### Description Retrieves financial information. ### Method GET ### Endpoint /api/balance/ ### Parameters #### Query Parameters - **apiToken** (string) - Required - API token ### Response #### Success Response (200) - **error** (boolean) - Indicates if an error occurred. - **premiumWebsites** (integer) - The number of premium websites. - **currentBalance** (string) - The current account balance, including currency. - **billingThreshold** (string) - The billing threshold amount, including currency. ### Response Example ```json { "error": false, "premiumWebsites": 3, "currentBalance": "EUR 5.06", "billingThreshold": "EUR 100.00" } ``` ``` -------------------------------- ### Example Filter Parameter for Country Code Source: https://www.mozello.com/developers/delivery-api This example shows how to use the 'filter' parameter to restrict returned items by a specific field, such as country code. The parameter value must be URL-encoded. ```http filter=country_code%3DLV ``` -------------------------------- ### Set Configuration Data Source: https://www.mozello.com/developers/apps-api JSON payload for setting configuration data for an installed app instance. ```json { "data": { "example_property_1": "Example", "example_property_2": "Example" } } ``` -------------------------------- ### API Authentication Header Source: https://www.mozello.com/developers/apps-api Example of the Authorization header required for API authentication. ```http Authorization: ApiKey MZL-d4fcd4c02c88eafaeaef7f87f6796f12 ``` -------------------------------- ### Product Data Structure Source: https://www.mozello.com/developers/store-api This is an example of the product data structure returned by the API. Missing values may be omitted. ```APIDOC ## Product Data Structure Example ### Description Represents the detailed structure of a product, including its handle, category, title, description, options, variants, pictures, pricing, and other attributes. ### Response Example ```json { "handle": "uid-1234567890", "category": { "path": [ { "en": "Gadgets", "de": "Geräte" }, { "en": "Smartphones", "de": "Smartphones" } ] }, "category_handle": "uid-123", "title": { "en": "Apple iPhone 12 Pro", "de": null }, "description": { "en": "A rather good phone.", "de": "Ein ziemlich gutes Telefon." }, "url": { "en": "apple-iphone-12-pro", "de": null }, "options": [ { "option_name": { "en": "Memory", "de": "Speicher" }, "display_style": "list", "values": [ { "value_name": "128 GB", "value_handle": "uid-5011" }, { "value_name": "256 GB", "value_handle": "uid-5012" } ] }, { "option_name": { "en": "Color", "de": "Farbe" }, "display_style": "colors", "values": [ { "value_name": { "en": "Space Grey", "de": "Space Grau" }, "value_handle": "uid-5021", "color_code": "#333333" }, { "value_name": { "en": "Pacific Blue", "de": "Pazifik Blau" }, "value_handle": "uid-5022", "color_code": "#003366" } ] } ], "variants": [ { "variant_no": 1, "variant_handle": "uid-1024", "option_value_handle1": "uid-5011", "option_value_handle2": "uid-5021", "option_value_handle3": null, "picture_handle": "uid-101", "price": null, "sale_price": null, "sku": "WHATEVR1", "stock": 1 }, { "variant_no": 2, "variant_handle": "uid-1025", "option_value_handle1": "uid-5012", "option_value_handle2": "uid-5022", "option_value_handle3": null, "picture_handle": "uid-102", "price": null, "sale_price": null, "sku": "WHATEVR2", "stock": 5 } ], "pictures": [ { "handle": "uid-100001", "url": "https://example.mozfiles.com/phone1.jpg" }, { "handle": "uid-100002", "url": "https://example.mozfiles.com/phone2.jpg" } ], "variant_pictures": [ { "handle": "uid-101", "url": "https://example.mozfiles.com/phone_gray.jpg" }, { "handle": "uid-102", "url": "https://example.mozfiles.com/phone_blue.jpg" } ], "price": 100.5, "sale_price": 95, "sku": null, "stock": null, "visible": true, "featured": false, "tax": null, "vendor": "Apple", "model": "iPhone 12 Pro", "weight": 189 } ``` ``` -------------------------------- ### Success Response for Languages Source: https://www.mozello.com/developers/apps-api Example of a successful JSON response containing a list of languages. ```json { "error": false, "languages": ["en", "de", "fr"] } ``` -------------------------------- ### Example Success Response Source: https://www.mozello.com/developers/delivery-api A successful API call returns a JSON object with 'error' set to false. ```json { "error": false } ``` -------------------------------- ### Enable Premium Website API Request and Responses Source: https://www.mozello.com/developers/reseller-api Example of enabling premium status for a website, including raw HTTP request and potential success or error JSON responses. ```http GET /api/website/enable_premium/?apiToken=8712f9767e6a03ab6c8a80d53fc3ef6e&website=55083 HTTP/1.1 Host: resellers.mozello.com ``` ```json { "error": false } ``` ```json { "error": true, "errorCode": 401, "errorMsg": "Unauthorized" } ``` -------------------------------- ### Delete Product Request and Responses Source: https://www.mozello.com/developers/store-api Example of a DELETE request to remove a product and the corresponding success or error responses. ```http DELETE /v1**/store/product/uid-1234567890/** HTTP/1.1 Host: api.mozello.com ``` ```json { "error": false } ``` ```json { "error": true, "error_code": 401, "error_message": "Unauthorized" } ``` -------------------------------- ### Example Return Data for a Single Pickup Point Source: https://www.mozello.com/developers/delivery-api This JSON object represents the data structure for a single pickup point. Missing values may be omitted in actual responses. ```json { "id": "LV100001", "title": "Smartpost Narvesen Bērzpils", "address": "Bērzpils iela 1a", "city": "Balvi", "zip": "4501", "country": "LV", "disabled_cash": false, "disabled_pos": false, "attributes": { "delivery_company_id": 3344 } } ``` -------------------------------- ### Public Integration Manifest Example Source: https://www.mozello.com/developers/delivery-api This JSON structure defines the required fields for a public integration manifest, including application type, title, vendor information, and data fields for delivery services. ```json { "app_type": "DELIVERY_SERVICE", "app_title": "Fancypost", "app_vendor": { "company_name": "Fancypost Inc", "support_email": "support@fancypostservice.com", "support_phone": "+1 555 0101 1234", "developer_email": "dev@fancypostservice.com" }, "delivery_api_data_fields": [ { "id": "customer_id", "title": { "en": "Your Customer ID", "de": "Ihre Kundennummer" }, "type": "text", "required": true }, { "id": "api_key", "title": { "en": "Your Secret Key", "de": "Ihre geheimen Schlüssel" }, "type": "password", "required": true } ], "delivery_service_info": { "info_url": { "en": "https://fancypostservice.com", "de": "https://fancypostservice.com/de/" } } } ``` -------------------------------- ### Verify Notification Authenticity with PHP Source: https://www.mozello.com/developers/store-api Use this PHP example to verify the authenticity of incoming notifications by comparing the computed HMAC-SHA256 hash with the X-Mozello-Hash header. ```php $signature = base64_encode(hash_hmac('sha256', $post_body, $api_key, true)); // check if hash matches $headers = getallheaders(); if ($signature === $headers['X-Mozello-Hash']) { // Your code here } ``` -------------------------------- ### Retrieve Custom Payment Fields Source: https://www.mozello.com/developers/payment-api Example JSON response containing custom fields, metadata, and seller information returned from the payment settings API. ```json { "error": false, "fields": { "customer_id": "1234567890", "api_key": "*****", "use_3d_secure": "0", "enable_banklink": "0" }, "meta": { "notify_url": "https://www.mozello.com/service/ipn/provider/xxx/", "success_url": "https://www.my-mozello-shop.com/shop/params/success/go/", "failure_url": "https://www.my-mozello-shop.com/shop/params/failure/go/" }, "seller": { "seller_street": "123 Elm Street", "seller_city": "Springfield", "seller_state": "IL", "seller_zip": "62704", "seller_country_code": "us" } } ``` -------------------------------- ### ORDER_CREATED Event Example Source: https://www.mozello.com/developers/store-api This JSON payload represents an ORDER_CREATED event, detailing the order information before payment is received. It includes customer details, shipping information, and a list of products in the order. ```json { "event": "ORDER_CREATED", "order": { "order_id": "MZ-1234567-123456", "created_at": "2020-12-30 15:25:33", // YYYY-MM-DD HH:MM:SS "payment_status": "pending", // always pending for ORDER_CREATED "dispatched": false, "archived": false, "name": "John Smith", "company": "Universal Exports LTD", "vat_id": "LV40001234567", "company_id": "40001234567", "email": "johnsmith@example.com", "phone": "+371 22222222", "country_name": "Latvia", "country_code": "lv", "address": "Summer street 10", "city": "Riga", "province_code": "", "zip": "LV-1000", "shipping": { "country_name": "Latvia", "country_code": "lv", "address": "Summer street 10", "city": "Riga", "province_code": "", "zip": "LV-1000", "pickup_point_id": "" }, "notes": "", "payment_method": "paypal", "shipping_method": "omniva-latvija", "shipping_tracking_code": "AA111111111111EE", "shipping_tracking_url": "", "currency": "EUR", "subtotal": 100, "shipping_price": 10, "shipping_tax_inclusive_percent": 21, "shipping_tax_exclusive_percent": null, "taxes": 23.1, "total": 133.1, "discount_code": "", "discount_amount": 0, "cart": [ { "product_handle": "uid-1234567890", "product_name": "Trousers, Red, XXL, TR-12345", "product_variant": ["Red", "XXL"], "product_variant_handle": "uid-1024", "product_price": 50, "product_price_discounted": null, "product_sku": "TR-12345", "product_quantity": 1, "product_value": 50, "weight": 700, "tax_inclusive_percent": 21, "tax_exclusive_percent": null }, { "product_handle": "uid-1234567891", "product_name": "Sweater, SW-12345", "product_price": 50, "product_price_discounted": null, "product_sku": "SW-12345", "product_quantity": 1, "product_value": 50, "weight": 400, "tax_inclusive_percent": 21, "tax_exclusive_percent": null } ], "print_url": "https://www.mozello.com/m/invoice/333444555/" } } ``` -------------------------------- ### Mozello App Integration Process Source: https://www.mozello.com/developers/apps-api Guidelines for creating, hosting, and registering a Mozello App. ```APIDOC ## Mozello App Integration ### Basics - App must be hosted on a web server with a mandatory HTTPS (SSL) connection. - App must interact with Mozello websites via Apps API and Store API. - App manifest must be created and submitted to the App integration setup portal. - App must support the Mozello App installation process. ### Integration Steps 1. Create a Mozello account for testing. 2. Submit integration manifest via App integration setup portal to receive an API key. 3. Implement the Mozello App installation process. 4. Submit integration for approval via the portal. 5. Upon approval, the integration goes live. 6. Keep the API key secret and prevent public access. ``` -------------------------------- ### Example DELETE Request for Delivery Method Source: https://www.mozello.com/developers/delivery-api This is an example of a raw HTTP DELETE request to remove a specific delivery method by its UID. ```http DELETE /v1**/store/delivery_method/uid-1234567890/** HTTP/1.1 Host: api.mozello.com ``` -------------------------------- ### Subscribe to Content Event and Set Content Source: https://www.mozello.com/developers/apps-api Use `mozPlugins.subscribeEvent` to subscribe to 'moz-content-after-price'. The callback obtains a `contentHandler` and sets initial content. This is for inserting custom HTML next to the price on product pages. ```javascript var afterPriceContentHandler; mozPlugins.subscribeEvent('moz-content-after-price', function(event, initContentHandler, eventParam) { afterPriceContentHandler = initContentHandler(); afterPriceContentHandler.setContent('Hello from plugin!'); }); ``` -------------------------------- ### Get Category Source: https://www.mozello.com/developers/store-api Retrieves detailed information for a specific category. ```APIDOC ## Get Category ### Description Retrieves detailed information for a specific category. ### Method GET ### Endpoint /store/category/****/ ### Return Values Returns category data. Missing values may be omitted. - **handle** (string) - The unique identifier for the category. - **title** (object) - The title of the category in different languages. - **lang_code** (string) - The localized title. - **level** (integer) - The nesting level of the category. - **previous_handle** (string) - The handle of the previous category at the same level. - **parent_handle** (string) - The handle of the parent category. - **seo_url** (string) - The SEO-friendly URL for the category. - **picture** (string) - The URL of the category's picture. ### Response Example ```json { "handle": "uid-123", "title": { "en": "Gadgets", "lv": "Ierīces" }, "level": 1, "previous_handle": null, "parent_handle": "uid-321", "seo_url": "gadgets", "picture": "https://www.example.com/image-file-1.jpg" } ``` ``` -------------------------------- ### List All Websites Source: https://www.mozello.com/developers/reseller-api Retrieve a list of all websites associated with the reseller account. ```json { "error": false, "websites": [ { "userName": "John Smith", "userEmail": "johnsmith@squeeezy.com", "userCountry": "uk", "userCreated": "2014-05-27 08:34:13", "userIsConfirmed": false, "userIsUnsubscribed": false, "websiteID": 38638, "websiteBrandname": "Squeeezy", "websiteAlias": "squeeezy", "websiteType": 2, "websiteCreated": "2014-05-27 08:34:23", "websiteModified": "2014-08-15 09:36:48", "websiteAccessed": "2014-08-14 12:53:16", "websiteStatus": 1, "websiteIsPremium": true }, { "userName": "Tim Allen", "userEmail": "tim@allen.com", "userCountry": "us", "userCreated": "2014-07-25 16:01:39", "userIsConfirmed": false, "userIsUnsubscribed": false, "websiteID": 55083, "websiteBrandname": "Tim Allen Recipies", "websiteAlias": "timallen", "websiteType": 2, "websiteCreated": "2014-07-25 16:01:48", "websiteModified": "2014-07-25 16:03:43", "websiteAccessed": null, "websiteStatus": 1, "websiteIsPremium": false } ] } ``` -------------------------------- ### Get category details Source: https://www.mozello.com/developers/store-api Retrieves detailed information for a specific category by handle. ```json { "handle": "uid-123", "title": { "en": "Gadgets", "lv": "Ierīces" }, "level": 1, "previous_handle": null, "parent_handle": "uid-321", "seo_url": "gadgets", "picture": "https://www.example.com/image-file-1.jpg" } ``` -------------------------------- ### Update Product Price Source: https://www.mozello.com/developers/store-api Example payload for updating only the price field of an existing product. ```json { "product": { "price": 100.5 } } ``` -------------------------------- ### PUT /store/product// Source: https://www.mozello.com/developers/store-api Updates an existing product. Note that handle, pictures, and variant_pictures cannot be updated via this endpoint. ```APIDOC ## PUT /store/product// ### Description Updates an existing product. Note that handle, pictures, and variant_pictures cannot be updated via this endpoint. ### Method PUT ### Endpoint /store/product// ### Parameters #### Path Parameters - **product-handle** (string) - Required - The unique handle of the product to update. #### Request Body - **product** (object) - Required - Product data to update. - **api_options** (object) - Optional - Additional API options. ### Request Example { "product": { "price": 100.5 } } ``` -------------------------------- ### Reseller API Basics Source: https://www.mozello.com/developers/reseller-api Information on how to interact with the Mozello Reseller API, including the base URL and request methods. ```APIDOC ## Mozello Reseller API Basics ### Base URL The base URL for all API calls is `https://resellers.mozello.com/api/`. ### Request Methods API calls are made using GET or POST requests. ### Authorization API requests must include an authorization token as a parameter. This token can be obtained and invalidated via login API calls. ### Example Request (Enable Premium) ```http GET /api/website/enable_premium/?apiToken=8712f9767e6a03ab6c8a80d53fc3ef6e&website=55083 HTTP/1.1 Host: resellers.mozello.com ``` ### Example Success Response ```json { "error": false } ``` ### Example Error Response ```json { "error": true, "errorCode": 401, "errorMsg": "Unauthorized" } ``` ``` -------------------------------- ### Apps API - Get Website Languages Source: https://www.mozello.com/developers/apps-api Retrieves a list of languages used on the website. ```APIDOC ## GET /apps/languages/ ### Description Gets list of languages used in the website. ### Method GET ### Endpoint /apps/languages/ ### Response #### Success Response (200) - **languages** (array) - An array of strings, where each string is a language code. #### Response Example ```json { "languages": ["en", "de", "fr"] } ``` ```