openapi: 3.2.0 info: version: 1.0.0 title: Customer Loyalty Management Loyalty Program Product API description: "An API to manage customer loyalty operations. Can also be used by 3rd-party partners (3PP) to get a customer's loyalty products and rewards\n**04-Oct-21 ChangeID: 0000000000235**\n -Branched off from the original TMF document." servers: - url: http://api.mtn.com/v1/loyaltyManagement security: - ApiKeyAuth: [] tags: - name: Loyalty Program Product paths: /loyaltyProgramMember/{memberId}/loyaltyProgramProduct: get: description: This operation is used to retrieve the loyalty program member’s loyalty program products. tags: - Loyalty Program Product operationId: List Products parameters: - name: memberId in: path required: true schema: type: string - name: subcriberEmail in: query schema: type: string - name: subscriberName in: query schema: type: string - name: band in: query schema: type: string - name: targetSystem in: query required: true schema: type: string enum: - MEDESSY responses: '200': description: Success content: application/json: schema: type: object properties: statusCode: type: string description: This is the MADAPI Canonical response Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system response are mapped to specific canonical response codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' statusMessage: type: string description: Status Message transactionId: type: string description: API generated Id to include for tracing requests data: type: object properties: productCategories: type: array items: $ref: '#/components/schemas/ProductProgramCategoriesResponseData' _links: type: object properties: self: type: string example: https://api.mtn.com/v1/loyaltymanagement/loyaltyProgramMember/23464618463/loyaltyProgramProduct 400: description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Error' 401: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' 403: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/Error' 404: description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' 405: description: Method Not allowed content: application/json: schema: $ref: '#/components/schemas/Error' 500: description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Error' security: [] /loyaltyProgramMember/{memberId}/loyaltyProgramProduct/{programProductId}: get: description: This operation is used to retrieve the loyalty member's merchants based on the categories the member is eligible for tags: - Loyalty Program Product operationId: Get Product parameters: - name: memberId in: path required: true schema: type: string - name: programProductId in: path required: true schema: type: string - name: band in: query schema: type: string - name: targetSystem in: query required: true schema: type: string enum: - MEDESSY responses: '200': description: Success content: application/json: schema: type: object properties: statusCode: type: string description: This is the MADAPI Canonical response Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system response are mapped to specific canonical response codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' statusMessage: type: string description: Status Message transactionId: type: string description: API generated Id to include for tracing requests data: type: object properties: merchants: type: array items: $ref: '#/components/schemas/ProductProgramRef' _links: type: object properties: self: type: string example: https://api.mtn.com/v1/loyaltymanagement/loyaltyProgramMember/23464618463/loyaltyProgramProduct '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/Error' security: [] components: schemas: ProductProgramRef: title: ProductProgram type: object properties: id: type: string name: type: string description: type: string productStatus: type: string productSpecId: type: string accountId: type: string image: type: string imageUrl: type: string loyaltyAccount: $ref: '#/components/schemas/LoyaltyAccountCreate' characteristics: type: array items: $ref: '#/components/schemas/ProductCharacteristics' required: - name - productSpecId CreateLoyaltyBalance: title: CreateLoyaltyBalance type: object properties: quantity: $ref: '#/components/schemas/Quantity' required: - quantity LoyaltyAccountCreate: title: LoyaltyAccountCreate type: object properties: id: type: string loyaltyBalance: $ref: '#/components/schemas/CreateLoyaltyBalance' ProductProgramCategoriesResponseData: title: ProductProgramUpdate type: object properties: name: type: string id: type: string description: type: string productStatus: type: string characteristics: type: array items: $ref: '#/components/schemas/ProductCharacteristics' Quantity: title: Quantity type: object properties: unit: type: string balance: type: number format: double required: - unit - balance ProductCharacteristics: title: ProductLinkRef type: object properties: name: type: string value: type: string Error: type: object required: - statusCode - statusMessage properties: statusCode: type: string description: This is the MADAPI Canonical Error Code (it is 4 characters long and it is not the HTTP Status Code which is 3 characters long). Back-end system errors are mapped to specific canonical error codes which are returned. More information on these mappings can be found on the MADAPI Confluence Page 'Response Codes' example: '1000' statusMessage: type: string description: More details and corrective actions related to the error which can be shown to a client supportMessage: type: string description: Internal message meant for consumers of the API to troubleshoot the error (could possible include the back-end system error code in the message if it would be useful) transactionId: type: string description: This is the same transactionId that is sent in the request timestamp: type: string format: date-time description: Timestamp of the error example: 2019-08-23T07:29:25.593+0000 securitySchemes: ApiKeyAuth: type: apiKey name: X-API-Key in: header