Shopify APIとデータモデルのRESTからGRAPHQLへの移行による主な変更点(Orders関連)

by 周建强 | June 12, 2025

Shopify-Rest2GraphQL-Orders

こんにちは。プロダクトチームの周です。

Shopify REST Admin API は2024年10月1日をもってレガシーとなったことに伴い、Shopify 連携のCData 製品でご利用のデータモデルについて、「REST Data Model」から「GRAPHQL Data Model」への移行を強くお勧めいたします。REST とGRAPHQL データモデルでは、利用可能なテーブル、ビュー、ストアドプロシージャに仕様上の違いが数多くありますため、GRAPHQL への移行に際しては、これらの違いを十分にご確認いただいた上で、計画的な移行を実施していただく必要があります。本記事ではGRAPHQL への移行による主な変更点(Orders関連)を案内いたします。

※Productsに関連する主な変更点はこちらのブログ記事をご参照ください。

※Fulfillment,Inventory,Customersに関連する主な変更点はこちらのブログ記事をご参照ください。

◆ Orders (REST) → (GRAPHQL) Orders

REST-2025-04.
Orders

GRAPHQL-2025-04.
Orders

GRAPHQLに関する注記

AppliedDiscountAmount

DraftOrders.AppliedDiscountAmountV2Amount

 

AppliedDiscountDescription

DraftOrders.AppliedDiscountDescription

 

AppliedDiscountTitle

DraftOrders.AppliedDiscountTitle

 

AppliedDiscountValue

DraftOrders.AppliedDiscountValue

 

AppliedDiscountValueType

DraftOrders.AppliedDiscountValueType

 

BillingAddressCountryCode

BillingAddressCountryCodeV2

 

BillingAddressDefault

✕ (GRAPHQL未対応)

 

BrowserIp

ClientIp

 

BuyerAcceptsMarketing

CustomerAcceptsMarketing

 

CartToken

✕ (GRAPHQL未対応)

 

CheckoutId

✕ (GRAPHQL未対応)

CheckoutToken

✕ (GRAPHQL未対応)

Currency

CurrencyCode

 

CurSubtotalPriceSetPresentmentMoneyAmount

CurrentSubtotalPriceSetPresentmentMoneyAmount

 

CurSubtotalPriceSetShopMoneyAmount

CurrentSubtotalPriceSetShopMoneyAmount

 

CurTotalAdditionalFeesSetPresentmentMoneyAmount

CurrentTotalAdditionalFeesSetPresentmentMoneyAmount

 

CurTotalAdditionalFeesSetShopMoneyAmount

CurrentTotalAdditionalFeesSetShopMoneyAmount

 

CurTotalDiscountsSetPresentmentMoneyAmount

CurrentTotalDiscountsSetPresentmentMoneyAmount

 

CurTotalDiscountsSetShopMoneyAmount

CurrentTotalDiscountsSetShopMoneyAmount

 

DiscountApplicationsAggregate

OrderDiscountApplications.*

 

FinancialStatus

DisplayFinancialStatus

 

FulfillmentAggregate

Fulfillments.*

 

FulfillmentStatus

DisplayFulfillmentStatus

 

Id

Id , LegacyResourceId

GRAPHQLの「Id」はRESTと異なるフォーマットを持つグローバルID。

InventoryBehaviour

OptionsInventoryBehaviour

疑似カラム

InvoiceSentAt

DraftOrders.InvoiceSentAt

InvoiceUrl

DraftOrders.InvoiceUrl

 

LandingSite

CustomerJourneySummaryFirstVisitLandingPage
CustomerJourneySummaryLastVisitLandingPage

 

LineAggregate

OrderLineItems.*

 

LocationId

PhysicalLocationId

 

NoteAttributesAggregate

OrderCustomAttributes.*

 

Operation

OrderCancel(ストアドプロシージャ)

Cancel以外は未対応

OrderStatusUrl

StatusPageUrl

OrigTotalAdditionalFeesSetPresentmentMoneyAmount

OriginalTotalAdditionalFeesSetPresentmentMoneyAmount

 

OrigTotalAdditionalFeesSetShopMoneyAmount

OriginalTotalAdditionalFeesSetShopMoneyAmount

 

PaymentTermsAmount

✕ (GRAPHQL未対応)

 

PaymentTermsCurrency

✕ (GRAPHQL未対応)

 

PaymentTermsPaymentSchedules

未対応

PresentmentCurrency

PresentmentCurrencyCode

ReferringSite

CustomerJourneySummaryFirstVisitReferrerUrl
CustomerJourneySummaryLastVisitReferrerUrl

RefundAggregate

Refunds.*

SendFulfillmentReceipt

OptionsSendFulfillmentRequest

疑似カラム

SendReceipt

OptionsSendReceipt

疑似カラム

ShippingAddressCountryCode

ShippingAddressCountryCodeV2

 

ShippingAddressDefault

✕ (GRAPHQL未対応)

 

ShippingAggregate

OrderShippingLines.*

ShippingLine*

 

SubtotalPrice

SubtotalPriceSetShopMoneyAmount

TaxAggregate

OrderTaxLines.*

 

TaxExempt

DraftOrders.TaxExempt

 

Token

✕ (GRAPHQL未対応)

 

TotalDiscounts

TotalDiscountsSetShopMoneyAmount

 

TotalLineItemsPriceSetPresentmentMoneyAmount

SubtotalPriceSetPresentmentMoneyAmount

 

TotalLineItemsPriceSetShopMoneyAmount

SubtotalPriceSetShopMoneyAmount

 

TotalOrderItemsPrice

SubtotalPriceSetShopMoneyAmount

 

TotalOutstanding

TotalOutstandingSetShopMoneyAmount

 

TotalPrice

TotalPriceSetShopMoneyAmount

 

TotalSubtotalSetPresentmentMoneyAmount

SubtotalPriceSetPresentmentMoneyAmount

 

TotalSubtotalSetShopMoneyAmount

SubtotalPriceSetShopMoneyAmount

 

TotalTax

TotalTaxSetShopMoneyAmount

 

TotalTipReceived

TotalTipReceivedSetShopMoneyAmount

 

◆ OrdersItems (REST) → (GRAPHQL) OrderLineItems

REST-2025-04.
OrdersItems

GRAPHQL-2025-04.
OrderLineItems

GRAPHQLに関する注記

AppliedDiscountAmount

DraftOrderLineItems.AppliedDiscountAmountV2Amount

 

AppliedDiscountDescription

DraftOrderLineItems.AppliedDiscountDescription

 

AppliedDiscountTitle

DraftOrderLineItems.AppliedDiscountTitle

 

AppliedDiscountValue

DraftOrderLineItems.AppliedDiscountValue

 

AppliedDiscountValueType

DraftOrderLineItems.AppliedDiscountValueType

 

FulfillableQuantity

未対応(GRAPHQL非推奨)

FulFillmentsService

Location.FulfillmentServiceId

ProductVariants.Id = OrderLineItems.VariantId
InventoryItemInventoryLevels.InventoryItemId = ProductVariants.InventoryItemId
InventoryItemInventoryLevels.LocationId = Location.Id

FulfillmentStatus

未対応(GRAPHQL非推奨)
→ Orders.DisplayFulfillmentStatus

GiftCard

IsGiftCard

 

ItemGrams

→ ProductVariants.InventoryItemMeasurementWeight*

 

ItemId

Id

GRAPHQLの「Id」はRESTと異なるフォーマットを持つグローバルID。

ItemPrice

OriginalUnitPriceSetShopMoneyAmount

 

ItemQuantity

Quantity

 

ItemTitle

Title

 

ItemVariantId

VariantId(ProductVariants.LegacyResourceId)

ProductVariants.Id = OrderLineItems.VariantId

OrderId

ResourceId(Orders.LegacyResourceId)

Orders.Id = OrderLineItems.ResourceId

ProductId

ProductId(Products.LegacyResourceId)

Products.Id =  OrderLineItems.ProductId

Properties

OrderLineItemCustomAttributes.*

 

TotalDiscount

TotalDiscountSetShopMoneyAmount

 

◆ NoteAttributes (REST) → (GRAPHQL) OrderCustomAttributes

REST-2025-04.
NoteAttributes

GRAPHQL-2025-04.
OrderCustomAttributes

GRAPHQLに関する注記

Name

Key

 

OrderId

ResourceId(Orders.LegacyResourceId)

Orders.Id = OrderCustomAttributes.ResourceId

OrderUpdatedAt

Orders.UpdatedAt

Orders.Id = OrderCustomAttributes.ResourceId


◆ OrderItemProperties (REST) → (GRAPHQL) OrderLineItemCustomAttributes

REST-2025-04.
OrderItemProperties

GRAPHQL-2025-04.
OrderLineItemCustomAttributes

GRAPHQLに関する注記

ItemId

ResourceId

GRAPHQLの「Id」はRESTと異なるフォーマットを持つグローバルID。

Name

Key

 

OrderId

Orders.LegacyResourceId

OrderLineItems.ResourceId = Orders.Id
OrderLineItems.Id = OrderLineItemCustomAttributes.ResourceId

OrderUpdatedAt

Orders.UpdatedAt

 

◆ OrderDiscountCodes (REST) → (GRAPHQL) OrderDiscountApplications

REST-2025-04.
OrderDiscountCodes

GRAPHQL-2025-04.
OrderDiscountApplications

GRAPHQLに関する注記

Amount

→ OrderLineItemDiscountAllocations.AllocatedAmountSetShopMoneyAmount

OrderLineItems.ResourceId = OrderDiscountApplications.OrderId
OrderLineItems.Id = OrderLineItemDiscountAllocations.OrderLineItemId

Code

DiscountCodeApplicationCode | ManualDiscountApplicationTitle

NULLではない方の値 (関連項目:Orders.DiscountCodes)

OrderId

OrderId

GRAPHQLの「Id」はRESTと異なるフォーマットを持つグローバルID。

OrderUpdatedAt

Orders.UpdatedAt

 

Type

ValueAmount | ValuePercentage → (fixed_amount | percentage)

NULLではない方のタイプ

◆ OrderItemDiscountAllocations (REST) → (GRAPHQL) OrderLineItemDiscountAllocations

REST-2025-04.
OrderItemDiscountAllocations

GRAPHQL-2025-04.
OrderLineItemDiscountAllocations

GRAPHQLに関する注記

Amount

AllocatedAmountSetShopMoneyAmount

 

ApplicationIndex

DiscountApplicationIndex

 

ItemId

OrderLineItemId

GRAPHQLの「Id」はRESTと異なるフォーマットを持つグローバルID。

OrderId

ResourceId( Orders.LegacyResourceId)

OrderLineItems.ResourceId = Orders.Id
OrderLineItems.Id = OrderLineItemDiscountAllocations.OrderLineItemId

OrderUpdatedAt

Orders.UpdatedAt

 

PresentmentMoneyAmount

AllocatedAmountSetPresentmentMoneyAmount

 

PresentmentMoneyCurrencyCode

AllocatedAmountSetPresentmentMoneyCurrencyCode

 

ShopMoneyAmount

AllocatedAmountSetShopMoneyAmount

 

ShopMoneyCurrencyCode

AllocatedAmountSetShopMoneyCurrencyCode

 

おわりに

本記事ではShopify API とデータモデルのREST からGRAPHQL への移行による主な変更点(Orders関連)を紹介しました。全ての変更点を網羅したリストではありませんが、ご不明な点がございましたら、お気軽に弊社サポートデスクにお問い合わせください。引き続きCData 製品をShopify へのデータ連携でご活用ください。

CData Shopify Drivers は30日間の無償トライアルが可能です。ぜひお試しくださいませ。
https://jp.cdata.com/drivers/shopify