DESCRIPCIÓN.
Este Web Service, es uno de los fundamentales de este grupo de API’s RESTfuldebido a que el mismo permite la consulta, el ingreso o la actualización de clientes (asociados / socios), incluyendo todos sus datos claves como por ejemplo, Datos Generales, Cuentas de Ahorro Iniciales, Campos Definidos por el Usuario (Calificadores Adicionales), Cuentas Bancarias, Teléfonos, Direcciones. Ademas de quedar registrado en la Aplicación SIFCO WEB, como un cliente (en el caso de ingreso).
Es importante acotar que para la correcta carga de todos los parámetros de un cliente se deben consumir todos los Web Services de Consulta de Categorías Generales, y las Constantes preestablecidas asociadas a variables o parámetros de la Aplicación SIFCO WEBdado a que ellos les permitan conocer todas las diferentes opciones de parámetros de clientes a consultar, ingresar o actualizar en la Aplicación SIFCO WEB.
Adicionalmente se debe indicar que las opciones de Consulta, Ingreso o Actualización depende del parámetro Modo tal como se explica en el Flujo de Trabajo de Clientes, y se refresca en la tabla a continuación por su importancia para este WS en particular.
Modo Modo de Acceso al Cliente en el Sistema. |
---|
Valor | Significado |
DSP | Permite Obtener toda la información del Cliente, cargada en el Sistema. |
INS | Permite Incluir un Cliente en el Sistema. |
UPD | Permite Actualizar solos los campos de Datos Generales, y Cuentas de Ahorro del Cliente en el Sistema. |
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: "WSIngresarClientes"
externalDocs:
description: "Manual SIFCO"
url: "https://sifco.atlassian.net/wiki/x/9ISo"
produces:
- application/json
paths:
/WSIngresarClientes:
post:
tags:
- WSIngresarClientes
operationId: "WSIngresarClientes"
summary: "WSIngresar Clientes"
parameters:
- $refname: "#/definitions/GxJsonErrorWSIngresarClientesInput"
security: - OAuth2: [] ApiKeyAuth1in: []
securityDefinitions:"body"
OAuth2: typerequired: oauth2false
flow: password tokenUrlschema:
https://test.sifco.org/DemoCoopGT/oauth/access_token scopes: Execute$ref: Permite el método tipo GET"#/definitions/WSIngresarClientesInput"
Insertresponses:
Permite el método tipo POST Update200:
Permite el método tipo PUT Deletedescription: Permite"Successful operation"
el método tipo DELETE FullControlschema:
Permite el manejo de los Cuatro Métodos GET, POST, PUT,DELETE, sobre el Web Service$ref: "#/definitions/WSIngresarClientesOutput"
ApiKeyAuth1: type404:
apiKey in: header namedescription: granttype"Not found"
definitionssecurity:
- WSIngresarClientesInputOAuth2: []
propertiesApiKeyAuth1: []
securityDefinitions:
Modo:
OAuth2:
type: "string"oauth2
ConsultaFormaIdentificarflow: password
tokenUrl: https://test.sifco.org/DemoCoopGT/oauth/access_token
type: "integer" scopes:
formatExecute: "int32"Permite el método tipo GET
ConsultaValorIdentificador: Insert: Permite el método type: "string"tipo POST
WSClienteUpdate: Permite el método tipo PUT
description: WSInformacion Cliente Delete: Permite el método tipo DELETE
$ref: "#/definitions/WSInformacionCliente" WSInformacionClienteFullControl: Permite el manejo de properties:los Cuatro Métodos GET, POST, PUT,DELETE, sobre CodigoCliente:el Web Service
descriptionApiKeyAuth1:
Código del Cliente type: apiKey
typein: "integer"header
name: granttype
formatdefinitions:
"int64"
WSIngresarClientesInput:
TipoDePersonaproperties:
description: Tipo de PersonaModo:
type: "string"
TipoIdentificacionConsultaFormaIdentificar:
descriptiontype: Tipo de Identificación"integer"
typeformat: "integer"int32"
ConsultaValorIdentificador:
formattype: "int32string"
DocumentoIdentificacionPaisWSCliente:
description: PaísWSInformacion deCliente
Emisión Documento type$ref: "integer#/definitions/WSInformacionCliente"
WSInformacionCliente:
formatproperties:
"int64" DocumentoIdentificacionDepartamentoCodigoCliente:
description: Código Regióndel EmisiónCliente
Identificación type: "integer"
format: "int64"
DocumentoIdentificacionMunicipioTipoDePersona:
description: DepartamentoTipo Emisiónde IdentificaciónPersona
type: "integerstring"
format: "int64"
DocumentoIdentificacionZonaTipoIdentificacion:
description: CódigoTipo Municipio Emisiónde Identificación
type: "integer"
format: "int64int32"
NumeroIdentificacionDocumentoIdentificacionPais:
description: NúmeroPais de IdentificaciónEmisión ClientesDocumento
type: "stringinteger"
PrimerNombreformat: "int64"
descriptionDocumentoIdentificacionDepartamento:
Primer Nombre typedescription: "string"Código Región Emisión Identifi
SegundoNombre: descriptiontype: Segundo"integer"
Nombre typeformat: "stringint64"
PrimeApellidoDocumentoIdentificacionMunicipio:
description: PrimerDepartamento Emisión ApellidoIdentific
type: "stringinteger"
SegundoApellido format: "int64"
descriptionDocumentoIdentificacionZona:
Segundo Apellido description: Código Municipio type: "string"Emisión Ident
ApellidoCasada:
description: Apellido de Casada type: "integer"
typeformat: "stringint64"
SexoNumeroIdentificacion:
description: Sexo ClienteNúmero de Identificación Clien
type: "string"
FechaNacimientoPrimerNombre:
description: FechaPrimer de NacimientoNombre
type: "string"
formatSegundoNombre:
"date" EstadoCivildescription: Segundo Nombre
description: Estado Civiltype: "string"
PrimeApellido:
typedescription: Primer "integer"Apellido
formattype: "int32string"
NombreJuridicoSegundoApellido:
description: NombreSegundo deApellido
Empresa o Sociedad
type: "string"
RepresentanteLegalApellidoCasada:
description: NombreApellido delde RepresentanteCasada
Legal type: "string"
NumeroRegistroMercantilSexo:
description: Número de Registro MercantilSexo Cliente
type: "string"
FechaConstitucionFechaNacimiento:
description: Fecha de ConstituciónNacimiento
type: "string"
format: "date"
GrupoEstadoCivil:
description: CódigoEstado delCivil
Grupo de Afinidad
type: "integer"
format: "int64int32"
NumeroIdentificacionTributariaNombreJuridico:
description: NúmeroNombre de Empresa Identificacióno TributariaSociedad
type: "string"
PromotorRepresentanteLegal:
description: Código PromotorNombre del Representante Legal
type: "string"
AfectoAImpuestosNumeroRegistroMercantil:
description: Número Afectode aRegistro ImpuestosMercantil
type: "string"
EstadoClienteFechaConstitucion:
description: EstadoFecha delde ClienteConstitución
type: "string"
CodigoReferencia: description: Referencia
typeformat: "stringdate"
ActividadEconomicaGrupo:
description: Código del Grupo de actividadAfinidad
económica type: "integer"
format: "int32int64"
DireccionEMailPrincipalNumeroIdentificacionTributaria:
description: Número de CorreoIdentificación ElectrónicoTributaria
type: "string"
DireccionEMailSecundarioPromotor:
description: CorreoCódigo ElectrónicoPromotor
Alternativo type: "string"
ExcluirDeMensajesDeCorreoAfectoAImpuestos:
description: ExcluirAfecto dea CorreosImpuestos
Electrónicos type: "integerstring"
formatEstadoCliente:
"int32" ParametrosExtendidos_B1Integrationdescription: Estado del Cliente
description: Parámetros Extendidos_B1 Integrationtype: "string"
$refCodigoReferencia:
"#/definitions/ParametrosExtendidos_B1Integration" Prestamosdescription: Referencia
type: array"string"
itemsActividadEconomica:
description: PréstamoCódigo de actividad económica
$ref type: "#/definitions/WSInformacionCliente.Prestamos"integer"
CuentasAhorroformat: "int32"
typeDireccionEMailPrincipal:
array itemsdescription: Correo Electrónico
descriptiontype: CuentaAhorro"string"
DireccionEMailSecundario:
$ref: "#/definitions/WSInformacionCliente.CuentasAhorro" description: Correo Electrónico CalificadoresAdicionales:Alternativo
type: array"string"
itemsExcluirDeMensajesDeCorreo:
description: CalificadorAdicionalExcluir de Correos Electronicos
$reftype: "#/definitions/WSInformacionCliente.CalificadoresAdicionales"
integer"
CuentasBancarias: typeformat: array"int32"
itemsParametrosExtendidos_B1Integration:
description: CuentaBancariaParametros Extendidos_B1 Integration
$ref: "#/definitions/WSInformacionCliente.CuentasBancariasParametrosExtendidos_B1Integration"
TelefonosPrestamos:
type: array
items:
description: TeléfonoPrestamo
$ref: "#/definitions/WSInformacionCliente.TelefonosPrestamos"
DireccionesCuentasAhorro:
type: array
items:
description: DirecciónCuentaAhorro
$ref: "#/definitions/WSInformacionCliente.DireccionesCuentasAhorro"
ParametrosExtendidos_B1Integration:
properties:
CentrosDeCosto CalificadoresAdicionales:
type: array
items:
description: CentroDeCostoCalificadorAdicional
$ref: "#/definitions/ParametrosExtendidos_B1IntegrationWSInformacionCliente.CentrosDeCostoCalificadoresAdicionales"
ProyectosCuentasBancarias:
type: array
items:
description: ProyectoCuentaBancaria
$ref: "#/definitions/ParametrosExtendidos_B1IntegrationWSInformacionCliente.ProyectosCuentasBancarias"
TransaccionesTelefonos:
type: array
items:
description: TransaccionesTelefono
$ref: "#/definitions/ParametrosExtendidos_B1IntegrationWSInformacionCliente.TransaccionesTelefonos"
SeriesDirecciones:
type: array
items:
description: SerieDireccion
$ref: "#/definitions/ParametrosExtendidos_B1IntegrationWSInformacionCliente.SeriesDirecciones"
ParametrosExtendidos_B1Integration.CentrosDeCostoRefPersonales:
properties: type: array
Secuenciaitems:
description: Referencia
Secuencia type$ref: "integer#/definitions/WSInformacionCliente.RefPersonales"
WSInformacionCliente.Prestamos:
format properties:
"int32" CodigoCCSAPNumeroPrestamo:
description: Número Códigodel CCSAPPréstamo
type: "string"
NombreCCSAPNombrePrestamo:
description: Nombre del CCSAPPréstamo
type: "string"
CodigoCCSifcoProducto:
description: CódigoCodigo CCSifcoProducto
type: "integer"
format: "int32"
NombreCCSifcoSubProducto:
description: Código NombreSubProducto CCSifcoColocacion
type: "stringinteger"
x-gx-level format: "ParametrosExtendidos_B1Integration"int32"
ParametrosExtendidos_B1Integration.ProyectosSaldo:
properties: description: Saldo de Secuencia:Capital
descriptiontype: Secuencia"number"
typeformat: "integerdouble"
x-gx-level: "WSInformacionCliente"
format: "int32"
WSInformacionCliente.CuentasAhorro:
properties:
CodigoProyectoSAPNumeroCuenta:
description: CódigoNumero Proyecto SAPCuenta
type: "string"
NombreCCSAPProducto:
description: NombreCodigo CCSAPProducto
type: "stringinteger"
format: "int32"
CodigoCCSifcoSubProducto:
description: Código del CCSifcoSubProducto
type: "integer"
format: "int32"
NombreCCSifcoTieneCondicionesEspeciales:
description: NombreTiene Condiciones CCSifcoEspeciales
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration" FrecuenciaCondicionesEspeciales:
ParametrosExtendidos_B1Integration.Transaccionesdescription: Código de la Frecuencia
properties: InterfazarCodigosDeTransacciontype: "integer"
descriptionformat: "int32"
Interfazar
Códigos De Transacción MontoDescuentoPlanilla:
type: "boolean"
NombreCampoSAP:
description: NombreMonto CampoDescuento SAPPlanilla
type: "stringnumber"
x-gx-level format: "ParametrosExtendidos_B1Integrationdouble"
ParametrosExtendidos_B1Integration.Series: properties:
ObjetoDeNegocioFrecuenciaDescuentoPlanilla:
description: Código Objetode Dela NegocioFrecuencia
type: "integer"
format: "int32"
CodigoSerieSAPReferencia:
description: CódigoCuenta Seriede SAPReferencia
type: "string"
NombreSerieSAPMonto:
description: Nombre Serie SAP Monto
type: "number"
typeformat: "stringdouble"
x-gx-level: "ParametrosExtendidos_B1IntegrationWSInformacionCliente"
WSInformacionCliente.PrestamosCalificadoresAdicionales:
properties:
NumeroPrestamoCodigoCalificador:
description: Número del PréstamoCódigo
type: "stringinteger"
NombrePrestamo format: "int32"
ValorCalificador:
description: NombreValor del calificador Préstamoadicional
type: "string"
Productox-gx-level: "WSInformacionCliente"
WSInformacionCliente.CuentasBancarias:
properties:
Correlativo:
description: CodigoReferencia ProductoBancaria
type: "integer"
format: "int32"
SubProductoCodigoBanco:
description: CódigoCodigo SubProducto ColocaciónBanco
type: "integer"
format: "int32"
SaldoTipoCuenta:
description: SaldoTipo de CapitalCuenta
type: "numberinteger"
format: "doubleint32"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.CuentasAhorro NumeroCuenta:
properties: NumeroCuentadescription: Número de description: Numero la Cuenta
type: "string"
ProductoEstadoReferencia:
description: Código ProductoEstatus de la Referencia Banca
type: "string"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.Telefonos:
properties:
Correlativo:
description: Correlativo por cliente
type: "integer"
format: "int32"
SubProductoTipoTelefono:
description: CódigoTipo delde SubProductotelefono
type: "integer"
format: "int32"
TieneCondicionesEspecialesNumeroTelefono:
description: TieneNúmero Condicionestelefonico
Especiales type: "string"
FrecuenciaCondicionesEspeciales:
description: Código de la Frecuencia
type: "integer"
format: "int32"
MontoDescuentoPlanilla:
description: Monto Descuento Planilla
type: "number"
format: "double"
FrecuenciaDescuentoPlanilla:
description: Código de la Frecuencia
type: "integer"
format: "int32"
Referencia:
description: Cuenta de Referencia
type: "string"
Monto:
description: Monto
type: "number"
format: "double"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.CalificadoresAdicionales:
properties:
CodigoCalificador:
description: Código
type: "integer"
format: "int32"
ValorCalificador:
description: Valor del calificador adicional
type: "string"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.CuentasBancarias:
properties:
Correlativo:
description: Referencia Bancaria
type: "integer"
format: "int32"
CodigoBanco:
description: Código Banco
type: "integer"
format: "int32"
TipoCuenta:
description: Tipo de Cuenta
type: "integer"
format: "int32"
NumeroCuenta:
description: Número de la Cuenta
type: "string"
EstadoReferencia:
description: Estatus de la Referencia Bancaria
type: "string"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.Telefonos:
properties:
Correlativo:
description: Correlativo por cliente
type: "integer"
format: "int32"
TipoTelefono:
description: Tipo de teléfono
type: "integer"
format: "int32"
NumeroTelefono:
description: Número telefónico
type: "string"
ObservacionTelefono:
description: Observaciones
typeObservacionTelefono:
description: Observaciones
type: "string"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.Direcciones:
properties:
Correlativo:
description: Correlativo de Dirección
type: "integer"
format: "int32"
TipoDireccion:
description: Tipo de Dirección
type: "integer"
format: "int32"
DireccionPais:
description: Código pais dirección
type: "integer"
format: "int64"
DireccionDepartamento:
description: Código Región Dirección
type: "integer"
format: "int64"
DireccionMunicipio:
description: Código Departamento Dirección
type: "integer"
format: "int64"
DireccionZona:
description: Código Municipio Dirección
type: "integer"
format: "int64"
Direccion:
description: Dirección
type: "string"
CodigoPostal:
description: Código Postal
type: "string"
Geolocalizacion:
description: Geolocalización
type: "string"
DireccionEmpresaDondeLabora:
description: Nombre de la empresa donde labora
type: "string"
Puesto:
description: Puesto en la empresa
type: "string"
x-gx-level: "WSInformacionCliente"
WSInformacionCliente.RefPersonales:
properties:
Correlativo:
description: Correlativo de Referencia Personal
type: "integer"
format: "int32"
TipoPersona:
description: Tipo de Persona Referencia
type: "string"
Nombre:
description: Referencia Nombre
type: "string"
Direccion:
description: Dirección Referencia Personal
type: "string"
CodigoPostal:
description: Código Postal Ref. Personal
type: "integer"
format: "int64"
Telefono:
description: Teléfono Referencia Personal
type: "string"
Fax:
description: FAX Referencia Personal
type: "string"
email:
description: Correo Electrónico Ref. Per.
type: "string"
TipoRelalcion:
description: Tipo de Relación
type: "string"
Detalle:
description: Detalles de la Referencia
type: "string"
Estatus:
description: Estatus de la Referencia Per.
type: "string"
Celular:
description: Celular referencia personal
type: "string"
x-gx-level: "WSInformacionCliente"
ParametrosExtendidos_B1Integration:
properties:
CentrosDeCosto:
type: array
items:
description: CentroDeCosto
$ref: "#/definitions/ParametrosExtendidos_B1Integration.CentrosDeCosto"
Proyectos:
type: array
items:
description: Proyecto
$ref: "#/definitions/ParametrosExtendidos_B1Integration.Proyectos"
Transacciones:
$ref: "#/definitions/ParametrosExtendidos_B1Integration.Transacciones"
Series:
type: array
items:
description: Serie
$ref: "#/definitions/ParametrosExtendidos_B1Integration.Series"
FormaDePago:
$ref: "#/definitions/ParametrosExtendidos_B1Integration.FormaDePago"
PagosTransferencia:
type: array
items:
description: PagoTransferencia
$ref: "#/definitions/ParametrosExtendidos_B1Integration.PagosTransferencia"
ParametrosExtendidos_B1Integration.CentrosDeCosto:
properties:
Secuencia:
description: Secuencia
type: "integer"
format: "int32"
CodigoCCSAP:
description: Codigo CCSAP
type: "string"
NombreCCSAP:
description: Nombre CCSAP
type: "string"
CodigoCCSifco:
description: Codigo CCSifco
type: "integer"
format: "int32"
NombreCCSifco:
description: Nombre CCSifco
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration"
ParametrosExtendidos_B1Integration.Proyectos:
properties:
Secuencia:
description: Secuencia
type: "integer"
format: "int32"
CodigoProyectoSAP:
description: Codigo Proyecto SAP
type: "string"
NombreCCSAP:
description: Nombre CCSAP
type: "string"
CodigoCCSifco:
description: Codigo CCSifco
type: "integer"
format: "int32"
NombreCCSifco:
description: Nombre CCSifco
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration"
ParametrosExtendidos_B1Integration.Transacciones:
properties:
InterfazarCodigosDeTransaccion:
description: Interfazar Codigos De Transaccion
type: "boolean"
NombreCampoSAP:
description: Nombre Campo SAP
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration"
ParametrosExtendidos_B1Integration.Series:
properties:
ObjetoDeNegocio:
description: Objeto De Negocio
type: "integer"
format: "int32"
CodigoSerieSAP:
description: Codigo Serie SAP
type: "string"
NombreSerieSAP:
description: Nombre Serie SAP
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration"
ParametrosExtendidos_B1Integration.FormaDePago:
properties:
InterfazFormaDePago:
description: Interfaz Forma De Pago
type: "boolean"
TarjetasDeCredito:
type: array
items:
description: TarjetaDeCredito
$ref: "#/definitions/ParametrosExtendidos_B1Integration.FormaDePago.TarjetasDeCredito"
x-gx-level: "ParametrosExtendidos_B1Integration"
ParametrosExtendidos_B1Integration.FormaDePago.TarjetasDeCredito:
properties:
CodigoTarjetaCredito:
description: Codigo Tarjeta Credito
type: "string"
FormatoTarjetaCredito:
description: Formato de Identificación
type: "string"
ExpresionTarjetaCredito:
description: Expresión Regular
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration.FormaDePago"
ParametrosExtendidos_B1Integration.PagosTransferencia:
properties:
CodigoPagoTransferencia:
description: Codigo Pago Transferencia
type: "integer"
format: "int32"
DescripcionPagoTransferencia:
description: Descripcion Pago Transferencia
type: "string"
CtaContablePagoTransferencia:
description: Cta Contable Pago Transferencia
type: "string"
EmpCodPagoTransferencia:
description: Código Empresa
type: "integer"
format: "int32"
TrxCodPagoTransferencia:
description: Código de Transacción
type: "integer"
format: "int32"
UsoPagoTransferencia:
description: Uso Pago Transferencia
type: "string"
x-gx-level: "ParametrosExtendidos_B1Integration"
WSIngresarClientesOutput:
properties:
CodigoCliente:
type: "integer"
format: "int64"
ConsultaResultados:
description: WSInformacion Cliente
type: array
items:
$ref: "#/definitions/WSInformacionCliente"
Messages:
description: Messages
type: array
items:
$ref: "#/definitions/Messages_Message"
Result:
type: "string"
Messages_Message:
properties:
Id:
description: Id
type: "string"
Type:
description: Type
type: "integer"
format: "int32"
Description:
description: Description
type: "string"
GxJsonError:
properties:
error:
$ref: "#/definitions/GxJsonError.error"
GxJsonError.error:
properties:
code:
type: "string"
message:
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.
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 la Creación de Clientes en la Aplicación SIFCO WEB.
A continuación se mostraran tres ejemplos de uso de este Web Service, uno para cada valor del parámetro Modo, dado a su relevancia para este Web Service en particular.
EJEMPLO #1
El siguiente ejemplo consulta los datos de un cliente en la Aplicación SIFCO WEB, con el Parámetro Modo : “DSP“
Tipo de Mensaje HTTP | Ejemplo |
---|
REQUEST | URL: Code Block |
---|
| https://test.sifco.org/democoopgt/rest/wsingresarclientes |
HEADERS: Code Block |
---|
| content-type: application/json
authorization: OAuth f2a9ec34-cf83-46f5-8862-f78........
genexus-agent: SmartDevice Application |
BODY: Code Block |
---|
| {
"Modo": "DSP",
"ConsultaFormaIdentificar": 1,
"ConsultaValorIdentificador": "12345",
"WSCliente": {}
} |
|
200 (Successful operation) Operación Exitosa | Code Block |
---|
| {
"CodigoCliente":"0",
"ConsultaResultados":[],
"Messages":[],
"Result":""
} |
|
400 (Bad Request). Solicitud Errada | Code Block |
---|
| {
"error": {
"code": "string",
"message": "string"
}
} |
|
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"
}
}
{
"CodigoCliente":"",
"ConsultaResultados":[],
"Messages":[],
"Result":""
} |
|
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"
}
} |
|
EJEMPLO #2
El siguiente ejemplo inserta un cliente en la Aplicación SIFCO WEB, con el Parámetro Modo : “INS”
Tipo de Mensaje HTTP | Ejemplo |
---|
REQUEST | URL: Code Block |
---|
https://test.sifco.org/democoopgt/rest/wsingresarclientes |
HEADERS Code Block |
---|
| content-type: application/json
authorization: OAuth f2a9ec34-cf83-46f5-8862-f78........
genexus-agent: SmartDevice Application |
BODY: Code Block |
---|
| {
"Modo": "string",
"ConsultaFormaIdentificar": 0,
"ConsultaValorIdentificador": "string",
"WSCliente": {
"CodigoCliente": 0,
"TipoDePersona": "string",
"TipoIdentificacion": 0,
"DocumentoIdentificacionPais": 0,
"DocumentoIdentificacionDepartamento": 0,
"DocumentoIdentificacionMunicipio": 0,
"DocumentoIdentificacionZona": 0,
"NumeroIdentificacion": "string",
"PrimerNombre": "string",
"SegundoNombre": "string",
"PrimeApellido": "string",
"SegundoApellido": "string",
"ApellidoCasada": "string",
"Sexo": "string",
"FechaNacimiento": "2019-09-18",
"EstadoCivil": 0,
"NombreJuridico": "string",
"RepresentanteLegal": "string",
"NumeroRegistroMercantil": "string",
"FechaConstitucion": "2019-09-18",
"Grupo": 0,
"NumeroIdentificacionTributaria": "string",
"Promotor": "string",
"AfectoAImpuestos": "string",
"EstadoCliente": "string",
"CodigoReferencia": "string",
"ActividadEconomica": 0,
"DireccionEMailPrincipal": "string",
"DireccionEMailSecundario": "string",
"ExcluirDeMensajesDeCorreo": 0,
"ProfesionUOficio": "string",
"ParametrosExtendidos_B1Integration": {
"CentrosDeCosto": [
{
"Secuencia": 0,
"CodigoCCSAP": "string",
"NombreCCSAP": "string",
"CodigoCCSifco": 0,
"NombreCCSifco": "string"
|
|
x-gx-level:"WSInformacionCliente"WSInformacionCliente.Direcciones:properties:Correlativo:description:CorrelativodeDireccióntype:"integer"formatint32TipoDireccion: description: Tipo de Direccióntype"integer"format:int32"
DireccionPais:NombreCCSifco": "string"
}
|
|
description:Códigopaísdireccióntype:integerformat:"int64"DireccionDepartamento: "InterfazarCodigosDeTransaccion": true,
|
|
description:CódigoRegiónDirección "NombreCampoSAP": "string"
|
|
type:"integer"format: "int64" DireccionMunicipiodescription:CódigoDepartamentoDireccióntype: "integer"formatint64DireccionZona: "NombreSerieSAP": "string"
|
|
description:CódigoMunicipioDireccióntype:"integer" format:int64Direccion:descriptionDireccióntype"NombrePrestamo": "string",
|
|
CodigoPostaldescriptionCódigo Postaltype"string"Geolocalizacion:description: Geolocalizacióntype"NumeroCuenta": "string",
|
|
DireccionEmpresaDondeLabora:descriptionNombredelaempresadondelabora type"TieneCondicionesEspeciales": "string",
|
|
Puesto "FrecuenciaCondicionesEspeciales": 0,
|
|
description "MontoDescuentoPlanilla": |
|
Puesto en la empresatype: "string""FrecuenciaDescuentoPlanilla": 0,
|
|
x-gx-levelWSInformacionClienteWSIngresarClientesOutput:properties:CodigoCliente:type: integerCalificadoresAdicionales": [
{
|
|
format:"int64"ConsultaResultados:description: WSInformacion Cliente"ValorCalificador": "string"
}
|
|
type:arrayitems:$ref:#/definitions/WSInformacionCliente"MessagesdescriptionMessagestypearrayitems"EstadoReferencia": "string"
}
|
|
$ref: "#/definitions/Messages_Message"Resulttype:"string"Messages_Message:properties:Id:descriptionIdtype"ObservacionTelefono": "string"
}
|
|
Type:descriptionTypetype:"integer"format:"int32"Description: descriptionDescriptiontype"string"GxJsonError:properties:error:$ref#/definitions/GxJsonError.error"GxJsonError.error:properties"CodigoPostal": "string",
|
|
code: "Geolocalizacion": "string",
|
|
description"DireccionEmpresaDondeLabora": |
|
CódigodeError typemessage:descriptionMensaje de Error
type: "string"
x-gx-level: "GxJsonError"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 la Creación de Clientes en la Aplicación SIFCO WEB.
El siguiente ejemplo inserta un cliente en la Aplicación SIFCO WEB.
Tipo de Mensaje HTTP | Ejemplo |
---|
REQUEST | URL:
Code Block |
---|
https://test.sifco.org/democoopgt/rest/wsingresarclientes |
HEADERS
Code Block |
---|
|
content-type: application/json
authorization: OAuth f2a9ec34-cf83-46f5-8862-f78........
genexus-agent: SmartDevice Application |
BODY: {
"Correlativo":0,
"TipoPersona":string,
"Nombre":string,
"Direccion":string,
"CodigoPostal":0,
"Telefono":string,
"Fax":string,
"email":string,
"TipoRelalcion":string,
"Detalle":string,
"Estatus":string,
"Celular":string
}
]
}
} |
|
200 (Successful operation) Operación Exitosa | |
Modo"string"ConsultaFormaIdentificar0,"ConsultaValorIdentificador":"string","WSCliente": { "CodigoCliente": 0,
"TipoDePersona": "string",
"TipoIdentificacion": 0,
|
|
"DocumentoIdentificacionPais": 0,
DocumentoIdentificacionDepartamentoDocumentoIdentificacionPais": 0, |
|
"DocumentoIdentificacionMunicipio":0,DocumentoIdentificacionZonaDocumentoIdentificacionDepartamento": 0, |
|
"NumeroIdentificacion":"string",PrimerNombreDocumentoIdentificacionMunicipio": |
|
"string""SegundoNombre": "string", PrimeApellidoDocumentoIdentificacionZona": |
|
"string",
"SegundoApellido": "string",ApellidoCasadaNumeroIdentificacion": "string",
" |
|
SexoPrimerNombre": "string",
" |
|
FechaNacimiento2019-09-18EstadoCivil0NombreJuridicoSegundoApellido": "string", |
|
RepresentanteLegalApellidoCasada": "string",
" |
|
NumeroRegistroMercantilFechaConstitucionFechaNacimiento": "2019-09-18",
" |
|
GrupoNumeroIdentificacionTributariaNombreJuridico": "string",
" |
|
PromotorRepresentanteLegal": "string",
" |
|
AfectoAImpuestosNumeroRegistroMercantil": "string",
" |
|
EstadoClientestring
"CodigoReferencia":"string",ActividadEconomicaDireccionEMailPrincipalNumeroIdentificacionTributaria": "string",
" |
|
DireccionEMailSecundarioExcluirDeMensajesDeCorreo0,
"ParametrosExtendidos_B1Integration": {
"CentrosDeCosto": ["string",
"EstadoCliente": "string",
|
|
{ "CodigoReferencia": "string",
" |
|
Secuencia
CodigoCCSAPDireccionEMailPrincipal": "string",
|
|
NombreCCSAPDireccionEMailSecundario": "string", |
|
CodigoCCSifcoExcluirDeMensajesDeCorreo": 0, |
|
NombreCCSifcoProfesionUOficio": "string",
|
|
}
],"ParametrosExtendidos_B1Integration": {
" |
|
ProyectosCentrosDeCosto": [
{
"Secuencia": 0,
" |
|
CodigoProyectoSAPCodigoCCSAP": "string",
"NombreCCSAP": "string",
"CodigoCCSifco": 0,
"NombreCCSifco": "string"
}
],
" |
|
NombreCCSifco"string"}],Transacciones[
{ InterfazarCodigosDeTransacciontrueNombreCampoSAP}],Series[{"ObjetoDeNegocio": 0,
CodigoSerieSAP"string","NombreSerieSAP": "string"} "InterfazarCodigosDeTransaccion": true,
|
|
]},Prestamos [{"NumeroPrestamo": "string"NombrePrestamo "string","Producto":0,SubProducto"Saldo":0 "CodigoSerieSAP": "string",
|
|
}],CuentasAhorro[{"NumeroCuenta":"string","Producto":0
SubProducto0,"TieneCondicionesEspeciales":"string",FrecuenciaCondicionesEspeciales0MontoDescuentoPlanilla0FrecuenciaDescuentoPlanillaReferencia"string"MontoCalificadoresAdicionales{ "CodigoCalificador": 0,ValorCalificador}]"CuentasBancarias":[{CorrelativoTieneCondicionesEspeciales": |
|
0CodigoBancoFrecuenciaCondicionesEspeciales": 0,
" |
|
TipoCuentaMontoDescuentoPlanilla": 0,
" |
|
NumeroCuentaFrecuenciaDescuentoPlanilla": |
|
"string"EstadoReferencia
}],Telefonos[{"Correlativo": 0,
TipoTelefonoCalificadoresAdicionales": [
|
|
0,"NumeroTelefono":"string",ObservacionTelefono"string"} ],
"Direcciones[{ "Correlativo":0
TipoDireccion0,"DireccionPais":0,DireccionDepartamentoDireccionMunicipioDireccionZonaDireccionNumeroCuenta": "string",
" |
|
CodigoPostalEstadoReferencia": "string" |
|
,"Geolocalizacion": "string", "DireccionEmpresaDondeLabora": "string",
Puesto"string"}]}}200 (Operación Exitosa) | Code Block |
---|
|
{CodigoClienteConsultaResultados[{
CodigoCliente0TipoDePersonaObservacionTelefono": "string" |
|
,"TipoIdentificacion":0,"DocumentoIdentificacionPais":0DocumentoIdentificacionDepartamento 0,"DocumentoIdentificacionMunicipio":0,DocumentoIdentificacionZonaNumeroIdentificacion"string"PrimerNombre"string"SegundoNombre"string",PrimeApellido"string",SegundoApellido"string"ApellidoCasada"Sexo":"string", FechaNacimiento2019-09-18
"EstadoCivil": 0,NombreJuridicoGeolocalizacion": "string",
" |
|
RepresentanteLegalDireccionEmpresaDondeLabora": "string",
" |
|
NumeroRegistroMercantil,"FechaConstitucion":"2019-09-18","Grupo": 0,}
],
"RefPersonales":[
{
" |
|
NumeroIdentificacionTributariaCorrelativo":0,
"TipoPersona":string,
"Nombre":string,
"Direccion":string,
"CodigoPostal":0,
"Telefono":string,
|
|
"Promotor": "string",
"AfectoAImpuestos": "string",
"EstadoCliente": "string",
"CodigoReferencia": "string",
"ActividadEconomica": 0,
"DireccionEMailPrincipal": "string", "Fax":string,
"email":string,
"TipoRelalcion":string,
"Detalle":string,
"Estatus":string,
"Celular":string
}
],
"Messages": [
{
" |
|
DireccionEMailSecundarioExcluirDeMensajesDeCorreoParametrosExtendidos_B1Integration{
"CentrosDeCosto": [
{
Secuencia0,
|
400 (Bad Request). Solicitud Errada | |
CodigoCCSAP "NombreCCSAP, CodigoCCSifco ,
NombreCCSifco string"This service needs an Authorization Header"
|
|
}
}
{
"CodigoCliente":"",
|
|
Proyectos |
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",
|
|
Secuencia": 0,
"CodigoProyectoSAP": "stringEJEMPLO #3
El siguiente ejemplo consulta los datos de un cliente en la Aplicación SIFCO WEB, con el Parámetro Modo : “UPD“
Tipo de Mensaje HTTP | Ejemplo |
---|
REQUEST | URL: Code Block |
---|
| https://test.sifco.org/democoopgt/rest/wsingresarclientes |
HEADERS: Code Block |
---|
| content-type: application/json
authorization: OAuth f2a9ec34-cf83-46f5-8862-f78........
genexus-agent: SmartDevice Application |
BODY: Code Block |
---|
| {
"Modo": "UPD",
|
|
"ConsultaFormaIdentificar": 1,
" |
|
NombreCCSAPConsultaValorIdentificador": " |
|
string CodigoCCSifco0,
NombreCCSifcostringN",
"TipoIdentificacion": 1,
|
|
}
"DocumentoIdentificacionPais": 320,
|
|
],
"DocumentoIdentificacionDepartamento": 13,
" |
|
TransaccionesDocumentoIdentificacionMunicipio": |
|
[
{
InterfazarCodigosDeTransaccionDocumentoIdentificacionZona": |
|
true0,
"NumeroIdentificacion": "7885 88363 9839",
" |
|
NombreCampoSAPstringSIFCO",
"SegundoNombre": "PRUEBA",
|
|
}
"PrimeApellido": "OFICINA",
"SegundoApellido": "GENERAL",
|
|
],Series["M",
"FechaNacimiento": "1982-05-11",
|
|
{
"EstadoCivil": 1,
"NombreJuridico": "",
|
|
ObjetoDeNegocio0"",
"NumeroRegistroMercantil": "",
|
|
CodigoSerieSAPstring NombreSerieSAPNumeroIdentificacionTributaria": " |
|
string3454534",
"Promotor": "admin",
|
|
}
"AfectoAImpuestos": "S",
"EstadoCliente": "A",
|
|
] }"CodigoReferencia": "4040",
|
|
Prestamos[ {
"DireccionEMailPrincipal": "rmatheu@sifco.org",
|
|
NumeroPrestamoDireccionEMailSecundario": " |
|
string",
"ExcluirDeMensajesDeCorreo": 0,
" |
|
NombrePrestamostring,Producto 0,SubProducto0 Saldo0
}],CuentasAhorroTieneCondicionesEspeciales": |
|
[{
"FrecuenciaCondicionesEspeciales": 8,
|
|
NumeroCuentaMontoDescuentoPlanilla": " |
|
string ProductoFrecuenciaDescuentoPlanilla": |
|
0
SubProducto0,TieneCondicionesEspecialesstring,"FrecuenciaCondicionesEspeciales":0,MontoDescuentoPlanilla0
FrecuenciaDescuentoPlanilla0
Referencia"string" MontoTieneCondicionesEspeciales": |
|
0}
"FrecuenciaCondicionesEspeciales": 8,
|
|
], CalificadoresAdicionales[{
"FrecuenciaDescuentoPlanilla": 11,
" |
|
CodigoCalificador0,ValorCalificadorstring
CuentasBancariasCalificadoresAdicionales": [],
"CuentasBancarias": [],
|
|
{ Correlativo0[],
"RefPersonales":[]
}
} |
|
200 (Successful operation) Operación Exitosa | Code Block |
---|
| {
"CodigoCliente": "1",
" |
|
CodigoBanco0 |
400 (Bad Request). Solicitud Errada | |
TipoCuenta0,
NumeroCuenta "EstadoReferencia }
],
"Telefonos": [
{
Correlativo
TipoTelefono0,service needs an Authorization Header"
}
}
{
" |
|
NumeroTelefono string",
"ConsultaResultados":[],
|
|
ObservacionTelefono string"
}
],
"Direcciones": [
{
"Correlativo": 0,
"TipoDireccion": 0,
"DireccionPais": 0,
"DireccionDepartamento": 0,
"DireccionMunicipio": 0,
"DireccionZona": 0,
"Direccion": "string",
"CodigoPostal": "string",
"Geolocalizacion": "string",
"DireccionEmpresaDondeLabora": "string",
"Puesto": "string"
}
]
}
],
"Messages": [
|
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 Mensajes), donde se describe el listado de mensajes 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 |
Tome en cuenta estos como los campos mínimos:
Cuando es una persona individual:
Code Block |
---|
|
{
"Modo": "INS",
"ConsultaFormaIdentificar": 0,
"ConsultaValorIdentificador": "",
"WSCliente": {
" |
Id"string"Type0Descriptionstring}
],
Resultstring
}400 (Requisicion Errada).
401 (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) ).
404 (Web Service, no encontrado).
500 (Error Interno del Servidor de las API’s REST).
Code Block |
---|
|
{error{codestringmessagestring}
} Tip |
---|
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. "FechaNacimiento": "1995-09-18",
"EstadoCivil": 2,
"ActividadEconomica": 1,
"DireccionEMailPrincipal": "XXX@sifco.org"
}
|
Cuando es una persona jurídica:
Code Block |
---|
{
"Modo": "INS",
"ConsultaFormaIdentificar": 1,
"ConsultaValorIdentificador": "0",
"WSCliente": {
"CodigoCliente": "0",
"TipoDePersona": "J",
"TipoIdentificacion": 2,
"NombreJuridico": "XXXXXXXXX",
"RepresentanteLegal": "PENDIENTE",
"NumeroIdentificacionTributaria": "99999",
}
} |