openapi: 3.2.0 info: version: '1.0' title: LoyaltySwagger Loyalty Burn API description: The TMForum Loyalty API Specification as developed by Globetom servers: - url: http://api.mtn.com/tmf-api/loyaltyManagement/v1 tags: - name: Loyalty Burn paths: /loyaltyMember/{memberId}/loyaltyBurn: get: description: This operation retrieves a loyalty burn transactions of a spesific programme member.Redemtion history tags: - Loyalty Burn operationId: List Burn Transactions parameters: - name: memberId in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/LoyaltyTransactionRef' post: description: This operation creates a new loyalty burn transaction, Loyaty redemtion. tags: - Loyalty Burn operationId: Burn Loyalty Balance parameters: - name: memberId in: path required: true schema: type: string responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/LoyaltyBurnCreateRef' '409': description: Conflict - A loyalty transaction with the same identifier already exists. 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/CreateLoyaltyBurn' required: true components: schemas: LoyaltyBalanceRef: title: LoyaltyBalance type: object properties: id: type: string quantity: $ref: '#/components/schemas/Quantity' redeemQuantity: $ref: '#/components/schemas/RedeemQuantity' LoyaltyBurnCreateRef: title: LoyaltyBurn type: object properties: code: type: string message: type: string description: type: string loyaltyBurnId: type: string availableBalance: type: string redeemedQuantity: type: integer format: int32 openingBalance: type: number format: double closingBalance: type: number format: double dateTime: type: string format: dateTime LoyaltyTransactionRef: title: LoyaltyTransaction type: object properties: id: type: string href: type: string quantity: type: integer format: int32 openingBalance: type: number format: double closingBalance: type: number format: double createDateTime: type: string format: dateTime modifiedDate: type: string format: dateTime dateTime: type: string format: dateTime description: type: string type: type: string catalogueItem: type: object properties: id: type: string name: type: string loyaltyProgramMember: type: object properties: id: type: string loyaltyBalance: type: array items: $ref: '#/components/schemas/LoyaltyBalanceRef' required: - id - href - quantity - description - openingBalance - closingBalance - dateTime 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 CreateLoyaltyBurn: title: CreateLoyaltyBurn type: object properties: redeemAllPoints: type: boolean loyaltyCatalogueItem: $ref: '#/components/schemas/LoyaltyCatalogueItemRef' LoyaltyCatalogueItemRef: title: LoyaltyCatalogueItem type: object properties: id: type: string unit: type: string enum: - sms - voice - data 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 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'