{
  "openapi": "3.0.1",
  "info": {
    "title": "Inventory Hub Sync",
    "description": "Sync inventory across Shopify, Amazon, eBay & WooCommerce in real-time. Prevent overselling, eliminate manual stock updates & scale to thousands of SKUs with conflict detection & audit trails.",
    "version": "0.0",
    "x-build-id": "05BTtrGTFGToSa5ZW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/classy_ecosystem~inventory-hub-sync/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-classy_ecosystem-inventory-hub-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/classy_ecosystem~inventory-hub-sync/runs": {
      "post": {
        "operationId": "runs-sync-classy_ecosystem-inventory-hub-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/classy_ecosystem~inventory-hub-sync/run-sync": {
      "post": {
        "operationId": "run-sync-classy_ecosystem-inventory-hub-sync",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "channels"
        ],
        "properties": {
          "mode": {
            "title": "Sync Mode",
            "enum": [
              "inventory",
              "prices",
              "both"
            ],
            "type": "string",
            "description": "Choose what to synchronize: inventory only, prices only, or both",
            "default": "inventory"
          },
          "channels": {
            "title": "E-commerce Channels",
            "type": "array",
            "description": "Array of e-commerce platforms to sync inventory across",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "enum": [
                    "shopify",
                    "amazon",
                    "ebay",
                    "woocommerce"
                  ],
                  "enumTitles": [
                    "Shopify",
                    "Amazon",
                    "eBay",
                    "WooCommerce"
                  ],
                  "title": "Channel Name",
                  "description": "The e-commerce platform name to sync inventory to",
                  "editor": "select"
                },
                "enabled": {
                  "type": "boolean",
                  "title": "Enabled",
                  "description": "Whether this channel is enabled for syncing",
                  "default": true
                },
                "apiKey": {
                  "type": "string",
                  "title": "API Key",
                  "description": "API credentials for the platform",
                  "editor": "textfield"
                },
                "store": {
                  "type": "string",
                  "title": "Store URL/ID",
                  "description": "Store identifier or URL for the platform",
                  "editor": "textfield"
                }
              },
              "required": [
                "name"
              ]
            },
            "default": [
              {
                "name": "shopify",
                "enabled": true,
                "store": "your_store.myshopify.com"
              }
            ]
          },
          "products": {
            "title": "Products to Sync",
            "type": "array",
            "description": "Array of products with their inventory and pricing information",
            "items": {
              "type": "object",
              "properties": {
                "sku": {
                  "type": "string",
                  "title": "SKU",
                  "description": "Product SKU or unique identifier",
                  "editor": "textfield"
                },
                "quantity": {
                  "type": "integer",
                  "title": "Stock Quantity",
                  "description": "Current stock quantity for this product",
                  "minimum": 0,
                  "default": 0,
                  "editor": "number"
                },
                "basePrice": {
                  "type": "number",
                  "title": "Base Price",
                  "description": "Base price for the product (used for price sync mode)",
                  "minimum": 0,
                  "editor": "number"
                },
                "currency": {
                  "type": "string",
                  "title": "Currency",
                  "description": "Currency code for the base price",
                  "enum": [
                    "USD",
                    "EUR",
                    "GBP",
                    "ARS",
                    "MXN",
                    "BRL"
                  ],
                  "enumTitles": [
                    "US Dollar",
                    "Euro",
                    "British Pound",
                    "Argentine Peso",
                    "Mexican Peso",
                    "Brazilian Real"
                  ],
                  "default": "USD",
                  "editor": "select"
                },
                "title": {
                  "type": "string",
                  "title": "Product Title",
                  "description": "Product title to sync (metadata)",
                  "editor": "textfield"
                },
                "description": {
                  "type": "string",
                  "title": "Description",
                  "description": "Product description to sync (metadata)",
                  "editor": "textarea"
                },
                "images": {
                  "type": "array",
                  "title": "Images",
                  "description": "List of image URLs to sync",
                  "editor": "stringList"
                },
                "tags": {
                  "type": "array",
                  "title": "Tags",
                  "description": "List of product tags",
                  "editor": "stringList"
                },
                "platforms": {
                  "type": "array",
                  "title": "Target Platforms",
                  "description": "Platforms where this product should be synced (leave empty for all)",
                  "editor": "select",
                  "items": {
                    "type": "string",
                    "enum": [
                      "shopify",
                      "amazon",
                      "ebay",
                      "woocommerce"
                    ],
                    "enumTitles": [
                      "Shopify",
                      "Amazon",
                      "eBay",
                      "WooCommerce"
                    ]
                  }
                }
              },
              "required": [
                "sku"
              ]
            },
            "default": [
              {
                "sku": "PROD001",
                "quantity": 100,
                "basePrice": 29.99,
                "currency": "USD",
                "platforms": [
                  "shopify",
                  "amazon"
                ]
              }
            ]
          },
          "pricingRules": {
            "title": "Dynamic Pricing Rules",
            "type": "array",
            "description": "Configure rules for automatic price adjustments across channels",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "title": "Rule ID",
                  "description": "Unique identifier for this rule",
                  "editor": "textfield"
                },
                "name": {
                  "type": "string",
                  "title": "Rule Name",
                  "description": "Human-readable name for the rule",
                  "editor": "textfield"
                },
                "type": {
                  "type": "string",
                  "title": "Rule Type",
                  "description": "Type of pricing adjustment to apply",
                  "enum": [
                    "fixed",
                    "percentage_markup",
                    "percentage_discount",
                    "stock_based"
                  ],
                  "enumTitles": [
                    "Fixed Price - Set exact price for channel",
                    "Percentage Markup - Add % to base price",
                    "Percentage Discount - Subtract % from base price",
                    "Stock-Based - Discount based on inventory levels"
                  ],
                  "editor": "select"
                },
                "channel": {
                  "type": "string",
                  "title": "Target Channel",
                  "description": "Channel to apply this rule to (leave empty for all channels)",
                  "enum": [
                    "shopify",
                    "amazon",
                    "ebay",
                    "woocommerce",
                    ""
                  ],
                  "enumTitles": [
                    "Shopify",
                    "Amazon",
                    "eBay",
                    "WooCommerce",
                    "All Channels"
                  ],
                  "editor": "select"
                },
                "fixedAmount": {
                  "type": "number",
                  "title": "Fixed Amount",
                  "description": "Fixed price amount (for 'fixed' rule type)",
                  "minimum": 0,
                  "editor": "number"
                },
                "percentage": {
                  "type": "number",
                  "title": "Percentage",
                  "description": "Percentage value for markup/discount rules (e.g., 15 for 15%)",
                  "minimum": 0,
                  "maximum": 100,
                  "editor": "number"
                },
                "stockThresholds": {
                  "type": "array",
                  "title": "Stock Thresholds",
                  "description": "Stock level thresholds for stock-based pricing",
                  "editor": "json",
                  "items": {
                    "type": "object",
                    "properties": {
                      "minStock": {
                        "type": "integer",
                        "title": "Min Stock",
                        "description": "Minimum stock level for this tier",
                        "minimum": 0,
                        "editor": "number"
                      },
                      "maxStock": {
                        "type": "integer",
                        "title": "Max Stock",
                        "description": "Maximum stock level for this tier",
                        "minimum": 0,
                        "editor": "number"
                      },
                      "discountPercentage": {
                        "type": "number",
                        "title": "Discount %",
                        "description": "Discount percentage to apply for this stock range",
                        "minimum": 0,
                        "maximum": 100,
                        "editor": "number"
                      }
                    }
                  }
                },
                "priority": {
                  "type": "integer",
                  "title": "Priority",
                  "description": "Rule priority (higher = applied first)",
                  "default": 0,
                  "editor": "number"
                },
                "enabled": {
                  "type": "boolean",
                  "title": "Enabled",
                  "description": "Whether this rule is active",
                  "default": true
                }
              },
              "required": [
                "id",
                "name",
                "type"
              ]
            },
            "default": []
          },
          "conflictThreshold": {
            "title": "Conflict Threshold",
            "minimum": 0,
            "type": "integer",
            "description": "Stock level difference threshold (in units) for triggering alerts",
            "default": 5
          },
          "autoResolve": {
            "title": "Auto Resolve Conflicts",
            "type": "boolean",
            "description": "Automatically resolve conflicts using the highest stock value",
            "default": true
          },
          "consolidateInventory": {
            "title": "Consolidate Inventory",
            "type": "boolean",
            "description": "Sum stock from all channels and redistribute it (Bidirectional Sync)",
            "default": false
          },
          "distributionStrategy": {
            "title": "Distribution Strategy",
            "enum": [
              "equal",
              "fill_priority"
            ],
            "type": "string",
            "description": "How to distribute total stock across channels",
            "default": "equal"
          },
          "notifyOnConflict": {
            "title": "Notify on Conflict",
            "type": "boolean",
            "description": "Send alerts when inventory conflicts are detected between platforms",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}