composer require fond-of-spryker/companies-company-addresses-rest-api
Add/Update Company Unit Address
curl -X POST "http://glue.yourdomain.com/companies/{{company_uuid}}/companies-company-addresses/" \
-H 'Content-Type: application/json' \
-d $'{
"data": {
"type": "companies-company-addresses",
"attributes": {
"name1": "{{name1}}",
"name2": "{{name2}}",
"address1": "{{address1}}",
"address2": "{{address2}}",
"city": "{{city}}",
"zipCode": "{{zipCode}}",
"country": "{{countryIso2Code}}",
"phone": "{{phone}}",
"fax": "{{fax}}",
"comment": "{{comment}}",
"isDefaultBilling": {{is default billing}}
}
}
}
}'
PATCH {{glue_uri}}//companies/{{company_uuid}}/companies-company-addresses/{{company_unit_address_uuid}}
curl -X POST "http://glue.yourdomain.com/companies/{{company_uuid}}/companies-company-addresses/{{company_unit_address_uuid}}" \
-H 'Content-Type: application/json' \
-d $'{
"data": {
"type": "companies-company-addresses",
"attributes": {
"name1": "{{name1}}",
"name2": "{{name2}}",
"address1": "{{address1}}",
"address2": "{{address2}}",
"city": "{{city}}",
"zipCode": "{{zipCode}}",
"country": "{{countryIso2Code}}",
"phone": "{{phone}}",
"fax": "{{fax}}",
"comment": "{{comment}}",
"isDefaultBilling": {{is default billing}}
}
}
}
}'