--- swagger: "2.0" info: title: CSMT-CRL-D-CustomerRelationshipManagement description: Microservice for Parties relationship information management version: 1.0.10 x-ibm-name: csmt-crl-d-customerrelationshipmanagement host: 127.0.0.1 schemes: - https basePath: /api produces: - application/json paths: /v1/customers/party/relationships: post: tags: - create-party-relationship operationId: create-party-relationship summary: Create a relationship between member and a customer description: Sets the relation between a member with a Customer consumes: - application/json produces: - application/json parameters: - name: client_id in: header required: true type: string description: Client ID generated during application registration - name: Authorization in: header required: true type: string description: The Authorization Token received during login - name: Accept in: header required: true type: string description: Content-Types that are acceptable for the response - name: uuid in: header required: true type: string description: 128 bit UUID that you generate for every request - name: Accept-Language in: header required: false type: string description: List of acceptable human languages for response - name: Content-Type in: header required: true type: string description: Content-Types that are sent in the request - name: countryCode in: header required: true type: string description: Country code in 2 character ISO 3166 format - name: businesscode in: header required: true type: string description: Business code identified during application registration - name: ChannelId in: header required: true type: string description: Channel where request originated - name: sid in: header required: true type: string description: SessionId sent by Consumer - name: source in: header required: true type: number description: SourceSystem or Source Application calling the API maxLength: 6 - name: stationName in: header description: Computer name calling or executing API required: false type: string maxLength: 8 - name: operator in: header required: true type: string description: Executive ID accesing API maxLength: 10 - name: createPartyRelationshipRequest in: body schema: $ref: '#/definitions/CreatePartyRelationshipRequest' responses: 200: description: Successful operation. 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' put: tags: - update-party-relationship operationId: update-party-relationship summary: Updates the relationship between a party with a customer description: Updates the relationship between a party with a customer consumes: - application/json produces: - application/json parameters: - name: client_id in: header required: true type: string description: Client ID generated during application registration - name: Authorization in: header required: true type: string description: The Authorization Token received during login - name: Accept in: header required: true type: string description: Content-Types that are acceptable for the response - name: uuid in: header required: true type: string description: 128 bit UUID that you generate for every request - name: Accept-Language in: header required: false type: string description: List of acceptable human languages for response - name: Content-Type in: header required: true type: string description: Content-Types that are sent in the request - name: countryCode in: header required: true type: string description: Country code in 2 character ISO 3166 format - name: businesscode in: header required: true type: string description: Business code identified during application registration - name: ChannelId in: header required: true type: string description: Channel where request originated - name: sid in: header required: true type: string description: SessionId sent by Consumer - name: stationName in: header description: Computer name calling or executing API required: false type: string maxLength: 8 - name: source in: header required: true type: number description: SourceSystem or Source Application calling the API maxLength: 6 - name: operator in: header required: true type: string description: Executive ID accesing API maxLength: 10 - name: updatePartyRelationshipRequest in: body schema: $ref: '#/definitions/UpdatePartyRelationshipRequest' responses: 200: description: Successful operation. 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' /v1/customers/party/customer-relationships/retrieve: post: tags: - retrieve-customer-relationship-by-party operationId: retrieve-customer-relationship-by-party summary: Retrieve the customer information related to a party description: Retrieves the customer information related to a particular party consumes: - application/json produces: - application/json parameters: - name: client_id in: header required: true type: string description: Client ID generated during application registration - name: Authorization in: header required: true type: string description: The Authorization Token received during login - name: Accept in: header required: true type: string description: Content-Types that are acceptable for the response - name: uuid in: header required: true type: string description: 128 bit UUID that you generate for every request - name: Accept-Language in: header required: false type: string description: List of acceptable human languages for response - name: Content-Type in: header required: true type: string description: Content-Types that are sent in the request - name: countryCode in: header required: true type: string description: Country code in 2 character ISO 3166 format - name: businesscode in: header required: true type: string description: Business code identified during application registration - name: ChannelId in: header required: true type: string description: Channel where request originated - name: sid in: header required: true type: string description: SessionId sent by Consumer - name: stationName in: header description: Computer name calling or executing API required: false type: string maxLength: 8 - name: source in: header required: true type: number description: SourceSystem or Source Application calling the API maxLength: 6 - name: operator in: header required: true type: string description: Executive ID accesing API maxLength: 10 - name: retrieveCustomerByPartyRequest in: body schema: $ref: '#/definitions/RetrieveCustomerByPartyRequest' responses: 200: description: Successful operation. schema: $ref: '#/definitions/RetrieveCustomerByPartyResponse' 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' /v1/customers/party/relationships/retrieve: post: tags: - retrieve-party-by-customer-relationship operationId: retrieve-party-by-customer-relationship summary: Get the parties information just sending the client Id description: Get the relationship information from parties who are related to a customer consumes: - application/json produces: - application/json parameters: - name: client_id in: header required: true type: string description: Client ID generated during application registration - name: Authorization in: header required: true type: string description: The Authorization Token received during login - name: Accept in: header required: true type: string description: Content-Types that are acceptable for the response - name: uuid in: header required: true type: string description: 128 bit UUID that you generate for every request - name: Accept-Language in: header required: false type: string description: List of acceptable human languages for response - name: Content-Type in: header required: true type: string description: Content-Types that are sent in the request - name: countryCode in: header required: true type: string description: Country code in 2 character ISO 3166 format - name: businesscode in: header required: true type: string description: Business code identified during application registration - name: ChannelId in: header required: true type: string description: Channel where request originated - name: sid in: header required: true type: string description: SessionId sent by Consumer - name: source in: header required: true type: number description: SourceSystem or Source Application calling the API maxLength: 6 - name: operator in: header required: true type: string description: Executive ID accesing API maxLength: 10 - name: retrievePartyRelationshipRequest in: body schema: $ref: '#/definitions/RetrievePartyRelationshipRequest' responses: 200: description: Successful operation. schema: $ref: '#/definitions/RetrievePartyRelationshipResponse' 400: description:
TypeCodeDetails
errorinvalidRequestMissing or invalid Parameters
schema: $ref: '#/definitions/ErrorResponse' 401: description:
TypeCodeDetails
errorunAuthorizedAuthorization credentials are missing or invalid
schema: $ref: '#/definitions/ErrorResponse' 403: description:
TypeCodeDetailsMore Info
erroraccessNotConfiguredThe request operation is not configured to access this resourceChannel/Country/Business provided in the request is not supported currently
schema: $ref: '#/definitions/ErrorResponse' 404: description:
TypeCodeDetailsMore Info
errorresourceNotFoundThe requested resource was not foundEmpty resource/resource not found
schema: $ref: '#/definitions/ErrorResponse' 422: description:
TypeCodeDetails
errorbusinessValidationFailedBusiness validation error occured on one or more parameters
schema: $ref: '#/definitions/ErrorResponse' 500: description:
TypeCodeDetails
fatalserverUnavailableThe request failed due to an internal error/server unavailability
schema: $ref: '#/definitions/ErrorResponse' definitions: CreatePartyRelationshipRequest: type: object properties: partyRelationship: $ref: '#/definitions/PartyRelationship' PartyRelationship: type: object properties: customerId: description: Client number or product owner type: string example: "73335782" maxLength: 12 pattern: ^\d{12}$ jobTitle: description: Type of job that the member does. type: string example: "01" maxLength: 2 pattern: ^\d{2}$ partyId: description: Client number generated for the member type: string example: "2445" maxLength: 12 pattern: ^\d{12}$ percentageOwnership: description: Percent of participation of the member in the product type: number format: float example: 25 maxLength: 2 pattern: ^\d{2}$ relationshipType: description: What is the member's relationship with client type: string example: "04" maxLength: 4 pattern: ^\d{4}$ partyRoleType: description: Type o member type: string example: "01" maxLength: 2 pattern: ^\d{2}$ product: $ref: '#/definitions/Product' required: - customerId - partyId - partyRoleType Product: type: object properties: productCode: description: Banamex product ID type: string example: 0993 maxLength: 4 pattern: ^\d{4}$ productInstrument: description: Instrument related to the product type: string example: "32" maxLength: 2 pattern: ^\d{2}$ contractNumber: description: Client's contract type: string example: "337822" maxLength: 12 pattern: ^\d{12}$ UpdatePartyRelationshipRequest: type: object properties: requestType: description: To remove or update the relation information ('V - remove', 'M - update') type: string example: M maxLength: 1 pattern: ^[A-Z]*$ partyRelationship: $ref: '#/definitions/PartyRelationship' required: - requestType RetrieveCustomerByPartyRequest: type: object properties: partyId: description: Member Id to identify type: string example: "889363" maxLength: 12 pattern: ^\d{12}$ pageIdWithContract: description: PageId for parties with contract type: integer example: 5 maxLength: 2 pattern: ^\d{2}$ pageIdWithoutContract: description: PageId for parties without contract type: integer example: 10 maxLength: 2 pattern: ^\d{2}$ required: - partyId RetrieveCustomerByPartyResponse: type: object properties: moreInfoWithContractFlag: description: Flag to know if there is more members with a banamex contract (any kind of contract) to retrieve type: boolean example: true moreInfoWithoutContractFlag: description: Flag to know if there is more members without a banamex contract (any kind of contract) to retrieve type: boolean example: false pageIdWithContract: description: PageId for parties with contract type: integer example: 5 maxLength: 2 pattern: ^\d{2}$ pageIdWithoutContract: description: PageId for parties without contract type: integer example: 10 maxLength: 2 pattern: ^\d{2}$ party: type: array items: $ref: '#/definitions/PartyDetails' PartyDetails: type: object properties: jobTitle: description: Type of job in the company type: string example: CEO partyRelationship: $ref: '#/definitions/PartyRelationshipDetails' PartyRelationshipDetails: type: object properties: customerId: description: Customer Id type: string example: "888093876" relationshipType: description: Relationship beetween the member and customer type: string example: "07" customerName: description: Name of the customer type: string example: JUAN PABLO DE LA ROSA ALLENDE partyRoleType: description: Position in the board of directors type: string example: Director percentageOwnership: description: Percent of amount indicated in policy type: number format: double example: 30 product: $ref: '#/definitions/Product' RetrievePartyRelationshipRequest: type: object properties: customerId: description: Customer Id type: string example: "34466334" maxLength: 12 pattern: ^\d{12}$ pageIdWithContract: description: PageId for parties with contract type: integer example: 5 maxLength: 2 pattern: ^\d{2}$ pageIdWithoutContract: description: PageId for parties without contract type: integer example: 10 maxLength: 2 pattern: ^\d{2}$ required: - customerId - moreInfoWithContractFlag - partiesNumberToFetch RetrievePartyRelationshipResponse: type: object properties: moreInfoWithContractFlag: description: Flag to know if there is more members with a banamex contract (any kind of contract) to retrieve type: boolean example: true moreInfoWithoutContractFlag: description: Flag to know if there is more members without a banamex contract (any kind of contract) to retrieve type: boolean example: false pageIdWithContract: description: PageId for parties with contract type: integer example: 5 maxLength: 2 pattern: ^\d{2}$ pageIdWithoutContract: description: PageId for parties without contract type: integer example: 10 maxLength: 2 pattern: ^\d{2}$ party: type: array items: $ref: '#/definitions/PartyDetailsInformation' PartyDetailsInformation: type: object properties: fullName: description: Complete name of the member type: string example: Fernando Diaz Miranda maxLength: 55 jobTitle: description: Type of job in the company type: string example: "20" partyId: description: Member Id type: integer format: int32 example: 4476222 relationshipType: description: Relationship between the member and customer type: integer format: int32 example: 4 partyRoleType: description: Position in the board of directors type: string example: Director percentageOwnership: description: Percent of amount indicated in policy type: number format: double example: 50 product: $ref: '#/definitions/ProductDetails' ProductDetails: type: object properties: productCode: description: Product hired related to the member type: string example: "433" paymentInstrumentId: description: Instrument of payment type: string example: "20" contractNumber: description: Client's contract type: string example: "337822" ErrorResponse: properties: type: type: string description: Invalid - Request did not confirm to the specification and was unprocessed and rejected. Please fix the value and try again enum: - error - warn - invalid - fatal code: description: Error code which qualifies the error type: string details: description: Human readable explanation specific to the occurrence of the problem type: string location: description: The name of the field that resulted in the error type: string moreInfo: description: More Info can be used to pass any additional details type: string uuid: description: 128 bit UUID that you generate for every request type: string timestamp: description: Timestamp of the error type: string required: - type - code x-ibm-configuration: enforced: true testable: true phase: realized consumes: - application/json securityDefinitions: OAuth2 Application Flow: type: oauth2 description: "" flow: application scopes: /api/v1: "" tokenUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext/api/v1/oauth/token Client ID: type: apiKey description: "" in: header name: X-IBM-Client-Id security: - OAuth2 Application Flow: - /api/v1 Client ID: [] x-ibm-endpoints: - endpointUrl: https://perf.api.externalapib2b.wlb.lac.nsroot.net:7100/mx-gcgapi/perfext type: - production - development ...