Allocate import costs to SKU landed cost API
Allocate shipment freight and insurance by value, weight or volume, compute CIF or FOB customs value, duty and import VAT from caller rates, and return per-unit landed cost.
The Allocate import costs to SKU landed cost operation is part of the Ecommerce Seller Profitability Unit Economics API on BRAINIAC.software. Allocate shipment freight and insurance by value, weight or volume, compute CIF or FOB customs value, duty and import VAT from caller rates, and return per-unit landed cost. It is exposed as POST /api/v1/ecommerce-profitability/landed-cost-import and priced at $0.04 USDC on Base. Payment uses the x402 exact scheme: an unpaid call returns HTTP 402 with payment requirements; after paying the exact USDC amount, retry the same request with a payment-signature header and Idempotency-Key. No account and no API key are required. Data sources for this product: Caller-supplied marketplace fees, product costs, ads rows, listing text, shipment lines, price history and settlement exports processed locally Limitations: Pure computation on caller input: no marketplace, payment-processor, tariff or tax API is called at request time. Fee schedules, duty rates, VAT rates and listing length limits must be supplied by the caller. Outputs are lookups or prechecks for human review. They are not legal, customs, tax, medical, or identity determinations. Money amounts are integers in minor units of one currency per request unless a fee rate produces a fractional intermediate. Outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Related operations in this group include Per-unit contribution margin and break-even, Analyse a sponsored-ads search-term report, Check listing keyword coverage and length limits, Estimate own-price elasticity from history. Open the group documentation for the full request schema, field notes, and response examples before integrating.
/api/v1/ecommerce-profitability/landed-cost-importExample request
curl -i -X POST "https://www.brainiac.software/api/v1/ecommerce-profitability/landed-cost-import" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"currency": "GBP",
"lines": [
{
"sku": "A",
"units": 100,
"unitCost": 500,
"weightKg": 50,
"volumeM3": 0.2,
"dutyRate": 0.12
},
{
"sku": "B",
"units": 50,
"unitCost": 1000,
"weightKg": 50,
"volumeM3": 0.3,
"dutyRate": 0
}
],
"freight": 20000,
"insurance": 1000,
"allocation": "value",
"dutyBasis": "CIF",
"importVatRate": 0.2,
"vatRecoverable": true
}
JSONAn unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.
FAQ
- Do I need an API key? No. Pay the listed USDC amount with x402.
- What network? Base (eip155:8453), USDC.
- Is this an official determination? No. Results are for human review against the cited sources.
Related operations
- Per-unit contribution margin and break-even — $0.03 USDC
- Analyse a sponsored-ads search-term report — $0.04 USDC
- Check listing keyword coverage and length limits — $0.02 USDC
- Estimate own-price elasticity from history — $0.04 USDC
Related APIs
Ecommerce Seller Profitability Unit Economics APIFull docsHow it works