Skip to content
Get started

The KYC Tenure service API

client.tenure.verify(TenureVerifyParams { tenureDate, phoneNumber, xCorrelator } params, RequestOptionsoptions?): TenureVerifyResponse { tenureDateCheck, contractType }
POST/tenure/check-tenure

Verifies a specified length of tenure, based on a provided date, for a network subscriber to establish a level of trust for the network subscription identifier.

ParametersExpand Collapse
params: TenureVerifyParams { tenureDate, phoneNumber, xCorrelator }
tenureDate: string

Body param: The date, in RFC 3339 / ISO 8601 compliant format “YYYY-MM-DD”, from which continuous tenure of the identified network subscriber is required to be confirmed

formatdate
phoneNumber?: string

Body param: A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with ’+’.

xCorrelator?: string

Header param: Correlation id for the different services

ReturnsExpand Collapse
TenureVerifyResponse { tenureDateCheck, contractType }
tenureDateCheck: boolean

true when the identified mobile subscription has had valid tenure since tenureDate, otherwise false

contractType?: "PAYG" | "PAYM" | "Business"

If exists, populated with:

  • PAYG - prepaid (pay-as-you-go) account
  • PAYM - contract account
  • Business - Business (enterprise) account

This attribute may be omitted from the response set if the information is not available

One of the following:
"PAYG"
"PAYM"
"Business"

The KYC Tenure service API

import Camara from 'camara-sdk';

const client = new Camara({
  bearerToken: process.env['CAMARA_BEARER_TOKEN'], // This is the default and can be omitted
});

const response = await client.tenure.verify({ tenureDate: '2023-07-03' });

console.log(response.tenureDateCheck);
{
  "tenureDateCheck": true,
  "contractType": "PAYM"
}
{
  "status": 400,
  "code": "INVALID_ARGUMENT",
  "message": "Client specified an invalid argument, request body or query param."
}
{
  "status": 400,
  "code": "OUT_OF_RANGE",
  "message": "Client specified an invalid range."
}
{
  "status": 401,
  "code": "UNAUTHENTICATED",
  "message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}
{
  "status": 403,
  "code": "PERMISSION_DENIED",
  "message": "Client does not have sufficient permissions to perform this action."
}
{
  "status": 404,
  "code": "IDENTIFIER_NOT_FOUND",
  "message": "The phone number provided is not associated with a customer account"
}
{
  "status": 422,
  "code": "SERVICE_NOT_APPLICABLE",
  "message": "The service is not applicable for the provided phone number"
}
{
  "status": 422,
  "code": "MISSING_IDENTIFIER",
  "message": "No phone number has been provided"
}
{
  "status": 422,
  "code": "UNNECESSARY_IDENTIFIER",
  "message": "An explicit phone number has been provided when one is already associated with the access token"
}
Returns Examples
{
  "tenureDateCheck": true,
  "contractType": "PAYM"
}
{
  "status": 400,
  "code": "INVALID_ARGUMENT",
  "message": "Client specified an invalid argument, request body or query param."
}
{
  "status": 400,
  "code": "OUT_OF_RANGE",
  "message": "Client specified an invalid range."
}
{
  "status": 401,
  "code": "UNAUTHENTICATED",
  "message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}
{
  "status": 403,
  "code": "PERMISSION_DENIED",
  "message": "Client does not have sufficient permissions to perform this action."
}
{
  "status": 404,
  "code": "IDENTIFIER_NOT_FOUND",
  "message": "The phone number provided is not associated with a customer account"
}
{
  "status": 422,
  "code": "SERVICE_NOT_APPLICABLE",
  "message": "The service is not applicable for the provided phone number"
}
{
  "status": 422,
  "code": "MISSING_IDENTIFIER",
  "message": "No phone number has been provided"
}
{
  "status": 422,
  "code": "UNNECESSARY_IDENTIFIER",
  "message": "An explicit phone number has been provided when one is already associated with the access token"
}