Create or update a consumption.
PUT /v1/clients/{clientId}/consumptions/{consumptionId}
application/json
OTH
BAG
BAL
BDL
BKL
BOU
BOX
BTL
BUN
CAN
CBM
CCM
CMS
CTN
DOZ
DRM
GGR
GMS
GRS
GYD
KGS
KLR
KME
MLT
MTR
MTS
NOS
PAC
PCS
PRS
QTL
ROL
SET
SQF
SQM
SQY
TBS
TGM
THD
TON
TUB
UGS
UNT
YDS
BUSINESS_ERROR
TECHNICAL_ERROR
BUSINESS_ERROR
TECHNICAL_ERROR
BUSINESS_ERROR
TECHNICAL_ERROR
BUSINESS_ERROR
TECHNICAL_ERROR
BUSINESS_ERROR
TECHNICAL_ERROR
{
"customerNumber": "customer-number-1",
"subscriptionId": "subscription-id-1",
"items": [
{
"id": "1",
"productDetails": {
"productId": "pack-2gb",
"description": "2gb data pack."
},
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "PCS"
},
"tax": {
"vatPercentage": 25
},
"total": {
"grossAmount": 125,
"netAmount": 100
},
"occurredAt": {
"start": "2022-09-28T10:40:44.421Z",
"end": null
},
"metadata": [
{
"key": "product-number",
"value": "3937501"
}
]
}
],
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
]
}
{
"consumptionTotal": {
"grossAmount": 125,
"vatAmount": 25,
"currencyCode": "NOK"
},
"refundTotal": {
"grossAmount": 20,
"vatAmount": 25,
"currencyCode": "NOK"
},
"id": "consumption-id-1",
"customerNumber": "customer-number-1",
"subscriptionId": "subscription-id",
"invoiceId": "100484",
"items": [
{
"id": "1",
"productDetails": {
"productId": "pack-2gb",
"description": "2gb data pack."
},
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "PCS",
"currencyCode": "NOK"
},
"total": {
"grossAmount": 125,
"netAmount": 100,
"currencyCode": "NOK",
"vatPercentage": 25
},
"occurredAt": {
"start": "2022-09-28T10:40:44.421Z",
"end": null
},
"metadata": [
{
"key": "product-number",
"value": "3937501"
}
]
}
],
"createdAt": "2022-09-28T10:40:44.421Z",
"billingDate": null,
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
],
"_links": [
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/consumptions/consumption-id-1",
"rel": "self",
"target": "API"
},
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/consumptions/consumption-id-1/timeline",
"rel": "timeline",
"target": "API"
},
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/subscriptions/subscription-id-1",
"rel": "subscription",
"target": "API"
}
]
}
{
"customerNumber": "customer-number-1",
"subscriptionId": "subscription-id-1",
"items": [
{
"id": "1",
"productDetails": {
"productId": "pack-2gb",
"description": "2gb data pack."
},
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "PCS"
},
"tax": {
"vatPercentage": 25
},
"total": {
"grossAmount": 125,
"netAmount": 100
},
"occurredAt": {
"start": "2022-09-28T10:40:44.421Z",
"end": null
},
"metadata": [
{
"key": "product-number",
"value": "3937501"
}
]
}
],
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
]
}
{
"consumptionTotal": {
"grossAmount": 125,
"vatAmount": 25,
"currencyCode": "NOK"
},
"refundTotal": {
"grossAmount": 20,
"vatAmount": 25,
"currencyCode": "NOK"
},
"id": "consumption-id-1",
"customerNumber": "customer-number-1",
"subscriptionId": "subscription-id",
"invoiceId": "100484",
"items": [
{
"id": "1",
"productDetails": {
"productId": "pack-2gb",
"description": "2gb data pack."
},
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "PCS",
"currencyCode": "NOK"
},
"total": {
"grossAmount": 125,
"netAmount": 100,
"currencyCode": "NOK",
"vatPercentage": 25
},
"occurredAt": {
"start": "2022-09-28T10:40:44.421Z",
"end": null
},
"metadata": [
{
"key": "product-number",
"value": "3937501"
}
]
}
],
"createdAt": "2022-09-28T10:40:44.421Z",
"billingDate": null,
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
],
"_links": [
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/consumptions/consumption-id-1",
"rel": "self",
"target": "API"
},
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/consumptions/consumption-id-1/timeline",
"rel": "timeline",
"target": "API"
},
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/subscriptions/subscription-id-1",
"rel": "subscription",
"target": "API"
}
]
}
{
"customerNumber": "customer-number-1",
"subscriptionId": "subscription-id-1",
"items": [
{
"id": "1",
"productDetails": {
"productId": "pack-2gb",
"description": "2gb data pack."
},
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "PCS"
},
"tax": {
"vatPercentage": 25
},
"total": {
"grossAmount": 125,
"netAmount": 100
},
"occurredAt": {
"start": "2022-09-28T10:40:44.421Z",
"end": null
},
"metadata": [
{
"key": "product-number",
"value": "3937501"
}
]
}
],
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
]
}
{
"type": "https://developer.riverty.io/errors/subscription/error-type",
"category": "BUSINESS_ERROR",
"title": "A description of the problem",
"message": "A description of the problem"
}