Assigns a specified billing address to a specified cart
Assigns a specified billing address to a specified cart.
Path parameters
-
The cart ID.
Body
-
Interface AddressInterface
-
useForShipping boolean
POST /V1/negotiable-carts/{cartId}/billing-address
curl \
-X POST https://magento2.winkelstraat.mac/rest/all/V1/negotiable-carts/{cartId}/billing-address \
-d '{"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"}]},"useForShipping":true}'
Request examples
{
"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"
}
]
},
"useForShipping": true
}
Response examples (200)
42
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 (400)
{
"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"
}