{
  "generated_at": "2026-04-24T15:01:35.625676+00:00",
  "slug": "api-shippingrates-org-api-dd-calculate",
  "title": "ShippingRates \u00b7 Demurrage & Detention Calculator",
  "url": "https://api.shippingrates.org/api/dd/calculate",
  "category": "data",
  "summary": "Compute demurrage and detention charges with slab breakdowns for international shipping containers.",
  "seo": {
    "title": "ShippingRates Demurrage Detention API - x402 Logistics",
    "description": "Calculate shipping demurrage and detention costs across 7 lines and 195 countries. Container rates, free days, per-diem breakdowns. $0.1 USDC per call."
  },
  "use_cases": [
    "Calculate detention costs for container shipments",
    "Compare rates across shipping lines",
    "Estimate free days and per-diem charges",
    "Plan logistics costs for international freight"
  ],
  "ideal_buyer": "Freight forwarders and logistics operators calculating container detention costs.",
  "example_prompt": "Calculate demurrage costs for a 40HC container in Singapore for 10 days with Maersk.",
  "example_request_body": {
    "days": 10,
    "country": "SG",
    "shipping_line": "MAERSK",
    "container_type": "40HC"
  },
  "risk_notes": [],
  "pricing_sanity": {
    "flag": "expensive",
    "ratio": 5,
    "median_category_atomic": 20000
  },
  "pricing_review_required": false,
  "pricing_decimal_suspect": false,
  "trust_tier": "indexed_external",
  "accepts": [
    {
      "scheme": "exact",
      "network": "base",
      "pay_to": "0x8c9e0882b4c6e6568fe76f16d59f7e080465e5c8",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "max_amount_required_atomic": "100000",
      "max_timeout_seconds": 300,
      "description": "Calculate demurrage & detention costs for a shipping line, country, container type, and number of days. Returns slab breakdown with free days, per-diem rates, and total cost.",
      "verified": false,
      "hints": {
        "input": {
          "body": {
            "required": [
              "line",
              "country",
              "container_type",
              "days"
            ],
            "properties": {
              "days": {
                "type": "number",
                "maximum": 365,
                "minimum": 1,
                "description": "Number of detention days (1-365)"
              },
              "line": {
                "enum": [
                  "maersk",
                  "msc",
                  "cma-cgm",
                  "hapag-lloyd",
                  "one",
                  "cosco"
                ],
                "type": "string",
                "description": "Shipping line slug: maersk, msc, cma-cgm, hapag-lloyd, one, cosco"
              },
              "country": {
                "type": "string",
                "description": "ISO 2-letter country code (e.g. IN, AE, SG, CN, MY, LK, PK, BD, TH)"
              },
              "container_type": {
                "enum": [
                  "20DV",
                  "40DV",
                  "40HC",
                  "20RF",
                  "40RF",
                  "20OT",
                  "40OT",
                  "20FR",
                  "40FR"
                ],
                "type": "string",
                "description": "Container type: 20DV, 40DV, 40HC, 20RF, 40RF, 20OT, 40OT, 20FR, 40FR"
              }
            }
          },
          "type": "http",
          "method": "POST",
          "bodyType": "json"
        },
        "output": {
          "type": "json",
          "example": {
            "days": 14,
            "line": "maersk",
            "slabs": [
              {
                "to": 7,
                "cost": 22.5,
                "days": 3,
                "from": 5,
                "rate_per_day": 7.5
              },
              {
                "to": 14,
                "cost": 105,
                "days": 7,
                "from": 8,
                "rate_per_day": 15
              }
            ],
            "country": "IN",
            "currency": "USD",
            "free_days": 4,
            "total_cost": 127.5,
            "container_type": "40HC"
          }
        }
      }
    },
    {
      "scheme": "exact",
      "network": "solana",
      "pay_to": "Gcv56hKWuEGmXheBpJxAwQxvX6QAMimZzzVrHaVCbNWE",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "max_amount_required_atomic": "100000",
      "max_timeout_seconds": 300,
      "description": "Calculate demurrage & detention costs for a shipping line, country, container type, and number of days. Returns slab breakdown with free days, per-diem rates, and total cost.",
      "verified": false,
      "hints": {
        "input": {
          "body": {
            "required": [
              "line",
              "country",
              "container_type",
              "days"
            ],
            "properties": {
              "days": {
                "type": "number",
                "maximum": 365,
                "minimum": 1,
                "description": "Number of detention days (1-365)"
              },
              "line": {
                "enum": [
                  "maersk",
                  "msc",
                  "cma-cgm",
                  "hapag-lloyd",
                  "one",
                  "cosco"
                ],
                "type": "string",
                "description": "Shipping line slug: maersk, msc, cma-cgm, hapag-lloyd, one, cosco"
              },
              "country": {
                "type": "string",
                "description": "ISO 2-letter country code (e.g. IN, AE, SG, CN, MY, LK, PK, BD, TH)"
              },
              "container_type": {
                "enum": [
                  "20DV",
                  "40DV",
                  "40HC",
                  "20RF",
                  "40RF",
                  "20OT",
                  "40OT",
                  "20FR",
                  "40FR"
                ],
                "type": "string",
                "description": "Container type: 20DV, 40DV, 40HC, 20RF, 40RF, 20OT, 40OT, 20FR, 40FR"
              }
            }
          },
          "type": "http",
          "method": "POST",
          "bodyType": "json"
        },
        "output": {
          "type": "json",
          "example": {
            "days": 14,
            "line": "maersk",
            "slabs": [
              {
                "to": 7,
                "cost": 22.5,
                "days": 3,
                "from": 5,
                "rate_per_day": 7.5
              },
              {
                "to": 14,
                "cost": 105,
                "days": 7,
                "from": 8,
                "rate_per_day": 15
              }
            ],
            "country": "IN",
            "currency": "USD",
            "free_days": 4,
            "total_cost": 127.5,
            "container_type": "40HC"
          }
        }
      }
    }
  ],
  "origin": {
    "slug": "api-shippingrates-org",
    "host": "api.shippingrates.org",
    "title": "ShippingRates \u2014 Demurrage, Detention & Freight Rate API",
    "description": "Compare demurrage and detention charges across 7 shipping lines in 195 countries. Freight rate calculator, local charges, transit times. Free trial.",
    "url": "https://api.shippingrates.org",
    "og_image": "https://shippingrates.org/og-image.png?v=20260324"
  },
  "json_ld": {
    "@id": "https://x402all.com/resource/api-shippingrates-org-api-dd-calculate",
    "url": "https://x402all.com/resource/api-shippingrates-org-api-dd-calculate",
    "name": "ShippingRates \u00b7 Demurrage & Detention Calculator",
    "@type": "WebAPI",
    "offers": [
      {
        "url": "https://x402all.com/resource/api-shippingrates-org-api-dd-calculate",
        "@type": "Offer",
        "price": "0.1",
        "availability": "https://schema.org/InStock",
        "priceCurrency": "USDC",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "0.100000",
          "unitText": "call",
          "priceCurrency": "USDC"
        },
        "eligibleCustomerType": "Agent",
        "additionalProperty": [
          {
            "@type": "PropertyValue",
            "name": "paymentNetwork",
            "value": "base"
          },
          {
            "@type": "PropertyValue",
            "name": "paymentAsset",
            "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
          }
        ]
      },
      {
        "url": "https://x402all.com/resource/api-shippingrates-org-api-dd-calculate",
        "@type": "Offer",
        "price": "0.1",
        "availability": "https://schema.org/InStock",
        "priceCurrency": "USDC",
        "priceSpecification": {
          "@type": "UnitPriceSpecification",
          "price": "0.100000",
          "unitText": "call",
          "priceCurrency": "USDC"
        },
        "eligibleCustomerType": "Agent",
        "additionalProperty": [
          {
            "@type": "PropertyValue",
            "name": "paymentNetwork",
            "value": "solana"
          },
          {
            "@type": "PropertyValue",
            "name": "paymentAsset",
            "value": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
          }
        ]
      }
    ],
    "sameAs": "https://api.shippingrates.org/api/dd/calculate",
    "@context": "https://schema.org",
    "provider": {
      "@id": "https://x402all.com/server/api-shippingrates-org",
      "url": "https://api.shippingrates.org",
      "name": "ShippingRates \u2014 Demurrage, Detention & Freight Rate API",
      "@type": "Organization"
    },
    "identifier": "api-shippingrates-org-api-dd-calculate",
    "description": "Calculate shipping demurrage and detention costs across 7 lines and 195 countries. Container rates, free days, per-diem breakdowns. $0.1 USDC per call.",
    "potentialAction": {
      "@type": "BuyAction",
      "target": "https://axon402.com/test-buy?resource=api-shippingrates-org-api-dd-calculate",
      "description": "Test-buy this endpoint on AXON"
    },
    "applicationCategory": "data"
  },
  "axon_deep_link": "https://axon402.com/test-buy?resource=api-shippingrates-org-api-dd-calculate"
}
