Orders
Can be used when an orderId can be both a SalesOrder and a Subscription and any version. Response body will be either a SalesOrderResponse or a SubscriptionResponse.
- : Access Younium API
Success
No content
Bad Request.
Unauthorized
Forbidden
Not Found
GET /Orders/{id} HTTP/1.1
Host: api.sandbox.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Get any version of a subscription or a sales order Charge.
- : Access Younium API
Success
OPC-000001Id of the milestone the charge starts on. Only relevant when 'startOn' is 'Milestone'
Id of the milestone the charge ends on. Only relevant when 'endOn' is 'Milestone'
The type of a charge. OneOff, Recurring, Usage and Measured are the standard charge types; Credits is a prepaid credits charge whose behaviour is set by its rules (credits granted once or every period, expiry, rollover, overage).
Values:
- OneOff: A one-time charge.
- Recurring: A recurring charge, billed every billing period.
- Usage: A usage charge, billed in arrears for the usage reported.
- Measured: A measured charge, billed for the quantity measured for each period.
- Credits: Prepaid credits: credits granted once or every period, optionally billing usage beyond the credits as overage. The quantity is the number of credits per grant.
The credit type this charge grants credits to; null for normal charges.
Code of the credit type (the key used when reporting usage); null for normal charges.
Name of the credit type; null for normal charges.
How often a Credits charge grants its credits. Set on the product charge; an order takes it from there.
Values:
- OneTime: The credits are granted once, when the charge is invoiced (a OneOff charge); top-ups add to the same wallet.
- Recurring: The credits are granted again every billing period (a Recurring charge), one pool per period.
Where a Credits grant comes from: the credits bought with the plan, or credits bought afterwards as a top-up. Set on the order charge and copied to every credit pool funded by it.
Values:
- Plan: The Credits charge of the ordered product, or a Credits charge added on a change order.
- TopUp: A top-up: a one-time grant added to an existing wallet.
When the granted credits expire. Set per Credits charge on the order.
Values:
- TermEnd: Pool expires at the order term end. Re-aligned on renewal when the charge has rollover at renewal. Not on evergreen orders.
- RollingMonths: Pool expires creditExpiryMonths months after its start (the order start, the change order's effective date for added credits, or the top-up date).
- PeriodEnd: Recurring grants only: credits minted for a billing period expire at the end of that period (no rollover).
What happens to usage reported after a Credits charge's credits are used up.
Values:
- FlagOnly: Usage beyond the credits is recorded as unfunded and flagged on the wallet (status and webhook); nothing is billed.
- BillOverage: Usage beyond the credits is billed monthly in arrears, per unit, at the charge's overage unit price.
Whether unused credits roll over at renewal (end-of-term expiry only); null for normal charges.
For 0-priced grants: print the included credits as a zero line (true) or keep goodwill credits off the invoice (false). Null for normal charges.
Credits charges that bill overage: usage beyond the credits has been invoiced for overage periods ending before this date.
Number of decimal places the tier From/To quantities on this charge may use (0..7). Only used for Volume and Tiered price models.
Remarks is copied to new invoice lines
Price for active price detail. Only visible on charges created after 2025-05-14
List Price for active price detail. Only visible on charges created after 2025-05-14
Discount Amount for active price detail. Only visible on charges created after 2025-05-14
Discount Percentage for active price detail. Only visible on charges created after 2025-05-14
Only visible on charges created after 2025-05-14
Only visible on charges created after 2025-05-14
Only visible on charges created after 2025-05-14
Only visible on charges created after 2025-05-14
Total price for a whole billing period. Only visible on charges created after 2025-05-14
Id of the charge used to create the order product charge. Not to be confused with field 'id'
Bad Request.
Unauthorized
Forbidden
Not Found
GET /Orders/Charges/{id} HTTP/1.1
Host: api.sandbox.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"chargeNumber": "OPC-000001",
"version": 1,
"isLastVersion": true,
"name": "text",
"chargeType": "OneOff",
"priceModel": "Flat",
"effectiveStartDate": "2026-01-01T00:00:00.000Z",
"effectiveEndDate": "2026-01-01T00:00:00.000Z",
"quantity": 1,
"unitCode": "text",
"startOn": "AlignToSubscription",
"endOn": "AlignToSubscription",
"startMilestoneId": "123e4567-e89b-12d3-a456-426614174000",
"endMilestoneId": "123e4567-e89b-12d3-a456-426614174000",
"chargedThroughDate": "2026-01-01T00:00:00.000Z",
"lastRenewalDate": "2026-01-01T00:00:00.000Z",
"lastPriceAdjustmentDate": "2026-01-01T00:00:00.000Z",
"pricePeriod": "Monthly",
"usageRating": "Sum",
"revenueRecognitionRule": "text",
"chargeKind": "OneOff",
"creditTypeId": "123e4567-e89b-12d3-a456-426614174000",
"creditTypeCode": "text",
"creditTypeName": "text",
"creditGrantMode": "OneTime",
"creditGrantSource": "Plan",
"creditExpiryMode": "TermEnd",
"creditExpiryMonths": 1,
"creditThresholdCredits": 1,
"creditOverageBehavior": "FlagOnly",
"creditRolloverAtRenewal": true,
"showZeroPriceOnInvoice": true,
"overageChargedThroughDate": "2026-01-01T00:00:00.000Z",
"creditRates": [
{
"usageTypeId": "123e4567-e89b-12d3-a456-426614174000",
"usageType": "text",
"usageTypeName": "text",
"creditsPerUnit": 1
}
],
"billingDay": "None",
"specificBillingDay": 1,
"offsetBillingDays": 1,
"billingPeriod": "Monthly",
"billingTiming": "InAdvance",
"periodAlignment": "None",
"alignmentDate": "2026-01-01T00:00:00.000Z",
"taxTemplate": "text",
"taxIncluded": true,
"createInvoiceLinesPerTier": true,
"tierDecimalPrecision": 1,
"estimatedUsage": 1,
"estimatedQuantity": 1,
"remainingQuantity": 1,
"orderedQuantity": 1,
"deliveryDate": "2026-01-01T00:00:00.000Z",
"remarks": "text",
"accountsReceivableAccount": "text",
"deferredRevenueAccount": "text",
"recognizedRevenueAccount": "text",
"contractAssetAccount": "text",
"changeState": "NotChanged",
"displayPrice": 1,
"customFields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"priceDetails": [
{
"tier": 1,
"price": 1,
"listPrice": 1,
"overageUnitPrice": 1,
"topUpUnitPrice": 1,
"description": "text",
"fromQuantity": 1,
"toQuantity": 1,
"priceBase": "Flat",
"lineDiscountPercent": 1,
"lineDiscountAmount": 1
}
],
"recurringMonthlyAmount": 1,
"recurringMonthlyAmountBase": 1,
"features": [
{
"code": "text",
"description": "text"
}
],
"orderDiscounts": [
{
"orderDiscountId": "123e4567-e89b-12d3-a456-426614174000",
"chargeId": "123e4567-e89b-12d3-a456-426614174000"
}
],
"externalERPId": "text",
"externalCRMId": "text",
"cmrr": {
"amount": 1,
"currencyCode": "text",
"currencyConversionDate": "2026-01-01T00:00:00.000Z",
"baseCurrencyAmount": 1,
"baseCurrencyCode": "text"
},
"acv": {
"amount": 1,
"currencyCode": "text",
"currencyConversionDate": "2026-01-01T00:00:00.000Z",
"baseCurrencyAmount": 1,
"baseCurrencyCode": "text"
},
"tcv": {
"amount": 1,
"currencyCode": "text",
"currencyConversionDate": "2026-01-01T00:00:00.000Z",
"baseCurrencyAmount": 1,
"baseCurrencyCode": "text"
},
"emrr": {
"amount": 1,
"currencyCode": "text",
"currencyConversionDate": "2026-01-01T00:00:00.000Z",
"baseCurrencyAmount": 1,
"baseCurrencyCode": "text"
},
"oneTimeFees": {
"amount": 1,
"currencyCode": "text",
"currencyConversionDate": "2026-01-01T00:00:00.000Z",
"baseCurrencyAmount": 1,
"baseCurrencyCode": "text"
},
"price": 1,
"listPrice": 1,
"discountAmount": 1,
"discountPercentage": 1,
"totalPrice": 1,
"totalListPrice": 1,
"totalDiscountAmount": 1,
"totalDiscountPercentage": 1,
"totalPerInvoice": 1,
"orderProductId": "123e4567-e89b-12d3-a456-426614174000",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"chargeId": "123e4567-e89b-12d3-a456-426614174000",
"created": "2026-01-01T00:00:00.000Z",
"modified": "2026-01-01T00:00:00.000Z"
}- : Access Younium API
PATCH /Orders/Charges/{id}: description, remarks, external ids and custom fields of an order charge. The credit settings of a Credits charge (and chargeKind / creditGrantMode, which are the product charge's) cannot be changed here; a value sent for one is refused with where it is changed instead of being dropped with a 200.
Success
No content
Bad Request.
Unauthorized
Forbidden
PATCH /Orders/Charges/{id} HTTP/1.1
Host: api.sandbox.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/merge-patch+json
Accept: */*
Content-Length: 139
{
"description": "text",
"remarks": "text",
"externalERPId": "text",
"externalCRMId": "text",
"customFields": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}No content
Set or edit invoiced to date on order product charge The Invoiced To date cannot be before the charges effective start date or the current invoiced to date. In the order product charge response the field for invoiced to date is referred to as 'chargedThroughDate'
- : Access Younium API
No Content
No content
Bad Request.
Unauthorized
Forbidden
Not Found
POST /Orders/Charges/{id}/InvoicedTo HTTP/1.1
Host: api.sandbox.younium.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"invoicedToDate": "2026-01-01T00:00:00.000Z"
}No content
Last updated