swagger: '2.0' info: title: DCB Recurring Debit 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: 1.0.0 host: api.ooredoo.com basePath: /tmf-api/prepayBalanceManagement/v1 schemes: - https consumes: - application/json;charset=utf-8 produces: - application/json;charset=utf-8 security: - Oauth: [] tags: - name: adjustBalance parameters: transactionIdparam: name: transactionId description: Partner transaction id generated at Partner side to denote their transaction and it needs to to unique for every transaction maxLength: 20 pattern: ^[A-Za-z0-9]+$ in: header type: string required: true paths: /adjustBalance: post: operationId: createAdjustBalance summary: Creates a AdjustBalance description: This operation creates a AdjustBalance entity. tags: - adjustBalance parameters: - $ref: '#/parameters/transactionIdparam' - name: adjustBalance description: The AdjustBalance to be created required: true schema: $ref: '#/definitions/AdjustBalance_Create' in: body 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.com/tmf-api/oauth/generateToken" flow: "application" scopes: urn:mdv:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Maldives OpCo urn:mdv:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Maldives OpCo urn:omn:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Oman OpCo urn:omn:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Oman OpCo urn:dza:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Algeria OpCo urn:dza:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Algeria OpCo urn:kwt:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Kuwait OpCo 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 urn:tun:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Tunisia OpCo urn:tun:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Tunisia OpCo urn:irq:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Iraq OpCo urn:irq:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Iraq OpCo urn:qat:prepaybalancemanagement:createadjustbalance:onetimedebit: Grants Access for Onetime Debit for Qatar OpCo urn:qat:prepaybalancemanagement:createadjustbalance:recurringdebit: Grants Access for Recurring Debit for Qatar 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 status: $ref: '#/definitions/ActionStatusType' amount: $ref: '#/definitions/Quantity' bucket: $ref: '#/definitions/BucketRef' 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 - bucket - customerAccount - requestor - logicalResource - usageType properties: channel: type: string description: valid values for the channel name OTP: type: string description: valid values for OTP pattern: ^[0-9a-zA-Z]{6}$ description: type: string description: Description of the recharge operation value example: Loan Recovery amount: $ref: '#/definitions/Quantity' bucket: $ref: '#/definitions/BucketRef' usageType: $ref: '#/definitions/UsageType' partyAccount: $ref: '#/definitions/PartyAccountRef' product: type: array items: $ref: '#/definitions/ProductRef' BucketRef: type: object description: link to the resource that holds bucket information required: - name - id properties: id: type: string description: unique identifier example: Credit Transfer name: type: string description: Name of the related entity. example: NewDigPreToNewDigPre Money: type: object description: A base / value business entity used to represent money properties: value: type: number format: float description: A positive floating point number example: 1.0 '@type': type: string description: When sub-classing, this defines the sub-class entity 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 name: type: string description: Name of the party account partyDetails: type: string description: Name of the party account ProductRef: type: object properties: id: type: string description: unique identifier required: - id 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: - DZD - OMR - TND - MVR - FILS - ILS - QAR - IQD description: units of currency. Below currencies are supported opcowise - "DZD" for Algeria, "OMR" for Oman, "TND" for Tunisia, "MVR" for Maldives, "FILS" for Kuwait, "ILS" for Palestine, "QAR" for Qatar, "IQD" for Iraq UsageType: type: string description: Denotes the usage of amount example: monetary enum: - monetary - voice - data - sms - other 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.