Skip to main content
PATCH
/
v1
/
packages
/
{id}
Update a Package
curl --request PATCH \
  --url https://fees.sandbox.lerian.net/v1/packages/{id} \
  --header 'Content-Type: <content-type>' \
  --header 'X-Organization-Id: <x-organization-id>' \
  --data '{
  "feeGroupLabel": "Standard Package",
  "description": "Package for testing",
  "minimumAmount": "3000.00",
  "maximumAmount": "6000.00",
  "waivedAccounts": [
    "@acc001",
    "@acc002",
    "@acc003"
  ],
  "fees": {
    "admFee": {
      "feeLabel": "Administrative Fee",
      "calculationModel": {
        "applicationRule": "flatFee",
        "calculations": [
          {
            "type": "flat",
            "value": "16.00"
          }
        ]
      },
      "referenceAmount": "originalAmount",
      "priority": 1,
      "isDeductibleFrom": true,
      "creditAccount": "@fees",
      "routeFrom": "d35a121f-a638-4d2d-966b-65657a049f12",
      "routeTo": "d35a121f-a638-4d2d-966b-65657a049f12"
    },
    "iof": {
      "feeLabel": "IOF",
      "calculationModel": {
        "applicationRule": "percentual",
        "calculations": [
          {
            "type": "percentage",
            "value": "6.00"
          }
        ]
      },
      "referenceAmount": "afterFeesAmount",
      "priority": 2,
      "isDeductibleFrom": false,
      "creditAccount": "@iof"
    }
  },
  "enable": true
}'
{
"id": "0194dc48-b6ab-728d-9b02-56bff488489a",
"feeGroupLabel": "Standard Package",
"description": "Package for testing",
"transactionRoute": "b2d91a9f-a369-4d8f-9116-660493b528ab",
"segmentId": "0197d237-c31d-74de-ab9a-8f6c4c210b97",
"ledgerId": "0197d1fb-4687-75b7-9615-a6547695ee6e",
"minimumAmount": "3000.00",
"maximumAmount": "6000.00",
"waivedAccounts": [
"@acc001",
"@acc002",
"@acc003"
],
"fees": {
"admFee": {
"feeLabel": "Administrative Fee",
"calculationModel": {
"applicationRule": "flatFee",
"calculations": [
{
"type": "flat",
"value": "16.00"
}
]
},
"referenceAmount": "originalAmount",
"priority": 1,
"isDeductibleFrom": true,
"creditAccount": "@fees",
"routeFrom": "d35a121f-a638-4d2d-966b-65657a049f12",
"routeTo": "d35a121f-a638-4d2d-966b-65657a049f12"
},
"iof": {
"feeLabel": "IOF",
"calculationModel": {
"applicationRule": "percentual",
"calculations": [
{
"type": "percentage",
"value": "6.00"
}
]
},
"referenceAmount": "afterFeesAmount",
"priority": 2,
"isDeductibleFrom": false,
"creditAccount": "@iof"
}
},
"enable": true,
"createdAt": "2025-04-10T03:21:06.782Z",
"updatedAt": "2025-04-09T18:45:17.976Z",
"deletedAt": null
}

Headers

Authorization
string

The authorization token in the 'Bearer <token>' format.
Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Content-Type
string
required

The type of media of the resource. Must be application/json.

Example:

"application/json"

X-Organization-Id
string
required

The unique identifier of the Organization associated with the request.

Example:

"0195fb87-eeb6-7487-bc58-659255a23ef1"

Path Parameters

id
string
required

Unique identifier of the package that you want to update.

Example:

"0195fd1b-b50e-7750-a897-67e2159d1aed"

Body

application/json
feeGroupLabel
string

Name of the tax group, used to identify the configured tax package.

description
string

Short summary of what this Fee Package is designed to handle.

minimumAmount
string

Minimum transaction amount below which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.

maximumAmount
string

Maximum transaction amount above which the fees in the package don't apply. Important: Use a dot (.) as the decimal separator — commas are not accepted.

waivedAccounts
string[]

List of accounts that are exempt from the taxes defined in the package.

fees
object

Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof, and its value must follow the Fee object schema.

enable
boolean

If true it indicates that the package is active.

Response

Indicates that the resource was successfully created and the operation was completed as expected.

id
string
required

Unique identifier of the package, in UUIDv7 format.

feeGroupLabel
string
required

Name of the tax group, used to identify the configured tax package.

ledgerId
string
required

Unique identifier of the Ledger this Fee Package is linked to in the Midaz Ledger.

minimumAmount
string
required

Minimum transaction amount below which the fees in the package don't apply.

maximumAmount
string
required

Maximum transaction amount above which the fees in the package don't apply.

fees
object
required

Object containing custom-named tax rules. Each key is defined by the client (e.g., admFee, iof, and its value must follow the Fee object schema.

enable
boolean
required

If true it indicates that the package is active.

description
string

Short summary of for the package explaining what it covers.

transactionRoute
string

The main accounting route that defines the nature of the transaction. Helps group related operations in the ledger.

segmentId
string

Unique identifier of the Segment this Fee Package is linked to in the Midaz Ledger.

waivedAccounts
string[]

List of accounts that are exempt from the taxes defined in the package.

createdAt
string<date-time>

Date when the package was created.

updatedAt
string<date-time>

Date when the package was last updated.

deletedAt
string<date-time>

Date when the package was deleted.