{
  "openapi": "3.0.1",
  "info": {
    "title": "Support First Response Business Hours Report",
    "description": "Compute first-response business duration and target due dates from normalized ticket exports and expanded work intervals. Flag incomplete calendars or response observations; export traceable evidence without support-system access.",
    "version": "0.1",
    "x-build-id": "KiaC5xzXr1b3qbHGF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~support-business-hours-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-support-business-hours-evidence",
        "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/h_murdock~support-business-hours-evidence/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-support-business-hours-evidence",
        "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/h_murdock~support-business-hours-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-support-business-hours-evidence",
        "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": [
          "snapshotId",
          "asOf",
          "responseObservation",
          "schedules"
        ],
        "properties": {
          "snapshotId": {
            "title": "Snapshot reference",
            "type": "string",
            "description": "Opaque reference for the supplied batch; no implicit clock or sample fallback."
          },
          "asOf": {
            "title": "Explicit report cutoff",
            "type": "string",
            "description": "Real RFC3339 instant with seconds and Z or known numeric offset; at most3fractional digits. Measures missing replies through this instant. Future ticket creation or replies rejected."
          },
          "responseObservation": {
            "title": "Response observation coverage",
            "type": "object",
            "description": "Required {from,through,coverage}. Instants use explicit RFC3339 offsets, from≤through inclusive. coverage complete/incomplete/unknown declares whether all first responses or their absence were observed over the full window across supplied sources. Target conclusions require complete coverage of ticket creation through its supplied reply or asOf. A missing reply is not proof of no reply outside complete coverage."
          },
          "schedules": {
            "title": "Finite calendar coverage",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Unique scheduleId, coverageStart, coverageEnd, coverage (complete/incomplete/unknown). All fields required; real explicit-offset instants; start<end. Caller already expands weekdays, holidays and DST. In complete coverage, unlisted time is non-working. Partial/unknown coverage yields unresolved conclusions. No recurring calendar guessing."
          },
          "tickets": {
            "title": "Normalized ticket rows",
            "minItems": 0,
            "maxItems": 5000,
            "type": "array",
            "description": "Each row requires literal sourceId, ticketId, createdAt, firstReplyAt (instant or null), scheduleId and targetMinutes (positive integer1–525600). Caller determines which reply counts under their policy; no native-channel emulation. Duplicate sourceId+ticketId rejected, including identical rows. Supply this array OR ticketsCsv; remove this array when using CSV. Explicit[] accepted. Combined tickets+workIntervals≤5000;4MB input;10000report evidence segments."
          },
          "workIntervals": {
            "title": "Expanded working intervals",
            "minItems": 0,
            "maxItems": 5000,
            "type": "array",
            "description": "Each row requires scheduleId, intervalId, start,end. Intervals are [start,end), positive duration, explicit RFC3339 offsets; inside schedule coverage. Duplicate schedule+interval IDs and overlaps rejected. Adjacent intervals allowed. Supply this array OR workIntervalsCsv; remove this array for CSV. Explicit[] means no supplied work intervals."
          },
          "ticketsCsv": {
            "title": "Ticket CSV alternative",
            "type": "string",
            "description": "Remove tickets array before supplying nonempty CSV. Exactly sourceId,ticketId,createdAt,firstReplyAt,scheduleId,targetMinutes unless mapped. Blank firstReplyAt means null. Canonical positive integer target; unknown/duplicate headers and ragged rows rejected; quoted fields/BOM accepted. Header-only CSV is an explicit empty batch."
          },
          "workIntervalsCsv": {
            "title": "Work interval CSV alternative",
            "type": "string",
            "description": "Remove workIntervals array before supplying nonempty CSV. Exactly scheduleId,intervalId,start,end unless mapped. Quoting/BOM accepted; unknown/duplicate headers and irregular records rejected."
          },
          "ticketColumns": {
            "title": "Ticket column mapping",
            "type": "object",
            "description": "Optional complete mapping of canonical fields (sourceId,ticketId,createdAt,firstReplyAt,scheduleId,targetMinutes) to distinct literal CSV headers, no extra mapping keys. Omit for canonical headers. Noncanonical mapping requires ticket CSV."
          },
          "intervalColumns": {
            "title": "Interval column mapping",
            "type": "object",
            "description": "Optional complete mapping of canonical fields (scheduleId,intervalId,start,end) to distinct literal CSV headers, no extra mapping keys. Noncanonical mapping requires interval CSV."
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Comma, semicolon or tab, applying to both CSV tables. Omit for comma. Does not alter array inputs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}