Resources

Configuring Acquia Commerce

This quickstart method replaces the previous method of API calls that enabled Acquia Commerce Manager and Magento to communicate. This method requires the use of the Acquia Commerce Manager API endpoint. Your API endpoint can be found at the following URL:

[Commerce Connector Url]v2/config/site

Using this endpoint, combined with a HMAC signature generated by your organization HMAC key and secret, you can complete the configuration of the Commerce Connector Service by issuing a POST request through the API.

Note

Acquia will provide your organization keys and secrets when you purchase Acquia Commerce Manager.

For an example POST request, you can download the following script:

{
	"site":{
		"name":"Internal test by user XYZ",
		"description":"A test to see if deployment succeeds"
	},
	"backend_auth":{
		"name":"Magento EE dev box",
		"description":"",
		"client_id":"000001111143cp0duklaoprob240druf",
		"client_secret":"55555qy3svotri2idap58t8uon088888",
		"token":"nnnnnbjn4so3s2pn377u4wl6dc5wwwww",
		"token_secret":"wwwwwrki3ujklm8r3du54njs839yyyyy"
	},
	"frontend_auth":{
		"name":"Drupal dev box",
		"description":"",
		"client_id":"00000000-ccfb-41ad-927c-111112222233",
		"client_secret":"dddddv134nluuuuu",
		"token":"",
		"token_secret":""
	},
	"backend_system":{
		"name":"Magento EE dev box",
		"description":"",
		"type":"magento",
		"url":"https://example.com/rest/V1/",
		"uuid":"en_US",
		"token_url":"",
		"skip_ssl":true
	},
	"frontend_system":{
		"name":"Drupal dev box",
		"description":"",
		"type":"drupal",
		"url":"https://example.com",
		"uuid":"1",
		"token_url":"",
		"skip_ssl":true
	},
	"mapping":{
		"name":"By user XYZ for testing internal (deployment)",
		"description":""
	}
}

This example script returns a response with the id of the website created, and the hmac_key and the hmac_secret used to identify the website.

You must enter the hmac_key and the hmac_secret into both Drupal and your e-commerce application.

POST examples generally appear similar to the following code:

{
 "name":"Test system",
 "description":"My test system",
 "site_id":idSite,
 "type":"magento",
 "url": "urlMagento",
 "uuid": "uuidMagento",
 "skip_ssl": true,
 "auth_id": idMagentoAuth,
 "properties":

  { "webhook_secret": "5349df8vybsdgqil48ergj" }
 }

Note

Quick setup can only create one mapping at a time.

If you need more mappings for a website (for example, to map different store languages), use that website’s hmac_key and secret to sign the requests and make individual calls to the API, by passing in the following:

{"site_id":"site_id_value"}

where site_id_value is the numerical value for site_id (such as {"site_id":"17"}) to perform the following tasks:

  • Create the system for Drupal, and return the system ID.

  • Create the system for e-commerce (Magento), and return the system ID.

  • Create the mapping of Drupal’s system ID to Magento’s system ID.

In this example, the systems and mappings are associated with a site_id value of 17. If you need the auth_id of the two authorizations that were created, as those IDs are needed to create system calls, contact Acquia Support.

There is a limit to the number of websites that can be created by each organization. This limit is set by Acquia when the Acquia Commerce Manager service is ordered.