Account Management Biz Api

(0 reviews)

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

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
namevaluedescriptionrequired
X-Correlation-IDstringIdentifier 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
channelIdstringChannel to business:
Can be one of: "agentportal”, “ecom", "mobile","selfportal"
N

Security Headers

NameTypeM/ODescription
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y

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.

nametypedescriptionrequired
paymentPlanObject ArrayDescribes a plan for payment (when a party wants to spread his payments).Y
paymentPlan.paymentFrequencyStringFrequency 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.planTypeStringType of payment plan.
Possible Values:
PREPAGO
POSTPAGO
MENSUAL
TRIMESTRAL
SEMESTRAL
ANUAL
N
paymentPlan.paymentMethod.idStringUnique identifier of the payment mean.
Possible Values:
COBRADOR
OFICINA
ENTES RECAUDADORES
CARGOTARJETA
PAR
CONVENIO TVCR
PAGO EN LINEA
PLANILLA
Y
characteristicObject ArrayDescribes a given characteristic of an object or entity through a name/value pair.N
characteristic.nameStringName of the characteristicN
characteristic.valueStringValue of the characteristicN
relatedPartyObject ArrayRelated Entity reference. A related party defines party or party role linked to a specific entityY
relatedParty.idstringUnique identifier of a related entity.Y
relatedParty.rolestringRole played by the related partyN
relatedParty.@typestringWhen sub-classing, this defines the sub-class entity nameN
relatedParty.@referredTypestringThe actual type of the target instance when needed for disambiguation.N

Characteristic Sub-Resource Table for request.

NameTypeY/NDescription
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.

nametypedescriptionrequired
idStringUnique identifier of a created billingProfile.Y
relatedPartyObject ArrayRelated Entity reference. A related party defines party or party role linked to a specific entityY
relatedParty.idstringUnique identifier of a related entity.Y
relatedParty.rolestringRole played by the related partyN
relatedParty.@typestringWhen sub-classing, this defines the sub-class entity nameN
relatedParty.@referredTypestringThe 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

nametypedescriptionrequired
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit.Y
namevaluedescriptionrequired
X-Correlation-IDstringIdentifier 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
channelIdstringChannel to business:
Can be one of: "agentportal”, “ecom", "mobile","selfportal"
N

Security Headers

NameTypeM/ODescription
client_idstringThe client_id identifying the channel. Minimum characters: 5Y
client_secretstringPassword associated with the client_id. Minimum characters: 5Y

query Parameters

NameTypeDescriptionrequired
relatedParty.idstringunique identifier of the related party.
here it is customerID.
Y
relatedParty.rolestringRole of the relatedParty.
Can be "customer"
N
characteristic.namestringName of the characteristic
here it is "lob"
Y
characteristic.valuestringValue 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.

nametypedescriptionrequired
idStringUnique identifier of a billingProfile.Y
paymentPlan.planTypeStringType of payment plan.N
paymentPlan.paymentMethod.idStringUnique identifier of the payment mean.N
relatedPartyObject ArrayRelated Entity reference. A related party defines party or party role linked to a specific entityY
relatedParty.idstringUnique identifier of a related entity.Y
relatedParty.rolestringRole played by the related partyN
relatedParty.@typestringWhen sub-classing, this defines the sub-class entity nameN
relatedParty.@referredTypestringThe 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"
    }]
  }

####



Reviews