{
  "openapi": "3.0.1",
  "info": {
    "title": "Inventory Reconciliation Checker",
    "description": "Reconcile opening stock, inventory movements, system closing balances, and physical counts by SKU, location, and period. Get exact expected, system, and physical variances for cycle-count and close review.",
    "version": "0.1",
    "x-build-id": "cIFY10LiHl68lToe0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ceddl~inventory-movement-reconciliation-evidence-gate/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ceddl-inventory-movement-reconciliation-evidence-gate",
        "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/ceddl~inventory-movement-reconciliation-evidence-gate/runs": {
      "post": {
        "operationId": "runs-sync-ceddl-inventory-movement-reconciliation-evidence-gate",
        "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/ceddl~inventory-movement-reconciliation-evidence-gate/run-sync": {
      "post": {
        "operationId": "run-sync-ceddl-inventory-movement-reconciliation-evidence-gate",
        "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": [
          "scopes"
        ],
        "properties": {
          "scopes": {
            "title": "Inventory reconciliation scopes",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "One to 1,000 independent SKU, location, and UTC-period scopes supplied as inline JSON.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "sku",
                "location",
                "period",
                "opening",
                "movements",
                "systemClosing",
                "physicalCount"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "title": "Scope ID",
                  "description": "Stable caller reference for this evidence package.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "sku": {
                  "title": "SKU or item ID",
                  "description": "Exact item identity; no fuzzy matching is performed.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "location": {
                  "title": "Inventory location",
                  "description": "Exact warehouse, zone, bin, or other bounded location identity.",
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "period": {
                  "title": "Reconciliation period",
                  "description": "Explicit UTC period using an inclusive start and exclusive end.",
                  "type": "object",
                  "required": [
                    "start",
                    "end"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "start": {
                      "title": "Period start",
                      "description": "Inclusive UTC timestamp with milliseconds.",
                      "type": "string",
                      "minLength": 24,
                      "maxLength": 24
                    },
                    "end": {
                      "title": "Period end",
                      "description": "Exclusive UTC timestamp with milliseconds.",
                      "type": "string",
                      "minLength": 24,
                      "maxLength": 24
                    }
                  }
                },
                "opening": {
                  "title": "Opening inventory evidence",
                  "description": "Opening quantity and explicit unit at period start.",
                  "type": "object",
                  "required": [
                    "quantity",
                    "unit"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "quantity": {
                      "title": "Opening quantity",
                      "description": "Non-negative decimal string with at most six fractional digits.",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 20
                    },
                    "unit": {
                      "title": "Opening unit",
                      "description": "Exact unit; conversions are not inferred.",
                      "type": "string",
                      "enum": [
                        "each",
                        "kg",
                        "liter"
                      ]
                    }
                  }
                },
                "movements": {
                  "title": "Movement ledger",
                  "description": "Zero to 1,000 uniquely identified movements explicitly owned by this period.",
                  "type": "array",
                  "maxItems": 1000,
                  "editor": "json",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "type",
                      "quantity",
                      "unit",
                      "occurredAt"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "title": "Movement ID",
                        "description": "Stable identifier unique inside this scope.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 160
                      },
                      "type": {
                        "title": "Movement type",
                        "description": "Enumerated type determines arithmetic sign.",
                        "type": "string",
                        "enum": [
                          "RECEIPT",
                          "SHIPMENT",
                          "TRANSFER_IN",
                          "TRANSFER_OUT",
                          "ADJUSTMENT_IN",
                          "ADJUSTMENT_OUT"
                        ]
                      },
                      "quantity": {
                        "title": "Movement quantity",
                        "description": "Positive decimal string with at most six fractional digits.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 20
                      },
                      "unit": {
                        "title": "Movement unit",
                        "description": "Must exactly match every other unit in the scope.",
                        "type": "string",
                        "enum": [
                          "each",
                          "kg",
                          "liter"
                        ]
                      },
                      "occurredAt": {
                        "title": "Movement time",
                        "description": "UTC timestamp within the inclusive-start/exclusive-end period.",
                        "type": "string",
                        "minLength": 24,
                        "maxLength": 24
                      }
                    }
                  }
                },
                "systemClosing": {
                  "title": "System-reported closing evidence",
                  "description": "Closing quantity independently reported by the source system.",
                  "type": "object",
                  "required": [
                    "quantity",
                    "unit"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "quantity": {
                      "title": "System closing quantity",
                      "description": "Non-negative decimal string with at most six fractional digits.",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 20
                    },
                    "unit": {
                      "title": "System closing unit",
                      "description": "Must exactly match the scope unit.",
                      "type": "string",
                      "enum": [
                        "each",
                        "kg",
                        "liter"
                      ]
                    }
                  }
                },
                "physicalCount": {
                  "title": "Physical-count evidence",
                  "description": "Observed closing count for the same item, location, period, and unit.",
                  "type": "object",
                  "required": [
                    "quantity",
                    "unit"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "quantity": {
                      "title": "Physical count quantity",
                      "description": "Non-negative decimal string with at most six fractional digits.",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 20
                    },
                    "unit": {
                      "title": "Physical count unit",
                      "description": "Must exactly match the scope unit.",
                      "type": "string",
                      "enum": [
                        "each",
                        "kg",
                        "liter"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}