Skip to content

Store adapter — Magento 2

The adapter object contains properties for connecting to the Magento 2 API.

Parent object: a store with property "platform" : "magento2"

Required properties

The following adapter properties are required for Magento 2 stores.

access_token

Propertyaccess_token
NameMagento 2 Access Token
DescriptionFound in Magento admin panel > System > Extensions > Integrations
Data typestring
Required?Yes

store_url

Propertystore_url
NameMagento 2 Store URL
Data typestring
Required?Yes

Optional properties

The following adapter properties are optional for Magento 2 stores.

import_status

Propertyimport_status
NameOrder Import Status
DescriptionStatus of orders to import
Data typestring
Default"processing"

store_view_code

Propertystore_view_code
NameStore View Code
DescriptionFor multi-store installations. Only orders from the specified store will be imported
Data typestring

Example

Example: create a new Magento 2 store
curl -X POST \
    -H "Authorization: Bearer $JWT_TOKEN" \
    -H "Content-Type: application/json" \
    https://api.getdropstream.com/stores \
    -d @- <<EOF
{ "customer_id": "3775",
  "name": "Your Magento 2 Store",
  "platform": "magento2",
  "adapter": {
    "access_token": "abc123",
    "store_url": "http://example.com",
    "import_status": "processing",
    "store_view_code": "abc123"
  }
}
EOF

For details about this request type, see: Create a new store.