Product Fees management

Retrieving all fees with given productId

get

Retrieve all fees with given productId.

Authorizations
Path parameters
tenantstringRequired

the tenant to work on.

Example: testtenant
productIdstringRequired

The unique identifier of the requested product.

Query parameters
siteCodestringOptional

A list of site codes.

Default: main
expandbooleanOptional

Whether only the fee-id is in the response or the full fees.

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
200Success
application/json
Responseone of
or
string[]OptionalExample: ["57b30fd2289c48001daf5486","96b30fd4586c48001daf1752"]
get
GET /fee/{tenant}/productFees/{productId}/fees HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "5d94587853b0c7036ab0ab7b",
    "active": true,
    "code": "lemon_picking_fee",
    "feeAbsolute": {
      "amount": 4.5,
      "currency": "EUR"
    },
    "feeType": "ABSOLUTE",
    "name": "Lemon Picking Fee",
    "siteCode": "main",
    "taxable": false,
    "yrn": "urn:yaas:saasag:fee:id:tenantName;5d94587853b0c7036ab0ab7b"
  },
  {
    "id": "5d94587853b0c7036ab0ab7b",
    "active": true,
    "code": "apple_picking_fee",
    "feeAbsolute": {
      "amount": 3.5,
      "currency": "EUR"
    },
    "feeType": "ABSOLUTE",
    "name": "Apple Picking Fee",
    "siteCode": "main",
    "taxable": false,
    "yrn": "urn:yaas:saasag:fee:id:tenantName;5d9457d953b0c7036ab0ab7a"
  }
]

Adding a list of fees to a product

put

Adds a list of feeIds to the itemYRN.


Required scopes

  • fee.item_update

Authorizations
Path parameters
tenantstringRequired

the tenant to work on.

Example: testtenant
productIdstringRequired

The unique identifier of the requested product.

Query parameters
siteCodestringOptional

A list of site codes.

Default: main
partialbooleanOptional

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

Default: false
Body
feeIdsstring[]Required
Responses
200
Resource updated successfully.
put
PUT /fee/{tenant}/productFees/{productId}/fees HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "feeIds": [
    "57b30fd2289c48001daf5486",
    "96b30fd4586c48001daf1752"
  ]
}

No content

Deleting all fees of an itemYRN

delete

Deletes item fee with specified productId in the itemYRN


Required scopes

  • fee.fee_delete and/or

  • fee.item_delete

Authorizations
Path parameters
tenantstringRequired

the tenant to work on.

Example: testtenant
productIdstringRequired

The unique identifier of the requested product.

Responses
204
Resource deleted successfully.
delete
DELETE /fee/{tenant}/productFees/{productId}/fees HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Deleting a fee from the itemYRN

delete

Deletes a fee for the specified productId and optionally deletes item fee if does not contain any more fee ids.


Required scopes

  • fee.fee_delete and/or

  • fee.item_delete

Authorizations
Path parameters
feeIdstringRequired
tenantstringRequired

the tenant to work on.

Example: testtenant
productIdstringRequired

The unique identifier of the requested product.

Responses
204
Resource deleted successfully.
delete
DELETE /fee/{tenant}/productFees/{productId}/fees/{feeId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?