{ "swagger": "2.0", "info": { "title": "API UsageConsumption", "description": "##TMF API Reference: TMF677 - Usage Consumption\n\n### Release: 20.5 - May 2021\n\nThis API covers the consumption levels of products, services or resources related to 0 or more parties. And so, we can search for remaining, global or used bucket values, or for exceptional consumption normally mentioned as out of bucket consumption.\n\nThere are 3 main changes in this API version: Usage Consumption is now described as a TASK resource, Usage Consumption Buckets may be linked between each other (aggregated buckets, bundled buckets, etc), Usage Consumption can be search having in mind services or resources. \n\n Copyright \u00a9 TM Forum 2020. All Rights Reserved", "version": "4.0.0" }, "host": "serverRoot", "basePath": "/tmf-api/usageConsumption/v4/", "schemes": [ "https" ], "consumes": [ "application/json;charset=utf-8" ], "produces": [ "application/json;charset=utf-8" ], "tags": [ { "name": "queryUsageConsumption" }, { "name": "notification listeners (client side)" }, { "name": "events subscription" } ], "paths": { "/queryUsageConsumption": { "get": { "operationId": "listQueryUsageConsumption", "summary": "List or find QueryUsageConsumption objects", "description": "This operation list or find QueryUsageConsumption entities", "tags": [ "queryUsageConsumption" ], "parameters": [ { "name": "fields", "description": "Comma-separated properties to be provided in response", "required": false, "in": "query", "type": "string" }, { "name": "offset", "description": "Requested index for start of resources to be provided in response", "required": false, "in": "query", "type": "integer" }, { "name": "limit", "description": "Requested number of resources to be provided in response", "required": false, "in": "query", "type": "integer" } ], "responses": { "200": { "description": "Success", "headers": { "X-Result-Count": { "description": "Actual number of items returned in the response body", "type": "integer" }, "X-Total-Count": { "description": "Total number of items matching criteria", "type": "integer" } }, "schema": { "type": "array", "items": { "$ref": "#/definitions/QueryUsageConsumption" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "operationId": "createQueryUsageConsumption", "summary": "Creates a QueryUsageConsumption", "description": "This operation creates a QueryUsageConsumption entity.", "tags": [ "queryUsageConsumption" ], "parameters": [ { "name": "queryUsageConsumption", "description": "The QueryUsageConsumption to be created", "required": true, "schema": { "$ref": "#/definitions/QueryUsageConsumption_Create" }, "in": "body" } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/QueryUsageConsumption" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/queryUsageConsumption/{id}": { "get": { "operationId": "retrieveQueryUsageConsumption", "summary": "Retrieves a QueryUsageConsumption by ID", "description": "This operation retrieves a QueryUsageConsumption entity. Attribute selection is enabled for all first level attributes.", "tags": [ "queryUsageConsumption" ], "parameters": [ { "name": "id", "description": "Identifier of the QueryUsageConsumption", "required": true, "type": "string", "in": "path" }, { "name": "fields", "description": "Comma-separated properties to provide in response", "required": false, "type": "string", "in": "query" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/QueryUsageConsumption" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } }, "delete": { "operationId": "deleteQueryUsageConsumption", "summary": "Deletes a QueryUsageConsumption", "description": "This operation deletes a QueryUsageConsumption entity.", "tags": [ "queryUsageConsumption" ], "parameters": [ { "name": "id", "description": "Identifier of the QueryUsageConsumption", "required": true, "type": "string", "in": "path" } ], "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub": { "post": { "operationId": "registerListener", "summary": "Register a listener", "description": "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "data", "schema": { "$ref": "#/definitions/EventSubscriptionInput" }, "required": true, "in": "body", "description": "Data containing the callback endpoint to deliver the information" } ], "responses": { "201": { "description": "Subscribed", "schema": { "$ref": "#/definitions/EventSubscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/hub/{id}": { "delete": { "operationId": "unregisterListener", "summary": "Unregister a listener", "description": "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", "tags": [ "events subscription" ], "parameters": [ { "name": "id", "type": "string", "required": true, "in": "path", "description": "The id of the registered listener" } ], "responses": { "204": { "description": "Deleted" }, "400": { "description": "Bad request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method not allowed", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/listener/queryUsageConsumptionCreateEvent": { "post": { "operationId": "listenToQueryUsageConsumptionCreateEvent", "summary": "Client listener for entity QueryUsageConsumptionCreateEvent", "description": "Example of a client listener for receiving the notification QueryUsageConsumptionCreateEvent", "tags": [ "notification listeners (client side)" ], "parameters": [ { "name": "data", "required": true, "in": "body", "description": "The event data", "schema": { "$ref": "#/definitions/QueryUsageConsumptionCreateEvent" } } ], "responses": { "201": { "description": "Notified", "schema": { "$ref": "#/definitions/EventSubscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/listener/queryUsageConsumptionDeleteEvent": { "post": { "operationId": "listenToQueryUsageConsumptionDeleteEvent", "summary": "Client listener for entity QueryUsageConsumptionDeleteEvent", "description": "Example of a client listener for receiving the notification QueryUsageConsumptionDeleteEvent", "tags": [ "notification listeners (client side)" ], "parameters": [ { "name": "data", "required": true, "in": "body", "description": "The event data", "schema": { "$ref": "#/definitions/QueryUsageConsumptionDeleteEvent" } } ], "responses": { "201": { "description": "Notified", "schema": { "$ref": "#/definitions/EventSubscription" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/Error" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/Error" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/Error" } }, "405": { "description": "Method Not allowed", "schema": { "$ref": "#/definitions/Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/Error" } } } } } }, "definitions": { "Addressable": { "type": "object", "description": "Base schema for adressable entities", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" } } }, "BalanceActionRef": { "type": "object", "description": "link to the resource that holds balance-related request information", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "BucketRefOrValue": { "type": "object", "description": "A bucket (called UsageVolumProduct in the SID Model) represents and tracks a quantity of usage (remaining or consumed). It could be either a quantity or an amount in a currency. It can represent a fixed number of SMS,MMS, call minutes, quantity of data and so on", "properties": { "id": { "type": "string", "description": "Unique Identifier within the server for the bucket" }, "href": { "type": "string", "description": "A resource URI pointing to the resource in the OB that stores the detailed information for the bucket" }, "description": { "type": "string", "description": "Text describing the contents of the balance managed by the bucket" }, "isShared": { "type": "boolean", "description": "True if the bucket is shared between several devices or users" }, "name": { "type": "string", "description": "Friendly name to identify the bucket" }, "remainingValueName": { "type": "string", "description": "Remaining amount in a formatted string for the bucket given in the balance unit (for example 1.9 Gb). This formatted string could be used for display needs for example" }, "status": { "type": "string", "description": "status for the bucket. active, expired, suspended" }, "usageType": { "type": "string", "description": "defines the type of the underlying Balance eg data,voice, any currency eg EUR, USD etc" }, "bucketCounter": { "type": "array", "items": { "$ref": "#/definitions/ConsumptionSummary" } }, "bucketRelationship": { "type": "array", "items": { "$ref": "#/definitions/BucketRelationship" } }, "logicalResource": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionLogicalResourceRef" } }, "partyAccount": { "$ref": "#/definitions/PartyAccountRef", "description": "A reference to the account that owns the bucket" }, "product": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionProductRef" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedParty" }, "description": "Used to provide information about any other entity with relation to the balance, for instance to define customer hierarchy for the balance (e.g.: customerId, userId, )" }, "remainingValue": { "$ref": "#/definitions/Quantity", "description": "Indicate the amount on the bucket" }, "reserveBalance": { "type": "array", "items": { "$ref": "#/definitions/ReserveBalanceRef" } }, "reservedValue": { "$ref": "#/definitions/Quantity", "description": "Indicate the amount reserved on the bucket; should be the sum of all the valid (i.e. confirmed and not consumed or expired) amounts in the reserveBalance request array" }, "service": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionServiceRef" } }, "validFor": { "$ref": "#/definitions/TimePeriod", "description": "The period for which the balance in the bucket is valid" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "BucketRelationship": { "type": "object", "description": "Linked bucket to the one instantiate, such as [isAggregated] if the bucket is a part of other or [aggregator] is the bucket holds others ", "required": [ "bucketRefOrValue", "relationshipType" ], "properties": { "relationshipType": { "type": "string", "description": "Type of the bucket relationship, such as [isAggregated] if the bucket is a part of other or [aggregator] is the bucket holds others" }, "bucketRefOrValue": { "$ref": "#/definitions/BucketRefOrValue" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "ConsumptionSummary": { "type": "object", "description": "The consumption counters (called ConsumptionSummary in the SID model) detail for example the different kind of consumption done on the bucket.", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "counterType": { "type": "string", "description": "Type of the consumption counter. We can give for example a counter of the used value for a bucket (counterType=used for example) or the value of the consumption done out of the bucket(s) (counterType=outOfBucket for example)" }, "level": { "type": "string", "description": "Counter level. The counter can be given globally for the bucket or detailed by user or by network product for example in case of shared bucket" }, "valueName": { "type": "string", "description": "Value of the counter in a formatted string used for display needs for example" }, "consumptionPeriod": { "$ref": "#/definitions/TimePeriod", "description": "Consumption counter period between a start date time and an end date time. For prepaid bucket, the period of counters is between the start date of the bucket and the effective date of the usage consumption report generation. For postpaid bucket, the period of counters is between the last bill date and the effective date of the usage consumption report generation." }, "user": { "$ref": "#/definitions/RelatedParty", "description": "Reference of the user for which the consumption counter is detailed. If the level of the counter is global (i.e. concerning all the users), the list of them is not specified. It can be found through the users listed in the network products of the bucket sub-resource" }, "value": { "$ref": "#/definitions/Quantity", "description": "Numeric value of the bucket counter in a given unit" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "Entity": { "type": "object", "description": "Base entity schema for use in TMForum Open-APIs", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "EntityRef": { "type": "object", "description": "Entity reference schema to be use for all entityRef class.", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "Extensible": { "type": "object", "description": "Base Extensible schema for use in TMForum Open-APIs", "properties": { "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "PartyAccountRef": { "type": "object", "description": "PartyAccount reference. A party account is an arrangement that a party has with an enterprise that provides products to the party.", "properties": { "id": { "type": "string", "description": "Unique identifier of the party account" }, "href": { "type": "string", "description": "Reference of the party account" }, "description": { "type": "string", "description": "Detailed description of the party account" }, "name": { "type": "string", "description": "Name of the party account" }, "status": { "type": "string", "description": "The condition of the account, such as due, paid, in arrears." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "Quantity": { "type": "object", "description": "An amount in a given unit", "properties": { "amount": { "default": 1, "type": "number", "format": "float", "description": "Numeric value in a given unit" }, "units": { "type": "string", "description": "Unit" } } }, "QueryUsageConsumption": { "type": "object", "description": "An QueryUsageConsumption allows to manage the calculation request of an usage consumption", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "queryUsageConsumptionDate": { "type": "string", "format": "date-time", "description": "Date when the query was submitted" }, "partyAccount": { "type": "array", "items": { "$ref": "#/definitions/PartyAccountRef" }, "description": "A reference to the account that owns the bucket" }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedParty" }, "description": "Reference and role of the related parties for which the usage consumption is requested" }, "searchCriteria": { "$ref": "#/definitions/UsageConsumption", "description": "Search structure to retrieve current value of usage" }, "usageConsumption": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumption" }, "description": "Report with current counters and balances" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "QueryUsageConsumption_Create": { "type": "object", "description": "An QueryUsageConsumption allows to manage the calculation request of an usage consumption\nSkipped properties: id,href,usageConsumption", "properties": { "queryUsageConsumptionDate": { "type": "string", "format": "date-time", "description": "Date when the query was submitted" }, "partyAccount": { "type": "array", "items": { "$ref": "#/definitions/PartyAccountRef" }, "description": "A reference to the account that owns the bucket" }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedParty" }, "description": "Reference and role of the related parties for which the usage consumption is requested" }, "searchCriteria": { "$ref": "#/definitions/UsageConsumption", "description": "Search structure to retrieve current value of usage" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "RelatedParty": { "type": "object", "description": "Related Entity reference. A related party defines party or party role linked to a specific entity.", "required": [ "@referredType", "id" ], "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "role": { "type": "string", "description": "Role played by the related party" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } } }, "ReserveBalanceRef": { "type": "object", "description": "The ReserveBalance resource allows adjustments to be made to the original BalanceTopup eg increment the amount, alter the recharge periodicity", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "ResourceRef": { "type": "object", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "TaskStateType": { "type": "string", "description": "Possible values for the state of a task", "enum": [ "accepted", "terminatedWithError", "inProgress", "done" ] }, "TimePeriod": { "type": "object", "description": "A period of time, either as a deadline (endDateTime only) a startDateTime only, or both", "properties": { "endDateTime": { "example": "1985-04-12T23:20:50.52Z", "type": "string", "format": "date-time", "description": "End of the time period, using IETC-RFC-3339 format" }, "startDateTime": { "example": "1985-04-12T23:20:50.52Z", "type": "string", "format": "date-time", "description": "Start of the time period, using IETC-RFC-3339 format" } } }, "UsageConsumption": { "type": "object", "description": "An usage consumption enables to know at a given point the balances and the consumption counters related to various buckets (SMS, Voice, Data for example). It could be calculated for a device identified by a public key (msisdn number for a mobile device for example or PSTN or VOIP number for a fix device), for a subscribed offer or option or for an user.", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "creationDate": { "type": "string", "format": "date-time", "description": "Date and time of the request creation" }, "description": { "type": "string", "description": "Free short text describing the usage consumption content" }, "lastUpdate": { "type": "string", "format": "date-time", "description": "Date when the status was last changed" }, "name": { "type": "string", "description": "Usage consumption name" }, "bucketRefOrValue": { "type": "array", "items": { "$ref": "#/definitions/BucketRefOrValue" }, "description": "Bucket(s) included in the offer or option subscribed." }, "logicalResource": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionLogicalResourceRef" } }, "partyAccount": { "type": "array", "items": { "$ref": "#/definitions/PartyAccountRef" }, "description": "A reference to the account that owns the bucket" }, "product": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionProductRef" } }, "relatedParty": { "type": "array", "items": { "$ref": "#/definitions/RelatedParty" }, "description": "Reference and role of the related parties for which the usage consumption is requested" }, "service": { "type": "array", "items": { "$ref": "#/definitions/UsageConsumptionServiceRef" } }, "state": { "$ref": "#/definitions/TaskStateType", "description": "State of the report report defined in the state engine" }, "validPeriod": { "$ref": "#/definitions/TimePeriod", "description": "Validity period" }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" } } }, "UsageConsumptionLogicalResourceRef": { "type": "object", "description": "reference to the LogicalResource eg MSISDN", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "consumptionSummary": { "type": "array", "items": { "$ref": "#/definitions/ConsumptionSummary" } }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "UsageConsumptionProductRef": { "type": "object", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "consumptionSummary": { "type": "array", "items": { "$ref": "#/definitions/ConsumptionSummary" } }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "UsageConsumptionServiceRef": { "type": "object", "description": "Service reference, for when Service is used by other entities", "properties": { "id": { "type": "string", "description": "unique identifier" }, "href": { "type": "string", "format": "uri", "description": "Hyperlink reference" }, "name": { "type": "string", "description": "Name of the related entity." }, "consumptionSummary": { "type": "array", "items": { "$ref": "#/definitions/ConsumptionSummary" } }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class" }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class Extensible name" }, "@referredType": { "type": "string", "description": "The actual type of the target instance when needed for disambiguation." } }, "required": [ "id" ] }, "EventSubscription": { "type": "object", "description": "Sets the communication endpoint address the service instance must use to deliver notification information", "required": [ "id", "callback" ], "properties": { "id": { "type": "string", "description": "Id of the listener" }, "callback": { "type": "string", "description": "The callback being registered." }, "query": { "type": "string", "description": "additional data to be passed" } } }, "EventSubscriptionInput": { "type": "object", "description": "Sets the communication endpoint address the service instance must use to deliver notification information", "required": [ "callback" ], "properties": { "callback": { "type": "string", "description": "The callback being registered." }, "query": { "type": "string", "description": "additional data to be passed" } } }, "QueryUsageConsumptionCreateEvent": { "type": "object", "description": "The notification data structure", "properties": { "event": { "description": "The event payload linked to the involved resource object", "$ref": "#/definitions/QueryUsageConsumptionCreateEventPayload" }, "eventId": { "type": "string", "description": "The identifier of the notification." }, "eventTime": { "type": "string", "format": "date-time", "description": "Time of the event occurrence." }, "eventType": { "type": "string", "description": "The type of the notification." }, "correlationId": { "type": "string", "description": "The correlation id for this event." }, "domain": { "type": "string", "description": "The domain of the event." }, "title": { "type": "string", "description": "The title of the event." }, "description": { "type": "string", "description": "An explnatory of the event." }, "priority": { "type": "string", "description": "A priority." }, "timeOcurred": { "type": "string", "format": "date-time", "description": "The time the event occured." } } }, "QueryUsageConsumptionCreateEventPayload": { "type": "object", "description": "The event data structure", "properties": { "queryUsageConsumption": { "description": "The involved resource data for the event", "$ref": "#/definitions/QueryUsageConsumption" } } }, "QueryUsageConsumptionDeleteEvent": { "type": "object", "description": "The notification data structure", "properties": { "event": { "description": "The event payload linked to the involved resource object", "$ref": "#/definitions/QueryUsageConsumptionDeleteEventPayload" }, "eventId": { "type": "string", "description": "The identifier of the notification." }, "eventTime": { "type": "string", "format": "date-time", "description": "Time of the event occurrence." }, "eventType": { "type": "string", "description": "The type of the notification." }, "correlationId": { "type": "string", "description": "The correlation id for this event." }, "domain": { "type": "string", "description": "The domain of the event." }, "title": { "type": "string", "description": "The title of the event." }, "description": { "type": "string", "description": "An explnatory of the event." }, "priority": { "type": "string", "description": "A priority." }, "timeOcurred": { "type": "string", "format": "date-time", "description": "The time the event occured." } } }, "QueryUsageConsumptionDeleteEventPayload": { "type": "object", "description": "The event data structure", "properties": { "queryUsageConsumption": { "description": "The involved resource data for the event", "$ref": "#/definitions/QueryUsageConsumption" } } }, "Error": { "description": "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)", "type": "object", "required": [ "code", "reason" ], "properties": { "code": { "type": "string", "description": "Application relevant detail, defined in the API or a common list." }, "reason": { "type": "string", "description": "Explanation of the reason for the error which can be shown to a client user." }, "message": { "type": "string", "description": "More details and corrective actions related to the error which can be shown to a client user." }, "status": { "type": "string", "description": "HTTP Error code extension" }, "referenceError": { "type": "string", "format": "uri", "description": "URI of documentation describing the error." }, "@baseType": { "type": "string", "description": "When sub-classing, this defines the super-class." }, "@schemaLocation": { "type": "string", "format": "uri", "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" }, "@type": { "type": "string", "description": "When sub-classing, this defines the sub-class entity name." } } } } }