ileap

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

iLEAP Technical Specifications

iLEAP技术规范

iLEAP extends the PACT Data Exchange Protocol with logistics emissions data types conforming to ISO 14083 and the GLEC Framework v3.1.
iLEAP扩展了PACT数据交换协议,新增了符合ISO 14083和GLEC Framework v3.1的物流排放数据类型。

Implementation Order

实现顺序

  1. PACT base: Authentication (OpenID discovery + OAuth2 Client Credentials),
    GET /2/footprints
    ,
    GET /2/footprints/{id}
    ,
    POST /2/events
    . See
    references/pact-implementation-guide.md
    .
  2. iLEAP extensions: Embed ShipmentFootprint, TOC, HOC as
    DataModelExtension
    s in ProductFootprints.
  3. TAD endpoint:
    GET /2/ileap/tad
    with filtering and pagination.
  4. Conformance: Run ACT against your server.
  1. PACT基础层:认证(OpenID发现 + OAuth2客户端凭证)、
    GET /2/footprints
    GET /2/footprints/{id}
    POST /2/events
    。详见
    references/pact-implementation-guide.md
  2. iLEAP扩展:在ProductFootprint中嵌入ShipmentFootprint、TOC、HOC作为
    DataModelExtension
  3. TAD端点:实现带过滤和分页功能的
    GET /2/ileap/tad
  4. 一致性验证:使用ACT工具对服务器进行测试。

Architecture Overview

架构概述

Roles

角色

RoleDescription
Transport Service UserPurchases transport (e.g., shipper)
Transport Service OrganizerProvides transport, subcontracts operations (e.g., LSP)
Transport OperatorCarries out transport (e.g., carrier)
角色描述
运输服务用户采购运输服务(如货主)
运输服务组织者提供运输服务,可转包运营(如物流服务提供商LSP)
运输运营商执行运输任务(如承运人)

Key invariant

核心规则

All numeric values are
Decimal
-- JSON strings matching
^-?\d+(\.\d+)?$
. Never use JSON numbers for iLEAP numeric fields.
所有数值类型均为
Decimal
——即匹配正则
^-?\d+(\.\d+)?$
的JSON字符串。iLEAP数值字段绝不能使用JSON数字类型。

Data Transactions

数据交易

DTData typeProviderConsumerEndpoint
DT#1ShipmentFootprint (TCEs)Operator/OrganizerService User
GET /2/footprints
DT#2TOC or HOCOperator/OrganizerOrganizer/User
GET /2/footprints
DT#3TADOperatorOrganizer/User
GET /2/ileap/tad
  • DT#1: TCE-level emissions for a single shipment, wrapped in a ShipmentFootprint
  • DT#2: Emission intensity data at TOC (transport) or HOC (hub) cluster level
  • DT#3: Raw activity data (distance, mass, energy) for parties that cannot yet calculate emissions
交易编号数据类型提供方消费方端点
DT#1ShipmentFootprint(含TCE)运营商/组织者服务用户
GET /2/footprints
DT#2TOC或HOC运营商/组织者组织者/用户
GET /2/footprints
DT#3TAD运营商组织者/用户
GET /2/ileap/tad
  • DT#1:单个运输订单的TCE层级排放数据,封装在ShipmentFootprint中
  • DT#2:运输集群(TOC)或枢纽集群(HOC)层级的排放强度数据
  • DT#3:无法自行计算排放的主体所需的原始活动数据(距离、重量、能耗)

Data Model Quick Reference

数据模型速查

ShipmentFootprint

ShipmentFootprint

PropertyTypeReqDescription
mass
DecimalMFreight mass in kg
volume
DecimalOFreight volume in CBM
shipmentId
StringMShipment identifier
tces
TCE[]MNon-empty array of TCEs
属性类型必填描述
mass
Decimal货物重量(单位:千克)
volume
Decimal货物体积(单位:立方米)
shipmentId
String运输订单标识符
tces
TCE[]非空TCE数组

TCE (Transport Chain Element)

TCE(运输链元素)

PropertyTypeReqDescription
tceId
StringMUnique TCE id
prevTceIds
String[]OIDs of preceding TCEs (ordering)
tocId
StringM*TOC id (*one of tocId/hocId required)
hocId
StringM*HOC id (*one of tocId/hocId required)
shipmentId
StringMShipment id
mass
DecimalMFreight mass in kg
distance
GLECDistanceMOrigin-destination distance
transportActivity
DecimalMTransport activity in tkm
co2eWTW
DecimalMWTW GHG emissions in kgCO2e
co2eTTW
DecimalMTTW GHG emissions in kgCO2e
属性类型必填描述
tceId
String唯一TCE标识符
prevTceIds
String[]前置TCE的ID(用于排序)
tocId
String是*TOC的ID(*tocId/hocId二选一必填)
hocId
String是*HOC的ID(*tocId/hocId二选一必填)
shipmentId
String运输订单ID
mass
Decimal货物重量(单位:千克)
distance
GLECDistance起运地到目的地的距离
transportActivity
Decimal运输活动量(单位:吨公里)
co2eWTW
Decimal全生命周期(WTW)温室气体排放量(单位:千克CO₂当量)
co2eTTW
Decimal油箱到车轮(TTW)温室气体排放量(单位:千克CO₂当量)

TOC (Transport Operation Category)

TOC(运输作业类别)

PropertyTypeReqDescription
tocId
StringMUnique TOC id
mode
TransportModeMTransport mode
energyCarriers
EnergyCarrier[]MEnergy carriers (shares must sum to 1)
co2eIntensityWTW
DecimalMWTW intensity per transportActivityUnit
co2eIntensityTTW
DecimalMTTW intensity per transportActivityUnit
transportActivityUnit
StringM
"tkm"
or
"TEUkm"
属性类型必填描述
tocId
String唯一TOC标识符
mode
TransportMode运输方式
energyCarriers
EnergyCarrier[]能源载体(占比总和必须为1)
co2eIntensityWTW
Decimal全生命周期(WTW)排放强度(每运输活动单位)
co2eIntensityTTW
Decimal油箱到车轮(TTW)排放强度(每运输活动单位)
transportActivityUnit
String
"tkm"
(吨公里)或
"TEUkm"
(标准箱公里)

HOC (Hub Operation Category)

HOC(枢纽作业类别)

PropertyTypeReqDescription
hocId
StringMUnique HOC id
hubType
HubTypeMHub type
energyCarriers
EnergyCarrier[]MEnergy carriers (shares must sum to 1)
co2eIntensityWTW
DecimalMWTW intensity per hubActivityUnit
co2eIntensityTTW
DecimalMTTW intensity per hubActivityUnit
hubActivityUnit
StringM
"tonnes"
or
"TEU"
属性类型必填描述
hocId
String唯一HOC标识符
hubType
HubType枢纽类型
energyCarriers
EnergyCarrier[]能源载体(占比总和必须为1)
co2eIntensityWTW
Decimal全生命周期(WTW)排放强度(每枢纽活动单位)
co2eIntensityTTW
Decimal油箱到车轮(TTW)排放强度(每枢纽活动单位)
hubActivityUnit
String
"tonnes"
(吨)或
"TEU"
(标准箱)

TAD (Transport Activity Data)

TAD(运输活动数据)

PropertyTypeReqDescription
activityId
StringMUnique activity id
consignmentIds
String[]MConsignment identifiers
distance
GLECDistanceMOrigin-destination distance
origin
LocationMOrigin location
destination
LocationMDestination location
departureAt
DateTimeMISO 8601 UTC departure
arrivalAt
DateTimeMISO 8601 UTC arrival
mode
TransportModeMTransport mode
属性类型必填描述
activityId
String唯一活动标识符
consignmentIds
String[]托运货物标识符
distance
GLECDistance起运地到目的地的距离
origin
Location起运地
destination
Location目的地
departureAt
DateTimeISO 8601格式的UTC出发时间
arrivalAt
DateTimeISO 8601格式的UTC到达时间
mode
TransportMode运输方式

Enum values

枚举值

  • TransportMode:
    Road
    ,
    Rail
    ,
    Air
    ,
    Sea
    ,
    InlandWaterway
  • HubType:
    Transshipment
    ,
    StorageAndTransshipment
    ,
    Warehouse
    ,
    LiquidBulkTerminal
    ,
    MaritimeContainerTerminal
  • EnergyCarrierType:
    Diesel
    ,
    HVO
    ,
    Petrol
    ,
    CNG
    ,
    LNG
    ,
    LPG
    ,
    HFO
    ,
    MGO
    ,
    Aviation fuel
    ,
    Hydrogen
    ,
    Methanol
    ,
    Electric
  • PackagingOrTrEqType:
    Box
    ,
    Pallet
    ,
    Container-TEU
    ,
    Container-FEU
    ,
    Container
  • Feedstock:
    Fossil
    ,
    Natural gas
    ,
    Grid
    ,
    Renewable electricity
    ,
    Cooking oil
  • TransportMode
    Road
    (公路)、
    Rail
    (铁路)、
    Air
    (航空)、
    Sea
    (海运)、
    InlandWaterway
    (内河航运)
  • HubType
    Transshipment
    (转运枢纽)、
    StorageAndTransshipment
    (仓储转运枢纽)、
    Warehouse
    (仓库)、
    LiquidBulkTerminal
    (液体散货码头)、
    MaritimeContainerTerminal
    (海运集装箱码头)
  • EnergyCarrierType
    Diesel
    (柴油)、
    HVO
    (氢化植物油)、
    Petrol
    (汽油)、
    CNG
    (压缩天然气)、
    LNG
    (液化天然气)、
    LPG
    (液化石油气)、
    HFO
    (重燃料油)、
    MGO
    (船用柴油)、
    Aviation fuel
    (航空燃油)、
    Hydrogen
    (氢气)、
    Methanol
    (甲醇)、
    Electric
    (电力)
  • PackagingOrTrEqType
    Box
    (箱)、
    Pallet
    (托盘)、
    Container-TEU
    (20英尺标准箱)、
    Container-FEU
    (40英尺标准箱)、
    Container
    (集装箱)
  • Feedstock
    Fossil
    (化石燃料)、
    Natural gas
    (天然气)、
    Grid
    (电网电力)、
    Renewable electricity
    (可再生电力)、
    Cooking oil
    (餐厨油)

JSON schemas

JSON模式文件

Located at
references/ileap-data-model/schemas/
:
  • shipment-footprint.json
    ,
    toc.json
    ,
    hoc.json
    ,
    tad.json
  • pcf-shipment-footprint.json
    ,
    pcf-toc.json
    ,
    pcf-hoc.json
    ,
    pcf-tad.json
位于
references/ileap-data-model/schemas/
目录下:
  • shipment-footprint.json
    toc.json
    hoc.json
    tad.json
  • pcf-shipment-footprint.json
    pcf-toc.json
    pcf-hoc.json
    pcf-tad.json

PACT Integration Rules

PACT集成规则

These are the most error-prone mappings when embedding iLEAP data into PACT ProductFootprints.
以下是将iLEAP数据嵌入PACT ProductFootprint时最容易出错的映射规则。

Common rules (all iLEAP types)

通用规则(所有iLEAP类型)

  • productCategoryCpc
    : MUST always be
    "83117"
  • packagingEmissionsIncluded
    : MUST be
    false
  • biogenicCarbonContent
    : SHOULD be
    "0"
  • extensions[].specVersion
    : MUST be
    "2.0.0"
  • One iLEAP extension per ProductFootprint (cannot mix SF + TOC etc.)
  • productCategoryCpc
    :必须始终设为
    "83117"
  • packagingEmissionsIncluded
    :必须设为
    false
  • biogenicCarbonContent
    :建议设为
    "0"
  • extensions[].specVersion
    :必须设为
    "2.0.0"
  • 每个ProductFootprint仅能包含一个iLEAP扩展(不能混合SF + TOC等类型)

Per-type mapping

按类型映射规则

FieldShipmentFootprintTOCHOC
productIds
urn:...:shipment:{shipmentId}
urn:...:toc:{tocId}
urn:...:hoc:{hocId}
declaredUnit
"ton kilometer"
"ton kilometer"
"kilogram"
unitaryProductAmount
sum(tces[].transportActivity)
"1"
"1000"
pCfExcludingBiogenic
sum(tces[].co2eWTW)
co2eIntensityWTW
co2eIntensityWTW
dataSchema
URL
.../shipment-footprint.json
.../toc.json
.../hoc.json
字段ShipmentFootprintTOCHOC
productIds
urn:...:shipment:{shipmentId}
urn:...:toc:{tocId}
urn:...:hoc:{hocId}
declaredUnit
"ton kilometer"
(吨公里)
"ton kilometer"
(吨公里)
"kilogram"
(千克)
unitaryProductAmount
sum(tces[].transportActivity)
(TCE运输活动量总和)
"1"
"1000"
pCfExcludingBiogenic
sum(tces[].co2eWTW)
(TCE全生命周期排放总和)
co2eIntensityWTW
(全生命周期排放强度)
co2eIntensityWTW
(全生命周期排放强度)
dataSchema
URL
.../shipment-footprint.json
.../toc.json
.../hoc.json

productIds URN format

productIds的URN格式

urn:pathfinder:product:customcode:vendor-assigned:{type}:{id}
urn:pathfinder:product:customcode:buyer-assigned:{type}:{id}
Where
{type}
is
shipment
,
toc
, or
hoc
.
urn:pathfinder:product:customcode:vendor-assigned:{type}:{id}
urn:pathfinder:product:customcode:buyer-assigned:{type}:{id}
其中
{type}
shipment
toc
hoc

dataSchema URLs

dataSchema URL

TypeURL
ShipmentFootprint
https://api.ileap.sine.dev/shipment-footprint.json
TOC
https://api.ileap.sine.dev/toc.json
HOC
https://api.ileap.sine.dev/hoc.json
See
references/pact-integration-examples.md
for complete annotated JSON examples of each type.
类型URL
ShipmentFootprint
https://api.ileap.sine.dev/shipment-footprint.json
TOC
https://api.ileap.sine.dev/toc.json
HOC
https://api.ileap.sine.dev/hoc.json
完整的带注释JSON示例请参考
references/pact-integration-examples.md

HTTP API

HTTP API

Authentication

认证流程

  1. Discover token endpoint:
    GET /.well-known/openid-configuration
  2. Obtain token:
    POST /auth/token
    with Basic Auth +
    grant_type=client_credentials
  3. Use token:
    Authorization: Bearer {token}
    on all API calls
See
references/pact-implementation-guide.md
for the full auth contract including request/response formats.
  1. 发现令牌端点:
    GET /.well-known/openid-configuration
  2. 获取令牌:使用Basic认证调用
    POST /auth/token
    ,参数
    grant_type=client_credentials
  3. 使用令牌:在所有API请求中添加
    Authorization: Bearer {token}
完整的认证契约(含请求/响应格式)请参考
references/pact-implementation-guide.md

PACT endpoints

PACT端点

MethodPathDescription
GET
/2/footprints
List ProductFootprints (with iLEAP extensions)
GET
/2/footprints/{id}
Get single ProductFootprint
POST
/2/events
Async event notifications
Supports
$filter
query parameter (OData v4 subset) and
limit
pagination with
Link
header.
方法路径描述
GET
/2/footprints
列出ProductFootprint(含iLEAP扩展)
GET
/2/footprints/{id}
获取单个ProductFootprint
POST
/2/events
异步事件通知
支持
$filter
查询参数(OData v4子集)和
limit
分页,分页信息通过
Link
头返回。

iLEAP endpoint

iLEAP端点

GET /2/ileap/tad?[filter params]&limit={n}
  • Filtering: query parameters as key-value pairs (e.g.,
    ?mode=Road
    )
  • Pagination:
    limit
    param +
    Link: <url>; rel="next"
    header
  • Response:
    { "data": [TAD, ...] }
GET /2/ileap/tad?[filter params]&limit={n}
  • 过滤:使用键值对形式的查询参数(如
    ?mode=Road
  • 分页:通过
    limit
    参数 +
    Link: <url>; rel="next"
    头实现
  • 响应格式
    { "data": [TAD, ...] }

Error codes

错误码

CodeHTTP StatusDescription
AccessDenied
403Invalid or missing token
TokenExpired
401Expired access token
BadRequest
400Malformed request
NoSuchFootprint
404Footprint ID not found
NotImplemented
400Unsupported filter or feature
See
references/known-issues.md
for error code gotchas (e.g.,
NotImplemented
is HTTP 400 not 501).
代码HTTP状态码描述
AccessDenied
403令牌无效或缺失
TokenExpired
401访问令牌已过期
BadRequest
400请求格式错误
NoSuchFootprint
404未找到指定ID的Footprint
NotImplemented
400不支持的过滤条件或功能
错误码的注意事项请参考
references/known-issues.md
(例如
NotImplemented
对应HTTP 400而非501)。

Conformance Testing & ACT

一致性测试与ACT工具

Conformance levels

一致性等级

  1. Emissions Data Conformance: DT#1 + DT#2 (ShipmentFootprint, TOC, HOC via
    /2/footprints
    )
  2. Activity Data Conformance: DT#3 (TAD via
    /2/ileap/tad
    )
  1. 排放数据一致性:支持DT#1 + DT#2(通过
    /2/footprints
    提供ShipmentFootprint、TOC、HOC)
  2. 活动数据一致性:支持DT#3(通过
    /2/ileap/tad
    提供TAD)

Test cases

测试用例

TCDescriptionEndpointExpected
TC001Get ProductFootprint with ShipmentFootprint
GET /2/footprints
200 + valid SF extension
TC002Get ProductFootprint with TOC
GET /2/footprints
200 + valid TOC extension
TC003Get ProductFootprint with HOC
GET /2/footprints
200 + valid HOC extension
TC004Get all TransportActivityData
GET /2/ileap/tad
200 + valid TAD list
TC005Get filtered TAD
GET /2/ileap/tad?mode=Road
200 + filtered results
TC006Get limited TAD
GET /2/ileap/tad?limit=1
200 + max 1 result
TC007TAD with invalid token
GET /2/ileap/tad
403 AccessDenied
TC008TAD with expired token
GET /2/ileap/tad
401 TokenExpired
TC008 note: TC008 requires the server to issue short-lived tokens so ACT can wait for expiry. Most test servers skip this by issuing long-lived tokens — TC008 will then time out or fail.
测试用例编号描述端点预期结果
TC001获取包含ShipmentFootprint的ProductFootprint
GET /2/footprints
200响应 + 有效的SF扩展
TC002获取包含TOC的ProductFootprint
GET /2/footprints
200响应 + 有效的TOC扩展
TC003获取包含HOC的ProductFootprint
GET /2/footprints
200响应 + 有效的HOC扩展
TC004获取所有运输活动数据
GET /2/ileap/tad
200响应 + 有效的TAD列表
TC005获取过滤后的TAD
GET /2/ileap/tad?mode=Road
200响应 + 过滤后的结果
TC006获取指定数量的TAD
GET /2/ileap/tad?limit=1
200响应 + 最多1条结果
TC007使用无效令牌请求TAD
GET /2/ileap/tad
403响应,错误码
AccessDenied
TC008使用过期令牌请求TAD
GET /2/ileap/tad
401响应,错误码
TokenExpired
TC008说明:TC008要求服务器签发短生命周期令牌,以便ACT工具等待令牌过期。大多数测试服务器会签发长生命周期令牌,此时TC008会超时或失败。

ACT (Automated Conformance Testing)

ACT(自动化一致性测试工具)

  • Web UI: https://act.sine.dev
  • CLI:
    references/act/act.sh
    -- downloads and runs binary for current architecture (arm64/x86_64)
sh
undefined
  • Web界面https://act.sine.dev
  • 命令行工具
    references/act/act.sh
    —— 自动下载并运行对应架构(arm64/x86_64)的二进制文件
sh
undefined

Run against demo API

针对演示API运行测试

curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"

```sh
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "https://api.ileap.sine.dev" -u "hello" -p "pathfinder"

```sh

Run against your own API

针对自有API运行测试

curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"

**GitHub Actions integration**:
```yaml
act_test:
  name: ACT Test
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v2
    - name: Run ACT
      run: |
        set -o pipefail
        curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
        bash -s -- test \
        -b "${{ secrets.API_URL }}" \
        -u "${{ secrets.ACT_USER }}" \
        -p "${{ secrets.ACT_PASSWORD }}"
Important ACT constraints:
  • PACT tests require a publicly reachable server — ACT delegates PACT tests to an external service that must reach the API over the internet
  • No iLEAP-only flag — ACT always runs both PACT and iLEAP test suites
  • PACT TC8 and TC18 are known failures even on the SINE reference API (
    api.ileap.sine.dev
    )
See
references/act/README.md
for full CLI options and coverage details.
curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |
bash -s -- test -b "<your-url>" -u "<user>" -p "<password>"

**GitHub Actions集成**:
```yaml
act_test:
  name: ACT Test
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v2
    - name: Run ACT
      run: |
        set -o pipefail
        curl -sSf https://raw.githubusercontent.com/sine-fdn/act/main/act.sh |\
        bash -s -- test \
        -b "${{ secrets.API_URL }}" \
        -u "${{ secrets.ACT_USER }}" \
        -p "${{ secrets.ACT_PASSWORD }}"
ACT工具重要限制
  • PACT测试要求服务器可公开访问——ACT会将PACT测试委托给外部服务,该服务需要通过互联网访问API
  • 无单独的iLEAP测试开关——ACT始终同时运行PACT和iLEAP测试套件
  • 即使在SINE参考API(
    api.ileap.sine.dev
    )上,PACT的TC8和TC18测试用例也会失败
完整的CLI选项和测试覆盖范围请参考
references/act/README.md

Certification

认证

SFC Certification Scheme extension for iLEAP Tool Providers

SFC认证计划针对iLEAP工具提供商的扩展规则

  • Eligibility: must be SFC Certified + implemented DT#1 and DT#2
  • Testing: ACT runs both PACT tests and iLEAP-specific tests
  • Mandatory: DT#1 and DT#2 tests must pass
  • Optional: DT#3 tests (recommended)
  • Remediation: up to 3 attempts at 2-week intervals
  • Validity: matches SFC Certification validity period
See
references/pilot-certification.md
for full certification process details.
  • 资格要求:必须已获得SFC认证,且已实现DT#1和DT#2
  • 测试要求:ACT工具需同时运行PACT测试和iLEAP专属测试
  • 强制通过:DT#1和DT#2的测试用例必须通过
  • 可选测试:DT#3的测试用例(推荐执行)
  • 整改机制:最多可尝试3次,每次间隔2周
  • 有效期:与SFC认证有效期一致
完整的认证流程请参考
references/pilot-certification.md

Verification with SINE Demo API

使用SINE演示API进行验证

The SINE Foundation hosts a public iLEAP-conformant server for testing.
SINE基金会运营一个符合iLEAP规范的公开服务器,用于测试。

Base URL

基础URL

Credentials

凭证

client_idclient_secretScope
hello
pathfinder
Global access to all data
transport_service_user
ileap
ShipmentFootprints + TAD
transport_service_organizer
ileap
TOCs + HOCs + TAD
client_idclient_secret权限范围
hello
pathfinder
全局访问所有数据
transport_service_user
ileap
访问ShipmentFootprints + TAD
transport_service_organizer
ileap
访问TOCs + HOCs + TAD

Step-by-step verification

分步验证指南

sh
undefined
sh
undefined

1. Discover OpenID configuration

1. 发现OpenID配置

2. Obtain access token

2. 获取访问令牌

TOKEN=$(curl -s -X POST https://api.ileap.sine.dev/auth/token
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)
TOKEN=$(curl -s -X POST https://api.ileap.sine.dev/auth/token
-u "hello:pathfinder"
-H "Content-Type: application/x-www-form-urlencoded"
-d "grant_type=client_credentials" | jq -r .access_token)

3. List all footprints

3. 列出所有Footprint

curl -s https://api.ileap.sine.dev/2/footprints
-H "Authorization: Bearer $TOKEN" | jq .
curl -s https://api.ileap.sine.dev/2/footprints
-H "Authorization: Bearer $TOKEN" | jq .

4. Get a specific footprint by ID

4. 根据ID获取指定Footprint

5. List transport activity data

5. 列出运输活动数据

curl -s https://api.ileap.sine.dev/2/ileap/tad
-H "Authorization: Bearer $TOKEN" | jq .
curl -s https://api.ileap.sine.dev/2/ileap/tad
-H "Authorization: Bearer $TOKEN" | jq .

6. Filter TAD by transport mode

6. 按运输方式过滤TAD

curl -s "https://api.ileap.sine.dev/2/ileap/tad?mode=Road"
-H "Authorization: Bearer $TOKEN" | jq .
undefined
curl -s "https://api.ileap.sine.dev/2/ileap/tad?mode=Road"
-H "Authorization: Bearer $TOKEN" | jq .
undefined

Navigating the Specs

规范文档导航

iLEAP spec

iLEAP规范

The normative iLEAP spec is at
references/ileap-extension/specs/index.bs
(Bikeshed format, 3291 lines).
SectionTopicLines
#introduction
Overview, PACT interop23-120
#definitions
ISO14083 and auxiliary terms125-237
#business-cases
Business cases 1-3239-312
#txns
Data transactions DT#1-DT#3315-387
#data-model
Data types (SF, TCE, TOC, HOC, TAD)624-1507
#dt-utility-section
GLECDistance, Location, enums1510-1897
#http-rest-api
TAD endpoint, filtering, pagination1899-2050
#pcf-mapping
PACT integration rules2052-2597
#conformance
Conformance levels2600-2730
#appendix-b
Example JSON (SF, TOC, HOC)2807-3049
#appendix-c
Conformance test cases TC001-TC0083050-3244
正式的iLEAP规范位于
references/ileap-extension/specs/index.bs
(Bikeshed格式,共3291行)。
章节主题行数范围
#introduction
概述、PACT互操作性23-120
#definitions
ISO14083及相关术语定义125-237
#business-cases
业务场景1-3239-312
#txns
数据交易DT#1-DT#3315-387
#data-model
数据类型(SF、TCE、TOC、HOC、TAD)624-1507
#dt-utility-section
GLECDistance、Location、枚举类型1510-1897
#http-rest-api
TAD端点、过滤、分页1899-2050
#pcf-mapping
PACT集成规则2052-2597
#conformance
一致性等级2600-2730
#appendix-b
JSON示例(SF、TOC、HOC)2807-3049
#appendix-c
一致性测试用例TC001-TC0083050-3244

PACT spec

PACT规范

The PACT v2.1.0 spec is at
references/pact-spec-v2/index.bs
(Bikeshed format, 2520 lines).
SectionTopicLines
#intro
Introduction, scope16-70
#terminology
Term definitions73-121
#data-model
Data model overview138-161
#dt-pf
ProductFootprint properties163-334
#dt-carbonfootprint
CarbonFootprint properties337-646
#dt-datamodelextension
DataModelExtension827-852
#dt-declaredunit
DeclaredUnit enum1089-1121
#api-auth
Authentication flow1539-1564
#api-action-auth
Action Authenticate1591-1703
#api-action-list
Action ListFootprints1706-1861
#api-action-get
Action GetFootprint1863-1922
#api-action-events
Action Events1925-2134
#api-error-responses
Error codes table2135-2277
PACT v2.1.0规范位于
references/pact-spec-v2/index.bs
(Bikeshed格式,共2520行)。
章节主题行数范围
#intro
介绍、范围16-70
#terminology
术语定义73-121
#data-model
数据模型概述138-161
#dt-pf
ProductFootprint属性163-334
#dt-carbonfootprint
CarbonFootprint属性337-646
#dt-datamodelextension
DataModelExtension827-852
#dt-declaredunit
DeclaredUnit枚举1089-1121
#api-auth
认证流程1539-1564
#api-action-auth
认证操作1591-1703
#api-action-list
列出Footprint操作1706-1861
#api-action-get
获取Footprint操作1863-1922
#api-action-events
事件操作1925-2134
#api-error-responses
错误码表2135-2277

Grep patterns

常用Grep命令

sh
undefined
sh
undefined

iLEAP: find a data type definition

iLEAP:查找数据类型定义

grep -n '<dfn element>' references/ileap-extension/specs/index.bs
grep -n '<dfn element>' references/ileap-extension/specs/index.bs

iLEAP: find all required properties for a type

iLEAP:查找某类型的所有必填属性

grep -n -A2 '<td>M$' references/ileap-extension/specs/index.bs
grep -n -A2 '<td>M$' references/ileap-extension/specs/index.bs

iLEAP: find PACT mapping rules

iLEAP:查找PACT映射规则

grep -n 'MUST be set to|MUST equal|MUST contain' references/ileap-extension/specs/index.bs
grep -n 'MUST be set to|MUST equal|MUST contain' references/ileap-extension/specs/index.bs

PACT: find property definitions

PACT:查找属性定义

grep -n '<dfn>' references/pact-spec-v2/index.bs | head -40
grep -n '<dfn>' references/pact-spec-v2/index.bs | head -40

PACT: find all mandatory properties

PACT:查找所有必填属性

grep -n '<td>M$' references/pact-spec-v2/index.bs
grep -n '<td>M$' references/pact-spec-v2/index.bs

PACT: find error codes

PACT:查找错误码

grep -n 'dfn>.*Denied|dfn>.*Request|dfn>.*Expired' references/pact-spec-v2/index.bs
undefined
grep -n 'dfn>.*Denied|dfn>.*Request|dfn>.*Expired' references/pact-spec-v2/index.bs
undefined

Reference Files

参考文件

FilePurpose
references/ileap-extension/specs/index.bs
Normative iLEAP spec (Bikeshed source)
references/pact-spec-v2/index.bs
PACT v2.1.0 spec (Bikeshed source)
references/pact-implementation-guide.md
PACT implementation steps (auth, endpoints, data model)
references/known-issues.md
Implementation gotchas and workarounds
references/demo-api-guide.md
iLEAP server implementation patterns
references/openapi.json
OpenAPI contract (non-normative)
references/ileap-data-model/schemas/*.json
JSON schemas for all iLEAP data types
references/pact-data-model/schema/data-model-schema.json
PACT base data model schema
references/pact-integration-examples.md
Annotated PACT integration JSON examples
references/demo-api/
SINE Foundation demo server source (Rust/Rocket)
references/act/README.md
ACT CLI usage, test coverage
references/act/act.sh
ACT runner script (detects arch, downloads binary)
references/pilot-certification.md
SFC certification process for iLEAP
references/whitepaper-v1.md
Strategic context only (not useful for implementation)
文件用途
references/ileap-extension/specs/index.bs
正式iLEAP规范(Bikeshed源文件)
references/pact-spec-v2/index.bs
PACT v2.1.0规范(Bikeshed源文件)
references/pact-implementation-guide.md
PACT实现指南(认证、端点、数据模型)
references/known-issues.md
实现注意事项与解决方案
references/demo-api-guide.md
iLEAP服务器实现模式
references/openapi.json
OpenAPI契约(非官方标准)
references/ileap-data-model/schemas/*.json
所有iLEAP数据类型的JSON模式
references/pact-data-model/schema/data-model-schema.json
PACT基础数据模型模式
references/pact-integration-examples.md
带注释的PACT集成JSON示例
references/demo-api/
SINE基金会演示服务器源码(Rust/Rocket框架)
references/act/README.md
ACT CLI使用说明、测试覆盖范围
references/act/act.sh
ACT运行脚本(自动检测架构、下载二进制文件)
references/pilot-certification.md
iLEAP的SFC认证流程
references/whitepaper-v1.md
仅含战略背景信息(对实现无帮助)