Fee management

Retrieving fees

get

Retrieves all fees for tenant.

Authorizations
Path parameters
tenantstringRequired

the tenant to work on.

Example: testtenant
Query parameters
siteCodestringOptional

A list of site codes.

Default: main
codestringOptional

A list of fee codes.

idstringOptional

A list of feeIds.

pageNumberinteger · min: 1Optional

The page number to be retrieved where the size of the pages must be specified by the pageSize parameter. The number of the first page is 1.

Default: 1
pageSizeinteger · min: 1Optional

The number of documents being retrieved on one page.

Default: 16
Header parameters
Accept-Languagestring · min: 1Optional

The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.

Default: *
Responses
200
Request was successful.
application/json
get
GET /fee/{tenant}/fees HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "5a030b5da1aff5000e31d43e",
    "name": {
      "de": "Sixpack PET",
      "en": "Sixpack PET"
    },
    "code": "apple_picking_fee",
    "feeType": "ABSOLUTE",
    "siteCode": "main",
    "feeAbsolute": {
      "amount": 3.5,
      "currency": "EUR"
    },
    "active": true,
    "taxable": false
  },
  {
    "id": "5a030b5da1aff5000e31d43e",
    "name": {
      "de": "ZACKE Bier",
      "en": "ZACKE Beer"
    },
    "code": "apple_mackintosh_fee",
    "feeType": "ABSOLUTE",
    "siteCode": "main",
    "feeAbsolute": {
      "amount": 4.5,
      "currency": "EUR"
    },
    "active": true,
    "taxable": false
  }
]

Creating fee

post

Creates a new fee.


Required scopes

  • fee.fee_create

Authorizations
Path parameters
tenantstringRequired

the tenant to work on.

Example: testtenant
Header parameters
Content-LanguagestringOptional

The locale identifier of the language of the updated attribute.

Body
idstringOptional

Unique identifier of the fee.

nameall ofRequired
anyOptional

The localized fee name.

and
one ofOptional

The localized value in the form of map (language, value) or string.

stringOptional

string in the specified language.

Example: Longneck bottle
or
descriptionall ofOptional
anyOptional

The localized fee description.

and
one ofOptional

The localized value in the form of map (language, value) or string.

stringOptional

string in the specified language.

Example: Longneck bottle
or
codestring · max: 100Required

The code-name, unique for the tenant.

feeTypestring · enumRequired

'PERCENT' for relative values, 'ABSOLUTE' for float values or 'ABSOLUTE_MULTIPLY_ITEMQUANTITY' for float values to be multiplied by the quantity of the item.

Possible values:
feePercentagenumberOptional

The fee rate in percentage. Required if feeType is 'PERCENT'.

feeAbsoluteall ofOptional
anyOptional

The fee as an absolute amount. Required if type is 'ABSOLUTE'.

and
itemTypestring · enumOptional

The itemtype the fee can belong to. It could be a product or paymenttype.

Possible values:
siteCodestringRequired

The SiteCode the fee belongs to.

activebooleanRequired

Flag indicating whether the fee is currently active or not.

taxablebooleanOptional

Flag indicating whether the fee is taxable or not.

taxCodestringOptional

The tax code. When 'taxable' is set to true, the taxCode is mandatory

yrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

Responses
201
The resource has been successfully created.
application/json
post
POST /fee/{tenant}/fees HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 190

{
  "name": {
    "de": "Sixpack PET",
    "en": "Sixpack PET"
  },
  "code": "apple_picking_fee",
  "feeType": "ABSOLUTE",
  "siteCode": "main",
  "feeAbsolute": {
    "amount": 3.5,
    "currency": "EUR"
  },
  "active": true,
  "taxable": false
}
{
  "id": "5d80a39ceec29e04726e921f",
  "yrn": "urn:yaas:saasag:fee:id:tenantName;5d80a39ceec29e04726e921f"
}

Retrieving fee by id

get

Retrieving a fee by given id.

Authorizations
Path parameters
idstringRequired

The unique identifier of the requested fee.

tenantstringRequired

the tenant to work on.

Example: testtenant
Query parameters
withItemsbooleanOptional

Boolean parameter that enables the retrieval of item YRNs the fee is assigned to. By default, this value is false.

Default: false
Header parameters
Accept-Languagestring · min: 1Optional

The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.

Default: *
Responses
200
Fee successfully retrieved.
application/json
get
GET /fee/{tenant}/fees/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "fee": {
    "id": "5d9459d453b0c703bb846e44",
    "active": true,
    "code": "apple_picking_fee",
    "feeAbsolute": {
      "amount": 3.5,
      "currency": "EUR"
    },
    "feeType": "ABSOLUTE",
    "name": {
      "en": "Sixpack PET",
      "de": "Sixpack PET"
    },
    "description": "Apple Picking Fee",
    "siteCode": "main",
    "taxable": false,
    "yrn": "urn:yaas:saasag:fee:id:tenantName;5d9459d453b0c703bb846e44"
  },
  "itemYRNs": {
    "siteCode": "main",
    "itemYrns": [
      "urn:yaas:saasag:caasproduct:product:oddity;5f734137b2a4130018db2766",
      "urn:yaas:saasag:caasproduct:product:oddity;5f73413db2a4130018db2767"
    ]
  }
}

Updating a fee

put

Updates a fee.


Required scopes

  • fee.fee_update

Authorizations
Path parameters
idstringRequired

The unique identifier of the requested fee.

tenantstringRequired

the tenant to work on.

Example: testtenant
Query parameters
partialbooleanOptional

Boolean parameter that defines the update type. By default, its value is false. For partial updates, the value is true.

Default: false
Header parameters
Content-LanguagestringOptional

The locale identifier of the language of the updated attribute.

Body
idstringOptional

Unique identifier of the fee.

nameall ofRequired
anyOptional

The localized fee name.

and
one ofOptional

The localized value in the form of map (language, value) or string.

stringOptional

string in the specified language.

Example: Longneck bottle
or
descriptionall ofOptional
anyOptional

The localized fee description.

and
one ofOptional

The localized value in the form of map (language, value) or string.

stringOptional

string in the specified language.

Example: Longneck bottle
or
codestring · max: 100Required

The code-name, unique for the tenant.

feeTypestring · enumRequired

'PERCENT' for relative values, 'ABSOLUTE' for float values or 'ABSOLUTE_MULTIPLY_ITEMQUANTITY' for float values to be multiplied by the quantity of the item.

Possible values:
feePercentagenumberOptional

The fee rate in percentage. Required if feeType is 'PERCENT'.

feeAbsoluteall ofOptional
anyOptional

The fee as an absolute amount. Required if type is 'ABSOLUTE'.

and
itemTypestring · enumOptional

The itemtype the fee can belong to. It could be a product or paymenttype.

Possible values:
siteCodestringRequired

The SiteCode the fee belongs to.

activebooleanRequired

Flag indicating whether the fee is currently active or not.

taxablebooleanOptional

Flag indicating whether the fee is taxable or not.

taxCodestringOptional

The tax code. When 'taxable' is set to true, the taxCode is mandatory

yrnstring · min: 1Optional

A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.

Responses
200
Fee successfully updated.
put
PUT /fee/{tenant}/fees/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 190

{
  "name": {
    "de": "Sixpack PET",
    "en": "Sixpack PET"
  },
  "code": "apple_picking_fee",
  "feeType": "ABSOLUTE",
  "siteCode": "main",
  "feeAbsolute": {
    "amount": 3.5,
    "currency": "EUR"
  },
  "active": true,
  "taxable": false
}

No content

Deleting a fee

delete

Deletes a fee by given id.


Required scopes

  • fee.fee_delete

Authorizations
Path parameters
idstringRequired

The unique identifier of the requested fee.

tenantstringRequired

the tenant to work on.

Example: testtenant
Responses
204
The resource has been successfully deleted.
delete
DELETE /fee/{tenant}/fees/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?