Post v1 guestcarts cart id shippinginformation
Body
-
Interface ShippingInformationInterface
POST /V1/guest-carts/{cartId}/shipping-information
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/guest-carts/{cartId}/shipping-information \
-d '{"addressInformation":{"shipping_address":{"id":42,"region":"string","region_id":42,"region_code":"string","country_id":"string","street":["string"],"company":"string","telephone":"string","fax":"string","postcode":"string","city":"string","firstname":"string","lastname":"string","middlename":"string","prefix":"string","suffix":"string","vat_id":"string","customer_id":42,"email":"string","same_as_billing":42,"customer_address_id":42,"save_in_address_book":42,"extension_attributes":{"discounts":[{"discount_data":{"amount":42.0,"base_amount":42.0,"original_amount":42.0,"base_original_amount":42.0},"rule_label":"string","rule_i_d":42}],"gift_registry_id":42,"pickup_location_code":"string"},"custom_attributes":[{"attribute_code":"string","value":"string"}]},"billing_address":{"id":42,"region":"string","region_id":42,"region_code":"string","country_id":"string","street":["string"],"company":"string","telephone":"string","fax":"string","postcode":"string","city":"string","firstname":"string","lastname":"string","middlename":"string","prefix":"string","suffix":"string","vat_id":"string","customer_id":42,"email":"string","same_as_billing":42,"customer_address_id":42,"save_in_address_book":42,"extension_attributes":{"discounts":[{"discount_data":{"amount":42.0,"base_amount":42.0,"original_amount":42.0,"base_original_amount":42.0},"rule_label":"string","rule_i_d":42}],"gift_registry_id":42,"pickup_location_code":"string"},"custom_attributes":[{"attribute_code":"string","value":"string"}]},"shipping_method_code":"string","shipping_carrier_code":"string","extension_attributes":{"newsletter_subscribe":"string"},"custom_attributes":[{"attribute_code":"string","value":"string"}]}}'
Request examples
{
"addressInformation": {
"shipping_address": {
"id": 42,
"region": "string",
"region_id": 42,
"region_code": "string",
"country_id": "string",
"street": [
"string"
],
"company": "string",
"telephone": "string",
"fax": "string",
"postcode": "string",
"city": "string",
"firstname": "string",
"lastname": "string",
"middlename": "string",
"prefix": "string",
"suffix": "string",
"vat_id": "string",
"customer_id": 42,
"email": "string",
"same_as_billing": 42,
"customer_address_id": 42,
"save_in_address_book": 42,
"extension_attributes": {
"discounts": [
{
"discount_data": {
"amount": 42.0,
"base_amount": 42.0,
"original_amount": 42.0,
"base_original_amount": 42.0
},
"rule_label": "string",
"rule_i_d": 42
}
],
"gift_registry_id": 42,
"pickup_location_code": "string"
},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
},
"billing_address": {
"id": 42,
"region": "string",
"region_id": 42,
"region_code": "string",
"country_id": "string",
"street": [
"string"
],
"company": "string",
"telephone": "string",
"fax": "string",
"postcode": "string",
"city": "string",
"firstname": "string",
"lastname": "string",
"middlename": "string",
"prefix": "string",
"suffix": "string",
"vat_id": "string",
"customer_id": 42,
"email": "string",
"same_as_billing": 42,
"customer_address_id": 42,
"save_in_address_book": 42,
"extension_attributes": {
"discounts": [
{
"discount_data": {
"amount": 42.0,
"base_amount": 42.0,
"original_amount": 42.0,
"base_original_amount": 42.0
},
"rule_label": "string",
"rule_i_d": 42
}
],
"gift_registry_id": 42,
"pickup_location_code": "string"
},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
},
"shipping_method_code": "string",
"shipping_carrier_code": "string",
"extension_attributes": {
"newsletter_subscribe": "string"
},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
}
}
Response examples (200)
{
"payment_methods": [
{
"code": "string",
"title": "string"
}
],
"totals": {
"grand_total": 42.0,
"base_grand_total": 42.0,
"subtotal": 42.0,
"base_subtotal": 42.0,
"discount_amount": 42.0,
"base_discount_amount": 42.0,
"subtotal_with_discount": 42.0,
"base_subtotal_with_discount": 42.0,
"shipping_amount": 42.0,
"base_shipping_amount": 42.0,
"shipping_discount_amount": 42.0,
"base_shipping_discount_amount": 42.0,
"tax_amount": 42.0,
"base_tax_amount": 42.0,
"weee_tax_applied_amount": 42.0,
"shipping_tax_amount": 42.0,
"base_shipping_tax_amount": 42.0,
"subtotal_incl_tax": 42.0,
"base_subtotal_incl_tax": 42.0,
"shipping_incl_tax": 42.0,
"base_shipping_incl_tax": 42.0,
"base_currency_code": "string",
"quote_currency_code": "string",
"coupon_code": "string",
"items_qty": 42,
"items": [
{
"item_id": 42,
"price": 42.0,
"base_price": 42.0,
"qty": 42.0,
"row_total": 42.0,
"base_row_total": 42.0,
"row_total_with_discount": 42.0,
"tax_amount": 42.0,
"base_tax_amount": 42.0,
"tax_percent": 42.0,
"discount_amount": 42.0,
"base_discount_amount": 42.0,
"discount_percent": 42.0,
"price_incl_tax": 42.0,
"base_price_incl_tax": 42.0,
"row_total_incl_tax": 42.0,
"base_row_total_incl_tax": 42.0,
"options": "string",
"weee_tax_applied_amount": 42.0,
"weee_tax_applied": "string",
"extension_attributes": {
"negotiable_quote_item_totals": {
"cost": 42.0,
"catalog_price": 42.0,
"base_catalog_price": 42.0,
"catalog_price_incl_tax": 42.0,
"base_catalog_price_incl_tax": 42.0,
"cart_price": 42.0,
"base_cart_price": 42.0,
"cart_tax": 42.0,
"base_cart_tax": 42.0,
"cart_price_incl_tax": 42.0,
"base_cart_price_incl_tax": 42.0,
"extension_attributes": {}
},
"sku": "string",
"manufacturer_name": "string",
"regular_price_incl_tax": "string"
},
"name": "string"
}
],
"total_segments": [
{
"code": "string",
"title": "string",
"value": 42.0,
"area": "string",
"extension_attributes": {
"tax_grandtotal_details": [
{
"amount": 42.0,
"rates": [
{
"percent": "string",
"title": "string"
}
],
"group_id": 42
}
],
"gift_cards": "string",
"gw_order_id": "string",
"gw_item_ids": [
"string"
],
"gw_allow_gift_receipt": "string",
"gw_add_card": "string",
"gw_price": "string",
"gw_base_price": "string",
"gw_items_price": "string",
"gw_items_base_price": "string",
"gw_card_price": "string",
"gw_card_base_price": "string",
"gw_base_tax_amount": "string",
"gw_tax_amount": "string",
"gw_items_base_tax_amount": "string",
"gw_items_tax_amount": "string",
"gw_card_base_tax_amount": "string",
"gw_card_tax_amount": "string",
"gw_price_incl_tax": "string",
"gw_base_price_incl_tax": "string",
"gw_card_price_incl_tax": "string",
"gw_card_base_price_incl_tax": "string",
"gw_items_price_incl_tax": "string",
"gw_items_base_price_incl_tax": "string"
}
}
],
"extension_attributes": {
"coupon_label": "string",
"negotiable_quote_totals": {
"items_count": 42,
"quote_status": "string",
"created_at": "string",
"updated_at": "string",
"customer_group": 42,
"base_to_quote_rate": 42.0,
"cost_total": 42.0,
"base_cost_total": 42.0,
"original_total": 42.0,
"base_original_total": 42.0,
"original_tax": 42.0,
"base_original_tax": 42.0,
"original_price_incl_tax": 42.0,
"base_original_price_incl_tax": 42.0,
"negotiated_price_type": 42,
"negotiated_price_value": 42.0
},
"base_customer_balance_amount": 42.0,
"customer_balance_amount": 42.0,
"coupon_codes": [
"string"
],
"coupons_labels": [
"string"
],
"reward_points_balance": 42.0,
"reward_currency_amount": 42.0,
"base_reward_currency_amount": 42.0
}
},
"extension_attributes": {
"adyen_payment_methods_response": "string",
"adyen_connected_terminals": "string"
}
}
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}