---
swagger: "2.0"
info:
title: CSMT-CRD-D-CstSegDtl
description: This microservice will be used to manage the customer segment information.
version: 1.0.0
x-ibm-name: csmt-crd-d-cstsegdtl
host: 127.0.0.1
schemes:
- https
basePath: /api
produces:
- application/json
paths:
/v1/customers/segments/retrieve:
post:
tags:
- retrieve-customer-segment
operationId: retrieve-customer-segment
summary: To retrieve the customer segment information for a customer.
description: This API will be used to retrieve customer segment and birthday
flag indicator that will be used by channels to prioritize attention to customer
according to the segment
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 durin application registration
- name: ChannelId
in: header
required: true
type: string
description: Channel where request originated
- name: sid
in: header
required: false
type: string
description: Session is generated and returned on the first API call of the
key exchange (GET e2e call) as response header, which needs to be resent
on succesive calls of same session.
- name: retrieveCustomerSegmentRequest
in: body
schema:
$ref: '#/definitions/RetrieveCustomerSegmentRequest'
responses:
200:
description: Successful operation.
schema:
$ref: '#/definitions/RetrieveCustomerSegmentResponse'
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:
RetrieveCustomerSegmentRequest:
type: object
properties:
customerId:
description: Unique identifier of the customer
type: string
example: "321116471234"
maxLength: 12
pattern: ^[0-9]*$
cardNumber:
description: Number Embossed/ Printed on the Card.
type: string
example: "4969452123456110"
maxLength: 16
pattern: ^[0-9]*$
RetrieveCustomerSegmentResponse:
type: object
properties:
customer:
$ref: '#/definitions/Customer'
required:
- customer
Customer:
type: object
properties:
fullName:
description: Full name of the customer
type: string
example: Luis Diaz Salinas
customerSegment:
description: Segment where the Customer belongs
type: string
example: "20"
birthdayTodayFlag:
description: Flag that indicates if it is customer's birthday today or not.
type: boolean
example: true
required:
- fullName
- customerSegment
- birthdayTodayFlag
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: URI to human readable documentation or detailed description of
the error
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
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
...