Your browser is out-of-date!

Update your browser to view this website correctly

×

How to connect Demandware to API2Cart?

First, go to the Account Manager page (https://account.demandware.com/dw/account/Home), generate dw_client_id (Client Id) and dw_api_pass (Api Password).   Then, add permissions for API2Cart API, so that our API could retrieve data from the store. Go to your Admin panel: Administration > Open Commerce API Setting > Select type: Shop & Data > Select context: Global Then, specify client application-specific configurations:            
For Type Shop:Global permissions
{
  "_v":"17.4",
  "clients":[
     {
        "client_id":"YOUR_CLIENT_ID",
        "allowed_origins": [

        ],
        "resources":[
           {
              "resource_id":"http://beta-public.api2cart.com/products/*/prices",
              "methods":["get"],
              "read_attributes":"(**)",
              "write_attributes":"(**)",
              "config":{
                 "product.prices.price_book_ids":"PRICE_BOOK_ID_1,PRICE_BOOK_ID_2,...,PRICE_BOOK_ID_N"
              }
           },
           {
              "resource_id":"http://beta-public.api2cart.com/**",
              "methods":[
                 "put",
                 "get",
                 "post",
                 "patch"
              ],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
           }
        ]
     }
  ]
}
Or per resource permissions
{
  "_v": "17.4",
  "clients": [
    {
      "client_id": "YOUR_CLIENT_ID",
      "allowed_origins": [
        
      ],
      "resources": [
        {
          "resource_id":"http://beta-public.api2cart.com/baskets",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*",
          "methods":["get","patch","delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/billing_address",
          "methods":["put"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/coupons",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/coupons/*",
          "methods":["delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/customer",
          "methods":["put"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/gift_certificate_items",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/items",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/items/*",
          "methods":["patch","delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/notes",
          "methods":["post","get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/payment_instruments",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/payment_instruments/*",
          "methods":["patch","delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/payment_methods",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/shipments",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/shipments/*",
          "methods":["patch"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/shipments/*/shipping_address",
          "methods":["put"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/shipments/*/shipping_method",
          "methods":["put"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/shipments/*/shipping_methods",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/baskets/*/submit",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/auth",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/password_reset",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*",
          "methods":["get","patch"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/addresses",
          "methods":["get","post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/addresses/*",
          "methods":["get","patch","delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/baskets",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/orders",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/password",
          "methods":["put"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/payment_instruments",
          "methods":["get","post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/customers/*/payment_instruments/*",
          "methods":["get","delete"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/orders",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/orders/*",
          "methods":["get","patch"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/orders/*/notes",
          "methods":["get","post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/orders/*/payment_methods",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/orders/*/payment_instruments",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/order_search",
          "methods":["post"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/products/*",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
           "resource_id": "http://beta-public.api2cart.com/products/*/availability",
           "methods": ["get"],
           "read_attributes": "(**)",
           "write_attributes": "(**)",
           "cache_time": 0
        },
        {
           "resource_id": "http://beta-public.api2cart.com/products/*/prices",
           "methods": ["get"],
           "read_attributes": "(**)",
           "write_attributes": "(**)",
           "cache_time": 0
        },
        {
          "resource_id":"http://beta-public.api2cart.com/site",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        },
        {
          "resource_id":"http://beta-public.api2cart.com/categories/*",
          "methods":["get"],
          "read_attributes":"(**)",
          "write_attributes":"(**)"
        }
      ]
    }
  ]
}
                           
For Type DataGlobal permissions
{
  "_v":"17.4",
  "clients":[
     {
        "client_id":"YOUR_CLIENT_ID",
        "resources":[
           {
              "resource_id":"http://beta-public.api2cart.com/**",
              "methods":[
                 "put",
                 "get",
                 "post",
                 "patch"
              ],
              "read_attributes":"(**)",
              "write_attributes":"(**)"
           }
        ]
     }
  ]
}
Or per resource permissions
{
  "_v": "17.4",
  "clients": [
    {
      "client_id": "YOUR_CLIENT_ID",
      "resources": [
        {
          "resource_id": "http://beta-public.api2cart.com/sites",
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/sites/**",
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/catalog_search",
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/product_search",
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/products/*",
          "methods": [
            "get",
            "patch"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/products/*/variant_search",
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/products/*/variations",
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/products/*/variation_attributes",
          "methods": [
            "get"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/customer_lists/**",
          "methods": [
            "get",
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/inventory_lists/*",
          "methods": ["patch"],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "http://beta-public.api2cart.com/inventory_lists/*/product_inventory_records/*",
          "methods": ["patch", "put", "get"],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
           "resource_id":"http://beta-public.api2cart.com/system_object_definitions/**",
           "methods":["get", "put" , "patch", "post", "delete"],
           "read_attributes":"(**)",
           "write_attributes":"(**)"
        }
      ]
    }
  ]
}
             

Posted in: Getting Started

Need help or advice?

Schedule a call