---
swagger: "2.0"
info:
title: CSMT-CRL-D-PartyManagement
description: Microservice to Parties information management
version: 1.0.8
x-ibm-name: csmt-crl-d-partymanagement
host: 127.0.0.1
schemes:
- https
basePath: /api
produces:
- application/json
paths:
/v1/customers/party:
post:
tags:
- create-party
operationId: create-party
summary: Saves party's information for first time
description: Create the register for a party person
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: createPartyRequest
in: body
schema:
$ref: '#/definitions/CreatePartyRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/CreatePartyResponse'
400:
description:
Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
schema:
$ref: '#/definitions/ErrorResponse'
401:
description: Type | Code | Details |
error | unAuthorized | Authorization
credentials are missing or invalid |
schema:
$ref: '#/definitions/ErrorResponse'
403:
description: Type | Code | Details | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
schema:
$ref: '#/definitions/ErrorResponse'
404:
description: Type | Code | Details | More
Info |
error | resourceNotFound | The requested
resource was not found | Empty resource/resource not found |
schema:
$ref: '#/definitions/ErrorResponse'
422:
description: Type | Code | Details |
error | businessValidationFailed | Business
validation error occured on one or more parameters |
schema:
$ref: '#/definitions/ErrorResponse'
500:
description: Type | Code | Details |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
put:
tags:
- update-party
operationId: update-party
summary: Updtes party's information
description: Updates the register for a party person
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: updatePartyRequest
in: body
schema:
$ref: '#/definitions/updatePartyRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/UpdatePartyResponse'
400:
description: Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
schema:
$ref: '#/definitions/ErrorResponse'
401:
description: Type | Code | Details |
error | unAuthorized | Authorization
credentials are missing or invalid |
schema:
$ref: '#/definitions/ErrorResponse'
403:
description: Type | Code | Details | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
schema:
$ref: '#/definitions/ErrorResponse'
404:
description: Type | Code | Details | More
Info |
error | resourceNotFound | The requested
resource was not found | Empty resource/resource not found |
schema:
$ref: '#/definitions/ErrorResponse'
422:
description: Type | Code | Details |
error | businessValidationFailed | Business
validation error occured on one or more parameters |
schema:
$ref: '#/definitions/ErrorResponse'
500:
description: Type | Code | Details |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
/v1/customers/{customerId}/party:
get:
tags:
- retrieve-all-party-details
operationId: retrieve-all-party-details
summary: Retrieve the party's information
description: Get all party's information details just sending the client id.
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: customerId
in: path
required: true
type: string
description: Customer Id
- 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
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveAllPartyDetailsResponse'
400:
description: Type | Code | Details |
error | invalidRequest | Missing
or invalid Parameters |
schema:
$ref: '#/definitions/ErrorResponse'
401:
description: Type | Code | Details |
error | unAuthorized | Authorization
credentials are missing or invalid |
schema:
$ref: '#/definitions/ErrorResponse'
403:
description: Type | Code | Details | More
Info |
error | accessNotConfigured | The request
operation is not configured to access this resource | Channel/Country/Business
provided in the request is not supported currently |
schema:
$ref: '#/definitions/ErrorResponse'
404:
description: Type | Code | Details | More
Info |
error | resourceNotFound | The requested
resource was not found | Empty resource/resource not found |
schema:
$ref: '#/definitions/ErrorResponse'
422:
description: Type | Code | Details |
error | businessValidationFailed | Business
validation error occured on one or more parameters |
schema:
$ref: '#/definitions/ErrorResponse'
500:
description: Type | Code | Details |
fatal | serverUnavailable | The
request failed due to an internal error/server unavailability |
schema:
$ref: '#/definitions/ErrorResponse'
definitions:
CreatePartyRequest:
type: object
properties:
dataCenterLocation:
description: CSI where the request goes
type: string
example: "04"
maxLength: 2
pattern: ^\d{2}$
party:
$ref: '#/definitions/Party'
Party:
type: object
properties:
aliasName:
description: alias Name or business alias name
type: string
example: Telmex
maxLength: 55
americanTaxId:
description: Tax Id where the member pay taxes
type: string
example: COPER3344525
maxLength: 20
fullName:
description: Full name or business name
type: string
example: Telefonos de Mexico SA de CV
maxLength: 170
taxId:
description: Tax Id in Mexico
type: string
example: COMS883992AZ4
maxLength: 20
curp:
description: Type of goverment Id number, CURP
type: string
example: BEML920313HMCLNS09
maxLength: 18
curpValidated:
description: Field to know if CURP has been validated
type: string
example: V
maxLength: 1
pattern: ^[A-Z]*$
emailAddress:
description: Member's eMail
type: string
example: ejemp@hotmail.com
maxLength: 26
partyType:
description: Person Type of the member
type: string
example: "01"
maxLength: 2
pattern: ^\d{2}$
fiel:
description: Electronic signature for pay taxes in Mexico
type: string
example: 33edfghhrrfe454543rgfdg3433678899vf
maxLength: 20
seniorPublicFigureType:
description: Value to indicate if person is public figure or a VIP. Value
can change depending on type or figure or person (president, senator, governor,
etc)
type: integer
example: 1
maxLength: 2
pattern: ^\d{2}$
branchId:
description: Branch number
type: string
example: "0034"
maxLength: 4
pattern: ^\d{4}$
structuredAddress:
type: array
items:
$ref: '#/definitions/StructuredAddress'
demographics:
$ref: '#/definitions/Demographics'
phone:
type: array
items:
$ref: '#/definitions/Phone'
employment:
type: array
items:
$ref: '#/definitions/Employment'
required:
- aliasName
- fullName
updatePartyRequest:
type: object
properties:
party:
$ref: '#/definitions/PartyDetail'
UpdatePartyResponse:
type: object
properties:
errorMessage:
description: Message from S016 system if something went wrong
type: string
example: No data was inserted in some dialogs
PartyDetail:
type: object
properties:
aliasName:
description: alias Name or business alias name
type: string
example: Telmex
americanTaxId:
description: Tax Id where the member pay taxes
type: string
example: COPER3344525
fullName:
description: Full name or business name
type: string
example: Telefonos de Mexico SA de CV
taxId:
description: Tax Id in Mexico
type: string
example: COMS883992AZ4
curp:
description: C.U.R.P.
type: string
example: BEML920313HMCLNS09
curpValidated:
description: Field to know if CURP has been validated
type: string
example: V
fiel:
description: Electronic signature for pay taxes in Mexico
type: string
example: 33edfghhrrfe454543rgfdg3433678899vf
emailAddress:
description: Member's eMail
type: string
example: ejemp@hotmail.com
seniorPublicFigureType:
description: Value to indicate if person is public figure or a VIP. Value
can change depending on type or figure or person (president, senator, governor,
etc)
type: integer
example: 1
partyType:
description: Person Type of the member
type: string
example: "01"
maxLength: 2
pattern: ^\d{2}$
partyId:
description: Member number for Identification
type: string
example: "4439992"
branchId:
description: Branch number
type: string
example: "034"
structuredAddress:
type: array
items:
$ref: '#/definitions/StructuredAddress'
phone:
type: array
items:
$ref: '#/definitions/Phone'
employment:
type: array
items:
$ref: '#/definitions/Employment'
demographics:
$ref: '#/definitions/Demographics'
required:
- aliasName
- fullName
- partyId
StructuredAddress:
type: object
properties:
addressType:
description: Description whether the addess is local or foreign
type: string
example: Foreign
maxLength: 8
streetName:
description: Name of the street and Ext. number and Int. number
type: string
example: Calle de los remedios No. 18
maxLength: 36
colonyName:
description: Colony name of the address
type: string
example: La Lupita
maxLength: 24
municipalityName:
description: Name of the municipality
type: string
example: Acambay
maxLength: 20
stateCode:
description: State code or federal entity of the address
type: string
example: "0013"
maxLength: 4
pattern: ^\d{4}$
postalCode:
description: Postal code or zip code of the address
type: string
example: "90210"
maxLength: 10
countryCode:
description: Code of the country
type: string
example: "0036"
maxLength: 4
pattern: ^\d{4}$
required:
- streetName
- colonyName
- municipalityName
- stateCode
- postalCode
- countryCode
Demographics:
type: object
properties:
nationality:
description: The status of belonging to a particular nation, whether by birth
or naturalization
type: string
example: "1"
maxLength: 1
pattern: ^\d{1}$
countryOfBirth:
description: Country code where person has born.
type: string
example: '''00004321'
maxLength: 8
pattern: ^\d{8}$
gender:
description: Gender/Sex - Male, Female, Other for the member
type: string
example: "1"
maxLength: 1
pattern: ^\d{1}$
stateOfBirthName:
description: This entity stores the basic demographic details of the applicant
type: string
example: "0021"
maxLength: 4
pattern: ^\d{4}$
dateOfBirth:
description: Date of birth of the member
type: string
format: date
example: "1995-12-07"
maxLength: 10
secondNationalCountryCode:
description: Country of the nationality
type: string
example: "00000003"
maxLength: 8
pattern: ^\d{8}$
taxDomicileCountryCode:
description: Foreign country where the member pay taxes
type: string
example: "0014"
maxLength: 4
pattern: ^\d{4}$
required:
- dateOfBirth
Phone:
type: object
properties:
phoneNumber:
description: Telephone of contact for the member
type: string
example: "72228237390"
maxLength: 10
pattern: ^\d{10}$
extensionNumber:
description: Extension number
type: string
example: "332"
maxLength: 6
pattern: ^\d{6}$
phoneType:
description: Type of telephone
type: string
maxLength: 2
example: "13"
pattern: ^\d{2}$
operatorName:
description: Phone Company
type: string
example: "0021"
maxLength: 4
pattern: ^\d{4}$
Employment:
type: object
properties:
occupationName:
description: Work id or business id
type: string
example: "36"
maxLength: 2
pattern: ^\d{2}$
businessSectorName:
description: Name of the business sector
type: string
example: "000321"
maxLength: 6
pattern: ^\d{6}$
CreatePartyResponse:
type: object
properties:
partyId:
description: Member number for Identification
type: string
example: "4439992"
maxLength: 12
pattern: ^\d{12}$
errorMessage:
description: Message from S016 system if something went wrong
type: string
example: No data was inserted in some dialogs
required:
- partyId
RetrieveAllPartyDetailsResponse:
type: object
properties:
party:
$ref: '#/definitions/PartyInformation'
PartyInformation:
type: object
properties:
aliasName:
description: Alias Name or business alias name
type: string
example: Telmex
americanTaxId:
description: Tax Identification Number of the organization in a foreign country
type: string
example: ASSFD7883992aade
partyType:
description: PersonType of the member
type: string
example: Fisica
fullName:
description: Full name or business name
type: string
example: Telefonos de Mexico SA de CV
taxId:
description: Tax Id where the member pay taxes
type: string
example: COPER3344525
curp:
description: C.U.R.P.
type: string
example: BEML920313HMCLNS09
curpValidated:
description: Field to know if CURP has been validated
type: string
example: V
fiel:
description: Electronic signature for pay taxes in Mexico
type: string
example: 33edfghhrrfe454543rgfdg3433678899vf
seniorPublicFigureType:
description: Value to indicate if person is public figure or a VIP. Value
can change depending on type or figure or person (president, senator, governor,
etc)
type: integer
example: 1
partyId:
description: Member number for Identification
type: string
example: "4439992"
emailAddress:
description: Member's eMail
type: string
example: ejemp@hotmail.com
branchId:
description: Branch number
type: string
example: "034"
structuredAddress:
type: array
items:
$ref: '#/definitions/StructuredAddress'
employment:
type: array
items:
$ref: '#/definitions/Employment'
demographics:
$ref: '#/definitions/Demographics'
phone:
type: array
items:
$ref: '#/definitions/Phone'
required:
- aliasName
- fullName
- partyId
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
...