openapi: 3.2.0 info: version: '1.0' title: LoyaltySwagger Loyalty Balance API description: The TMForum Loyalty API Specification as developed by Globetom servers: - url: http://api.mtn.com/tmf-api/loyaltyManagement/v1 tags: - name: Loyalty Balance paths: /loyaltyMember/{memberId}/loyaltyBalance: get: description: This operation retrieves loyalty program member accounts balance. tags: - Loyalty Balance operationId: List Member Balances parameters: - name: memberId in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GetLoyaltyBalance' patch: description: This operation updates the attributes of a loyalty program member loyalty balance present in the request body and update another members/ point transfer loyalty balance. tags: - Loyalty Balance operationId: Update Member Balance parameters: - name: memberId in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/LoyaltySuccessResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' '422': description: Unprocessable Entity - Field rule violation or missing required attribute. content: application/json: schema: $ref: '#/components/schemas/Error' requestBody: content: application/json: schema: $ref: '#/components/schemas/LoyaltyBalanceTransfer' required: true components: schemas: ValidFor: title: ValidFor type: object properties: startDateTime: type: string endDateTime: type: string required: - startDateTime LoyaltyMemberLinkRef: title: LoyaltyMemberLinkRef type: object properties: id: type: string publicIdentifier: type: string href: type: string Quantity: title: Quantity type: object properties: unit: type: string balance: type: number format: double required: - balance RedeemQuantity: title: Quantity type: object properties: unit: type: string balance: type: number format: double required: - balance LoyaltyBalanceTransfer: title: LoyaltyBalanceTransfer type: object properties: toLoyaltyProgrammeMember: type: string pointsToBeTransferred: type: number ErrorDetail: required: - code - message properties: code: description: An integer coding the error type. This is given to caller so he can translate them if required. type: integer message: description: A short localized string that describes the error. type: string description: description: (optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values. type: string infoURL: description: (optional) A URL to online documentation that provides more information about the error. type: string GetLoyaltyBalance: title: GetLoyaltyBalance type: object properties: availablePoints: type: string listResponse: type: array items: $ref: '#/components/schemas/LoyaltyBalance' LoyaltySuccessResponse: title: LoyaltyBalanceTransferResponse required: - code - message properties: code: description: An integer coding the error type. This is given to caller so he can translate them if required. type: integer message: description: A short localized string that describes the error. type: string description: description: (optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values. type: string LoyaltyProgramProductSpecification: title: Specification type: object properties: id: type: string required: - id Error: required: - code - message properties: code: description: An integer coding the error type. This is given to caller so he can translate them if required. type: integer message: description: A short localized string that describes the error. type: string description: description: (optional) A long localized error description if needed. It can contain precise information about which parameter is missing, or what are the identifier acceptable values. type: string infoURL: description: (optional) A URL to online documentation that provides more information about the error. type: string details: type: array items: $ref: '#/components/schemas/ErrorDetail' LoyaltyBalance: title: LoyaltyBalance type: object properties: id: type: string quantity: $ref: '#/components/schemas/Quantity' redeemQuantity: $ref: '#/components/schemas/RedeemQuantity' validFor: $ref: '#/components/schemas/ValidFor' loyaltyProgramMember: $ref: '#/components/schemas/LoyaltyMemberLinkRef' productSpecification: $ref: '#/components/schemas/LoyaltyProgramProductSpecification'