POST

get_settings

This action returns settings of an online shop, e.g. the tax settings.

Query parameters

action
string

Requested method

required
default : get_settings
shop_number
string

Your shop number.

required
example : 11413
trace_id
string

Unique request trace ID.

required
example : sma-9412

Response

array[object]
error
integer

Error code 0 means no error.

required
error_text
string or null

Error text; null means no error.

required
shopgate_library_version
string

Shopgate Library version. Example: “2.5.0”

required
plugin_version
string

Plugin version. Example: “2.5.3”

required
trace_id
string

Request trace-ID, needed as reference for contact. Example: “sma-4f99573d74ae1”

required
allowed_address_countries
array[object]

A list of countries which are allowed to use on customer address creation

allowed_shipping_countries
array[object]

A list of countries where the shop delivers to

tax
array[object]
required
payment_methods
array[object]
required
customer_groups
array[object]

A list of ShopgateCustomerGroups.

Error codes

Code Description
2 cannot open/create logfile(s)
10 invalid value in configuration
11 error reading or writing configuration
20 no action specified
21 unknown action requested
22 disabled action requested
23 wrong response format
83 database error
100 no connection to server
101 Unknown action
102 error code received from merchant API
120 authentication failed
999 Unknown error

Example

{
  "error": 0,
  "error_text": null,
  "trace_id": null,
  "shopgate_library_version": "2.9.1",
  "plugin_version": "2.9.2",
  "customer_groups": [
    {
      "id": "0",
      "name": "NOT LOGGED IN",
      "is_default": 0,
      "customer_tax_class_key": "Retail Customer"
    },
    {
      "id": "1",
      "name": "Registered",
      "is_default": 1,
      "customer_tax_class_key": "Retail Customer"
    },
    {
      "id": "10",
      "name": "Wholesale Customer",
      "is_default": 0,
      "customer_tax_class_key": "Wholesale Customer"
    }
  ],
  "allowed_shipping_countries": [
    {
      "country": "AU",
      "state": [
        "All"
      ]
    },
    {
      "country": "AT",
      "state": [
        "All"
      ]
    },
    {
      "country": "CA",
      "state": [
        "All"
      ]
    },
    {
      "country": "FR",
      "state": [
        "All"
      ]
    },
    {
      "country": "GB",
      "state": [
        "All"
      ]
    },
    {
      "country": "US",
      "state": [
        "All"
      ]
    }
  ],
  "allowed_address_countries": [
    {
      "country": "AU",
      "state": [
        "All"
      ]
    },
    {
      "country": "AT",
      "state": [
        "All"
      ]
    },
    {
      "country": "CA",
      "state": [
        "All"
      ]
    },
    {
      "country": "FR",
      "state": [
        "All"
      ]
    },
    {
      "country": "GB",
      "state": [
        "All"
      ]
    },
    {
      "country": "US",
      "state": [
        "All"
      ]
    }
  ],
  "tax": {
    "product_tax_classes": [
      {
        "id": "2",
        "key": "Taxable Goods"
      },
      {
        "id": "4",
        "key": "Shipping"
      }
    ],
    "customer_tax_classes": [
      {
        "id": "3",
        "key": "Retail Customer",
        "is_default": 1
      },
      {
        "id": "5",
        "key": "Wholesale Customer",
        "is_default": 0
      }
    ],
    "tax_rates": [
      {
        "id": "1",
        "key": "1",
        "display_name": "US-WA-*-Default",
        "tax_percent": "9.5000",
        "country": "US",
        "state": "US-WA",
        "zipcode_type": "all",
        "zipcode_pattern": "",
        "zipcode_range_from": "",
        "zipcode_range_to": ""
      },
      {
        "id": "3",
        "key": "3",
        "display_name": "US-IL-*-Default",
        "tax_percent": "6.5000",
        "country": "US",
        "state": "US-IL",
        "zipcode_type": "all",
        "zipcode_pattern": "",
        "zipcode_range_from": "",
        "zipcode_range_to": ""
      }
    ],
    "tax_rules": [
      {
        "id": "1",
        "name": "Retail Customer-Taxable Goods-Rate 1",
        "priority": "1",
        "product_tax_classes": [
          {
            "id": "2",
            "key": "2"
          },
          {
            "id": "4",
            "key": "4"
          }
        ],
        "customer_tax_classes": [
          {
            "id": "3",
            "key": "3"
          }
        ],
        "tax_rates": [
          {
            "id": "1",
            "key": "1"
          }
        ]
      }
    ]
  },
  "payment_methods": [
    {
      "id": "cod"
    },
    {
      "id": "paypal"
    }
  ]
}