{
  "openapi": "3.0.1",
  "info": {
    "title": "Parcel Billable Weight Evidence Report",
    "description": "Compare declared and audited parcel dimensions, exact dimensional and actual billable weights, and supplied invoice weights under caller rounding/divisor policies. Trace changes and missing evidence in CSV, JSON and HTML; no carrier credentials or refund claims.",
    "version": "0.1",
    "x-build-id": "4PgQpselyQWnRxM9c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/h_murdock~parcel-billable-weight-evidence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-h_murdock-parcel-billable-weight-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~parcel-billable-weight-evidence/runs": {
      "post": {
        "operationId": "runs-sync-h_murdock-parcel-billable-weight-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~parcel-billable-weight-evidence/run-sync": {
      "post": {
        "operationId": "run-sync-h_murdock-parcel-billable-weight-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",
          "requiredBases",
          "evidenceCoverage",
          "csvDelimiter",
          "policies"
        ],
        "properties": {
          "snapshotId": {
            "title": "Snapshot ID",
            "type": "string",
            "description": "Opaque batch identifier; leading zeroes preserved. No customer names or addresses needed."
          },
          "requiredBases": {
            "title": "Required measurement bases",
            "type": "array",
            "description": "Declare which bases are required: declared, audited, or both. Missing required evidence is unresolved; missing optional evidence is not-provided. No runtime fallback."
          },
          "evidenceCoverage": {
            "title": "Evidence coverage",
            "enum": [
              "complete",
              "incomplete",
              "unknown"
            ],
            "type": "string",
            "description": "Caller declaration for this batch scope. Incomplete/unknown coverage prevents an overall consistent conclusion even if supplied rows agree."
          },
          "csvDelimiter": {
            "title": "CSV delimiter",
            "enum": [
              ",",
              ";",
              "\t"
            ],
            "type": "string",
            "description": "Explicit delimiter for both optional CSV tables. Decimal values always use a dot and remain strings."
          },
          "policies": {
            "title": "Caller policies",
            "type": "array",
            "description": "One policy per scopeId: policyRef, dimensionUnit in/cm, weightUnit lb/kg, dimensionalDivisor, dimensionRounding none/ceil/nearest-half-up, dimensionIncrement, billableWeightIncrement, tolerance. All arithmetic values decimal strings <=999999.999999, <=6 fraction places. Divisor/increments positive; tolerance >=0. Divisor units must be dimensionUnit cubed per weightUnit; no automatic carrier choice or conversion. Weight rounding is always ceiling to the declared billable increment; dimensionIncrement ignored only when none. Required explicit policy, no defaults."
          },
          "measurements": {
            "title": "measurements",
            "type": "array",
            "description": "Each row: recordId, packageId, scopeId, basis declared/audited, length, width, height, dimensionUnit in/cm, actualWeight, weightUnit lb/kg, recordedAt real UTC YYYY-MM-DDTHH:mm:ss[.sss]Z, sourceReference. Dimensions positive; actualWeight nonnegative. All numeric quantities decimal strings <=999999.999999 with <=6 decimal places. Units must exactly match scope policy. Repeated package/basis is unresolved, even identical rows. Unique record IDs within table. Supply array (including [] when empty) OR nonempty CSV, never both. At least one evidence row combined. Max5,000 combined records including policies; JSON <=4 MB. Opaque IDs are literal strings without surrounding whitespace/control characters."
          },
          "measurementsCsv": {
            "title": "measurements CSV",
            "type": "string",
            "description": "Optional mapped CSV alternative. REMOVE the corresponding array when entering CSV. UTF-8 BOM/quoted fields accepted; empty/duplicate/unknown headers, ragged rows and malformed decimals rejected. No URLs fetched."
          },
          "measurementsColumns": {
            "title": "measurements CSV mapping",
            "type": "object",
            "description": "Map EVERY canonical field (recordId, packageId, scopeId, basis, length, width, height, dimensionUnit, actualWeight, weightUnit, recordedAt, sourceReference) to a distinct CSV header. Omit for canonical headers. Custom mapping requires CSV; canonical mapping is harmless with arrays."
          },
          "invoices": {
            "title": "invoices",
            "type": "array",
            "description": "Each row: recordId, packageId, scopeId, billedWeight (nonnegative decimal string <=999999.999999, <=6 fractional places), weightUnit lb/kg, sourceReference. Units must match scope policy. Repeated package invoices are unresolved, never summed. Unique record IDs within table. No PDF/OCR or currency amounts. Supply array (including [] when empty) OR nonempty CSV, never both. At least one evidence row combined. Max5,000 combined records including policies; JSON <=4 MB. Opaque IDs are literal strings without surrounding whitespace/control characters."
          },
          "invoicesCsv": {
            "title": "invoices CSV",
            "type": "string",
            "description": "Optional mapped CSV alternative. REMOVE the corresponding array when entering CSV. UTF-8 BOM/quoted fields accepted; empty/duplicate/unknown headers, ragged rows and malformed decimals rejected. No URLs fetched."
          },
          "invoicesColumns": {
            "title": "invoices CSV mapping",
            "type": "object",
            "description": "Map EVERY canonical field (recordId, packageId, scopeId, billedWeight, weightUnit, sourceReference) to a distinct CSV header. Omit for canonical headers. Custom mapping requires CSV; canonical mapping is harmless with arrays."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}