Update invoice info
PATCH/org/:orgId/entitlement/:entitlementId/invoice/:invoiceId/info
Update a draft invoice. Only DueDate, OverallDiscount, and Memo can be updated.
Request
Path Parameters
Organization ID
Entitlement ID
Invoice ID
- application/json
Body
required
Update Invoice Info Request Params
Possible values: [PERCENTAGE
, ABSOLUTE
]
Responses
- 200
- 400
- 500
Updated Invoice info
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
Array [
]
Array [
Array [
]
]
Array [
]
Array [
]
addFixedFees
object[]
Adjust charge fields The fixed fees to be added to the invoice.
addonDetail
object
adjustDiscountByDimensions
object[]
add or adjust discount for a specific dimension
discount
object
Possible values: [PERCENTAGE
, ABSOLUTE
]
adjustMinimumSpendByDimensions
object[]
add or adjust minimum spend for a specific dimension
adjustOverallDiscount
object
discount
object
Possible values: [PERCENTAGE
, ABSOLUTE
]
adjustOverallMinimumSpend
object
billableDimensionDetails
object[]
Amount is the amount that is calculated based on the FeeExpression
billableMetricKey
object
GroupBysExpression is string expression of array of group bys.
ID is billableMetric ID (Key)
Possible values: [basic
, tiered
, bulk
, volume
, percentage
, tiered-percentage
, matrix
]
details
object[]
Details is the details of the pricing model that is used to show what the amount is for.
Description of the pricing model that is used to show what the amount is for. like 'Bulk pricing: 0-100 units', 'Tiered pricing: 0-100 units'
FeeExpression is the expression used to calculate the fee that is used to show how the amount is calculated. like '211 × $0.03'
discount
object
Possible values: [PERCENTAGE
, ABSOLUTE
]
DiscountExpression is the expression used to calculate the discount that is used to show how the discount is calculated.
Flag to indicate if this period is a trial period.
MinimumCommit is the minimum commit amount that is used to show the minimum commit amount. Will be ignored if the value is 0 or less.
Possible values: [``, DIMENSION
, DIMENSION_GROUP_BY
]
Name of this billable dimension.
Final quantity of the billable dimension in the invoice period, which calculates the fee in price model. It may be the sum value of count/sum/unique_count or latest/max value according to different aggregation type.
commitsRevenueDetails
object[]
Recurring flat fee for the invoice. There should be only one type fee for each invoice, commits, or usage.
The total amount of the commit revenue.
The quantity of the commit dimension. Default is 1.
The unit price of the commit dimension.
The creation date of the invoice when the status of the invoice may be draft or issued. It may be different from the issue date.
Due amount = SubtotalAmount + TaxAmount - AdjustOverallDiscount
DueDate = IssueDate + NetTerm
Grace Period in number of days
IssueDate, issue invoice automatically when CreationDate + GracePeriod, or issue invoice manually IssueDate >= CreationDate && IssueDate <= CreationDate + GracePeriod
Net Terms period in number of days
paymentInstallmentsDetail
object
Invoice receipt url, it only exists when there are transactions.
SPA url with JWT.
Subtotal amount calculated from the user usage.
Trial period in number of days
usageDailyRevenues
object[]
Billable dimension fees for the invoice.
billableMetricKey
object
GroupBysExpression is string expression of array of group bys.
ID is billableMetric ID (Key)
uniquePropertyItems
object
{
"addFixedFees": [
{
"endDate": "2024-07-29T15:51:28.071Z",
"quantity": 0,
"rate": 0,
"reason": "string",
"startDate": "2024-07-29T15:51:28.071Z"
}
],
"addonDetail": {
"amount": 0,
"chargeOn": "2024-07-29T15:51:28.071Z",
"description": "string",
"id": "string",
"name": "string"
},
"adjustDiscountByDimensions": [
{
"dimensionKey": "string",
"discount": {
"discountType": "PERCENTAGE",
"value": 0
},
"reason": "string"
}
],
"adjustMinimumSpendByDimensions": [
{
"dimensionKey": "string",
"minimumSpend": 0,
"reason": "string"
}
],
"adjustOverallDiscount": {
"discount": {
"discountType": "PERCENTAGE",
"value": 0
},
"reason": "string"
},
"adjustOverallMinimumSpend": {
"minimumSpend": 0,
"reason": "string"
},
"billableDimensionDetails": [
{
"amount": 0,
"billableMetricKey": {
"groupBysExpression": "string",
"id": "string"
},
"category": "basic",
"details": [
{
"descriptions": "string",
"feeExpressions": "string"
}
],
"discount": {
"discountType": "PERCENTAGE",
"value": 0
},
"discountExpression": "string",
"isTrial": true,
"minimumCommit": 0,
"minimumCommitScope": "",
"name": "string",
"quantity": 0
}
],
"commitsRevenueDetails": [
{
"amount": 0,
"description": "string",
"expression": "string",
"key": "string",
"name": "string",
"quantity": 0,
"rate": 0
}
],
"creationDate": "2024-07-29T15:51:28.071Z",
"currency": "string",
"description": "string",
"dueAmount": 0,
"dueDate": "2024-07-29T15:51:28.071Z",
"gracePeriodInDays": 0,
"issueDate": "2024-07-29T15:51:28.071Z",
"memo": "string",
"netTermsInDays": 0,
"paymentInstallmentsDetail": {
"amount": 0,
"chargeOn": "2024-07-29T15:51:28.071Z",
"description": "string"
},
"receiptUrl": "string",
"spaUrl": "string",
"subtotalAmount": 0,
"taxAmount": 0,
"trialPeriodInDays": 0,
"usageDailyRevenues": [
{
"billableMetricKey": {
"groupBysExpression": "string",
"id": "string"
},
"date": "string",
"quantity": 0,
"uniquePropertyItems": {}
}
]
}
Bad request error
- application/json
- Schema
Schema
string
Internal server error
- application/json
- Schema
Schema
string