Versions Compared

Key

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

Web Services para Registrar o Modificar Tipos de Documento de Identificación.

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 Tipos de Documento de Identificación en la **Aplicación SIFCO WEB** ." termsOfService: "https://sifco.org/sobre-nosotros/" contact: email: "soporte@sifco.org" license: name: "Apache 2.0

DESCRIPCIÓN.

Este Web Service, permite Consultar, Crear o Modificar Tipos de Actividad Económica en la Aplicación SIFCO WEB, es importante mencionar que en la descripción de los mismos se pueden definir relaciones con Actividades Económicas Padres, para tener una mejor organización de estos tipos de actividad económica.

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: "TApTipIdentificacion"
  externalDocs:
    description: "Manual SIFCO"
    url: "https://sifco.atlassian.net/wiki/x/cgDd"
produces:
  - application/json
paths:
  /TApTipIdentificacion/{ApTidCod}:
    get:
      tags:
        - TApTipIdentificacion
      operationId: "GetTApTipIdentificacion"
      summary: "Consultar los Tipos de Documento de Identificación Registrados en el Sistema"
      url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "<SERVER>"
schemes:parameters:
        - https in: header
- http basePath: /<APPDIR>/rest tags: - name: "TApTipIdentificacion"   externalDocsname: Content-Type
   description: "Manual SIFCO"     urltype: "https://sifco.atlassian.net/wiki/x/cgDd"
produces:
  - application/json
paths:
  /TApTipIdentificacion/{ApTidCod}:string"
          getrequired:  true
    tags:      default: application/json
 - TApTipIdentificacion      - operationIdin: "GetTApTipIdentificacion"header
      summary: "Consultar los Tipos dename: DocumentoAuthorization
de Identificación Registrados en el Sistema"     type: "string"
parameters:         - inrequired: headertrue
          namedefault: Content-Type
OAuth <Access Token>
        - typein: "string"header
          requiredname: trueGENEXUS-AGENT
          default: application/jsontype: "string"
         - inrequired: headertrue
          namedefault: AuthorizationSmartDevice Application
        - typename: "stringApTidCod"
          requiredin: true"path"
          defaultdescription: OAuth <Access Token>"Tipo de Identificación"
         - inrequired: headertrue
          nametype: GENEXUS-AGENT"integer"
          typeformat: "stringint32"
      
   required: true  responses:
        default200: SmartDevice
Application         - namedescription: "ApTidCodSuccessful operation"
          inschema:
"path"            description$ref: "Tipo de Identificación#/definitions/TApTipIdentificacion"
          required400:
true           typedescription: "integerBad request"
          formatschema:
"int32"              responses:$ref: "#/definitions/GxJsonError"
        200401:
          description: "SuccessfulNot operationAuthenticated"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        400404:
          description: "Bad request: "Data with the specified key could not be found"
          schema:
            $ref: "#/definitions/GxJsonError"
        401500:
          description: "NotInternal server Authenticatederror"
          schema:
            $ref: "#/definitions/GxJsonError"

    post:
     404: tags:
        - TApTipIdentificacion
    description  operationId: "InsertTApTipIdentificacion"Data
with the specified key could not besummary: found"Insertar los Tipos de Documento de Identificación Registrados en el Sistema"
   schema:   parameters:
        - $refin: "#/definitions/GxJsonError"header
          500name: Content-Type
          descriptiontype: "Internal server errorstring"
          schemarequired: true
           $refdefault: "#/definitions/GxJsonError"application/json
        - postin: header
     tags:     name: Authorization
  - TApTipIdentificacion       operationIdtype: "InsertTApTipIdentificacionstring"
       summary: "Insertar los Tiposrequired: detrue
Documento de Identificación Registrados en el Sistema"    default: OAuth <Access parameters:Token>
        - in: header
          name: ContentGENEXUS-TypeAGENT
          type: "string"
          required: true
          default: application/jsonSmartDevice Application
        - inname: header"ApTidCod"
          namein: Authorization"path"
          typedescription: "stringTipo de Identificación"
          required: true
          defaulttype: OAuth <Access Token>"integer"
         - informat: header"int32"
         - name: GENEXUS-AGENT
          type: "stringTApTipIdentificacion"
          requiredin: true"body"
          defaultdescription: SmartDevice Application"SDT of TApTipIdentificacion"
         - namerequired: "ApTidCod"false
          inschema:
"path"            description$ref: "Tipo de Identificación#/definitions/TApTipIdentificacion"

         requiredresponses:
true           type200:
"integer"           formatdescription: "int32Successful operation"
        -  nameschema:
 "TApTipIdentificacion"           in$ref: "body#/definitions/TApTipIdentificacion"
          description: "SDT of TApTipIdentificacion"201:
           requireddescription: false"Created"
          schema:
            $ref: "#/definitions/TApTipIdentificacion"
       responses:
        200 400:
          description: "SuccessfulBad operationrequest"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        201401:
          description: "CreatedNot Authenticated"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        400404:
          description: "Bad requestData with the specified key could not be found"
          schema:
            $ref: "#/definitions/GxJsonError"
        401500:
          description: "NotInternal server Authenticatederror"
          schema:
            $ref: "#/definitions/GxJsonError"

    put:
  404    tags:
        - TApTipIdentificacion
 description     operationId: "UpdateTApTipIdentificacion"Data
with the specified key could not besummary: found"Actualizar los Tipos de Documento de Identificación Registrados en el Sistema"
   schema:   parameters:
        - $refin: "#/definitions/GxJsonError" header
          500name: Content-Type
         description type: "Internal server errorstring"
          schemarequired: true
           $refdefault: "#/definitions/GxJsonError"application/json
        put- in: header
     tags:     name: Authorization
  - TApTipIdentificacion       operationIdtype: "UpdateTApTipIdentificacionstring"
      summary:  "Actualizar los Tiposrequired: detrue
Documento de Identificación Registrados en el Sistema"    default: OAuth <Access parameters:Token>
        - in: header
          name: ContentGENEXUS-TypeAGENT
          type: "string"
          required: true
          default: application/jsonSmartDevice Application
        - inname: header"ApTidCod"
          namein: Authorization"path"
          typedescription: "stringTipo de Identificación"
          required: true
          defaulttype: OAuth"integer"
<Access Token>         - informat: header"int32"
        -  name: GENEXUS-AGENT"TApTipIdentificacion"
          typein: "stringbody"
          required: true
          default: SmartDevice Applicationdescription: "SDT of TApTipIdentificacion"
         - namerequired: "ApTidCod"true
          inschema:
 "path"           description$ref: "Tipo de Identificación#/definitions/TApTipIdentificacion"
      
   required: true  responses:
        type200:
"integer"           formatdescription: "int32Successful operation"
         - nameschema:
"TApTipIdentificacion"            in$ref: "body"
    #/definitions/TApTipIdentificacion"
     description: "SDT of TApTipIdentificacion"400:
          requireddescription: true"Bad request"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
             responses:
        200401:
          description: "SuccessfulNot operationAuthenticated"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        400404:
          description: "BadNot request"found"
          schema:
            $ref: "#/definitions/GxJsonError"
      schema:  409:
          $refdescription: "#/definitions/GxJsonErrorTApTipIdentificacion was changed"
        401500:
          description: "NotInternal server Authenticatederror"
          schema:
            $ref: "#/definitions/GxJsonError"

     delete:
 404:     tags:
     description: "Not found" - TApTipIdentificacion
      operationId: "DeleteTApTipIdentificacion"
schema:      summary: "Eliminar los Tipos de Documento de $ref: "#/definitions/GxJsonError"
  Identificación Registrados en el Sistema"
      409parameters:
        -  descriptionin: "TApTipIdentificacionheader
was changed"         500name: Content-Type
          descriptiontype: "Internal server errorstring"
          schemarequired: true
           $refdefault: "#/definitions/GxJsonError"application/json
        - deletein: header
     tags:     name: Authorization
  - TApTipIdentificacion       operationIdtype: "DeleteTApTipIdentificacionstring"
      summary: "Eliminar los Tipos de Documento derequired: Identificacióntrue
Registrados en el Sistema"       parametersdefault: OAuth <Access Token>
        - in: header
          name: ContentGENEXUS-TypeAGENT
          type: "string"
          required: true
          default: SmartDevice application/jsonApplication
        - name: "ApTidCod"
      in: header    in: "path"
          description: "Tipo de Identificación"
          namerequired: Authorizationtrue
          type: "stringinteger"
          requiredformat: true"int32"

         defaultresponses:
OAuth <Access Token>         - in200:
header          description: name: GENEXUS-AGENT"Successful operation"
          typeschema:
"string"            required$ref: true"#/definitions/TApTipIdentificacion"
          default204:
SmartDevice Application         - namedescription: "ApTidCodSuccessful operation"
          inschema:
"path"            description$ref: "Tipo de Identificación#/definitions/TApTipIdentificacion"
          required400: true
          typedescription: "integerBad request"
          formatschema: "int32"
            responses:$ref: "#/definitions/GxJsonError"
        200401:
          description: "SuccessfulNot operationAuthenticated"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        204404:
          description: "SuccessfulNot operationfound"
          schema:
            $ref: "#/definitions/TApTipIdentificacionGxJsonError"
        400500:
          description: "Internal "Badserver requesterror"
          schema:
            $ref: "#/definitions/GxJsonError"


security:
  - OAuth2: []
    401ApiKeyAuth1: []
securityDefinitions:
  OAuth2:
     descriptiontype: "Notoauth2
Authenticated"    flow: password
    tokenUrl: schema:https://test.sifco.org/DemoCoopGT/oauth/access_token
    scopes:
       $ref: "#/definitions/GxJsonError"
 Execute: Permite el método tipo GET
      404Insert: Permite el método tipo POST
      descriptionUpdate: "NotPermite found"el método tipo PUT
       schemaDelete: Permite el método tipo DELETE
      FullControl: $ref: "#/definitions/GxJsonError"
        500:
     Permite el manejo de los Cuatro Métodos GET, POST, PUT,DELETE, sobre el Web Service
  ApiKeyAuth1:
    descriptiontype: "Internal server error"apiKey
    in: header
    schemaname: granttype

definitions:

  TApTipIdentificacion:
    properties:
  $ref: "#/definitions/GxJsonError"   securityApTidCod:
   - OAuth2: []   description: Tipo ApiKeyAuth1:de []Identificación
securityDefinitions:   OAuth2:     type: oauth2"integer"
    flow: password     tokenUrl: https://test.sifco.org/DemoCoopGT/oauth/access_tokenformat: "int32"

      scopesApTidDes:
        Executedescription: PermiteNombre elde métodoIdentificación
tipo GET       Insert: Permite el método tipo POSTtype: "string"

      ApTidForma:
        Updatedescription: PermiteFormato elde métodoIdentificación
tipo PUT       Deletetype: Permite el método tipo DELETE "string"

      ApTipExpReg:
      FullControl: Permite eldescription: manejoExpresión deRegular
los Cuatro Métodos GET, POST, PUT,DELETE, sobre el Web Servicetype: "string"

 ApiKeyAuth1:     typeApTidValidacion:
apiKey     in: header  description: Tipo de name:Validación granttypea Realizar
definitions:    TApTipIdentificacion:     propertiestype: "integer"
     ApTidCod:   format: "int32"

   description: Tipo de Identificación gx_md5_hash:
        typedescription: "integer"
        format: "int32"

      ApTidDes:
        description: Nombre de Identificacióngx_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"


     ApTidFormarequired:
      - ApTidCod
description:
Formato de IdentificaciónGxJsonError:
        type: "string"properties:
       ApTipExpRegerror:
        description$ref: Expresión Regular"#/definitions/GxJsonError.error"

  GxJsonError.error:
     typeproperties:
"string"        ApTidValidacioncode:
        description: TipoCódigo de Validación a RealizarError
        type: "integerstring"

       formatmessage:
"int32"        gx_md5_hash:
 description: Mensaje de Error
      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"


    required:
      - ApTidCod

  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"  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

TApTipIdentificacion

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 crear Tipos de Documentos de Identificación en la Aplicación SIFCO WEB.

El siguiente ejemplo crea un Tipo de Documento de Identificación en la Aplicación SIFCO WEB.

Tipo de Mensaje HTTP

Ejemplo

REQUEST

URL:

Code Block

HEADERS

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

BODY:

Code Block

201 (Created)

(Registro Creado con Éxito)

Code Block

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"
  }
}

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 que este Web Service, NO REQUIERE seguir algún Flujo de Trabajo especifico por ende se puede utilizar de forma independiente al Flujo de Trabajo descrito en el Web Services de Clientes.

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" , "parametros" , "generales" , "tipo" , "identificación" , "documento" ) and type = "page" and space = "DOC"

Artículos Actualizados Recientemente

Recent updates
typespage
max5
spacesDOC
themeconcise
hideHeadingtrue
Change History