JDBC Driver for Shopify

Build 25.0.9434

DraftOrders

Lists saved draft orders for manual checkout or invoicing workflows.

Table-Specific Information

Select

The driver uses the Shopify API to process WHERE clause conditions built with the following columns and operators. The driver processes other filters client-side within the driver.

  • Id supports the '=, IN' comparison operators.
  • Status supports the '=, !=' comparison operators.
  • CreatedAt supports the '=, !=, <, >, >=, <=' comparison operators.
  • UpdatedAt supports the '=, !=, <, >, >=, <=' comparison operators.
  • CustomerId supports the '=, !=' comparison operators.

For example, the following queries are processed server-side:

  SELECT * FROM DraftOrders WHERE Id = 'Val1'
  SELECT * FROM DraftOrders WHERE Status = 'Val1'
  SELECT * FROM DraftOrders WHERE CreatedAt = '2023-01-01 11:10:00'
  SELECT * FROM DraftOrders WHERE UpdatedAt = '2023-01-01 11:10:00'
  SELECT * FROM DraftOrders WHERE CustomerId = 'Val1'

Insert

The following columns can be used to create a new record:

Email, CustomerId, BillingAddressId, BillingAddressFirstName, BillingAddressLastName, BillingAddressAddress1, BillingAddressAddress2, BillingAddressCity, BillingAddressCompany, BillingAddressCountry, BillingAddressPhone, BillingAddressProvince, BillingAddressZip, BillingAddressProvinceCode, BillingAddressCountryCodeV2, ShippingAddressId, ShippingAddressFirstName, ShippingAddressLastName, ShippingAddressAddress1, ShippingAddressAddress2, ShippingAddressCity, ShippingAddressCompany, ShippingAddressCountry, ShippingAddressPhone, ShippingAddressProvince, ShippingAddressZip, ShippingAddressProvinceCode, ShippingAddressCountryCodeV2, AppliedDiscountTitle, AppliedDiscountDescription, AppliedDiscountValue, AppliedDiscountValueType, AppliedDiscountAmountV2Amount, DraftOrderLineItems (references DraftOrderLineItems), DiscountCodes, AcceptAutomaticDiscounts, AllowDiscountCodesInCheckout

DraftOrderLineItems Temporary Table Columns

Column NameTypeDescription
TitleStringThe title of the product or variant. This field only applies to custom line items.
QuantityIntThe number of product variants that are requested in the draft order.
SkuStringThe SKU number of the product variant.
TaxableBoolWhether the variant is taxable.
RequiresShippingBoolWhether physical shipping is required for the variant.
AppliedDiscountTitleStringName of the order-level discount.
AppliedDiscountDescriptionStringDescription of the order-level discount.
AppliedDiscountValueDoubleThe order level discount amount. If 'valueType' is 'percentage', then 'value' is the percentage discount.
AppliedDiscountValueTypeStringType of the order-level discount.
AppliedDiscountAmountV2AmountDecimalDecimal money amount.
VariantIdStringA globally-unique ID.
WeightValueDoubleThe weight value using the unit system specified with 'unit'.
WeightUnitStringThe unit of measurement for 'value'.

Update

The following columns can be updated:

Email, CustomerId, BillingAddressId, BillingAddressFirstName, BillingAddressLastName, BillingAddressAddress1, BillingAddressAddress2, BillingAddressCity, BillingAddressCompany, BillingAddressCountry, BillingAddressPhone, BillingAddressProvince, BillingAddressZip, BillingAddressProvinceCode, BillingAddressCountryCodeV2, ShippingAddressId, ShippingAddressFirstName, ShippingAddressLastName, ShippingAddressAddress1, ShippingAddressAddress2, ShippingAddressCity, ShippingAddressCompany, ShippingAddressCountry, ShippingAddressPhone, ShippingAddressProvince, ShippingAddressZip, ShippingAddressProvinceCode, ShippingAddressCountryCodeV2, AppliedDiscountTitle, AppliedDiscountDescription, AppliedDiscountValue, AppliedDiscountValueType, AppliedDiscountAmountV2Amount, DraftOrderLineItems (references DraftOrderLineItems), DiscountCodes, AcceptAutomaticDiscounts, AllowDiscountCodesInCheckout

DraftOrderLineItems Temporary Table Columns

Column NameTypeDescription
TitleStringThe title of the product or variant. This field only applies to custom line items.
QuantityIntThe number of product variants that are requested in the draft order.
SkuStringThe SKU number of the product variant.
TaxableBoolWhether the variant is taxable.
RequiresShippingBoolWhether physical shipping is required for the variant.
AppliedDiscountTitleStringName of the order-level discount.
AppliedDiscountDescriptionStringDescription of the order-level discount.
AppliedDiscountValueDoubleThe order level discount amount. If 'valueType' is 'percentage', then 'value' is the percentage discount.
AppliedDiscountValueTypeStringType of the order-level discount.
AppliedDiscountAmountV2AmountDecimalDecimal money amount.
VariantIdStringA globally-unique ID.
WeightValueDoubleThe weight value using the unit system specified with 'unit'.
WeightUnitStringThe unit of measurement for 'value'.

Delete

You can delete entries by specifying the following column:

Id

Columns

Name Type ReadOnly References Description
Id [KEY] String True

The globally unique identifier of the draft order.

LegacyResourceId String True

The legacy identifier of the draft order in the REST Admin API.

Name String True

The unique identifier for the draft order within the store, typically shown with a prefix such as '#D1223'.

MarketName String True

The name of the market selected for the draft order.

Email String False

The email address of the customer associated with the draft order, used for notifications.

Note2 String True

Optional merchant-facing notes attached to the draft order.

Phone String True

The phone number associated with the draft order.

Ready Bool True

Indicates whether the draft order is complete and ready to be finalized. Draft orders might require asynchronous processing before this value becomes true.

Status String True

The current status of the draft order.

Tags String True

A comma-separated list of tags applied to the draft order. Updating this field overwrites all existing tags.

CompletedAt Datetime True

The date and time when the draft order was converted into a completed order.

CurrencyCode String True

The three-letter currency code of the shop at the time of the most recent update to the draft order.

DefaultCursor String True

A default cursor used to fetch the next record in ascending Id order.

InvoiceUrl String True

The URL to the checkout page, sent to the customer in the draft order invoice email.

TaxExempt Bool True

Indicates whether the draft order is exempt from taxes.

TaxesIncluded Bool True

Indicates whether taxes are included in the line item prices.

TotalWeight String True

The total weight of all items in the draft order, measured in grams.

HasTimelineComment Bool True

Indicates whether the merchant has added a timeline comment to the draft order.

InvoiceSentAt Datetime True

The date and time when the invoice was last sent to the customer.

PresentmentCurrencyCode String True

The currency code in which the customer is expected to pay for this draft order.

ReserveInventoryUntil Datetime True

The date and time after which reserved inventory for this draft order is released.

VisibleToCustomer Bool True

Indicates whether the draft order is visible to the customer in the self-serve portal.

InvoiceEmailTemplateSubject String True

The subject line defined in the draft invoice email template.

MarketRegionCountryCode String True

The country code of the selected market region for the draft order.

BillingAddressMatchesShippingAddress Bool True

Indicates whether the billing address matches the shipping address.

CreatedAt Datetime True

The date and time when the draft order was created.

UpdatedAt Datetime True

The date and time when the draft order was last updated.

OrderId String True

The globally unique identifier of the order created from the draft order, if completed.

PurchasingEntityCustomerId String True

The globally unique identifier of the purchasing customer.

PurchasingEntityCompanyCompanyId String True

The globally unique identifier of the purchasing company, if applicable.

CustomerId String False

Customers.Id

The globally unique identifier of the customer to whom the draft order invoice was sent.

BillingAddressId String False

The globally unique identifier of the billing address.

BillingAddressCoordinatesValidated Bool True

Indicates whether the billing address includes valid latitude and longitude coordinates.

BillingAddressValidationResultSummary String True

The validation status of the billing address, as determined by Shopify Admin's address validation feature.

BillingAddressName String True

The full name of the customer on the billing address.

BillingAddressFirstName String False

The first name of the customer on the billing address.

BillingAddressLastName String False

The last name of the customer on the billing address.

BillingAddressAddress1 String False

The first line of the billing address, usually the street address or PO Box.

BillingAddressAddress2 String False

The second line of the billing address, often an apartment, suite, or unit number.

BillingAddressCity String False

The city, district, village, or town of the billing address.

BillingAddressCompany String False

The company name on the billing address, if provided.

BillingAddressCountry String False

The country of the billing address.

BillingAddressLatitude Double True

The latitude coordinate of the billing address.

BillingAddressLongitude Double True

The longitude coordinate of the billing address.

BillingAddressPhone String False

The phone number associated with the billing address, formatted in E.164 (for example, +16135551111).

BillingAddressProvince String False

The region of the billing address, such as province, state, or district.

BillingAddressZip String False

The ZIP or postal code of the billing address.

BillingAddressFormattedArea String True

A comma-separated list of the billing address components: city, province, and country.

BillingAddressProvinceCode String False

The two-letter region code for the billing address (for example, ON).

BillingAddressCountryCodeV2 String False

The two-letter country code for the billing address (for example, US).

ShippingAddressId String False

The globally unique identifier of the shipping address.

ShippingAddressCoordinatesValidated Bool True

Indicates whether the shipping address includes valid latitude and longitude coordinates.

ShippingAddressValidationResultSummary String True

The validation status of the shipping address, as determined by Shopify Admin's address validation feature.

ShippingAddressName String True

The full name of the recipient on the shipping address.

ShippingAddressFirstName String False

The first name of the recipient on the shipping address.

ShippingAddressLastName String False

The last name of the recipient on the shipping address.

ShippingAddressAddress1 String False

The first line of the shipping address, usually the street address or PO Box.

ShippingAddressAddress2 String False

The second line of the shipping address, often an apartment, suite, or unit number.

ShippingAddressCity String False

The city, district, village, or town of the shipping address.

ShippingAddressCompany String False

The company name on the shipping address, if provided.

ShippingAddressCountry String False

The country of the shipping address.

ShippingAddressLatitude Double True

The latitude coordinate of the shipping address.

ShippingAddressLongitude Double True

The longitude coordinate of the shipping address.

ShippingAddressPhone String False

The phone number associated with the shipping address, formatted in E.164 (for example, +16135551111).

ShippingAddressProvince String False

The region of the shipping address, such as province, state, or district.

ShippingAddressZip String False

The ZIP or postal code of the shipping address.

ShippingAddressFormattedArea String True

A comma-separated list of the shipping address components: city, province, and country.

ShippingAddressProvinceCode String False

The two-letter region code for the shipping address (for example, ON).

ShippingAddressCountryCodeV2 String False

The two-letter country code for the shipping address (for example, US).

ShippingLineId String True

The globally unique identifier of the shipping line.

ShippingLineCarrierIdentifier String True

A reference to the carrier service that provided the shipping rate, when calculated by a third-party service.

ShippingLineTitle String True

The title of the shipping line.

ShippingLineCode String True

A reference to the shipping method used.

ShippingLineCustom Bool True

Indicates whether the shipping line is custom.

ShippingLinePhone String True

The phone number associated with the shipping address for the shipping line.

ShippingLineSource String True

The source system or rate provider of the shipping line.

ShippingLineDeliveryCategory String True

The classification of the shipping method applied to the draft order.

ShippingLineShippingRateHandle String True

A system-generated identifier for the shipping rate. Not stable and not intended for display.

ShippingLineRequestedFulfillmentServiceId String True

The globally unique identifier of the fulfillment service requested for this shipping line.

AppliedDiscountTitle String False

The name of the order-level discount applied to the draft order.

AppliedDiscountDescription String False

The description of the order-level discount.

AppliedDiscountValue Double False

The amount of the order-level discount. If the value type is 'percentage', this is the percentage discount applied.

AppliedDiscountValueType String False

The type of the order-level discount (for example, percentage or fixed amount).

PaymentTermsId String True

The globally unique identifier of the payment terms template used.

PaymentTermsTranslatedName String True

The translated name of the payment terms template in the shop admin's language.

PaymentTermsPaymentTermsName String True

The name of the payment terms template applied to the draft order.

PaymentTermsOverdue Bool True

Indicates whether any scheduled payments are overdue for the draft order.

PaymentTermsDueInDays Int True

The number of days between the issue date and due date, based on the applied payment terms template.

PaymentTermsPaymentTermsType String True

The type of payment terms template applied to the draft order.

PaymentTermsOrderId String True

The globally unique identifier of the order associated with the payment terms.

AppliedDiscountAmountV2Amount Decimal False

The monetary value of the applied discount, expressed as a decimal.

AppliedDiscountAmountV2CurrencyCode String True

The currency code of the applied discount.

LineItemsSubtotalPricePresentmentMoneyAmount Decimal True

The subtotal of draft order line items in the presentment currency, expressed as a decimal.

LineItemsSubtotalPricePresentmentMoneyCurrencyCode String True

The currency code of the line item subtotal in the presentment currency.

LineItemsSubtotalPriceShopMoneyAmount Decimal True

The subtotal of draft order line items in the shop currency, expressed as a decimal.

LineItemsSubtotalPriceShopMoneyCurrencyCode String True

The currency code of the line item subtotal in the shop currency.

SubtotalPriceSetPresentmentMoneyAmount Decimal True

The subtotal of the draft order in the presentment currency, expressed as a decimal.

SubtotalPriceSetPresentmentMoneyCurrencyCode String True

The currency code of the draft order subtotal in the presentment currency.

SubtotalPriceSetShopMoneyAmount Decimal True

The subtotal of the draft order in the shop currency, expressed as a decimal.

SubtotalPriceSetShopMoneyCurrencyCode String True

The currency code of the draft order subtotal in the shop currency.

TotalDiscountsSetPresentmentMoneyAmount Decimal True

The total discounts applied to the draft order in the presentment currency, expressed as a decimal.

TotalDiscountsSetPresentmentMoneyCurrencyCode String True

The currency code of the total discounts in the presentment currency.

TotalDiscountsSetShopMoneyAmount Decimal True

The total discounts applied to the draft order in the shop currency, expressed as a decimal.

TotalDiscountsSetShopMoneyCurrencyCode String True

The currency code of the total discounts in the shop currency.

TotalLineItemsPriceSetPresentmentMoneyAmount Decimal True

The total price of all line items in the presentment currency, expressed as a decimal.

TotalLineItemsPriceSetPresentmentMoneyCurrencyCode String True

The currency code of the total line item price in the presentment currency.

TotalLineItemsPriceSetShopMoneyAmount Decimal True

The total price of all line items in the shop currency, expressed as a decimal.

TotalLineItemsPriceSetShopMoneyCurrencyCode String True

The currency code of the total line item price in the shop currency.

TotalPriceSetPresentmentMoneyAmount Decimal True

The total price of the draft order in the presentment currency, expressed as a decimal.

TotalPriceSetPresentmentMoneyCurrencyCode String True

The currency code of the draft order total in the presentment currency.

TotalPriceSetShopMoneyAmount Decimal True

The total price of the draft order in the shop currency, expressed as a decimal.

TotalPriceSetShopMoneyCurrencyCode String True

The currency code of the draft order total in the shop currency.

TotalShippingPriceSetPresentmentMoneyAmount Decimal True

The total shipping price in the presentment currency, expressed as a decimal.

TotalShippingPriceSetPresentmentMoneyCurrencyCode String True

The currency code of the total shipping price in the presentment currency.

TotalShippingPriceSetShopMoneyAmount Decimal True

The total shipping price in the shop currency, expressed as a decimal.

TotalShippingPriceSetShopMoneyCurrencyCode String True

The currency code of the total shipping price in the shop currency.

TotalTaxSetPresentmentMoneyAmount Decimal True

The total tax amount in the presentment currency, expressed as a decimal.

TotalTaxSetPresentmentMoneyCurrencyCode String True

The currency code of the total tax amount in the presentment currency.

TotalTaxSetShopMoneyAmount Decimal True

The total tax amount in the shop currency, expressed as a decimal.

TotalTaxSetShopMoneyCurrencyCode String True

The currency code of the total tax amount in the shop currency.

DraftOrderLineItems String False

The list of line items included in the draft order.

DiscountCodes String False

The discount codes applied to the draft order.

AcceptAutomaticDiscounts Bool False

Indicates whether automatic discounts should be applied to the draft order during calculation.

AllowDiscountCodesInCheckout Bool False

Indicates whether discount codes are allowed during checkout of the draft order.

Warnings String True

A list of warnings raised during draft order calculation.

PlatformDiscountIds String True

The list of platform-level discounts applied to the draft order.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434