fond-of-spryker/companies-company-addresses-rest-api

Company company addresses rest api

dev-master 2020-04-06 07:58 UTC

README

PHP from Travis config license

Installation

composer require fond-of-spryker/companies-company-addresses-rest-api

Glue API

Add/Update Company Unit Address

POST {{glue_uri}}//companies/{{company_uuid}}/companies-company-addresses/
Example
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}}
Example
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}}
                }
              }            
          }
     }'