Skip to main content

Update a Cart Shipping Group

PUT Update a Cart Shipping Group

https://useast.api.elasticpath.com/v2/carts/:cartID/shipping-groups/shippingGroupID

Parameters

Path parameters

NameRequiredTypeDescription
cartIDRequiredstringThe unique identifier of the cart to retreive a shipping group for a cart.
shippingGroupIDRequiredstringThe unique identifier of the shipping group related to a cart.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
typeRequiredstringRepresents the type of object being returned. Must be set to shipping_group.
shipping_typeOptionalstringRepresents the type of shipment. The maximum character allowed is 50. For example, UPS Ground, Canada Post Expedited.
tracking_referenceOptionalstringSpecifies the tracking reference of the shipment. The maximum character allowed is 50. For example, ground_1234.
shipping_priceOptionalobjectIncludes shipping_price.base,shipping_price.tax, and shipping_price.fees.
shipping_price.baseOptionalnumberSpecifies the base price of the shipment. If not provided, it is zero.
shipping_price.taxOptionalnumberSpecifies the tax price applied to the shipment. If not provided, it is zero.
shipping_price.feesOptionalnumberSpecifies the shipping fees applied to the shipment. If not provided, it is zero.
delivery_estimateOptionalobjectSpecifies the delivery estimate object.
delivery_estimate.startOptionalstringRepresents the start date of the delivery.
delivery_estimate.endOptionalstringRepresents the end date of the delivery.
addressOptionalobjectSpecifies the details of the shipping address.
address.first_nameOptionalstringSpecifies first name of the shipping recipient.
address.last_nameOptionalstringSpecifies last name of the shipping recipient.
address.company_nameOptionalstringSpecifies company name of the shipping recipient.
address.line_1OptionalstringIndicates first line of the shipping address.
address.line_2OptionalstringIndicates second line of the shipping address.
address.postcodeOptionalstringRepresents postal code of the shipping address.
address.countyOptionalstringSpecifies the county of the shipping address.
address.countryOptionalstringSpecifies the country of the shipping address.
address.regionOptionalstringSpecifies the state, province, or region of the shipping address.
address.instructionsOptionalstringSpecifies shipping instructions.

Request Example

curl -X PUT https://useast.api.elasticpath.com/v2/carts/:cartID/shipping-groups/shippingGroupID
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $ {
"data": {
"type": "shipping_group",
"shipping_type": "shipping-type-updated",
"tracking_reference": "tracking-reference-updated",
"shipping_price": {
"base":500,
"tax":100,
"fees":100
},
"delivery_estimate": {
"start": "2023-04-25T00:00:00.000+00:00",
"end": "2023-04-29T00:00:00.000+00:00"
},
"address": {
"first_name": "Ron",
"last_name": "Swanson",
"phone_number": "",
"company_name": "Ron Swanson Enterprises",
"line_1": "1 Sunny Street",
"line_2": "",
"postcode": "92802",
"county": "Orange",
"country": "US",
"region": "CA",
"instructions": ""
}
}
}

Response Example

200 OK

{
"data": {
"type": "shipping_group",
"id": "eb063818-939a-458f-97a4-2601c0c2b445",
"relation": "cart",
"order_id": "",
"cart_id": "2b5cb684-7fdf-4a50-9e6a-9e880f7150ba",
"shipping_type": "shipping-type-updated",
"tracking_reference": "tracking-reference-updated",
"address": {
"first_name": "Andy",
"last_name": "Dwyer",
"company_name": "Ron Swanson Enterprises",
"phone_number": "",
"line_1": "1 Sunny Street",
"line_2": "",
"city": "Vancouver",
"postcode": "92802",
"county": "Orange",
"country": "US",
"region": "WA",
"instructions": ""
},
"delivery_estimate": {
"start": "2023-04-26T22:52:19Z",
"end": "2023-04-27T22:52:19Z"
},
"created_at": "2023-06-23T16:36:10.717Z",
"updated_at": "2023-06-26T15:44:14.620214165Z",
"relationships": {
"cart": {
"data": {
"type": "cart",
"id": "2b5cb684-7fdf-4a50-9e6a-9e880f7150ba"
}
}
},
"meta": {
"shipping_display_price": {
"total": {
"amount": 700,
"currency": "USD",
"formatted": "$7.00"
},
"base": {
"amount": 500,
"currency": "USD",
"formatted": "$5.00"
},
"tax": {
"amount": 100,
"currency": "USD",
"formatted": "$1.00"
},
"fees": {
"amount": 100,
"currency": "USD",
"formatted": "$1.00"
}
}
}
}
}