📈

【Shopify.dev和訳】Admin API/GraphQL ref/Shipping & fulfillment②

2021/10/02に公開

この記事について

この記事は、Admin APIs/GraphQL reference/Shipping and fulfillmentの記事を和訳したものです。

記事内で使用する画像は、公式ドキュメント内の画像を引用して使用させていただいております。

Shopify アプリのご紹介

Shopify アプリである、「商品ページ発売予告アプリ | リテリア Coming Soon」は、商品ページを買えない状態のまま、発売日時の予告をすることができるアプリです。Shopify で Coming Soon 機能を実現することができます。

https://apps.shopify.com/shopify-application-314?locale=ja&from=daniel

Shopify アプリである、「らくらく日本語フォント設定|リテリア Font Picker」は、ノーコードで日本語フォントを使用できるアプリです。日本語フォントを導入することでブランドを演出することができます。

https://apps.shopify.com/font-picker-1?locale=ja&from=daniel

Shipping and fulfillment APIs (OBJECTS 中盤)

DeliveryMethodDefinition

内容 | On this page

フィールド | Fields

active (Boolean!)
このメソッド定義がアクティブであるかどうか。

description (String)
メソッド定義の説明。

id (ID!)
グローバルに一意な識別子。

methodConditions ([DeliveryCondition!]!)
このメソッド定義が注文に適用されるために通過しなければならないメソッドの条件。

name (String!)
メソッド定義の名前。

rateProvider (DeliveryRateProvider!)
レート定義または参加者から、このメソッド定義に提供されたレート。

DeliveryMethodDefinition を返す型 | Types that return DeliveryMethodDefinition

実装 | Implements

複数の DeliveryMethodDefinitions をページングするために自動生成される型です。

On this page

フィールド | Field

edges ([DeliveryMethodDefinitionEdge!]!)
エッジのリスト。

pageInfo (PageInfo!)
ページネーションを補助するための情報。

自動生成されたタイプで、1 つの DeliveryMethodDefinition とページネーション時のカーソルを保持します。

内容 | On this page

フィールド | Field

cursor (String!)
ページネーションで使用するためのカーソルです。

node (DeliveryMethodDefinition!)
DeliveryMethodDefinitionEdge の末尾の項目。

DeliveryMethodDefinitionEdge を返す型 | Types that return DeliveryMethodDefinitionEdge

サンプル | Samples

Query 1
# 配送方法定義のIDを取得
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                methodDefinitions (first:2) {
                  edges {
                    node {
                      id
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 1
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/66760507414"
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "id": "gid://shopify/DeliveryMethodDefinition/66760605718"
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 16,
      "actualQueryCost": 14,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 892,
        "restoreRate": 50
      }
    }
  }
}
Query 2

# 配送レートとメソッドを適用するために満たすべき条件を取得する
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                methodDefinitions (first:2) {
                  edges {
                    node {
                      active
                      description
                      id
                      name
                      rateProvider {
                        __typename
                      }
                      methodConditions {
                        id
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 2
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "active": true,
                                "description": null,
                                "id": "gid://shopify/DeliveryMethodDefinition/66760507414",
                                "name": "canada_post",
                                "rateProvider": {
                                  "__typename": "DeliveryParticipant"
                                },
                                "methodConditions": []
                              }
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "methodDefinitions": {
                          "edges": [
                            {
                              "node": {
                                "active": true,
                                "description": null,
                                "id": "gid://shopify/DeliveryMethodDefinition/66760605718",
                                "name": "canada_post",
                                "rateProvider": {
                                  "__typename": "DeliveryParticipant"
                                },
                                "methodConditions": []
                              }
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 24,
      "actualQueryCost": 18,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 982,
        "restoreRate": 50
      }
    }
  }
}

DeliveryMethodDefinitionCounts

次に、ゾーン内の方式定義の数を、マーチャントが所有する方式定義と参加者が所有する方式定義に分けます。

内容 | On this page

フィールド | Fields

participantDefinitionsCount (Int!)
現在のゾーンでの参加者メソッド定義の数。

rateDefinitionsCount (Int!)
現在のゾーンにある商人定義のメソッド定義の数。

DeliveryMethodDefinitionCounts を返す型 | Types that return DeliveryMethodDefinitionCounts

DeliveryParticipant

キャリアが定義したレートに、マーチャントが定義した固定料金またはレートに対するパーセンテージ料金を加えることができる。

内容 | On this page

フィールド | Fields

adaptToNewServicesFlag (Boolean!)
新しく利用できるサービスを含めるべきかどうかを示すフラグ。

carrierService (DeliveryCarrierService!)
この参加者にこのキャリアサービスを使用する。

fixedFee (MoneyV2)
この参加者に対する、マーチャントが設定した固定料金。

id (ID!)
グローバルに一意な識別子。

participantServices ([DeliveryParticipantService!]!)
参加者が提供するサービスとそのアクティブな状態。

percentageOfRateFee (Float!)
この参加者に対するマーチャント設定のパーセンテージオブレートフィー。

実装 | Implements

DeliveryParticipantService

参加者が提供するサービスです。

内容 | On this page

フィールド | Fields

active (Boolean!)
サービスがアクティブかどうか。

name (String!)
サービスの名前。

DeliveryParticipantService を返す型 | Types that return DeliveryParticipantService

DeliveryProductVariantsCount

1 つのプロファイルに含まれる製品バリエーションの数。500 個が上限です。

内容 | On this page

フィールド | Fields

capped (Boolean!)
カウントが上限の 500 に達した場合。

count (Int!)
商品バリエーションのカウント。

DeliveryProductVariantsCount を返す型 | Types that return DeliveryProductVariantsCount

DeliveryProfile

マルチロケーションで製品ごとに配送するためのプロファイルです。

内容 | On this page

接続先 | Connection

profileItems (DeliveryProfileItemConnection!)
このプロファイルに関連する製品とバリアント。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false
sortKeyProfileItemSortKeys (ProfileItemSortKeys) 指定されたキーでリストをソートします。この引数は非推奨です。プロファイル・アイテムのソートはサポートされなくなりました。
デフォルト値 : ID

sellingPlanGroups (SellingPlanGroupConnection!)
指定された配送プロファイルに関連する販売計画グループ。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false

フィールド | Fields

activeMethodDefinitionsCount (Int!)
プロファイルのアクティブな配送料金の数です。

default (Boolean!)
このプロファイルがデフォルトのプロファイルであるかどうか。

id (ID!)
グローバルに一意な識別子。

legacyMode (Boolean!)
このストアが配送プロファイルのレガシー互換モードを有効にしているかどうか。

locationWithoutRatesCount (Int!)
レートが定義されていないロケーションの数。

name (String!)
配送プロファイルの名前。

originLocationCount (Int!)
プロファイルのアクティブなオリジンロケーションの数です。

productVariantsCountV2 (DeliveryProductVariantsCount!)
このプロファイルに含まれる製品バリアントの数。

profileLocationGroups ([DeliveryProfileLocationGroup!]!)
このプロファイルを使用しているロケーショングループと関連ゾーンです。

unassignedLocations ([Location!]!)
このプロファイルのロケーショングループに割り当てられていないロケーションのリスト。

zoneCountryCount (Int!)
配送先として有効なレートを持つ国の数。

DeliveryProfile を返す型 | Types that return DeliveryProfile

DeliveryProfile のミューテーション | Mutation for DeliveryProfile

deliveryProfileCreate
配送プロファイルを作成します。

deliveryProfileRemove
配送プロファイルの削除/解除をエンキューします。

deliveryProfileUpdate
配送プロファイルの更新を行います。

実装 | Implements

非推奨フィールド | Deprecated fields

productVariantsCount (Int!) deprecated
このプロファイルの製品バリアントの数です。デフォルトのプロファイルのカウントはサポートされておらず、-1 を返します。

複数の DeliveryProfile をページングするための自動生成される型です。

フィールド | Fields

edges ([DeliveryProfileEdge!]!)
エッジのリスト。

pageInfo (PageInfo!)
ページネーションを補助するための情報。

自動生成された型で、1 つの DeliveryProfile とページネーション時のカーソルを保持します。

フィールド | Fields

cursor (String!)
ページネーションで使用するためのカーソルです。

node (DeliveryProfile!)
DeliveryProfileEdge の末尾の項目。

DeliveryProfileEdge を返す型 | Types that return DeliveryProfileEdge

サンプル | Samples

Query 1
# 最初の10件の配送プロファイルを取得
{
  deliveryProfiles(first:10) {
    edges {
      node {
        id
        name
        default
      }
    }
  }
}
Response 1
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "id": "gid://shopify/DeliveryProfile/20602617878",
            "name": "General Profile",
            "default": true
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 12,
      "actualQueryCost": 3,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 997,
        "restoreRate": 50
      }
    }
  }
}
Query 2

# 配送プロファイルをIDで取得
{
  deliveryProfile(id:"gid://shopify/DeliveryProfile/20602617878") {
    name
  }
}
Response 2
{
  "data": {
    "deliveryProfile": {
      "name": "General Profile"
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 1,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 999,
        "restoreRate": 50
      }
    }
  }
}
Query 3

# QueryRoot.nodeフィールドとGraphQLフラグメントを使用した配送プロファイルの取得
{
  node(id:"gid://shopify/DeliveryProfile/20602617878") {
    id
    ...on DeliveryProfile {
      name
    }
  }
}
Response 3
{
  "data": {
    "node": {
      "id": "gid://shopify/DeliveryProfile/20602617878",
      "name": "General Profile"
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 1,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 999,
        "restoreRate": 50
      }
    }
  }
}
Query 4

# 配送プロファイルに関連付けられた製品バリエーションを取得
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileItems (first: 2) {
          edges {
            node {
              product {
                id
                handle
              }
              variants (first: 2) {
                edges {
                  node {
                    id
                    title
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 4
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileItems": {
              "edges": [
                {
                  "node": {
                    "product": {
                      "id": "gid://shopify/Product/1974208299030",
                      "handle": "rough-snowflake-camisole"
                    },
                    "variants": {
                      "edges": [
                        {
                          "node": {
                            "id": "gid://shopify/ProductVariant/19523123216406",
                            "title": "Default Title"
                          }
                        }
                      ]
                    }
                  }
                },
                {
                  "node": {
                    "product": {
                      "id": "gid://shopify/Product/1974208331798",
                      "handle": "wandering-thunder-blouse"
                    },
                    "variants": {
                      "edges": [
                        {
                          "node": {
                            "id": "gid://shopify/ProductVariant/19523123249174",
                            "title": "Default Title"
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 17,
      "actualQueryCost": 15,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 985,
        "restoreRate": 50
      }
    }
  }
}

DeliveryProfileItem

製品と、この配送プロファイルの一部である関連するバリアントのサブセットです。

接続先 | Connection

variants (ProductVariantConnection!)
この配送プロファイルに関連する製品バリアント。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false
sortKeys (ProductVariantSortKeys) 指定されたキーで基礎となるリストをソートします。この引数は、非推奨です。プロファイル アイテム バリアント ソートはサポートされなくなりました。
デフォルト値 : ID

フィールド | Fields

product (Product!)
このプロファイルに関連する製品です。

DeliveryProfileItem を返す型 | Types that return DeliveryProfileItem

複数の DeliveryProfileItems をページングするために自動生成される型です。

フィールド | Fields

edges ([DeliveryProfileItemEdge!]!)
エッジのリストです。

pageInfo (PageInfo!)
ページネーションを補助するための情報。

自動生成された型で、1 つの DeliveryProfileItem とページネーション中のカーソルを保持します。

フィールド | Fields

cursor (String!)
ページネーションで使用するカーソルです。

node (DeliveryProfileItem!)
DeliveryProfileItemEdge の末尾のアイテム。

DeliveryProfileItemEdge を返す型 | Types that return DeliveryProfileItemEdge

DeliveryProfileLocationGroup

ロケーショングループと配送プロファイルに関連付けられたゾーンをリンクします。

接続先 | Connections

locationGroupZones (DeliveryLocationGroupZoneConnection!)
ロケーショングループと配送プロファイルに関連する適用ゾーン。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false

フィールド | Fields

countriesInAnyZone ([DeliveryCountryAndZone!]!)
指定されたロケーショングループと配送プロファイルに対して、任意のゾーンですでに選択されている国を指定します。

locationGroup (DeliveryLocationGroup!)
配送プロファイルに関連付けられたロケーショングループ。

DeliveryProfileLocationGroup を返す型 | Types that return DeliveryProfileLocationGroup

DeliveryProvince

ゾーンを定義するために使用される地域。

フィールド | Fields

code (String!)
この地域のコードです。

id (ID!)
グローバルに一意な識別子。

name (String!)
この地域の名前。

translatedName (String!)
ユーザーロケールに基づいて翻訳された地域の名前。

DeliveryProvince を返す型 | Types that return DeliveryProvince

実装 | Implements

サンプル | Samples

Query 1
# 配送地域のIDを取得
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                zone {
                  id
                  countries {
                    provinces {
                      id
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 1
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308061718",
                          "countries": [
                            {
                              "provinces": [
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077344790"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077377558"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077410326"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077443094"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077475862"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077508630"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077541398"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077574166"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077606934"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077639702"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077672470"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077705238"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077738006"
                                }
                              ]
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308160022",
                          "countries": [
                            {
                              "provinces": []
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 14,
      "actualQueryCost": 14,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 986,
        "restoreRate": 50
      }
    }
  }
}
Query 2

# 商品の配送可能な地域を取得します。
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                zone {
                  id
                  countries {
                    provinces {
                      id
                      code
                      name
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 2
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308061718",
                          "countries": [
                            {
                              "provinces": [
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077344790"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077377558"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077410326"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077443094"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077475862"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077508630"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077541398"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077574166"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077606934"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077639702"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077672470"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077705238"
                                },
                                {
                                  "id": "gid://shopify/DeliveryProvince/1672077738006"
                                }
                              ]
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308160022",
                          "countries": [
                            {
                              "provinces": []
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 14,
      "actualQueryCost": 14,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 986,
        "restoreRate": 50
      }
    }
  }
}

DeliveryRateDefinition

DeliveryMethodDefinition のマーチャント定義のレートです。

フィールド | Fields

id (ID!)
グローバルに一意な識別子。

price (MoneyV2!)
このレートの価格です。

実装 | Implements

DeliverySetting

デリバリーショップレベルの設定。

フィールド | Fields

legacyModeBlocked (DeliveryLegacyModeBlocked!)
ストアがマルチロケーション配送プロファイルモードへの変換をブロックされているかどうか。ショップがブロックされている場合は、ブロックの理由も返されます。

legacyModeProfiles (Boolean!)
マルチロケーション配送プロファイル機能のレガシー互換性モードを有効にします。

DeliverySetting を返す型 | Types that return DeliverySetting

DeliverySetting のミューテーション | Mutations for DeliverySetting

deliverySettingUpdate
ストアの配送設定を行います。

DeliveryZone

ゾーンとは、配送プロファイル内の配送方法を含む地理的なエリアのことです。

フィールド | Fields

countries ([DeliveryCountry!]!)
ゾーン内の国のリストです。

id (ID!)
グローバルに一意な識別子。

name (String!)
ゾーンの名前。

DeliveryZone を返す型 | Types that return DeliveryZone

実装 | Implements

サンプル | Samples

Query 1
# Get the ID of the delivery zone
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                zone {
                  id
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 1
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308061718"
                        }
                      }
                    },
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308160022"
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 990,
        "restoreRate": 50
      }
    }
  }
}
Query 2

# Get the delivery zones where products can be shipped to
{
  deliveryProfiles (first: 1) {
    edges {
      node {
        profileLocationGroups {
          locationGroupZones (first: 2) {
            edges {
              node {
                zone {
                  id
                  name
                  countries {
                    name
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
Response 2
{
  "data": {
    "deliveryProfiles": {
      "edges": [
        {
          "node": {
            "profileLocationGroups": [
              {
                "locationGroupZones": {
                  "edges": [
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308061718",
                          "name": "Domestic",
                          "countries": [
                            {
                              "name": "Canada"
                            }
                          ]
                        }
                      }
                    },
                    {
                      "node": {
                        "zone": {
                          "id": "gid://shopify/DeliveryZone/41308160022",
                          "name": "Rest of world",
                          "countries": [
                            {
                              "name": "Rest of World"
                            }
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 12,
      "actualQueryCost": 12,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 973,
        "restoreRate": 50
      }
    }
  }
}

DraftFulfillment

フルフィルメントサービスごとにグループ化された未充足のラインアイテムを返します。フルフィルメントのドラフトには、そのフルフィルメントが配送を必要とするかどうか、配送ラベルを印刷できるかどうかなどの追加情報が含まれています。

フィールド | Fields

allowLabelPurchase (Boolean!)
ラベルの購入が可能かどうか。

lineItems ([LineItem!]!)
このドラフトフルフィルメントの一部であるラインアイテム(バリアントに対応する可能性があります)。

requiresShipping (Boolean!)
フルフィルメントが配送を必要とするかどうか。

service (FulfillmentService!)
フルフィルメントを実現するためのサービス。

EditableProperty

属性の編集可能な情報です。

フィールド | Fields

locked (Boolean!)
その属性が編集のためにロックされているかどうか。

reason (FormattedString)
属性が編集用にロックされている理由。

EditableProperty を返す型 | Types that return EditableProperty

Fulfillment

フルフィルメントを表します。Shopify では、フルフィルメントは、注文に含まれる 1 つまたは複数のアイテムの出荷を表します。

注文が完全に履行された場合、それは注文に含まれるすべてのアイテムがお客様に送信されたことを意味します。

ひとつの注文に対して、複数のフルフィルメントを設定することができます。

接続先 | Connection

events (FulfillmentEventConnection!)
このフルフィルメントに関連するイベントの履歴です。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false
sortKey (FulfillmentEvenSortKeys) 指定されたキーでリストをソートします。
デフォルト値 : HAPPENED_AT

fulfillmentLineItems (FulfillmentLineItemConnection!)
フルフィルメントのラインアイテムのリスト。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false

fulfillmentOrders (FulfillmentOrderConnection!)
フルフィルメントのフルフィルメントオーダーのリスト。

Argument Description
after (String) 指定されたカーソルの後にある要素を返します。
before (String) 指定されたカーソルの前にある要素を返します。
first (Int) リストの最初から n 個目の要素までを返します。
last (Int) リストの最後から n 個目の要素までを返します。
reverse (Boolean) 対象となるリストの順序を逆にします。
デフォルト値 : false

フィールド | Fields

createdAt (DateTime!)
フルフィルメントが作成された日付と時間。

deliveredAt (DateTime)
このフルフィルメントが配送された日付。

displayStatus (FulfillmentDisplayStatus)
このフルフィルメントの人間が読める表示ステータス。

estimatedDeliveryAt (Datetime)
このフルフィルメントが到着する予定日。

id (ID!)
グローバルに一意な識別子。

inTransitAt (DateTime)
フルフィルメントが輸送中になった日付と時間。

legacyResourceId (UnsignedInt64!)
REST 管理 API 内の対応するリソースの ID。

location (Location)
フルフィルメントが処理された場所。

name (String!)
このフルフィルメントの人間が読める参照識別子。

order (Order!)
フルフィルメントが作成された注文です。

requiresShipping (Boolean!)
フルフィルメント内のいずれかのラインアイテムが配送を必要とするかどうか。

service (FulfillmentService)
フルフィルメントに関連するフルフィルメントサービス。

status (FulfillmentStatus!)
フルフィルメントのステータス。

totalQuantity (Int!)
フルフィルメントのすべてのラインアイテムの数量の合計。

trackingInfo ([FulfillmentTrackingInfo!]!)
フルフィルメントに関連するトラッキング情報(トラッキング会社、トラッキング番号、トラッキング URL など)。

Argument Description
first (Int) 配列の結果をこのサイズに切り詰めます。

updatedAt (DateTime!)
フルフィルメントが最後に修正された日付と時間です。

Fulfillment を返す型 | Types that return Fulfillment

Fulfillment のミューテーション | Mutation for Fulfillment

fulfillmentCancel
フルフィルメントをキャンセルします。

fulfillmentCreateV2
1 つまたは複数のフルフィルメント注文のフルフィルメントを作成します。フルフィルメント注文は、同じ注文に関連付けられ、同じ場所に割り当てられます。

実装 | Implements

複数の Fulfillment をページングするための自動生成される型。

フィールド | Fields

edges ([FulfillmentEdge!]!)
エッジのリスト。

pageInfo (PageInfo!)
ページネーションを補助するための情報。

ページネーションの際に 1 つの Fulfillment とカーソルを保持する自動生成の型。

フィールド | Fields

cursor (String!)
ページネーションで使用するためのカーソルです。

node (Fulfillment!)
FulfillmentEdge の末尾の項目。

FulfillmentEdge を返す型 | Types that return FulfillmentEdge

サンプル | Samples

Query 1
# Orderオブジェクトを使用して最初の10件のフルフィルメントを取得する
{
  order(id: "gid://shopify/Order/1248358563862") {
    fulfillments(first:10){
      id
    }
  }
}

Response 1
{
  "data": {
    "order": {
      "fulfillments": [
        {
          "id": "gid://shopify/Fulfillment/1114431586326"
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 2,
      "actualQueryCost": 2,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 998,
        "restoreRate": 50
      }
    }
  }
}
Query 2
# FulfillmentOrder オブジェクトを使用して最初の 10 件のフルフィルメントを取得します。
{
  fulfillmentOrder(id: "gid://shopify/FulfillmentOrder/323409412118") {
    fulfillments(first:10) {
      edges {
        node {
          id
        }
      }
    }
  }
}

Response 2
{
  "data": {
    "fulfillmentOrder": {
      "fulfillments": {
        "edges": [
          {
            "node": {
              "id": "gid://shopify/Fulfillment/1114431586326"
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 13,
      "actualQueryCost": 4,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 996,
        "restoreRate": 50
      }
    }
  }
}
Query 3

# フルフィルメントの状態を取得する
{
  fulfillment(id: "gid://shopify/Fulfillment/1114431586326") {
    id
    status
  }
}
Response 3
{
  "data": {
    "fulfillment": {
      "id": "gid://shopify/Fulfillment/1114431586326",
      "status": "SUCCESS"
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 1,
      "actualQueryCost": 1,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 999,
        "restoreRate": 50
      }
    }
  }
}
Query 4
# フルフィルメントの出荷、配送、位置情報の取得
{
  fulfillment(id: "gid://shopify/Fulfillment/1114431586326") {
    id
    createdAt
    updatedAt
    deliveredAt
    displayStatus
    legacyResourceId
    location {
      id
    }
    name
    requiresShipping
    status
    totalQuantity
  }
}
Response 4
{
  "data": {
    "fulfillment": {
      "id": "gid://shopify/Fulfillment/1114431586326",
      "createdAt": "2020-09-01T18:45:25Z",
      "updatedAt": "2020-09-01T18:45:25Z",
      "deliveredAt": null,
      "displayStatus": "FULFILLED",
      "legacyResourceId": "1114431586326",
      "location": {
        "id": "gid://shopify/Location/17285971990"
      },
      "name": "#1001-F1",
      "requiresShipping": true,
      "status": "SUCCESS",
      "totalQuantity": 1
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 2,
      "actualQueryCost": 2,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 998,
        "restoreRate": 50
      }
    }
  }
}
Query 5
# ノードフィールドとGraphQLフラグメントを使って、特定のフルフィルメントを検索する
{
  node(id:"gid://shopify/Fulfillment/1114431586326") {
    ...on Fulfillment {
    id
    createdAt
    updatedAt
    deliveredAt
    displayStatus
    legacyResourceId
    location {
      id
    }
    name
    requiresShipping
    status
    totalQuantity
    }
  }
}
Response 5
{
  "data": {
    "node": {
      "id": "gid://shopify/Fulfillment/1114431586326",
      "createdAt": "2020-09-01T18:45:25Z",
      "updatedAt": "2020-09-01T18:45:25Z",
      "deliveredAt": null,
      "displayStatus": "FULFILLED",
      "legacyResourceId": "1114431586326",
      "location": {
        "id": "gid://shopify/Location/17285971990"
      },
      "name": "#1001-F1",
      "requiresShipping": true,
      "status": "SUCCESS",
      "totalQuantity": 1
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 2,
      "actualQueryCost": 2,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 998,
        "restoreRate": 50
      }
    }
  }
}

Shopify アプリのご紹介

Shopify アプリである、「商品ページ発売予告アプリ | リテリア Coming Soon」は、商品ページを買えない状態のまま、発売日時の予告をすることができるアプリです。Shopify で Coming Soon 機能を実現することができます。

https://apps.shopify.com/shopify-application-314?locale=ja&from=daniel

Shopify アプリである、「らくらく日本語フォント設定|リテリア Font Picker」は、ノーコードで日本語フォントを使用できるアプリです。日本語フォントを導入することでブランドを演出することができます。

https://apps.shopify.com/font-picker-1?locale=ja&from=daniel

Discussion

ログインするとコメントできます