Set shipping/billing methods and additional data for cart and collect totals
Set shipping/billing methods and additional data for cart and collect totals.
Body
-
Interface PaymentInterface
-
shippingCarrierCode string
The carrier code.
-
shippingMethodCode string
The shipping method code.
-
additionalData object
Additional data for totals collection.
PUT /V1/carts/mine/collect-totals
curl \
-X PUT https://magento2.winkelstraat.mac/rest/all/V1/carts/mine/collect-totals \
-d '{"paymentMethod":{"po_number":"string","method":"string","additional_data":["string"],"extension_attributes":{"agreement_ids":["string"],"origin":"string"}},"shippingCarrierCode":"string","shippingMethodCode":"string","additionalData":{"extension_attributes":{"gift_messages":[{"gift_message_id":42,"customer_id":42,"sender":"string","recipient":"string","message":"string","extension_attributes":{"entity_id":"string","entity_type":"string","wrapping_id":42,"wrapping_allow_gift_receipt":true,"wrapping_add_printed_card":true}}]},"custom_attributes":[{"attribute_code":"string","value":"string"}]}}'
Request examples
{
"paymentMethod": {
"po_number": "string",
"method": "string",
"additional_data": [
"string"
],
"extension_attributes": {
"agreement_ids": [
"string"
],
"origin": "string"
}
},
"shippingCarrierCode": "string",
"shippingMethodCode": "string",
"additionalData": {
"extension_attributes": {
"gift_messages": [
{
"gift_message_id": 42,
"customer_id": 42,
"sender": "string",
"recipient": "string",
"message": "string",
"extension_attributes": {
"entity_id": "string",
"entity_type": "string",
"wrapping_id": 42,
"wrapping_allow_gift_receipt": true,
"wrapping_add_printed_card": true
}
}
]
},
"custom_attributes": [
{
"attribute_code": "string",
"value": "string"
}
]
}
}
Response examples (200)
{
"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
}
}
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "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"
}