Tenant configurations

Manage Tenant Configurations

Retrieving configurations

get

Retrieves a list of configurations.


Required scopes

  • configuration.configuration_view

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Query parameters
keysstringOptional
Responses
200
OK
application/json
get
GET /configuration/{tenant}/configurations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
200

OK

[
  {
    "key": "customer.deletion.redirecturl",
    "secured": false,
    "value": "https://tenant.com/custDelete?token=",
    "version": 1
  },
  {
    "key": "customer.passwordreset.redirecturl",
    "secured": false,
    "value": "https://tenant.com/changePassword?token=",
    "version": 1
  },
  {
    "key": "customer.changeemail.redirecturl",
    "secured": false,
    "value": "https://tenant.com/emailChangeConfirm?token=",
    "version": 1
  },
  {
    "key": "cust.notification.email.from",
    "secured": false,
    "value": "[email protected]",
    "version": 3
  },
  {
    "key": "project_country",
    "secured": false,
    "value": "EN",
    "version": 2
  },
  {
    "key": "project_curr",
    "secured": false,
    "value": "[{\"id\":\"EUR\",\"label\":\"Euro\",\"default\":true,\"required\":true}]",
    "version": 3
  },
  {
    "key": "project_lang",
    "secured": false,
    "value": "[{\"id\":\"en\",\"label\":\"English\",\"default\":true,\"required\":true}]",
    "version": 2
  },
  {
    "key": "taxConfiguration",
    "secured": false,
    "value": {
      "taxClassOrder": [
        "FULL",
        "HALF",
        "ZERO"
      ],
      "taxClasses": {
        "FULL": 19,
        "HALF": 7,
        "ZERO": 0
      }
    },
    "version": 2
  },
  {
    "key": "packagingConf",
    "secured": false,
    "value": {
      "packagingGroupOptions": [
        "1_cooling_product",
        "2_standard",
        "3_fragile"
      ],
      "packagingPositionOptions": [
        "1_bottom_robust",
        "2_bottom_insensitive",
        "3_middle_standard",
        "4_top_sensitive"
      ]
    },
    "version": 2
  },
  {
    "key": "storefront.htmlPage",
    "secured": false,
    "value": "index.html",
    "version": 1
  },
  {
    "key": "storefront.host",
    "secured": false,
    "value": "tenant.com",
    "version": 1
  },
  {
    "key": "unitConf",
    "secured": false,
    "value": [
      {
        "units": {
          "LTR": {
            "availableUnitValue": 1,
            "conversion": {
              "MLT": 1000
            }
          },
          "GRM": {
            "availableUnitValue": 100,
            "conversion": {
              "KGM": 0.001
            }
          },
          "KGM": {
            "availableUnitValue": 1,
            "conversion": {
              "GRM": 1000
            }
          },
          "MLT": {
            "availableUnitValue": 100,
            "conversion": {
              "LTR": 0.001
            }
          }
        },
        "name": "UnitConfiguration",
        "description": "This object holds the unit configurations and the factors to calculate between different units"
      }
    ],
    "version": 1
  }
]

Creating configurations

post

Creates new configurations.


Required scopes

  • configuration.configuration_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

Bodyobject · Configuration[]
keystring · min: 1Optional

Configuration's key.

valueone ofOptional

Client configuration's value. It can be any valid JSON object.

objectOptional
or
stringOptional
or
object[]Optional
or
booleanOptional
versionintegerOptional

Configuration's version.

securedbooleanOptional

Flag indicating whether the configuration should be encrypted.

Default: false
Responses
201
Created
application/json
post
POST /configuration/{tenant}/configurations HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 278

[
  {
    "key": "project_country",
    "secured": false,
    "value": "DE",
    "version": 1
  },
  {
    "key": "project_lang",
    "secured": false,
    "value": "[{\"id\":\"en\",\"label\":\"English\",\"default\":true,\"required\":true},{\"id\":\"de\",\"label\":\"German\",\"default\":false,\"required\":false}]",
    "version": 1
  }
]
[
  {
    "key": "project_country",
    "secured": false,
    "value": "DE",
    "version": 1
  },
  {
    "key": "project_lang",
    "secured": false,
    "value": "[{\"id\":\"en\",\"label\":\"English\",\"default\":true,\"required\":true},{\"id\":\"de\",\"label\":\"German\",\"default\":false,\"required\":false}]",
    "version": 1
  }
]

Retrieving a configuration

get

Retrieves a specified configuration.


Required scopes

  • configuration.configuration_view

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

propertyKeystringRequired

Desired configuration's key.

Responses
200
OK
application/json
get
GET /configuration/{tenant}/configurations/{propertyKey} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "key": "project_lang",
  "secured": false,
  "value": "[{\"id\":\"en\",\"label\":\"English\",\"default\":true,\"required\":true}]",
  "version": 2
}

Updating a configuration

put

Updates a specified configuration.


Required scopes

  • configuration.configuration_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

propertyKeystringRequired

Desired configuration's key.

Body
keystring · min: 1Optional

Configuration's key.

valueone ofOptional

Client configuration's value. It can be any valid JSON object.

objectOptional
or
stringOptional
or
object[]Optional
or
booleanOptional
versionintegerOptional

Configuration's version.

securedbooleanOptional

Flag indicating whether the configuration should be encrypted.

Default: false
Responses
200
OK
application/json
put
PUT /configuration/{tenant}/configurations/{propertyKey} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "key": "project_country",
  "secured": false,
  "value": "AT",
  "version": 1
}
{
  "key": "project_country",
  "secured": false,
  "value": "AT",
  "version": 1
}

Deleting a configuration

delete

Deletes a specified configuration.


Required scopes

  • configuration.configuration_manage

Authorizations
Path parameters
tenantstringRequired

Your Emporix tenant's name.

Note: The tenant should always be written in lowercase.

propertyKeystringRequired

Desired configuration's key.

Responses
204
No Content
delete
DELETE /configuration/{tenant}/configurations/{propertyKey} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?