This document lists common endpoints used in our older REST based APIs (Checkout API and Shop API), and its equivalent in the DTC API. The idea is to ensure that you'll get a good overview when planning a migration to the DTC API.
Read the full migration documentation here.
Catalog#
Products#
Action | Checkout API | Shop API | DTC API |
---|
List products | GET products | GET products | displayItems |
Search products | POST products | POST products/search | displayItems |
Filter products | POST products | POST products/filter, GET products/{filter}/{value} | displayItems |
Product Details | POST product/{product} | POST products | displayItem |
Categories#
Action | Checkout API | Shop API | DTC API |
---|
List Categories | GET categories | GET categories | categories |
Category details | - | POST categories/{category} | - |
Quering categories in the DTC API will not return displays (products), but categories and their data like ID and URI. In order to list displays from a specific category, you will need to make a separate request to displayItems
filtered by category, or a lookupUri request.
Brands#
Action | Checkout API | Shop API | DTC API |
---|
List brands | GET brands | GET brands | brands |
Brand details | - | POST brands/{brand} | - |
Collections#
Action | Checkout API | Shop API | DTC API |
---|
List collections | GET collections | GET collections | collections |
Collection details | - | GET collections/{collection} | collections |
Warehouses#
Action | Checkout API | Shop API | DTC API |
---|
List Warehouses | GET warehouses | GET warehouses | - |
There is no query in the DTC API to list warehouses, instead: use brickAndMortars
.
Customer Migration#
Update customer#
Read the full migration documentation here.
The DTC API offers a generic updateCustomer
mutation for customer update actions. It requires the shopper to be logged in.
Action | Checkout API | Shop API | DTC API |
---|
Update customer address | PUT /address | PUT /customers/{email} | updateCustomer |
Update customer | PUT /customer/update | PUT /customers/{email} | updateCustomer |
Change password | PUT /password | PUT /customers/{email} | updateCustomer |
Change email | PUT /email | PUT /customers/{email} | updateCustomer |
Register, log in and log out#
Action | Checkout API | Shop API | DTC API |
---|
Register customer | POST /register | POST /customers/{email} | registerCustomer |
Log in | POST /login/{email} | POST /customers/{email}/login | logout |
Log out | POST /logout | No matches | logout |
Get customer data#
Action | Checkout API | Shop API | DTC API |
---|
Customer | GET /customer | GET /customers/{email} GET /customers/{email}/registered/{registered} | customer |
Customer Orders | POST /orders | | customer |
Subscription management#
Action | Checkout API | Shop API | DTC API |
---|
Customer subscriptions | POST /customer/subscriptions | POST /customers/{email}/subscriptions | customer subscriptionContracts |
Add customer subscription | POST /customer/contracts/{contract}/subscription | POST /customers/{email}/contracts/{contract}/subscription | addSubscription |
Update subscription quantity | PUT /customer/contracts/{contract}/subscription/{subscription} | input | updateSubscriptionQuantity |
Change subscription address | PUT /subscription/address | PUT /subscription/address | changeSubscriptionContractAddress |
Change subscription interval | PUT /subscription/interval | PUT /subscription/interval | updateSubscriptionInterval |
Update subscription status | PUT /subscription/status | PUT /subscription/status | updateSubscriptionStatus |
Reset password flow#
The reset password flow consits of multiple steps, each listed below.
Action | Checkout API | Shop API | DTC API |
---|
Send reset password email | POST /password-reset-email POST /password-reset-email/{email} | POST customers/{email}/password-reset-email | equestPasswordResetEmail |
Verify hashes | No matches | POST /customer-password-reset-check | verifyResetPasswordHashes |
Reset password | POST /password-reset | PUT /customers/{email} | resetPassword |
Whishlist#
Action | Checkout API | Shop API | DTC API |
---|
Customer wishlist | GET /customer/wishlists/{wishlist} | No matches | customer |
Add wishlist item | POST /customer/wishlists/{wishlist}/items/{displayItem} | No matches | No matches |
Remove wishlist item | DELETE /customer/wishlists/{wishlist}/items/{displayItem} | No matches | No matches |
Add wishlist item
Adding a wishlist item to wishlist, if wishlist doesn't exists, create it.
Note: DTC API doesn’t support the wishlist functionality yet.
Remove wishlist item
Remove wishlist item based on display item from the wishlist
Note: DTC API doesn’t support the wishlist functionality yet.
Product and newsletter subscriptions#
Action | Checkout API | Shop API | DTC API |
---|
Subscribe to back in stock | POST /back-in-stock-subscription | POST /customers/{email}/back-in-stock-subscription | subscribeToBackInStock |
Subscribe to newsletter | POST /newsletter-subscription``POST /newsletter-subscription/{email} | POST /customers/{email}/newsletter-subscription | subscribeToNewsletter |
Checkout API | DTC API |
---|
M | MALE |
F | FEMALE |
| UNKOWN |
The DTC API interval type format differs from Checkout API and needs to be mapped or casted to lowercase.
Checkout API | Shop API | DTC API |
---|
day | day | DAY |
week | week | WEEK |
month | month | MONTH |
year | year | YEAR |
Selection#
Read the full migration documentation here.
Add product#
Action | Checkout API | Shop API | DTC API |
---|
Add item | POST /items/{item} POST /items/{item}/quantity/{quantity} | POST /selections/{selection}/items/{item} POST /selections/{selection}/items/{item}/quantity/{quantity} | addItem |
Add flexible bundle | POST /items/bundles/{item} | POST /selections/{selection}/bundles | addFlexibleBundle |
Add gift certificate | POST /items/gift-certificates/{giftCertificate} POST /items/gift-certificates/{giftCertificate}/amount/{amount} | POST /selections/{selection}/gift-certificates/{giftCertificate} POST/selections/{selection}/gift-certificates/{giftCertificate}/amount/{amount} | Not supported |
Line modifications#
Action | Checkout API | Shop API | DTC API |
---|
Increase line quantity | POST /lines/{line} POST /lines/{line}/quantity/{quantity} | POST /selections/{selection}/lines/{line} POST /selections/{selection}/lines/{line}/quantity/{quantity} | Not supported |
Reduce line quantity | DELETE /lines/{line}/quantity/{quantity} | DELETE /selections/{selection}/lines/{line}/quantity/{quantity} | Not supported |
Reduce item quantity | Not supported | DELETE /selections/{selection}/items/{item}/quantity/{quantity} | Not supported |
Delete line | DELETE /lines/{line} | DELETE /selections/{selection}/lines/{line} | deleteLine |
Delete item | Not supported | DELETE /selections/{selection}/items DELETE/selections/{selection}/items/{item} | Not supported |
Set line quantity | PUT /lines/{line}/quantity/{quantity} | PUT /selections/{selection}/lines/{line}/quantity/{quantity} | updateLine |
Set item quantity | Not supported | PUT /selections/{selection}/items/{item}/quantity/{quantity} | Not supported |
Remove line subscription plan | DELETE /lines/{line}/subscription-plan | DELETE /selections/{selection}/lines/{line}/subscription-plan | removeSubscriptionPlanFromLine |
Update line subscription plan | PUT /lines/{line}/subscription-plan/{subscriptionPlan} | PUT /selections/{selection}/lines/{line}/subscription-plan/{subscriptionPlan} | updateLine |
Selection modifications#
Action | Checkout API | Shop API | DTC API |
---|
Change country | PUT /countries/{country} | PUT /countries/{country}/states/{state} | PUT /selections/{selection}/countries/{country} |
Update market | PUT /selection | PUT /selections/{selection}/markets/{market} | setMarket |
Update pricelist | PUT /selection | PUT /selections/{selection}/pricelists/{pricelist} | Dependent on country |
Change language | PUT /languages/{language} | PUT /selections/{selection}/languages/{language} | setLanguage |
Set campaign site | PUT /campaign-site | Not supported | setCampaignSite |
Set affiliate | Not supported | Not supported | setAffiliate |
Remove customer | Not supported | DELETE /selections/{selection}/customers | Not supported |
Attach customer | Not supported | PUT /selections/{selection}/customers/{customer} | Not supported |
Set VAT exempt | Not supported | PUT /selections/{selection}/vat-exempt/{vatExempt} | Not supported |
Remaining endpoints#
Action | Checkout API | Shop API | DTC API |
---|
Create selection | Created with first selection modification | POST /selections | Created with first selection modification |
Get selection | GET /selection | GET /selections/{selection} | selection |
Attach selection | PUT /selection/{selection} | No matches | setSelection |
Claim selection | Not supported | POST /payment-links/{hash1}/{hash2} | claimSelection |
Line prices#
Checkout API | Shop API | DTC API |
---|
priceEachAsNumber | priceEachAsNumber | line.unitOriginalPrice - applied campaigns appliedPromotions.value.value * quantity |
priceEachWithoutTaxAsNumber | priceEachWithoutTaxAsNumber | (line.unitOriginalPrice - applied campaigns appliedPromotions.value.value * quantity) / tax percent |
priceEachBeforeDiscountAsNumber | priceEachBeforeDiscountAsNumber | line.unitOriginalPrice |
priceEachReductionAsNumber | priceEachReductionAsNumber | line.unitPriceReduction (includes campaign + voucher) |
totalPriceBeforeDiscountAsNumber | totalPriceBeforeDiscountAsNumber | line.originalLineValue |
totalPriceAsNumber | totalPriceAsNumber | line.lineValue + line vouchers appliedPromotions.value.value * line quantity |
totalPriceAfterCampaignAsNumber | totalPriceAfterCampaignAsNumber | line.originalLineValue - applied campaigns * line quantity |
totalPriceAfterDiscountAsNumber | totalPriceAfterDiscountAsNumber | line.lineValue |
anyDiscount | anyDiscount | line.hasDiscount |
taxPercent | taxPercent | line.taxPercent |
Note: Unlike Checkout API and Shop API, which only include campaign promotions in line prices, the DTC API includes all applied promotions. Therefore, to match the previous price format, you will need to calculate certain values independently.
Checkout Migration#
Read the full migration documentation here.
All data needed to complete the checkout flow is available via the checkout
field in the selection
. We recommend including it only during the checkout stage because it triggers communication with external services and may result in increased response times.
The following examples use the checkoutSelectionFields fragment, which can have the following format:
Checkout details#
Action | Checkout API | Shop API | DTC API |
---|
Set shipping method | PUT /shipping-methods/{shippingMethod} | PUT /selections/{selection}/shipping-method/{shippingMethod} | setShippingMethod |
Set payment method | PUT /payment-methods/{paymentMethod} | PUT /selections/{selection}/payment-methods/{paymentMethod} | setPaymentMethod |
Payment fields | PUT /payment-fields | POST /selections/{selection}/payment-fields | PUT /selections/{selection}/checkout-fields |
Vouchers#
Action | Checkout API | Shop API | DTC API |
---|
Add voucher | POST /vouchers | POST /selections/{selection}/vouchers/{voucher} | addVoucher |
Add URI voucher | POST /vouchers | POST /selections/{selection}/voucher-uri/{voucher} | lookupUri |
Remove voucher | DELETE /vouchers | DELETE /vouchers/{voucher} | DELETE /selections/{selection}/vouchers, DELETE /selections/{selection}/vouchers/{voucher} |
Remove URI voucher | DELETE /vouchers | DELETE /vouchers/{voucher} | DELETE /selections/{selection}/voucher-uri/{voucher} |
Ship from Store#
Action | Checkout API | Shop API | DTC API |
---|
Set allocation rule | PUT /allocation-rule/{id} | PUT /selections/{selection}/allocation-rule/{allocationRule} | setAllocationRule |
Set Brick and mortar | PUT /brick-and-mortar/{id} | PUT /selections/{selection}/brick-and-mortar/{brickAndMortar} | setBrickAndMortar |
Fulfilment check | POST /fulfillment-check | POST /selections/{selection}/fulfillment-check | fulfillmentCheck |
Payment process#
Action | Checkout API | Shop API | DTC API |
---|
Payment instructions | POST /payment | POST /selections/{selection}/payment | paymentInstructions |
Payment result | POST /payment-result | POST /selections/{selection}/payment-result | paymentResult |
Remaining
Action | Checkout API | Shop API | DTC API |
---|
Address search | POST /address-search | POST /payment-methods/{paymentMethod}/address-search | - |
Receipt | GET /receipt | GET /selections/{selection}/receipt | order |
Address search
DTC API doesn’t support address search.
Totals#
DTC API provides selection totals under selection.checkout.totals. This list contains the selection summary per type.
Checkout API | Shop API | DTC API |
---|
itemsTotalPriceAsNumber | itemsTotalPriceAsNumber | ITEMS_SUBTOTAL + discounts applied on lines. |
totalDiscountPriceAsNumber | totalDiscountPriceAsNumber | DISCOUNT + CREDIT |
shippingPriceAsNumber | shippingPriceAsNumber | SHIPPING |
handlingCostAddedToShippingPrice | handlingCostPriceAsNumber | HANDLING |
totalQuantity | totalQuantity | Sum of line.quantity |
taxDeductedAsNumber | taxDeductedAsNumber | TAX_DEDUCT.taxPercent |
taxAddedAsNumber | taxAddedAsNumber | TAX_ADDED.taxPercent |
taxPercent | taxPercent | INCLUDING_TAX.taxPercent |
grandTotalPriceAsNumber | grandTotalPriceAsNumber | GRAND_TOTAL |
grandTotalPriceTaxAsNumber | grandTotalPriceTaxAsNumber | INCLUDING_TAX or TAX_ADDED |