# Shipping option update Will be called whenever the consumer selects a shipping option. The order will be updated according to the response received by Checkout. Endpoint: POST /merchant_urls.shipping_option_update Version: 1.0.0 ## Request fields (application/json): - `order_amount` (integer, required) Non-negative, minor units. Total total amount of the order, including tax and any discounts. - `order_tax_amount` (integer, required) Non-negative, minor units. The total tax amount of the order. - `order_lines` (array, required) The applicable order lines (max 1000) - `order_lines.type` (string) Type of the order line item. The possible values are:physical (physical good)discountshipping_feesales_tax (depends on the country/city, usually called VAT)digital (digital good)gift_cardstore_credit (credit from the merchant)surcharge (extra charge) Example: "physical" - `order_lines.reference` (string) Article number, SKU or similar. (max 255 characters) Example: "19-402-USA" - `order_lines.name` (string, required) Descriptive name of the order line item (max 255 characters) Example: "Red T-Shirt" - `order_lines.quantity` (integer, required) Non-negative number. Quantity of the order line item. Example: 5 - `order_lines.subscription` (object) - `order_lines.subscription.name` (string) The name of the subscription product. Example: "Premium Account" - `order_lines.subscription.interval` (string, required) The cadence unit for this. Example: "DAY" Enum: "DAY", "WEEK", "MONTH", "YEAR" - `order_lines.subscription.interval_count` (integer, required) The number of intervals. Example: 30 - `order_lines.quantity_unit` (string) Unit used to describe the quantity, e.g. kg, pcs... If defined has to be 1-8 characters Example: "pcs" - `order_lines.unit_price` (integer, required) Minor units. Includes tax, excludes discount. (max value: 100000000). Example: 100 Euros should be 10000. Example: 10000 - `order_lines.tax_rate` (integer, required) Non-negative value. The percentage value is represented with two implicit decimals. (max 10000) Example: 25% should be 2500. Example: 1000 - `order_lines.total_amount` (integer, required) Minor units. Includes tax and discount. Example: 25 euros should be 2500 Value = (quantity x unit_price) - total_discount_amount. (max value: 100000000) Example: 50000 - `order_lines.total_discount_amount` (integer) Non-negative minor units. Includes tax. Example: 25 euros should be 2500 - `order_lines.total_tax_amount` (integer, required) Must be within ±1 of total_amount - total_amount \* 10000 / (10000 + tax_rate). Negative when type is discount. Example: 4545 - `order_lines.merchant_data` (string) Property used to store additional metadata per item that will be returned whenever an order is read from Kustom. Pass through field. (max 1024 characters). Example: "{\"marketplace_seller_info\":[{\"product_category\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}" - `order_lines.product_url` (string) URL to the product page that can be later embedded in communications between Kustom and the customer. (max 1024 characters) Example: "https://www.example.com/products/f2a8d7e34" - `order_lines.image_url` (string) URL to an image that can be later embedded in communications between Kustom and the customer. (max 1024 characters) Improves post-purchase customer experiences. Example: "https://www.exampleobjects.com/product-image-1200x1200.jpg" - `order_lines.product_identifiers` (object) - `order_lines.product_identifiers.brand` (string) The product's brand name as generally recognized by consumers. If no brand is available for a product, do not supply any value. Example: "Intel" - `order_lines.product_identifiers.color` (string) Color to be shown to the end customer (max 64 characters). Example: "Blue" - `order_lines.product_identifiers.category_path` (string) The product's category path as used in the merchant's webshop. Include the full and most detailed category and separate the segments with ' > '. (max 750 characters) Example: "Electronics Store > Computers & Tablets > Desktops" Example: "Electronics Store > Computers & Tablets > Desktops" - `order_lines.product_identifiers.global_trade_item_number` (string) The product's Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. Exclude dashes and spaces, where possible Example: "735858293167" - `order_lines.product_identifiers.manufacturer_part_number` (string) The product's Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible Example: "BOXNUC5CPYH" - `order_lines.product_identifiers.size` (string) Size to be shown to the end customer (max 64 characters). Example: "Medium" - `order_lines.shipping_attributes` (object) - `order_lines.shipping_attributes.weight` (integer) The product's weight as used in the merchant's webshop. Non-negative. Measured in grams. Example: 1000 - `order_lines.shipping_attributes.dimensions` (object) - `order_lines.shipping_attributes.dimensions.height` (integer) The product's height as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.dimensions.width` (integer) The product's width as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.dimensions.length` (integer) The product's length as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.tags` (array) The product's extra features, example ["dangerous_goods", "bulky"] - `billing_address` (object) - `billing_address.given_name` (string) Given name. Example: "John" - `billing_address.family_name` (string) Family name. Example: "Doe" - `billing_address.email` (string) E-mail address. Example: "john@doe.com" - `billing_address.title` (string) Title.Valid values for UK:MrMsMrsMissValid values for DACH:HerrFrauValid values for NL:Dhr.Mevr. Example: "Mr" - `billing_address.street_address` (string) Street address, first line. (Street name and number) Example: "Lombard St 10" - `billing_address.street_address2` (string) Street address, second line. (Apartment number, suite, etc.) Example: "Apt 214" - `billing_address.street_name` (string) Street name. Only applicable in DE/AT/NL. Do not combine with street_address. See streetNumber. Example: "Lombard St" - `billing_address.street_number` (string) Street number. Only applicable in DE/AT/NL. Do not combine with street_address. See streetName. Example: "10" - `billing_address.house_extension` (string) House extension. Only applicable in NL Example: "B" - `billing_address.postal_code` (string) Postal/post code. Example: "90210" - `billing_address.city` (string) City. Example: "Beverly Hills" - `billing_address.region` (string) State or Region. Example: "CA" - `billing_address.phone` (string) Phone number. Example: "333444555" - `billing_address.country` (string) ISO 3166 alpha-2. Country. Example: "US" - `billing_address.care_of` (string) Care of. Example: "C/O" - `shipping_address` (object) - `selected_shipping_option` (object) - `selected_shipping_option.id` (string, required) id Example: "express_priority" - `selected_shipping_option.name` (string, required) Name. Example: "EXPRESS 1-2 Days" - `selected_shipping_option.description` (string) Description. Example: "Delivery by 4:30 pm" - `selected_shipping_option.promo` (string) Promotion name. To be used if this shipping option is promotional. Example: "Christmas Promotion" - `selected_shipping_option.price` (integer, required) Price including tax. - `selected_shipping_option.preselected` (boolean) If true, this option will be preselected when checkout loads. Default: false - `selected_shipping_option.tax_amount` (integer, required) Tax amount. - `selected_shipping_option.tax_rate` (integer, required) Non-negative. In percent, two implicit decimals. I.e 2500 = 25%. - `selected_shipping_option.shipping_method` (string) Shipping method. Possible values:PickUpStoreHomeBoxRegBoxUnregPickUpPointOwnPostalDHLPackstationDigital If DHLPackstation is selected the correct form will be displayed. Example: "PickUpStore" - `selected_shipping_option.delivery_details` (object) - `selected_shipping_option.delivery_details.carrier` (string) Carrier product name - `selected_shipping_option.delivery_details.class` (string) Type of shipping class - `selected_shipping_option.delivery_details.product` (object) - `selected_shipping_option.delivery_details.product.name` (string) Carrier product name - `selected_shipping_option.delivery_details.product.identifier` (string) Carrier product identifier - `selected_shipping_option.delivery_details.timeslot` (object) - `selected_shipping_option.delivery_details.timeslot.id` (string) Id - `selected_shipping_option.delivery_details.timeslot.start` (string) Start time - `selected_shipping_option.delivery_details.timeslot.end` (string) End time - `selected_shipping_option.delivery_details.pickup_location` (object) - `selected_shipping_option.delivery_details.pickup_location.name` (string) Name of the location - `selected_shipping_option.delivery_details.pickup_location.address` (object) - `selected_shipping_option.tms_reference` (string) TMS reference. Required to map completed orders to shipments reserved in TMS. Example: "a1b2c3d4-e4f6-g7h8-i9j0-k1l2m3n4o5p6" - `selected_shipping_option.selected_addons` (array) - `selected_shipping_option.selected_addons.type` (string) - `selected_shipping_option.selected_addons.price` (integer) - `selected_shipping_option.selected_addons.external_id` (string) - `selected_shipping_option.selected_addons.user_input` (string) - `purchase_currency` (string, required) ISO 4217 purchase currency. Example: "USD" - `customer` (object) - `customer.type` (string) The default supported value is 'person'. If B2B is enabled for the merchant, the value may be "organization". Example: "person" - `customer.gender` (string) Customer’s gender - ‘male’ or ‘female’. Example: "male" - `customer.date_of_birth` (string) Customer’s date of birth. The format is ‘yyyy-mm-dd’. ISO 8601 date. Example: "1995-10-20" - `customer.organization_registration_id` (string) "The organization's official registration id (organization number). Note: Applicable only for B2B orders." Example: "556737-0431" - `customer.vat_id` (string) Organization VAT ID. Only applies for b2b orders. ## Response 200 fields (application/json): - `order_amount` (integer, required) Non-negative, minor units. Total total amount of the order, including tax and any discounts. - `order_tax_amount` (integer, required) Non-negative, minor units. The total tax amount of the order. - `merchant_data` (string) Pass through field (max 1024 characters). Example: "{\"marketplace_seller_info\":[{\"product_category\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}" - `order_lines` (array, required) The applicable order lines (max 1000) - `order_lines.type` (string) Type of the order line item. The possible values are:physical (physical good)discountshipping_feesales_tax (depends on the country/city, usually called VAT)digital (digital good)gift_cardstore_credit (credit from the merchant)surcharge (extra charge) Example: "physical" - `order_lines.reference` (string) Article number, SKU or similar. (max 255 characters) Example: "19-402-USA" - `order_lines.name` (string, required) Descriptive name of the order line item (max 255 characters) Example: "Red T-Shirt" - `order_lines.quantity` (integer, required) Non-negative number. Quantity of the order line item. Example: 5 - `order_lines.subscription` (object) - `order_lines.subscription.name` (string) The name of the subscription product. Example: "Premium Account" - `order_lines.subscription.interval` (string, required) The cadence unit for this. Example: "DAY" Enum: "DAY", "WEEK", "MONTH", "YEAR" - `order_lines.subscription.interval_count` (integer, required) The number of intervals. Example: 30 - `order_lines.quantity_unit` (string) Unit used to describe the quantity, e.g. kg, pcs... If defined has to be 1-8 characters Example: "pcs" - `order_lines.unit_price` (integer, required) Minor units. Includes tax, excludes discount. (max value: 100000000). Example: 100 Euros should be 10000. Example: 10000 - `order_lines.tax_rate` (integer, required) Non-negative value. The percentage value is represented with two implicit decimals. (max 10000) Example: 25% should be 2500. Example: 1000 - `order_lines.total_amount` (integer, required) Minor units. Includes tax and discount. Example: 25 euros should be 2500 Value = (quantity x unit_price) - total_discount_amount. (max value: 100000000) Example: 50000 - `order_lines.total_discount_amount` (integer) Non-negative minor units. Includes tax. Example: 25 euros should be 2500 - `order_lines.total_tax_amount` (integer, required) Must be within ±1 of total_amount - total_amount \* 10000 / (10000 + tax_rate). Negative when type is discount. Example: 4545 - `order_lines.merchant_data` (string) Property used to store additional metadata per item that will be returned whenever an order is read from Kustom. Pass through field. (max 1024 characters). Example: "{\"marketplace_seller_info\":[{\"product_category\":\"Women's Fashion\",\"product_name\":\"Women Sweatshirt\"}]}" - `order_lines.product_url` (string) URL to the product page that can be later embedded in communications between Kustom and the customer. (max 1024 characters) Example: "https://www.example.com/products/f2a8d7e34" - `order_lines.image_url` (string) URL to an image that can be later embedded in communications between Kustom and the customer. (max 1024 characters) Improves post-purchase customer experiences. Example: "https://www.exampleobjects.com/product-image-1200x1200.jpg" - `order_lines.product_identifiers` (object) - `order_lines.product_identifiers.brand` (string) The product's brand name as generally recognized by consumers. If no brand is available for a product, do not supply any value. Example: "Intel" - `order_lines.product_identifiers.color` (string) Color to be shown to the end customer (max 64 characters). Example: "Blue" - `order_lines.product_identifiers.category_path` (string) The product's category path as used in the merchant's webshop. Include the full and most detailed category and separate the segments with ' > '. (max 750 characters) Example: "Electronics Store > Computers & Tablets > Desktops" Example: "Electronics Store > Computers & Tablets > Desktops" - `order_lines.product_identifiers.global_trade_item_number` (string) The product's Global Trade Item Number (GTIN). Common types of GTIN are EAN, ISBN or UPC. Exclude dashes and spaces, where possible Example: "735858293167" - `order_lines.product_identifiers.manufacturer_part_number` (string) The product's Manufacturer Part Number (MPN), which - together with the brand - uniquely identifies a product. Only submit MPNs assigned by a manufacturer and use the most specific MPN possible Example: "BOXNUC5CPYH" - `order_lines.product_identifiers.size` (string) Size to be shown to the end customer (max 64 characters). Example: "Medium" - `order_lines.shipping_attributes` (object) - `order_lines.shipping_attributes.weight` (integer) The product's weight as used in the merchant's webshop. Non-negative. Measured in grams. Example: 1000 - `order_lines.shipping_attributes.dimensions` (object) - `order_lines.shipping_attributes.dimensions.height` (integer) The product's height as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.dimensions.width` (integer) The product's width as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.dimensions.length` (integer) The product's length as used in the merchant's webshop. Non-negative. Measured in millimeters. Example: 100 - `order_lines.shipping_attributes.tags` (array) The product's extra features, example ["dangerous_goods", "bulky"] - `shipping_options` (array) A list of shipping options available for this order. - `shipping_options.id` (string, required) id Example: "express_priority" - `shipping_options.name` (string, required) Name. Example: "EXPRESS 1-2 Days" - `shipping_options.description` (string) Description. Example: "Delivery by 4:30 pm" - `shipping_options.promo` (string) Promotion name. To be used if this shipping option is promotional. Example: "Christmas Promotion" - `shipping_options.price` (integer, required) Price including tax. - `shipping_options.preselected` (boolean) If true, this option will be preselected when checkout loads. Default: false - `shipping_options.tax_amount` (integer, required) Tax amount. - `shipping_options.tax_rate` (integer, required) Non-negative. In percent, two implicit decimals. I.e 2500 = 25%. - `shipping_options.shipping_method` (string) Shipping method. Possible values:PickUpStoreHomeBoxRegBoxUnregPickUpPointOwnPostalDHLPackstationDigital If DHLPackstation is selected the correct form will be displayed. Example: "PickUpStore" - `shipping_options.delivery_details` (object) - `shipping_options.delivery_details.carrier` (string) Carrier product name - `shipping_options.delivery_details.class` (string) Type of shipping class - `shipping_options.delivery_details.product` (object) - `shipping_options.delivery_details.product.name` (string) Carrier product name - `shipping_options.delivery_details.product.identifier` (string) Carrier product identifier - `shipping_options.delivery_details.timeslot` (object) - `shipping_options.delivery_details.timeslot.id` (string) Id - `shipping_options.delivery_details.timeslot.start` (string) Start time - `shipping_options.delivery_details.timeslot.end` (string) End time - `shipping_options.delivery_details.pickup_location` (object) - `shipping_options.delivery_details.pickup_location.name` (string) Name of the location - `shipping_options.delivery_details.pickup_location.address` (object) - `shipping_options.delivery_details.pickup_location.address.given_name` (string) Given name. Example: "John" - `shipping_options.delivery_details.pickup_location.address.family_name` (string) Family name. Example: "Doe" - `shipping_options.delivery_details.pickup_location.address.email` (string) E-mail address. Example: "john@doe.com" - `shipping_options.delivery_details.pickup_location.address.title` (string) Title.Valid values for UK:MrMsMrsMissValid values for DACH:HerrFrauValid values for NL:Dhr.Mevr. Example: "Mr" - `shipping_options.delivery_details.pickup_location.address.street_address` (string) Street address, first line. (Street name and number) Example: "Lombard St 10" - `shipping_options.delivery_details.pickup_location.address.street_address2` (string) Street address, second line. (Apartment number, suite, etc.) Example: "Apt 214" - `shipping_options.delivery_details.pickup_location.address.street_name` (string) Street name. Only applicable in DE/AT/NL. Do not combine with street_address. See streetNumber. Example: "Lombard St" - `shipping_options.delivery_details.pickup_location.address.street_number` (string) Street number. Only applicable in DE/AT/NL. Do not combine with street_address. See streetName. Example: "10" - `shipping_options.delivery_details.pickup_location.address.house_extension` (string) House extension. Only applicable in NL Example: "B" - `shipping_options.delivery_details.pickup_location.address.postal_code` (string) Postal/post code. Example: "90210" - `shipping_options.delivery_details.pickup_location.address.city` (string) City. Example: "Beverly Hills" - `shipping_options.delivery_details.pickup_location.address.region` (string) State or Region. Example: "CA" - `shipping_options.delivery_details.pickup_location.address.phone` (string) Phone number. Example: "333444555" - `shipping_options.delivery_details.pickup_location.address.country` (string) ISO 3166 alpha-2. Country. Example: "US" - `shipping_options.delivery_details.pickup_location.address.care_of` (string) Care of. Example: "C/O" - `shipping_options.tms_reference` (string) TMS reference. Required to map completed orders to shipments reserved in TMS. Example: "a1b2c3d4-e4f6-g7h8-i9j0-k1l2m3n4o5p6" - `shipping_options.selected_addons` (array) - `shipping_options.selected_addons.type` (string) - `shipping_options.selected_addons.price` (integer) - `shipping_options.selected_addons.external_id` (string) - `shipping_options.selected_addons.user_input` (string) - `attachment` (object) - `attachment.body` (string, required) The content of the extra merchant data which should be presented as a string inside this property. The body should be an object containing any of the keys and sub objects described below serialised to JSON. Example: "{\"hotel_reservation_details\": [{\"pnr\": \"VH67899\",\"hotel_intinerary\": [{\"hotel_name\": \"Hotel ltd.\",\"address\": {\"street_address\": \"Storgatan 3\",\"postal_code\": \"113 35\",\"city\": \"Stockholm\",\"country\": \"Sweden\"},\"start_time\": \"2019-01-31T15:00:00Z\",\"end_time\": \"2019-01-31T15:30:00Z\",\"number_of_rooms\": 2,\"ticket_delivery_method\": \"email\",\"ticket_delivery_recipient\": \"jonas.larlsson@kustom.com\",\"hotel_price\": 23050,\"class\": \"Business\",\"passenger_id\": [1]}],\"passengers\": [{\"id\": 1,\"title\": \"mr\",\"first_name\": \"Adam\",\"last_name\": \"Adamson\"}],\"insurance\": [{\"insurance_company\": \"Insurance Company X\",\"insurance_type\": \"travel\",\"insurance_price\": 0}],\"affiliate_name\": \"TradeMaxi AB\"}],\"air_reservation_details\": [{\"pnr\": \"VH67899\",\"intinerary\": [{\"departure\": \"ARN\",\"departure_city\": \"Stockholm\",\"arrival\": \"NCE\",\"arrival_city\": \"Nice\",\"carrier\": \"SK\",\"segment_price\": 34000,\"departure_date\": \"2019-01-30T15:00:00Z\",\"ticket_delivery_method\": \"email\",\"ticket_delivery_recipient\": \"jonas.larlsson@kustom.com\",\"passenger_id\": [1]}],\"passengers\": [{\"id\": 1,\"title\": \"mr\",\"first_name\": \"Adam\",\"last_name\": \"Adamson\"}],\"insurance\": [{\"insurance_company\": \"Insurance Company X\",\"insurance_type\": \"travel\",\"insurance_price\": 0}],\"affiliate_name\": \"TradeMaxi AB\"}],\"customer_account_info\": [{\"unique_account_identifier\": \"12345\",\"account_registration_date\": \"2016-01-24T15:00:00Z\",\"account_last_modified\": \"2017-01-24T15:00:00Z\"}],\"payment_history_full\": [{\"payment_option\": \"card\",\"number_paid_purchases\": 2,\"total_amount_paid_purchases\": 1234,\"date_of_last_paid_purchase\": \"2018-01-24T15:00:00Z\",\"date_of_first_paid_purchase\": \"2018-01-24T15:00:00Z\"}]}" - `attachment.content_type` (string, required) The content type of the body. It is usually represented as "application/vnd.klarna.internal.emd-v2+json" Example: "application/vnd.klarna.internal.emd-v2+json" - `purchase_currency` (string, required) ISO 4217 purchase currency. Example: "USD" - `locale` (string) RFC 1766 customer's locale. Example: "en-US" - `external_payment_methods` (array) List of external payment methods that will be displayed as part of payment methods in the checkout. - `external_payment_methods.name` (string, required) The name of the payment provider. (max 255 characters) Example: "PayhereUs" - `external_payment_methods.fee` (integer) Minor units. Includes tax. - `external_payment_methods.description` (string) Short description of the payment method. This is displayed below the selected payment method. (max 500 characters) Example: "an American company operating a worldwide online payments system" - `external_payment_methods.countries` (array) If specified, limits the method to the listed countries (alpha 2 codes). - `external_payment_methods.label` (string) Controls label of buy buttoncontinuecomplete Example: "continue" - `external_payment_methods.redirect_url` (string, required) URL to redirect to. (must be https, min 7, max 2000 characters) Example: "https://www.example.com/us/start" - `external_payment_methods.image_url` (string) URL to an image to display. (must be https, max 2000 characters) Example: "https://www.exampleobjects.com/product-image-1200x1200.jpg" - `tags` (array) Extra information added to the order. Example: ["dangerous_goods", "bulky"] ## Response 400 fields (application/json): - `error_type` (string, required) Error type. Possible values: unsupported_shipping_address, address_error or approval_failed Example: "address_error" - `error_text` (string, required) Error text. Required if error_type is address_error or approval_failed Example: "Ooops, something went wrong..." ## Response 301 fields ## Response 302 fields ## Response 303 fields ## Response 307 fields