API: foundation stiffness

POST /v1/stiffness — explicit service loads, centered tangent steps, signed reciprocal matrix terms, vertical secant/tangent response, and diagnostics.


Computes a signed reciprocal lateral–rotation tangent matrix and both vertical secant and local tangent stiffness at one explicit service state. The method and inputs are explained in Foundation stiffness; the same analysis runs interactively at the stiffness tool.

Endpoint

POST
https://api.pilecalc.com/v1/stiffness
GET
/v1/stiffness?key=…&req=…&fields=…(for header-less callers)

The request composes the two existing analyses: lateral takes compatible pile/soil objects from /v1/lateral, and axial the same pile/soil as /v1/axial without capacity factors. Supply serviceLoads and positive localtangentSteps separately. Axial and lateral inputs must represent the same vertical pile geometry and both profiles must cover its full length.

Authentication, rate limits, and the error envelope are shared by every endpoint — see the API overview. Requests are unit-agnostic: any self-consistent unit system works, and results come back in the same units. The examples below use SI (m, kN, kPa, kN/m³).

Request fields

This table is generated from the same schema that validates the request, so it cannot drift. Where a field appears once per variant row, it belongs to that variant only.

FieldTypeRequiredConstraints
unitSystem"si" | "us"yes
serviceLoadsobjectyes
serviceLoads.verticalnumberyes> 0
serviceLoads.shearnumberyes
serviceLoads.momentnumberyes
tangentStepsobjectyes
tangentSteps.shearnumberyes> 0
tangentSteps.momentnumberyes> 0
axialobjectyes
axial.pileobjectyes
axial.pile.kind = "uniform"variantno
axial.pile.lengthnumberyes> 0
axial.pile.diameternumberyes> 0
axial.pile.tipAreanumberno> 0
axial.pile.batterDegnumberno0 – 45
axial.pile.elasticModulusnumberyes> 0
axial.pile.unitWeightnumberyes≥ 0
axial.pile.displacementbooleanno
axial.pile.deltaDegnumberno0 – 60
axial.pile.frictionFactornumberno> 0
axial.pile.kind = "sectioned"variantyes
axial.pile.sections[]object[]yesmin 1 item
axial.pile.sections[].topnumberyes≥ 0
axial.pile.sections[].bottomnumberyes> 0
axial.pile.sections[].diameternumberyes> 0
axial.pile.sections[].perimeternumberno> 0
axial.pile.sections[].areanumberno> 0
axial.pile.tipAreanumberno> 0
axial.pile.batterDegnumberno0 – 45
axial.pile.elasticModulusnumberyes> 0
axial.pile.unitWeightnumberyes≥ 0
axial.pile.displacementbooleanno
axial.pile.deltaDegnumberno0 – 60
axial.pile.frictionFactornumberno> 0
axial.soilobjectyes
axial.soil.layers[]object[]yesmin 1 item
axial.soil.layers[].topnumberyes≥ 0
axial.soil.layers[].bottomnumberyes> 0
axial.soil.layers[].gammanumberyes> 0
axial.soil.layers[].type"cohesive" | "cohesionless" | "rock"yes
axial.soil.layers[].cohesionnumberno≥ 0
axial.soil.layers[].phinumberno0 – 60
axial.soil.layers[].sptNnumberno≥ 0
axial.soil.layers[].qunumberno≥ 0
axial.soil.layers[].rockJointCondition"massive-intact" | "closed" | "open-or-gouge-filled"no
axial.soil.layers[].rqdnumberno0 – 100
axial.soil.layers[].kDownnumberno> 0
axial.soil.layers[].kUpnumberno> 0
axial.soil.layers[].kcnumberno> 0
axial.soil.layers[].kanumberno> 0
axial.soil.waterTableDepthnumberno≥ 0
axial.soil.waterUnitWeightnumberno> 0
axial.segmentsnumbernointeger, 200 – 500
axial.loadSettlementPointsnumbernointeger, 320 – 400
axial.maxTipSettlementnumberno> 0
lateralobjectyes
lateral.pileobjectyes
lateral.pile.kind = "uniform"variantno
lateral.pile.lengthnumberyes> 0
lateral.pile.diameternumberyes> 0
lateral.pile.einumberyes> 0
lateral.pile.groundSurfaceDepthnumberno≥ 0
lateral.pile.kind = "sectioned"variantyes
lateral.pile.sectionsobject | object[]yesmin 1 item
lateral.pile.groundSurfaceDepthnumberno≥ 0
lateral.soilobjectyes
lateral.soil.layers[]object[]yesmin 1 item
lateral.soil.layers[].model = "soft-clay"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].cnumberyes> 0
lateral.soil.layers[].cBottomnumberno> 0
lateral.soil.layers[].e50numberyes> 0
lateral.soil.layers[].e50Bottomnumberno> 0
lateral.soil.layers[].jnumberno> 0
lateral.soil.layers[].model = "stiff-clay-above-water"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].cnumberyes> 0
lateral.soil.layers[].cBottomnumberno> 0
lateral.soil.layers[].e50numberyes> 0
lateral.soil.layers[].e50Bottomnumberno> 0
lateral.soil.layers[].jnumberno> 0
lateral.soil.layers[].knumberno> 0
lateral.soil.layers[].kBottomnumberno> 0
lateral.soil.layers[].model = "stiff-clay-below-water"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].cnumberyes> 0
lateral.soil.layers[].cBottomnumberno> 0
lateral.soil.layers[].e50numberyes> 0
lateral.soil.layers[].e50Bottomnumberno> 0
lateral.soil.layers[].knumberyes> 0
lateral.soil.layers[].kBottomnumberno> 0
lateral.soil.layers[].model = "sand-reese"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].phinumberyes0 – 60
lateral.soil.layers[].phiBottomnumberno0 – 60
lateral.soil.layers[].knumberyes> 0
lateral.soil.layers[].kBottomnumberno> 0
lateral.soil.layers[].model = "sand-api"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].phinumberyes0 – 60
lateral.soil.layers[].phiBottomnumberno0 – 60
lateral.soil.layers[].knumberyes> 0
lateral.soil.layers[].kBottomnumberno> 0
lateral.soil.layers[].model = "weak-rock"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].qunumberyes> 0
lateral.soil.layers[].quBottomnumberno> 0
lateral.soil.layers[].eirnumberyes> 0
lateral.soil.layers[].eirBottomnumberno> 0
lateral.soil.layers[].rqdnumberyes0 – 100
lateral.soil.layers[].rqdBottomnumberno0 – 100
lateral.soil.layers[].krmnumberno> 0
lateral.soil.layers[].model = "elastic"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].esTopnumberyes≥ 0
lateral.soil.layers[].esBottomnumberno≥ 0
lateral.soil.layers[].model = "user"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].esnumberno≥ 0
lateral.soil.layers[].curves[]object[]no
lateral.soil.layers[].curves[].depthnumberyes≥ 0
lateral.soil.layers[].curves[].points[]object[]yesmin 2 items
lateral.soil.layers[].curves[].points[].ynumberyes≥ 0
lateral.soil.layers[].curves[].points[].pnumberyes≥ 0
lateral.soil.layers[].model = "liquefied-sand"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].units"SI" | "US"yes
lateral.soil.layers[].model = "silt-cphi"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].cnumberyes> 0
lateral.soil.layers[].cBottomnumberno> 0
lateral.soil.layers[].phinumberyes0 – 60
lateral.soil.layers[].phiBottomnumberno0 – 60
lateral.soil.layers[].knumberyes> 0
lateral.soil.layers[].kBottomnumberno> 0
lateral.soil.layers[].jnumberno> 0
lateral.soil.layers[].model = "piedmont-residual"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].esinumberyes> 0
lateral.soil.layers[].esiBottomnumberno> 0
lateral.soil.layers[].lambdanumberno> 0
lateral.soil.layers[].model = "iso-clay"variantyes
lateral.soil.layers[].topnumberyes≥ 0
lateral.soil.layers[].bottomnumberyes> 0
lateral.soil.layers[].gammanumberyes> 0
lateral.soil.layers[].gammaBottomnumberno> 0
lateral.soil.layers[].sunumberyes> 0
lateral.soil.layers[].suBottomnumberno> 0
lateral.soil.layers[].alphanumberno0 – 1
lateral.soil.layers[].gap"open" | "closed"no
lateral.soil.layers[].clayType"soft" | "stiff"no
lateral.soil.cyclesnumbernointeger, > 0
lateral.incrementsnumbernointeger, 10 – 800
lateral.layering"direct" | "georgiadis"no

Response fields

FieldTypeDescription
lateral.serviceStateobjectDeclared V/M/Q state and the converged head deflection, slope, clockwise rotation, and maximum moment.
lateral.flexibility.deflectionShearnumberCentered tangent ∂y/∂V (m/kN).
lateral.flexibility.deflectionMomentnumberPublished reciprocal coupling ∂y/∂M (1/kN), symmetrized only after the raw terms pass tolerance.
lateral.flexibility.rotationShearnumberPublished reciprocal coupling ∂θ/∂V (1/kN); equals deflectionMoment.
lateral.flexibility.rotationMomentnumberCentered tangent ∂θ/∂M (1/(kN·m)).
lateral.stiffness.shearDeflectionnumberSigned tangent Kyy = ∂V/∂y (kN/m).
lateral.stiffness.shearRotationnumberSigned coupling Kyθ = ∂V/∂θ (kN/rad).
lateral.stiffness.momentDeflectionnumberSigned reciprocal coupling Kθy = ∂M/∂y (kN·m/m); equals shearRotation numerically in a consistent unit basis.
lateral.stiffness.momentRotationnumberSigned tangent Kθθ = ∂M/∂θ (kN·m/rad).
lateral.reciprocityobjectRaw off-diagonal terms, relative mismatch, declared tolerance, and symmetrization flag.
lateral.convergence.runsobjectDiagnostics for the service, V±ΔV, and M±ΔM p-y solves. A response exists only if all converged.
vertical.serviceLoad / .settlementnumberExplicit vertical service load Q (kN) and interpolated service settlement s (m).
vertical.secantStiffnessnumberVertical secant Q/s at the declared service load (kN/m).
vertical.tangentStiffnessnumberLocal piecewise dQ/ds in the service-load bracket (kN/m).
vertical.convergenceobjectFine/half-resolution integration and curve-sampling meshes, differences, and tolerances.
axialSummary.ultimateDownnumberUltimate downward resistance from the same fine axial run (kN); not an allowable service resistance.
methodobjectStable method ID, editions, tangent/secant basis, and the explicitly excluded axial–lateral cross-derivatives.

Code examples

A complete, runnable request. Replace YOUR_API_KEY (or set PILECALC_API_KEY in your environment).

POST /v1/stiffness
curl https://api.pilecalc.com/v1/stiffness \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "unitSystem": "si",
  "serviceLoads": {
    "vertical": 500,
    "shear": 150,
    "moment": 150
  },
  "tangentSteps": {
    "shear": 1.5,
    "moment": 1.5
  },
  "axial": {
    "pile": {
      "kind": "uniform",
      "length": 15,
      "diameter": 0.61,
      "elasticModulus": 30000000,
      "unitWeight": 24,
      "displacement": true
    },
    "soil": {
      "layers": [
        {
          "type": "cohesionless",
          "top": 0,
          "bottom": 16,
          "gamma": 19,
          "phi": 34
        }
      ]
    },
    "segments": 400,
    "loadSettlementPoints": 320
  },
  "lateral": {
    "pile": {
      "kind": "uniform",
      "length": 15,
      "diameter": 0.61,
      "ei": 143000
    },
    "soil": {
      "layers": [
        {
          "model": "elastic",
          "top": 0,
          "bottom": 15,
          "gamma": 9.5,
          "esTop": 10000
        }
      ]
    },
    "increments": 120,
    "layering": "direct"
  }
}'

The GET variant returns lateral.stiffness.shearDeflection,lateral.stiffness.shearRotation,lateral.stiffness.momentRotation,vertical.secantStiffness,vertical.tangentStiffness as a plain-text CSV line — made for Excel's WEBSERVICE() and Sheets' IMPORTDATA() (see Use PileCalc in Excel). Omit fields to get the full JSON response.

Interpreting results

  • The lateral terms are tangent derivatives at the declared V/M/Q state. Re-run if the structural model's service reactions change materially.
  • Zero lateral service shear or moment is valid: centered perturbations still return the complete tangent matrix. A perturbation cannot exceed 5% of its reference scale; at zero lateral action the references are Q for shear and QD for moment.
  • Preserve the signs of shearRotation and momentDeflection. Rotation is clockwise positive and equals minus the solver's head slope. Taking absolute values destroys the work-conjugate matrix.
  • Vertical secantStiffness reproduces total service settlement; verticaltangentStiffness describes an increment about that state. They are not interchangeable.
  • A successful response means all five lateral runs converged, raw reciprocity passed, and the vertical fine/half-resolution differences passed. Failures return an engine error; no partial matrix is published.

The water-unit-weight trap

With a water table, effective stresses depend on axial.soil.waterUnitWeight — pass 9.81 when working in kN/m³ (see Units & conventions).