TrueXCore DeviceSwap API

API aggregator for device swap checks and latest device change date retrieval. The service routes every request through Telcofinder using the provided phoneNumber, resolves the consumer-aware provider route, and invokes the downstream Open Gateway Device Swap capability using CIBA authentication.

  • undefined
  • undefined
healthHealth check operations
GET/healthHealth check

Parameters

No parameters

Responses

CodeDescriptionLinks
200

Service is healthy

Media type

application/json
{
  "status": "OK"
}
503

Service is unhealthy

Media type

application/json
{
  "status": "KO"
}
device-swapDevice swap aggregation operations
POST/device-swap/checkCheck whether a device swap occurred recently

Returns whether the mobile line has experienced a device swap during the requested time window. Requires permission truexcore.deviceSwap.check.

  • Bearer JWT

Parameters

No parameters

Request bodyrequired

Media type

application/json
{
  "phoneNumber": "+34666666666",
  "maxAge": 72
}

Responses

CodeDescriptionLinks
200

Device swap check executed successfully

Media type

application/json
{
  "trace_id": "trace-001",
  "swapped": false
}
400

Validation error

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
401

Unauthorized

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
403

Forbidden

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
404

Operator not supported or information not available

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "NOT_FOUND",
  "message": "No information found for this request"
}
429

Provider quota exceeded

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "TOO_MANY_REQUESTS",
  "message": "Too many requests, please retry later using a backoff strategy"
}
500

Internal provider or routing error

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
503

Upstream dependency unavailable

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
POST/device-swap/retrieve-dateRetrieve the latest device change date

Returns the timestamp of the latest device swap event, or null when the downstream provider has no retained value for the requested line. Requires permission truexcore.deviceSwap.retrieveDate.

  • Bearer JWT

Parameters

No parameters

Request bodyrequired

Media type

application/json
{
  "phoneNumber": "+34666666666"
}

Responses

CodeDescriptionLinks
200

Latest device change date retrieved successfully

Media type

application/json
{
  "trace_id": "trace-001",
  "latestDeviceChange": "2023-07-03T12:27:08.312Z"
}
400

Validation error

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
401

Unauthorized

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
403

Forbidden

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
404

Operator not supported or information not available

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "NOT_FOUND",
  "message": "No information found for this request"
}
429

Provider quota exceeded

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "TOO_MANY_REQUESTS",
  "message": "Too many requests, please retry later using a backoff strategy"
}
500

Internal provider or routing error

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
503

Upstream dependency unavailable

Media type

application/json
{
  "trace_id": "trace-001",
  "code": "VALIDATION_ERROR",
  "message": "Request validation failed"
}
Schemas
HealthResponse
HealthResponse {
status
string
example: OK
enum: [ OK, KO ]
}
CheckDeviceSwapRequest
CheckDeviceSwapRequest {
phoneNumber*
string
pattern: ^\+[1-9][0-9]{4,14}$
example: +34666666666

Subscriber number in E.164 format, starting with country code and prefixed with '+'.

maxAge
integer($int32)
minimum: 1
maximum: 2400
default: 240
example: 72

Period in hours to be checked for device swap.

}
CheckDeviceSwapResponse
CheckDeviceSwapResponse {
trace_id*
string
example: trace-001

Distributed trace identifier for the request.

swapped*
boolean
example: false

Indicates whether the device has been swapped during the provided maxAge period.

}
RetrieveDeviceSwapDateRequest
RetrieveDeviceSwapDateRequest {
phoneNumber*
string
pattern: ^\+[1-9][0-9]{4,14}$
example: +34666666666

Subscriber number in E.164 format, starting with country code and prefixed with '+'.

}
RetrieveDeviceSwapDateResponse
RetrieveDeviceSwapDateResponse {
trace_id*
string
example: trace-001

Distributed trace identifier for the request.

latestDeviceChange
string($date-time)
nullable: true
example: 2023-07-03T12:27:08.312Z

Timestamp of the latest device swap performed. It must follow RFC 3339 and must have a time zone. Recommended format is yyyy-MM-dd'T'HH:mm:ss.SSSZ, which allows values such as 2023-07-03T14:27:08.312+02:00 or 2023-07-03T12:27:08.312Z.

}
ErrorResponse
ErrorResponse {
trace_id
string
example: trace-001

Distributed trace identifier.

code*
string
example: VALIDATION_ERROR

Stable TrueXCore error code. Current public values include VALIDATION_ERROR, INVALID_ARGUMENT, KNOW_YOUR_CUSTOMER_INVALID_PARAM_COMBINATION, UNAUTHORIZED, FORBIDDEN, NOT_FOUND, PATH_NOT_FOUND, TOO_MANY_REQUESTS, SERVICE_UNAVAILABLE and INTERNAL_SERVER_ERROR.

message*
string
example: Request validation failed

Detailed error description.

}