{
 "openapi": "3.1.0",
 "info": {
  "title": "Carrier Scorecard (Supply Chain)",
  "version": "20261030b",
  "description": "Computed rather than typed: what each carrier moved, what it cost, how much of it arrived on time, and how often their invoice was wrong."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "carrier-scorecard": {
    "type": "object",
    "required": [],
    "properties": {
     "carrier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Carrier id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "carrier_no": {
      "type": "string",
      "description": "Carrier no",
      "readOnly": true
     },
     "name": {
      "type": "string",
      "description": "Name",
      "readOnly": true
     },
     "carrier_type": {
      "type": "string",
      "description": "Carrier type",
      "readOnly": true
     },
     "scac": {
      "type": "string",
      "description": "Scac",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "insurance_expires_on": {
      "type": "string",
      "format": "date",
      "description": "Insurance expires on",
      "readOnly": true
     },
     "shipments": {
      "type": "integer",
      "description": "Shipments",
      "readOnly": true
     },
     "delivered": {
      "type": "integer",
      "description": "Delivered",
      "readOnly": true
     },
     "on_time_count": {
      "type": "integer",
      "description": "On time count",
      "readOnly": true
     },
     "on_time_pct": {
      "type": "string",
      "format": "decimal",
      "description": "On time pct",
      "readOnly": true
     },
     "spend": {
      "type": "string",
      "format": "decimal",
      "description": "Spend",
      "readOnly": true
     },
     "weight_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Weight kg",
      "readOnly": true
     },
     "cost_per_kg": {
      "type": "string",
      "format": "decimal",
      "description": "Cost per kg",
      "readOnly": true
     },
     "invoices": {
      "type": "integer",
      "description": "Invoices",
      "readOnly": true
     },
     "disputed_invoices": {
      "type": "integer",
      "description": "Disputed invoices",
      "readOnly": true
     },
     "invoice_variance": {
      "type": "string",
      "format": "decimal",
      "description": "Invoice variance",
      "readOnly": true
     },
     "invoice_accuracy_pct": {
      "type": "string",
      "format": "decimal",
      "description": "Invoice accuracy pct",
      "readOnly": true
     },
     "exception_events": {
      "type": "integer",
      "description": "Exception events",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/carrier-scorecard": {
   "get": {
    "summary": "list carrier-scorecard",
    "operationId": "list_carrier_scorecard_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post carrier scorecard",
    "operationId": "action_carrier_scorecard_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/carrier-scorecard/{carrier_id}": {
   "get": {
    "summary": "get carrier-scorecard",
    "operationId": "get_carrier_scorecard_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/carrier-scorecard/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_carrier_scorecard_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/carrier-scorecard/{id}": {
   "put": {
    "summary": "Put carrier scorecard",
    "operationId": "action_carrier_scorecard_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete carrier scorecard",
    "operationId": "action_carrier_scorecard_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}