swagger: '2.0' info: title: DCB-Prepay Balance Management description: |- ## TMF API Reference: TMF654 - Prepay Balance Management ### Draft : 0.8 - Mar 2024 The DCB (Direct Carrier Billing) API enables consumers to change their balance allowing both debit (onetime debit and recurring debit) operations. Every bucket will measure balance in different units, it can be monetary or non-monetary (e.g.: number of sms that are available, number of GB of data available, …) ### Resourcesq - AdjustBalance ### Operations - Perform a new onetime debit or recurring debit operation version: 4.0.0 host: api.ooredoo.ps basePath: /tmf-api/prepayBalanceManagement/v1 schemes: - https consumes: - application/json;charset=utf-8 produces: - application/json;charset=utf-8 security: - Oauth: [] tags: - name: adjustBalance paths: /adjustBalance: post: operationId: createAdjustBalance summary: Creates a AdjustBalance description: This operation creates a AdjustBalance entity. tags: - adjustBalance parameters: - name: adjustBalance description: The AdjustBalance to be created required: true schema: $ref: '#/definitions/AdjustBalance_Create' in: body - name: transactionId description: transactionId Eg - Alhapnumeric id required: true in: header type: string - name: countryCode description: countryCode Eg - PSE required: false in: header type: string - name: applicationCode description: applicationCode Eg - OG_CENTRAL required: true in: header type: string - name: applicationUserName description: applicationUserName Eg - FUSION required: true in: header type: string - name: token description: token conditional mandatory Eg - OG_CENTRAL_Test_T required: true in: header type: string responses: '201': description: Created headers: transactionId: description: Transaction Id type: string schema: $ref: '#/definitions/AdjustBalance' '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' '422': description: Business Rule Exception schema: $ref: '#/definitions/Error' securityDefinitions: Oauth: type: "oauth2" tokenUrl: "https://api.ooredoo.ps/tmf-api/oauth/otp" flow: "application" scopes: urn:pse:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Palestine OpCo urn:pse:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Palestine OpCo definitions: ActionStatusType: type: string description: Valid values for the Action Status Type example: created enum: - created - failed - cancelled - completed AdjustBalance: type: object description: The AdjustBalance 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 for the resource href: type: string description: A reference to the resource description: type: string description: Description of the recharge operation reason: type: string description: Text describing the reason for the action/task requestedDate: type: string format: date-time description: Date when the deduction request was received in the server amount: $ref: '#/definitions/Quantity' channel: $ref: '#/definitions/ChannelRef' description: Indicator for the channel used to request the transfer operation. Structure including at least attribute name logicalResource: type: array items: $ref: '#/definitions/LogicalResourceRef' product: type: array items: $ref: '#/definitions/ProductRef' status: $ref: '#/definitions/ActionStatusType' usageType: $ref: '#/definitions/UsageType' AdjustBalance_Create: type: object description: |- The AdjustBalance resource allows adjustments to be made to the original BalanceTopup eg increment the amount, alter the recharge periodicity Skipped properties: id,href,status,requestedDate,confirmationDate,relatedParty,partyAccount required: - amount - units - description - requestor properties: OTP: type: string description: valid values for OTP- Conditional Mandatory for Onetimedebit pattern: ^[0-9a-zA-Z]{6}$ description: type: string description: Description of the recharge operation value example: Loan Recovery reason: type: string description: Text describing the reason for the action/task originalTransactionID: type: string description: transactionId Eg - To be used for Recurringdebit amount: $ref: '#/definitions/Quantity' logicalResource: type: array items: $ref: '#/definitions/LogicalResourceRef' requestor: $ref: '#/definitions/RelatedParty' Quantity: type: object description: Indicate the amount on the bucket required: - amount - units properties: amount: type: number format: float description: Numeric value in a given unit. example: 1.5 units: type: string enum: - ILS description: units of currency. ILS" for Palestine UsageType: type: string description: Denotes the usage of amount example: monetary enum: - monetary RelatedParty: type: object description: Related Entity reference. A related party defines party or party role linked to a specific entity. required: - name properties: name: type: string description: unique identifier LogicalResourceRef: type: object description: reference to the LogicalResource eg MSISDN properties: id: type: string description: unique identifier required: - id ChannelRef: type: object description: The channel to which the resource reference to. e.g. channel for selling product offerings, channel for opening a trouble ticket etc.. properties: id: type: string description: unique identifier name: type: string description: Name of the channel. ProductRef: type: object properties: id: type: string description: unique identifier '@baseType': example: ResourceSpecification type: string description: When sub-classing, this defines the super-class '@type': example: LogicalResourceSpecification type: string description: When sub-classing, this defines the sub-class Extensible name required: - id 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.