Fee management

Retrieving fees

get

Retrieves all fees for a 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
/fee/{tenant}/fees
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_packaging_fee",
    "feeType": "ABSOLUTE",
    "siteCode": "main",
    "feeAbsolute": {
      "amount": 4.5,
      "currency": "EUR"
    },
    "active": true,
    "taxable": false
  }
]

Creating a fee

post

Creates a new fee within a specified tenant. Fees can be applied to various entities, such as products or payment methods, to manage pricing structures effectively.


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.

nameone ofRequired

The localized fee name.

stringOptional

string in the specified language.

Example: Longneck bottle
or
descriptionone ofOptional

The localized fee description.

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'.

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
/fee/{tenant}/fees
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 a fee by id

get

Retrieve the details of a fee by 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
/fee/{tenant}/fees/{id}
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

Update the details of an existing 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.

nameone ofRequired

The localized fee name.

stringOptional

string in the specified language.

Example: Longneck bottle
or
descriptionone ofOptional

The localized fee description.

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'.

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.

No content

put
/fee/{tenant}/fees/{id}
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.

No content

delete
/fee/{tenant}/fees/{id}
DELETE /fee/{tenant}/fees/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?