リクエストの準備
マニフェストの作成には、貨物データを適切な構造に整理する必要があります。APIは階層的なアプローチを使用し、まずマニフェストを作成し、次に個別の貨物詳細を含むマニフェスト明細行を追加します。
各コンポーネントには、通関コンプライアンスと正確な書類作成を確保するための特定の必須フィールドがあります。以下に、必須のデータ構造と入力項目を示します。
主要な入力タイプ
マニフェストAPIは、貨物データを整理するために複数の入力タイプを使用します。
ManifestInput: 空港、waybillタイプ、フライト詳細などの高レベル貨物情報ManifestLineInput: マニフェストにリンクされた個別貨物の詳細ManifestLineItemInput: 通関分類のための商品情報CreatePartyInput: 出発地および目的地の当事者と所在地の詳細
完全なフィールド定義とオプションは、GraphQL API リファレンスでご確認ください。
API経由でマニフェストを作成する
貨物データを整理したら、GraphQL mutationを送信してマニフェストを作成します。
ステップ1: マニフェストヘッダーを作成する
1
mutation ManifestCreate($input: ManifestInput!) {2
manifestCreate(input: $input) {3
id4
amount5
arrivalDate6
awbNumber7
awbPrefix8
carrierCode9
createdAt10
createdBy11
destinationCode12
operatorDestination13
operatorOrigin14
originCode15
postalOperatorCode16
serviceNumber17
source18
transportationMode19
updatedAt20
updatedBy21
weight22
weightUnit23
statusTransitions {24
createdAt25
createdBy26
note27
source28
}29
lines(first: 5) {30
totalCount31
edges {32
cursor33
node {34
id35
trackingNumber36
endUse37
currencyCode38
createdAt39
createdBy40
updatedAt41
updatedBy42
landedCost {43
id44
}45
}46
}47
}48
}49
}RESPONSE
json
{
"data": {
"manifestCreate": {
"id": "manifest_abc123def456",
"amount": "0",
"arrivalDate": "2026-03-15T14:30:00.000Z",
"awbNumber": "1234",
"awbPrefix": "001",
"carrierCode": "AA",
"createdAt": "2026-01-06T12:00:00.000Z",
"createdBy": "organization_xyz789",
"destinationCode": "JFK",
"operatorDestination": "US",
"originCode": "LHR",
"postalOperatorCode": "J1CGBA",
"serviceNumber": "1234",
"source": "API",
"transportationMode": "AIR",
"updatedAt": "2026-01-06T12:00:00.000Z",
"updatedBy": "organization_xyz789",
"weight": "0",
"weightUnit": "KILOGRAM",
"statusTransitions": [],
"lines": {
"totalCount": 0,
"edges": []
}
}
}
}
ステップ2: マニフェスト明細行を追加する
manifestCreate mutationから返されたIDを使用して、個別の貨物をマニフェストにリンクできます。
1
mutation ManifestLineCreate($manifestId: ID!, $input: ManifestLineInput!) {2
manifestLineCreate(manifestId: $manifestId, input: $input) {3
id4
manifestId5
trackingNumber6
endUse7
currencyCode8
referenceNumber9
arrivalDate10
createdAt11
createdBy12
updatedAt13
updatedBy14
landedCost {15
id16
}17
}18
}RESPONSE
json
{
"data": {
"manifestLineCreate": {
"id": "manifest_line_def456ghi789",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX123456789GB",
"endUse": "NOT_FOR_RESALE",
"currencyCode": "USD",
"referenceNumber": "ORDER-2026-001",
"arrivalDate": "2026-03-15T14:30:00.000Z",
"createdAt": "2026-01-06T12:05:00.000Z",
"createdBy": "organization_xyz789",
"updatedAt": "2026-01-06T12:05:00.000Z",
"updatedBy": "organization_xyz789",
"landedCost": null
}
}
}
ステップ3: 複数のマニフェスト明細行を追加する(バッチ)
効率化のため、manifestLinesCreate mutationを使用して単一のリクエストで複数のマニフェスト明細行を追加できます。各明細行には、貨物の出発地と目的地を定義する独自の parties 配列が必要です。
1
mutation ManifestLinesCreate($manifestId: ID!, $input: [ManifestLineInput!]!) {2
manifestLinesCreate(manifestId: $manifestId, input: $input) {3
id4
manifestId5
trackingNumber6
endUse7
currencyCode8
createdAt9
}10
}RESPONSE
json
{
"data": {
"manifestLinesCreate": [
{
"id": "manifest_line_aaa111bbb222",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX123456789GB",
"endUse": "NOT_FOR_RESALE",
"currencyCode": "USD",
"createdAt": "2026-01-06T12:10:00.000Z"
},
{
"id": "manifest_line_ccc333ddd444",
"manifestId": "manifest_abc123def456",
"trackingNumber": "LX987654321GB",
"endUse": "GIFT",
"currencyCode": "USD",
"createdAt": "2026-01-06T12:10:00.000Z"
}
]
}
}
ステップ4: マニフェストを更新する
フライト詳細が変更された場合、以下のmutationを使用してマニフェストの詳細を更新できます。source フィールドは必須で、更新のデータソースを示します。
1
mutation ManifestUpdate($id: ID!, $input: ManifestUpdateInput!) {2
manifestUpdate(id: $id, input: $input) {3
id4
amount5
arrivalDate6
awbNumber7
awbPrefix8
carrierCode9
createdAt10
createdBy11
destinationCode12
operatorDestination13
operatorOrigin14
originCode15
postalOperatorCode16
serviceNumber17
source18
transportationMode19
updatedAt20
updatedBy21
weight22
weightUnit23
statusTransitions {24
createdAt25
createdBy26
note27
source28
}29
}30
}RESPONSE
json
{
"data": {
"manifestUpdate": {
"id": "manifest_abc123def456",
"amount": "150.50",
"arrivalDate": "2026-03-16T10:00:00.000Z",
"awbNumber": "5678",
"awbPrefix": "001",
"carrierCode": "BA",
"createdAt": "2026-01-06T12:00:00.000Z",
"createdBy": "organization_xyz789",
"destinationCode": "JFK",
"operatorDestination": "US",
"originCode": "LHR",
"postalOperatorCode": "J1CGBA",
"serviceNumber": "5678",
"source": "RESDIT",
"transportationMode": "AIR",
"updatedAt": "2026-01-06T14:30:00.000Z",
"updatedBy": "organization_xyz789",
"weight": "25.5",
"weightUnit": "KILOGRAM",
"statusTransitions": [
{
"createdAt": "2026-01-06T14:30:00.000Z",
"createdBy": "organization_xyz789",
"note": "Flight rescheduled due to weather",
"source": "RESDIT"
}
]
}
}
}
データソースの値
ManifestUpdateInput の source フィールドは以下の値を受け付けます。
| 値↕ | 説明↕ |
|---|---|
CARDIT | キャリアデータ交換 |
PRECON | 事前貨物通知 |
PREDES | 事前発送通知 |
RESDIT | 発送への応答 |
米国向け貨物の通関マニフェストを準備する。
インバウンド郵便貨物データをZonosに提供します。Zonosは、米国向け郵便貨物に必要なすべての情報を含む包括的な通関マニフェストを準備します。