Account Management Biz Api
SettlementAccount
/settlementAccount [POST]
This operation creates a customer's billing profile entity.
Request
This section defines all the possible data structures sent by the client when consuming the method.
URL
https://[localhost]:[port]/tmf-api/accountManagement/v4/{businessId}/settlementAccount
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
name | value | description | required |
---|---|---|---|
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
channelId | string | Channel to business: Can be one of: "agentportal”, “ecom", "mobile","selfportal" | N |
Security Headers
Name | Type | M/O | Description |
---|---|---|---|
client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
Body
{
"paymentPlan": [
{
"paymentFrequency": "POR ADELANTADO",
"planType": "MENSUAL",
"paymentMethod":
{
"id": "COBRADOR"
}
}
],
"characteristic": [
{
"name": "lob",
"value": "FIXED"
},
{
"name": "billingAddress",
"value": "1-HG45L"
}
],
"relatedParty": [
{
"id": "1-3GF5A7",
"role": "customer",
"@type": "RelatedParty",
"@referredType": "Customer"
}
]
}
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
paymentPlan | Object Array | Describes a plan for payment (when a party wants to spread his payments). | Y |
paymentPlan.paymentFrequency | String | Frequency of the payments. Possible Values: NORMAL DEL 01 AL 10 DEL 11 AL 20 DEL 21 AL 30 A MAS DE 30 DIAS REICIDENTES POR ADELANTADO DOBLES | N |
paymentPlan.planType | String | Type of payment plan. Possible Values: PREPAGO POSTPAGO MENSUAL TRIMESTRAL SEMESTRAL ANUAL | N |
paymentPlan.paymentMethod.id | String | Unique identifier of the payment mean. Possible Values: COBRADOR OFICINA ENTES RECAUDADORES CARGOTARJETA PAR CONVENIO TVCR PAGO EN LINEA PLANILLA | Y |
characteristic | Object Array | Describes a given characteristic of an object or entity through a name/value pair. | N |
characteristic.name | String | Name of the characteristic | N |
characteristic.value | String | Value of the characteristic | N |
relatedParty | Object Array | Related Entity reference. A related party defines party or party role linked to a specific entity | Y |
relatedParty.id | string | Unique identifier of a related entity. | Y |
relatedParty.role | string | Role played by the related party | N |
relatedParty.@type | string | When sub-classing, this defines the sub-class entity name | N |
relatedParty.@referredType | string | The actual type of the target instance when needed for disambiguation. | N |
Characteristic Sub-Resource Table for request.
Name | Type | Y/N | Description |
---|---|---|---|
characteristic.name == "collectionsBank" | String | "Y" when the paymentMethod.id (MetodoPago) is ENTES RECAUDADORES. | Possible Values: COOPEALIANZA PERIMERCADOS MONTE VERDE PERIMERCADOS NORMAL FARMACIAS FISCHEL BANCO DAVIVIENDA |
characteristic.name == "billingAddress" | String | "Y" when the payment method (MetodoPago) is COBRADOR | It corresponds to the billing address Id. |
characteristic.name == "subsidiary" | String | "Y" when the paymentMethod.id (MetodoPago) is OFICINA. | Possible Values: SAN JOSE PEREZ ZELEDON SAN CARLOS LIMON PALMARES OROTINA LIBERIA LA CRUZ TILARAN LAS JUNTAS PARRITA COBANO RIO CLARO TUCAN TAMARINDO PUNTARENAS |
characteristic.name == "onlinePayment" | String | "Y" when the paymentMethod.id (MetodoPago) is PAGO EN LINEA. | Possible Values: BAC-SUCURSAL ELECTRONICA BANCO DE COSTA RICA BANCO PROMERICA BN-CONECTIVIDAD GOLLO EN LINEA GRUPO-EMPRESARIAL MEGASUPER RED ALO SERVIMAS (EN LINEA) WALLMART |
characteristic.name == "parBank" | String | "Y" when the paymentMethod.id (MetodoPago) is PAR | Possible Values: BANCO DE COSTA RICA BANCO NACIONAL BN CONECTIVIDAD PAR |
characteristic.name="lob" | String | "Y" | Lob. Example { "name":"lob", "value":"FIXED" } |
Response
In this section all the possible data structures received by the client at the moment of responding the method are defined.
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[201]
Created - request successful, settlementAccount has been created. Response body may contain an entity corresponding to the created resource.
{
"id": "1-A87HB",
"relatedParty": [
{
"id": "1-3GF5A7",
"role": "customer",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"@type": "settlementAccount"
}
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
id | String | Unique identifier of a created billingProfile. | Y |
relatedParty | Object Array | Related Entity reference. A related party defines party or party role linked to a specific entity | Y |
relatedParty.id | string | Unique identifier of a related entity. | Y |
relatedParty.role | string | Role played by the related party | N |
relatedParty.@type | string | When sub-classing, this defines the sub-class entity name | N |
relatedParty.@referredType | string | The actual type of the target instance when needed for disambiguation. | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. example is mentioned below.
{
"errors": [
{
"code": 400,
"message": "CREATE_SETTLEMENTACCOUNT:FAILED",
"description": "El valor del campo Payment Method del business component Com Invoice Profile no coincide con ningún valor de la lista de selección enlazada PickList Payment Method.(SBL-DAT-00225)."
}
]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method PATCH not allowed for : /{businessId}/settlementAccount"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation PATCH /settlementAccount for Business Id: xxxx not implemented"
}]
}
/settlementAccount [GET]
This operation retrieves customer's billing profile entities.
Request
This section defines all the possible data structures sent by the client when consuming the method.
URL
https://[localhost]:[port]/tmf-api/accountManagement/v4/{businessId}/settlementAccount
URL PARAMS
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
name | value | description | required |
---|---|---|---|
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
channelId | string | Channel to business: Can be one of: "agentportal”, “ecom", "mobile","selfportal" | N |
Security Headers
Name | Type | M/O | Description |
---|---|---|---|
client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
query Parameters
Name | Type | Description | required |
---|---|---|---|
relatedParty.id | string | unique identifier of the related party. here it is customerID. | Y |
relatedParty.role | string | Role of the relatedParty. Can be "customer" | N |
characteristic.name | string | Name of the characteristic here it is "lob" | Y |
characteristic.value | string | Value of the characteristic can be one of "FIXED", "PREPAID", "POSTPAID" | Y |
Response
In this section all the possible data structures received by the client at the moment of responding the method are defined.
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[200]
OK - settlementAccount request processed successfully. Response body may contain an entity corresponding to the requested resource.
[
{
"id": "1-29K8VCO",
"paymentPlan": [
{
"planType": "PAYMENT",
"paymentMethod": {
"id": "CARGO AUTOMATICO"
}
}
],
"relatedParty": [
{
"id": "1-N2C3HF",
"role": "customer",
"@type": "RelatedParty",
"@referredType": "Customer"
}
],
"@type": "settlementAccount"
}
]
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
id | String | Unique identifier of a billingProfile. | Y |
paymentPlan.planType | String | Type of payment plan. | N |
paymentPlan.paymentMethod.id | String | Unique identifier of the payment mean. | N |
relatedParty | Object Array | Related Entity reference. A related party defines party or party role linked to a specific entity | Y |
relatedParty.id | string | Unique identifier of a related entity. | Y |
relatedParty.role | string | Role played by the related party | N |
relatedParty.@type | string | When sub-classing, this defines the sub-class entity name | N |
relatedParty.@referredType | string | The actual type of the target instance when needed for disambiguation. | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. example is mentioned below.
{
"errors": [
{
"code": 400,
"message": "APIKIT:BAD_REQUEST",
"description": "/relatedParty/0 required key [id] not found"
}
]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method PATCH not allowed for : /{businessId}/settlementAccount"
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "The request failed due to an internal error.",
"description": ""
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation PATCH /settlementAccount for Business Id: xxxx not implemented"
}]
}
####