Home Integrations
🔌

Integrations

Maxim Izmaylov
By Maxim Izmaylov
• 2 articles

API Integration

API integration enables full access to Controlata data: manage sales, customers, and products from external systems. Setting up API integration requires technical knowledge in programming and experience with API interfaces. If you are not a developer, you will need assistance from a technical specialist to implement the integration. Integration Setup 1. Go to Controlata settings, find the "Integrations" section and click "Connect" next to "General API" 2. Get your API key for request authorization 3. Configure a prefix for sale numbers (will be added to the beginning of all sales created through API) Authorization All requests must include the API key in the Authorization header: Authorization: your_api_key Base URLs All endpoints are located at: - Customers: https://api.controlata.com/connect/v1/customers/ - Sales: https://api.controlata.com/connect/v1/orders/ - Products: https://api.controlata.com/connect/v1/products/ Request and Response Format - Method: POST - Data format: JSON - Encoding: UTF-8 All responses contain a success field (true/false) and in case of error - an error field with description. Working with Customers Create Customer URL: customers/add.php Required parameters: - name (string) - customer name Optional parameters: - email (string) - email address - phone (string) - phone number - address_legal (string) - legal address - address_real (string) - delivery address - agreement (string) - agreement number - manager_name (string) - manager name - manager_post (string) - manager position - notes (string) - notes Example request: { "name": "Acme Corp", "email": "[email protected]", "phone": "+1 (555) 123-4567" } Example response: { "success": true, "customer_id": 123 } Edit Customer URL: customers/edit.php Required parameters: - customer_id (int) - customer ID - name (string) - customer name Optional parameters are the same as for creating a customer. Important: If an optional parameter is not included in the request, the existing value will be replaced with empty. Delete Customer URL: customers/delete.php Required parameters: - customer_id (int) - customer ID Get Customer List URL: customers/get_list.php No parameters required. Example response: { "success": true, "customers": [ { "id": 123, "name": "Acme Corp", "email": "[email protected]", "phone": "+1 (555) 123-4567", "notes": "" } ] } Get Customer Details URL: customers/get_entry.php Required parameters: - customer_id (int) - customer ID Working with Sales Create Sale URL: orders/add.php Required parameters: - num (string) - sale number - products (array) - array of products: - sku (string) - product SKU - amount (float) - quantity - total (float) - total amount (price × quantity) Customer (one of the options): - customer_id (int) - ID of existing customer - customer_name (string) - name of new customer Optional parameters: - customer_email, customer_phone, customer_address_real and other customer fields - storage_id (int) - storage location ID (if not specified, default sales storage location is used) - date_placed (string) - sale date in YYYY-MM-DD format (if not specified, current date is used) - date_shipped (string) - shipped date in YYYY-MM-DD format - delivery_price (float) - delivery cost - discount (float) - discount amount - production (int) - 1 to create production, 0 to fulfill from inventory - notes (string) - notes Example request: { "num": "1001", "customer_name": "John Smith", "customer_email": "[email protected]", "delivery_price": 25, "discount": 5, "products": [ { "sku": "A001", "amount": 2, "total": 180 }, { "sku": "A002", "amount": 1, "total": 100 } ] } Example response: { "success": true, "order_id": 456, "customer_id": 789 } Edit Sale URL: orders/edit.php Required parameters: - order_id (int) - sale ID - num (string) - sale number - products (array) - array of products Optional parameters are the same as for creating a sale. Important: If an optional parameter is not included in the request, the existing value will be replaced with empty. Update Sale Status URL: orders/update_status.php Required parameters: - order_id (int) - sale ID - status (int) - new status (0 = new, 1 = packed, 3 = shipped, 4 = canceled) Optional parameters: - date_shipped (string) - shipped date in YYYY-MM-DD format, can be specified when transitioning sale to shipped status Update Payment Status URL: orders/update_payment.php Required parameters: - order_id (int) - sale ID - status (int) - payment status (0 = unpaid, 1 = partially paid, 2 = paid) Delete Sale URL: orders/delete.php Required parameters: - order_id (int) - sale ID Get Sales List URL: orders/get_list.php Optional parameters: - date_from (string) - from date in YYYY-MM-DD format - date_to (string) - to date in YYYY-MM-DD format Get Sale Details URL: orders/get_entry.php Required parameters: - order_id (int) - sale ID Example response: { "success": true, "order": { "id": "31591", "num": "103", "status": "0", "payment": "0", "date_placed": "2025-08-09", "date_shipped": "2025-08-11", "subtotal": "4800.00", "delivery_price": "0.00", "discount": "0.00", "total": "4800.00", "cost": "2294.00", "notes": "", "amount": "6.000", "lines": "3", "source": "api", "production": "0", "production_num": null, "customer_id": "4877", "customer_name": "John Smith", "customer_email": "[email protected]", "customer_phone": "", "customer_address_real": "", "customer_address_legal": "", "customer_agreement": "", "customer_manager_name": "", "customer_manager_post": "", "customer_notes": "", "storage_id": "3998", "storage_name": "Main", "products": [ { "id": "48390", "sku": "F003", "name": "Oak Dining Chair", "amount": "4", "unit": "pcs", "total": "1800", "price": "450", "cost": "995.20", "position": "0" } ] } } Working with Products Create Product URL: products/add.php Required parameters: - name (string) - product name - unit (string) - unit of measure (see list below) - storage_id (int) - storage location ID Optional parameters: - sku (string) - product SKU - price (float) - sales price - batch_size (float) - batch size (default: 1) - stock (float) - initial stock level - minimum (float) - minimum stock level - notes (string) - notes Example request: { "name": "Product 1", "sku": "PROD001", "unit": "pcs", "price": 90, "storage_id": 1, "stock": 10, "minimum": 5 } Edit Product URL: products/edit.php Required parameters: - product_id (int) - product ID - name (string) - product name - unit (string) - unit of measure (see list below) - storage_id (int) - storage location ID Optional parameters: Other parameters are the same as for creating a product. Important: If an optional parameter is not included in the request, the existing value will be replaced with empty. Update Stock Levels URL: products/update_stock.php Required parameters: - product_id (int) - product ID - storage_id (int) - storage location ID - stock (float) - new stock quantity Optional parameters: - notes (string) - adjustment notes Delete Product URL: products/delete.php Required parameters: - product_id (int) - product ID Get Products List URL: products/get_list.php Required parameters: - storage_id (int) - storage location ID Get Product Details URL: products/get_entry.php Required parameters: - product_id (int) - product ID - storage_id (int) - storage location ID Available Units of Measure When working with products, you can use the following units of measure: Quantity and Weight: - pcs - pieces - kg - kilograms - lbs - pounds - oz - ounces - g - grams - mg - milligrams - t - tons - ct - carats - pkg - packages - set - sets Volume: - L - liters - ml - milliliters - gal - gallons - fl oz - fluid ounces Length and Area: - m - meters - cm - centimeters - mm - millimeters - km - kilometers - in - inches - ft - feet - yd - yards - sq m - square meters - sq cm - square centimeters - sq ft - square feet - cu m - cubic meters - cu cm - cubic centimeters - cu ft - cubic feet Finding storage_id When creating products or sales, you may need the storage location identifier storage_id. Currently, we don't have endpoints for getting the list of storage locations, but you can find the storage_id of existing locations in the system by: 1. Going to the storage locations section 2. Opening the required storage location 3. Taking the storage_id from the browser address bar: https://app.controlata.com/storages/item/[storage_id] Error Handling In case of error, the API returns JSON with fields: - success: false - error: error description Example errors: { "success": false, "error": "Product not found or access denied" } Common errors: - 401 Unauthorized - invalid API key - Customer not found - customer not found - All products have wrong SKU - all products have invalid SKU - Invalid status value - invalid status value Special Features - Product matching is done by SKU. First, search is performed by main product SKU, if not found - by alternative SKUs. If a product is not found, it is skipped, but the sale is created with the remaining products. - Logging: All requests are logged for debugging and monitoring. - Sale prefixes: The sale number prefix from integration settings is automatically added to the sale number.

Last updated on Sep 10, 2025

Shopify Integration

The Shopify integration allows you to seamlessly connect your Shopify store with your manufacturing operations. This two-way integration automatically syncs orders from Shopify to Controlata and updates inventory levels from Controlata back to Shopify. What the Integration Does Shopify → Controlata - Order Import: All new orders from Shopify are automatically imported to Controlata - Order Updates: Changes made to orders in Shopify are reflected in Controlata - Order Deletion: If an order is deleted in Shopify, it's also removed from Controlata Controlata → Shopify - Inventory Sync: Stock levels are updated from Controlata to Shopify Customer Data Limitation According to Shopify policies, to access Customer data with custom apps, your store must be on the Grow plan or higher. So if your store is on a lower plan, all orders received from Shopify will use a generic "Shopify Customer" as the customer. Setting Up the Integration Step 1: Create a custom app in Shopify 1. From your Shopify admin, go to Settings > Apps and sales channels. 2. Click Develop apps. 3. Click Create a custom app. 4. In the modal window, enter the App name and select an App developer. The app developer can be the store owner, or any staff or collaborator account with the Develop apps permission. 5. Click Create app. 6. After the app is created, click Configure Admin API scopes. 7. Select and save the following API access scopes: 1. write_inventory 2. read_inventory 3. read_locations 4. read_orders 5. read_assigned_fulfillment_orders 6. read_products 7. read_fulfillments 8. In Webhook subscriptions select Event version: 2025-07 9. In Overview, click Install App 10. Navigate to API credentials, and save: 1. Admin API access token (it can only be revealed once, so be sure to save it once revealed) 2. API key 3. API secret key Here is a Shopify guide on custom apps: https://help.shopify.com/en/manual/apps/app-types/custom-apps Step 2: Configure Integration in Controlata 1. In your Controlata account, go to Settings 2. Scroll down to Integrations 3. Find Shopify and click Connect 4. Input all fields: 1. Your Store domain at myshopify.com 2. API credentials you saved at the previous step: 1. Admin API access token 2. API key 3. API secret key 5. Optionally, customize the Sale number prefix (default is "S-") 6. Choose the default Fulfillment method for new orders: From Inventory or Made to order 7. If you chose "From Inventory" at the previous step, then you can select the Default storage location for new sales orders. 8. Click Save 9. If all information is correct, you will see Connection created successfully 10. Finally, map your Shopify locations to Controlata locations by clicking Locations Mapping 11. Map locations and click Save Product Matching Products between Shopify and Controlata are matched using SKU codes. - Ensure your products have consistent SKUs in both systems - You can set Alternative SKUs in Controlata for additional matching flexibility - If a product from a Shopify order isn't found in Controlata, the product information will be added to the order notes, but no new product will be created automatically - If no products are matched, the order will not be created in Controlata Location Mapping - Location mapping is required to sync inventory levels between your locations in Controlata and in Shopify. - You can select Not mapped for any Shopify location if you wish not to sync inventory levels for this location with Controlata. - When orders are created in Shopify, no inventory location is assigned to them, so Controlata will use your Default storage location from connection settings, if your chosen fulfillment method for new sales orders is set to From Inventory in connection settings. - When you fulfill the order in Shopify, the location will be assigned to the order and it will be updated in Controlata. Real-time updates - Order data syncs happen in real-time, but sometimes updates may take up to a few minutes - Inventory level updates happen once every minute

Last updated on Aug 27, 2025