Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Web Services para Registrar o Modificar las Referencias Bancarias de un Cliente.

Swagger open api macroswagger: '2.0' info: title: "SIFCO_REST_API" version: "1.0" description: "La presente documentación busca detallar los métodos que permite ejecutar este **Web Services**, como es Registrar o Modificar las Referencias Bancarias de un cliente en la **Aplicación SIFCO WEB** ." termsOfService: "https://sifco.org/sobre-nosotros/" contact: email: "soporte@sifco.org" license: name: "Apache 2.0" url: "http://www.apache.org/licenses/LICENSE-2.0.html" host: "<SERVER>" schemes: - https - http basePath: /<APPDIR>/rest tags: - name: "TClRefBancarias" externalDocs: description: "Manual SIFCO" url: "https://sifco.atlassian.net/wiki/x/FADU" produces: - application/json paths: /TClRefBancarias/{ClCliCod}: get: tags: - TClRefBancarias operationId: "GetTClRefBancarias" summary: "Consultar las Referencias Bancarias de un Cliente en el Sistema" parameters: - in: header name: Content-Type type: "string" required: true default: application/json - in: header name: Authorization type: "string" required: true default: OAuth <Access Token> - in: header name: GENEXUS-AGENT type: "string" required: true

DESCRIPCIÓN.

Este Web Service, permite el ingreso al sistemas de clientes (asociados / socios), permitiendo cargar solo las Cuentas Bancarias de que dispone el cliente con sus detalles respectivos, que ya haya sido creado a través de el Web Service (TClClientes). Es importante acotar que para la correcta carga de los parámetros de un cliente en este Web Service, se deben revisar las Constantes preestablecidas asociadas a variables o parámetros de la Aplicación SIFCO WEB y Web Services de Consulta de Categorías Generales, dado a que ellos les permitan cargas los parámetros de este Web Service de forma adecuada en la Aplicación SIFCO WEB.

Swagger open api macro
swagger: '2.0'
info:
  title: "SIFCO_REST_API"
  version: "1.0"
  termsOfService: "https://sifco.org/sobre-nosotros/"
  contact:
    email: "soporte@sifco.org"
  license:
    name: "Apache 2.0"  
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "<SERVER>"
schemes:
  - https
  - http
basePath: /<APPDIR>/rest
tags:
- name: "TClRefBancarias"
  externalDocs:
    description: "Manual SIFCO"
    url: "https://sifco.atlassian.net/wiki/x/FADU"
produces:
  - application/json
paths:
  /TClRefBancarias/{ClCliCod}:
    get:
      tags:
        - TClRefBancarias
 default:  SmartDevice Application  operationId: "GetTClRefBancarias"
     - namesummary: "ClCliCod"Consultar las Referencias Bancarias de un Cliente en el Sistema"
 in:  "path"   parameters:
       description: "Código- delin: Cliente"header
          requiredname: trueContent-Type
          type: "integerstring"
          formatrequired: "int64"true
          default: application/json
 responses:       - in: 200:header
          descriptionname: "SuccessfulAuthorization
operation"           schema:type: "string"
          required: true
$ref: "#/definitions/TClRefBancarias"         400default: OAuth <Access Token>
       description: "Bad request" - in: header
          schemaname: GENEXUS-AGENT
           $reftype: "#/definitions/GxJsonErrorstring"
        401  required: true
          descriptiondefault: "NotSmartDevice Authenticated"Application
        -  schemaname: "ClCliCod"
           $refin: "#/definitions/GxJsonErrorpath"
        404:  description: "Código del Cliente"
     description: "Data with the specified keyrequired: couldtrue
not be found"        type: "integer"
        schema  format: "int64"
      
    $ref  responses:
"#/definitions/GxJsonError"         500200:
          description: "InternalSuccessful server erroroperation"
          schema:
            $ref: "#/definitions/GxJsonErrorTClRefBancarias"
     post:       tags400:
        - TClRefBancarias description: "Bad  request"
  operationId: "InsertTClRefBancarias"       summaryschema:
"Insertar las Referencias Bancarias de un Cliente en el Sistema"       parameters$ref: "#/definitions/GxJsonError"
       - in401:
header          description: name: Content-Type"Not Authenticated"
          typeschema:
"string"            required$ref: true"#/definitions/GxJsonError"
          default404:
application/json         - indescription: header"Data with the specified key could not be found"
  name: Authorization       schema:
   type: "string"           required: true$ref: "#/definitions/GxJsonError"
           default500:
OAuth <Access Token>        description: -"Internal in:server headererror"
          nameschema:
GENEXUS-AGENT            type$ref: "string#/definitions/GxJsonError"

         requiredpost:
true      tags:
    default: SmartDevice Application  - TClRefBancarias
     - nameoperationId: "ClCliCodInsertTClRefBancarias"
          insummary: "path"Insertar las Referencias Bancarias de un Cliente en el Sistema"
  description: "Código del Cliente" parameters:
        - requiredin: trueheader
          typename: "integer"Content-Type
          formattype: "int64string"
        -  namerequired: "TClRefBancarias"true
          indefault: "body"application/json
        -  descriptionin: "SDTheader
of TClRefBancarias"           requiredname: falseAuthorization
          schematype: "string"
           $refrequired: "#/definitions/TClRefBancarias"true
       responses:   default: OAuth <Access   Token>
200:        -   descriptionin: "Successfulheader
operation"           schemaname: GENEXUS-AGENT
           $reftype: "#/definitions/TClRefBancarias"string"
          201required: true
         description default: "Created"SmartDevice Application
        - schemaname: "ClCliCod"
           $refin: "#/definitions/TClRefBancariaspath"
        400:  description: "Código        description: "Bad request"del Cliente"
           schemarequired: true
           $reftype: "#/definitions/GxJsonErrorinteger"
        401  format: "int64"
        - descriptionname: "Not AuthenticatedTClRefBancarias"
          schemain: "body"
           $refdescription: "#/definitions/GxJsonError"SDT of TClRefBancarias"
         404 required: false
          descriptionschema:
"Data with the specified key could not be found"           schema$ref: "#/definitions/TClRefBancarias"

          $refresponses:
"#/definitions/GxJsonError"         500200:
          description: "InternalSuccessful server erroroperation"
          schema:
            $ref: "#/definitions/GxJsonErrorTClRefBancarias"
     put:       tags201:
        - TClRefBancarias
      operationId description: "UpdateTClRefBancariasCreated"
      summary: "Actualizar las Referencias Bancariasschema:
de un Cliente en el Sistema"       parameters$ref: "#/definitions/TClRefBancarias"
       - in400:
header          description: name: Content-Type"Bad request"
          typeschema:
 "string"           required$ref: true"#/definitions/GxJsonError"
          default401:
application/json         - indescription: header"Not Authenticated"
          nameschema:
 Authorization           type$ref: "string#/definitions/GxJsonError"
          required404:
true           defaultdescription: OAuth"Data <Accesswith Token>the specified key could not be found"
  - in: header      schema:
    name: GENEXUS-AGENT           type$ref: "string#/definitions/GxJsonError"
        500:
 required: true        description: "Internal server default:error"
SmartDevice Application         -schema:
name: "ClCliCod"           in$ref: "path#/definitions/GxJsonError"

    put:
    description  tags:
"Código  del Cliente"     - TClRefBancarias
      requiredoperationId: "UpdateTClRefBancarias"
true      summary: "Actualizar las Referencias Bancarias type: "integer"
   de un Cliente en el Sistema"
      formatparameters:
"int64"
        - namein: "TClRefBancarias"header
          inname: "body"Content-Type
          descriptiontype: "SDT of TClRefBancariasstring"
          required: true
          schemadefault: application/json
        - in: header
$ref: "#/definitions/TClRefBancarias"          name: Authorization
      responses:    type:  "string"
  200:           descriptionrequired: "Successfultrue
operation"           schemadefault: OAuth <Access Token>
        - $refin: "#/definitions/TClRefBancarias" header
          400name: GENEXUS-AGENT
         description type: "Bad requeststring"
          schemarequired: true
           $refdefault: "#/definitions/GxJsonError"
SmartDevice Application
       401:           description- name: "Not AuthenticatedClCliCod"
          schemain: "path"
           $refdescription: "#/definitions/GxJsonErrorCódigo del Cliente"
        404  required: true
          descriptiontype: "Not foundinteger"
          schemaformat: "int64"
        -   $refname: "#/definitions/GxJsonErrorTClRefBancarias"
        409  in: "body"
          description: "TClRefBancariasSDT wasof changedTClRefBancarias"
        500:           descriptionrequired: "Internal server error"true
           schema:
            $ref: "#/definitions/GxJsonErrorTClRefBancarias"
     delete: 
      tagsresponses:
        -200:
   TClRefBancarias       operationIddescription: "DeleteTClRefBancariasSuccessful operation"
      summary: "Eliminar las Referencias Bancariasschema:
de un Cliente en el Sistema"       parameters$ref: "#/definitions/TClRefBancarias"
       - in400:
header           namedescription: Content-Type
"Bad request"
         type schema:
"string"            required$ref: true"#/definitions/GxJsonError"
          default401:
application/json         - indescription: header"Not Authenticated"
          nameschema:
Authorization            type$ref: "string#/definitions/GxJsonError"
          required404:
true           defaultdescription: OAuth"Not <Accessfound"
Token>         - inschema:
 header           name$ref: GENEXUS-AGENT"#/definitions/GxJsonError"
          type: "string"409:
          requireddescription: true"TClRefBancarias was changed"
        default500:
SmartDevice Application         - namedescription: "ClCliCodInternal server error"
          inschema:
"path"            description$ref: "Código del Cliente#/definitions/GxJsonError"

         requireddelete:
true      tags:
    type: "integer"   - TClRefBancarias
      formatoperationId: "int64DeleteTClRefBancarias"
       responsessummary: "Eliminar las Referencias Bancarias de un Cliente en 200:el Sistema"
         descriptionparameters:
"Successful operation"       - in: header
 schema:         name: Content-Type
  $ref: "#/definitions/TClRefBancarias"         204:type: "string"
          descriptionrequired: "Successfultrue
operation"           schemadefault: application/json
        - in: header
$ref: "#/definitions/TClRefBancarias"         400name: Authorization
         description: "Bad requesttype: "string"
          schemarequired: true
          default: OAuth <Access $ref: "#/definitions/GxJsonError"Token>
        - 401in: header
         description name: "Not Authenticated"GENEXUS-AGENT
           schematype: "string"
          required: $ref: "#/definitions/GxJsonError"true
          404default: SmartDevice Application
        - descriptionname: "Not foundClCliCod"
          schemain: "path"
           $ref: "#/definitions/GxJsonError"description: "Código del Cliente"
          required: true
          type: "integer"
          format: "int64"

      responses:
    500:
          description: "Internal server error"
          schema:
            $ref: "#/definitions/GxJsonError"


security:
  - OAuth2: []
    ApiKeyAuth1: []
securityDefinitions:
  OAuth2:
    type: oauth2
    flow: password
    tokenUrl: https://test.sifco.org/DemoCoopGT/oauth/access_token
    scopes:
      Execute: Permite el método tipo GET
      Insert: Permite el método tipo POST
      Update: Permite el método tipo PUT
      Delete: Permite el método tipo DELETE
      FullControl: Permite el manejo de los Cuatro Métodos GET, POST, PUT,DELETE, sobre el Web Service
  ApiKeyAuth1:
    type: apiKey
    in: header
    name: granttype

definitions:

  TClRefBancarias:
    properties:
      ClCliCod:
        description: Código del Cliente    200:
          description: "Successful operation"
          schema:
            $ref: "#/definitions/TClRefBancarias"
        204:
          description: "Successful operation"
          schema:
            $ref: "#/definitions/TClRefBancarias"
        400:
          description: "Bad request"
          schema:
            $ref: "#/definitions/GxJsonError"
        401:
          description: "Not Authenticated"
          schema:
            $ref: "#/definitions/GxJsonError"
        404:
          description: "Not found"
          schema:
            $ref: "#/definitions/GxJsonError"
        500:
          description: "Internal server error"
          schema:
            $ref: "#/definitions/GxJsonError"


security:
  - OAuth2: []
    ApiKeyAuth1: []
securityDefinitions:
  OAuth2:
    type: oauth2
    flow: password
    tokenUrl: https://test.sifco.org/DemoCoopGT/oauth/access_token
    scopes:
      Execute: Permite el método tipo GET
      Insert: Permite el método tipo POST
      Update: Permite el método tipo PUT
      Delete: Permite el método tipo DELETE
      FullControl: Permite el manejo de los Cuatro Métodos GET, POST, PUT,DELETE, sobre el Web Service
  ApiKeyAuth1:
    type: apiKey
    in: header
    name: granttype

definitions:

  TClRefBancarias:
    properties:
      ClCliCod:
        description: Código del Cliente
        type: "integer"
        format: "int64"

      ClNomSocio:
        description: Nombre del Cliente
        type: "string"

      RefBanUlt:
        description: Ultima Referencia Bancaria
        type: "integer"
        format: "int32"

      gx_md5_hash:
        description: gx_md5_hash is an identifier for a specific version of a resource, it is used for optimistic concurrency check. It is required for update and delete operations and  ignored on insert.
        type: "string"

      Level1:
        $ref: "#/definitions/TClRefBancarias.Level1Item"

    required:
      - ClCliCod

  TClRefBancarias.Level1Item:
    properties:
      RefBanCor:
        description: Referencia Bancaria
        type: "integer"
        format: "int32"

      ApBanCod:
        description: Código Banco
        type: "integer"
        format: "int32"

      ApBanNombre:
        description: Nombre
        type: "string"

      RefBanTCta:
        description: Tipo de Cuenta
        type: "integer"
        format: "int32"

      RefBanNCta:
        description: Número de la Cuenta
        type: "string"

      RefBanEstatus:
        description: Estatus de la Referencia Bancaria
        type: "string"


    required:
      - RefBanCor
    x-gx-level: "TClRefBancarias"

  GxJsonError:
    properties:
      error:
        $ref: "#/definitions/GxJsonError.error"

  GxJsonError.error:
    properties:
      code:
        description: Código de Error
        type: "string"

      message:
        description: Mensaje de Error
        type: "string"


    x-gx-level: "GxJsonError"

RELACIONES ENTRE EL MODELO DE DATOS DE ESTE WEB SERVICE, Y EL RESTO DEL API’s RESTful DE LA APLICACIÓN SIFCO WEB.

Modelo de Datos de este Web Service

Web Service a Constantes del Sistema Relacionados

TClTelefonos

>TClTelefonos.Level1

TelTipo

Constantes preestablecidas asociadas a variables o parámetros de la Aplicación SIFCO WEB.

EJEMPLOS DE REQUEST Y RESPONSE, PARA LOS SERVICIOS RESTful BAJO PROTOCOLO HTTP.

A continuación se muestra una tabla con un ejemplo de una Solicitud y un Respuesta para este Web Service.

METODO POST

Este método para este Web Service en especifico permite agregar una Cuenta Bancaria a un Cliente en la Aplicación SIFCO WEB.

El siguiente ejemplo inserta una Cuenta Bancaria a un cliente en la Aplicación SIFCO WEB.

Tipo de Mensaje HTTP

Ejemplo

REQUEST

URL:

Code Block
languagehtml
https://test.sifco.org/democoopgt/rest/TClRefBancarias/3

HEADERS

Code Block
languagejson
content-type: application/json
authorization: OAuth f2a9ec34-cf83-46f5-8862-f78........
genexus-agent: SmartDevice Application

BODY:

Code Block
languagejson
{
    "ClCliCod": "3",
    "ClNomSocio": "ANA MARIA DEL CARMEN MUJER CIFUENTES GONZALEZ",
    "RefBanUlt": 1,
        "Level1": [
          {
              "RefBanCor": 1,
              "ApBanCod": 1,
              "ApBanNombre": "BANCO EJEMPLO",
              "RefBanTCta": 1,
              "RefBanNCta": "564843481-1",
              "RefBanEstatus": "P",
              
type
"RefInstrucciones": "
integer
"
          }
format:
  
"int64"
      ],
 
ClNomSocio:
   "ClExcluirCorreosElectronicos": 0,
    
description: Nombre del Cliente
"gx_md5_hash": "C65A6DBB33EF2AD159D591C48E3FF0C4"
}

200 (Successful operation)

Operación Exitosa

Code Block
{
    "ClCliCod": "3",
    
type
"ClNomSocio": "
string"
ANA MARIA DEL CARMEN MUJER CIFUENTES GONZALEZ",
    "RefBanUlt": 1,
        
description
"Level1": 
Ultima
[
Referencia
 
Bancaria
         
type:
{
"integer"
         
format:
 
"int32"
    
gx_md5_hash
"RefBanCor": 1,
       
description:
 
gx_md5_hash
 
is
 
an
 
identifier
 
for
 
a
 
specific version of a resource, it is used for optimistic concurrency check. It is required for update and delete operations and ignored on insert.
"ApBanCod": 1,
              "ApBanNombre": "BANCO EJEMPLO",
             
type:
 "
string
RefBanTCta": 1,
      
Level1:
        
$ref
"RefBanNCta": "
#/definitions/TClRefBancarias.Level1Item"
564843481-1",
     
required:
        
-
 
ClCliCod
"RefBanEstatus": "P",
  
TClRefBancarias.Level1Item:
     
properties:
       
RefBanCor:
"RefInstrucciones": ""
          }
 
description:
 
Referencia
 
Bancaria
     ],
   
type:
 "
integer
ClExcluirCorreosElectronicos": 0,
    
format
"gx_md5_hash": "
int32
C65A6DBB33EF2AD159D591C48E3FF0C4"
}

201 (Created)

(Registro Creado con Éxito)

Code Block
{
    
ApBanCod
"ClCliCod": "3",
    
description
"ClNomSocio": 
Código
"ANA 
Banco
MARIA DEL CARMEN MUJER CIFUENTES GONZALEZ",
   
type:
 "
integer
RefBanUlt": 1,
       
format:
 "
int32
Level1": [
      
ApBanNombre:
    {
    
description:
 
Nombre
         
type
"RefBanCor": 
"string"
1,
       
RefBanTCta:
       "ApBanCod": 1,
description:
   
Tipo
 
de
 
Cuenta
         
type
"ApBanNombre": "
integer
BANCO EJEMPLO",
        
format:
      "
int32
RefBanTCta": 1,
      
RefBanNCta:
        
description: Número de la Cuenta
"RefBanNCta": "564843481-1",
              
type
"RefBanEstatus": "
string"
P",
             
RefBanEstatus:
 "RefInstrucciones": ""
         
description:
 
Estatus
}
de
 
la
 
Referencia
 
Bancaria
     ],
   
type:
 "
string
ClExcluirCorreosElectronicos": 0,
    
required
"gx_md5_hash": "C65A6DBB33EF2AD159D591C48E3FF0C4"
}

400 (Bad Request).

Solicitud Errada

Code Block
{
  
- RefBanCor
"error": {
    
x-gx-level
"code": "
TClRefBancarias
string",
   
GxJsonError: properties
 "message": "string"
  
error: $ref: "#/definitions/GxJsonError.error" GxJsonError.error: properties: code: description: Código de Error type: "string" message: description: Mensaje de Error type: "string" x-gx-level: "GxJsonError"
}
}

401 (This service needs an Authorization Header)

(No Autenticado, asociado normalmente a que no se respetaron las cabeceras obligatorias para el consumo de este Web Service, para mayores detalles consultar (Configuración de Seguridad para Obtener Token de Acceso y Consumir de los Web Services) ).

Code Block
{
  "error": {
    "code":"0",
    "message":"This service needs an Authorization Header"
  }
}

404 (Not Found).

Respuesta Vacía (Web Service, no encontrado)

500 (Internal Server Error)

(Error Interno del Servidor de las API’s REST).

Code Block
{
  "error": {
    "code": "string",
    "message": "string"
  }
}

Info

INFORMACIÓN

Para identificar el MENSAJE DE ERROR remitirse a la pagina de (Listado de Errores) External Call Out, donde se describe el listado de errores que arroja las API’s REST de la Aplicación SIFCO WEB, con su respectiva Descripción.

Note

NO DEBE OLVIDAR

NO olvide tomar en cuenta para el uso de este Web Service, el Flujo de Trabajo descrito en Web Services de Clientes, dado a que en caso de no seguirlo al pie de la letra puede generar errores inesperados en la ejecución.

Note

RESPETE LOS ENCABEZADOS OBLIGATORIOS para que pueda consumir el WEB SERVICE respectivo.

Code Block
Content-Type: application/json
Authorization: OAuth f2a9ec34-cf83-46f5-8862-f78ac03670d1!171380a787a9152688ab61a94d66e0eb77...
GENEXUS-AGENT: SmartDevice Application
Warning

EN CASO DE ERROR HTTP 401 (Not Authenticated)

Por favor validar que esta colocando los Encabezados Adecuadamente, y de persistir el problema dirigirse a la Pagina (Configuración de Seguridad para Obtener Token de Acceso y Consumir de los Web Services), para generar nuevamente su Token de Acceso, y/o verificar problemas con su acceso al API REST.

Live Search
spaceKeyDOC
placeholderBúsqueda en esta Pagina
typepage

Enlaces Relevantes

Artículos Relacionados

Filter by label (Content by label)
showLabelsfalse
max5
showSpacefalse
cqllabel in ( "informacion" , "tecnica" , "api" , "rest" , "web" , "services" , "clientes" , "referencias" , "bancarias" ) and type = "page" and space = "DOC"

Artículos Actualizados Recientemente

Recent updates
typespage
max5
spacesDOC
themeconcise
hideHeadingtrue
Change History