Estimate shipping
application/json
POST
/V1/carts/{cartId}/estimate-shipping-methods-by-address-id
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/carts/{cartId}/estimate-shipping-methods-by-address-id' \
--header "Content-Type: application/json" \
--data '{"addressId":42}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/carts/{cartId}/estimate-shipping-methods-by-address-id' \
--header "Content-Type: application/xml"
Request examples
{
"addressId": 42
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<addressId type="integer">42</addressId>
</root>
Response examples (200)
[
{
"carrier_code": "string",
"method_code": "string",
"carrier_title": "string",
"method_title": "string",
"amount": 42.0,
"base_amount": 42.0,
"available": true,
"extension_attributes": {
"carrier_codes": [
{
"code": "string",
"name": "string"
}
],
"delivery_window_dates": [
{
"carrier_code": "string",
"from": "string",
"to": "string",
"method_title": "string",
"expires": "string"
}
],
"is_pickup_point": true,
"pickup_point": {
"pick_up_point_id": "string",
"carrier_method": "string",
"name": "string",
"address_lines": [
"string"
],
"city": "string",
"state": "string",
"country": "string",
"postal": "string",
"telephone": "string",
"fax": "string"
}
},
"error_message": "string",
"price_excl_tax": 42.0,
"price_incl_tax": 42.0
}
]
Response examples (200)
<?xml version="1.0" encoding="UTF-8"?>
<root type="array">
<root>
<carrier-code>string</carrier-code>
<method-code>string</method-code>
<carrier-title>string</carrier-title>
<method-title>string</method-title>
<amount type="float">42.0</amount>
<base-amount type="float">42.0</base-amount>
<available type="boolean">true</available>
<extension-attributes>
<carrier-codes type="array">
<carrier-code>
<code>string</code>
<name>string</name>
</carrier-code>
</carrier-codes>
<delivery-window-dates type="array">
<delivery-window-date>
<carrier-code>string</carrier-code>
<from>string</from>
<to>string</to>
<method-title>string</method-title>
<expires>string</expires>
</delivery-window-date>
</delivery-window-dates>
<is-pickup-point type="boolean">true</is-pickup-point>
<pickup-point>
<pick-up-point-id>string</pick-up-point-id>
<carrier-method>string</carrier-method>
<name>string</name>
<address-lines type="array">
<address-line>string</address-line>
</address-lines>
<city>string</city>
<state>string</state>
<country>string</country>
<postal>string</postal>
<telephone>string</telephone>
<fax>string</fax>
</pickup-point>
</extension-attributes>
<error-message>string</error-message>
<price-excl-tax type="float">42.0</price-excl-tax>
<price-incl-tax type="float">42.0</price-incl-tax>
</root>
</root>
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 (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
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"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>