openapi: 3.0.0
info:
  title: PeraCRM V2 Api
  version: 1.0.0
servers:
- url: http://pera.local
- url: https://app.peracrm.com
tags:
- name: Tasks
- name: Negotiations
- name: Contacts
- name: Integrations
paths:
  /api/v2/tasks/1:
    put:
      tags:
      - Tasks
      summary: Update task
      operationId: apiV2Tasks1PUT
      parameters:
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                titulo: test
                fecha: 2021-01-10
                hora: 08:00
                prioridad: ALTA
                notas: lorem
                estado: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Tasks
  /api/v2/tasks:
    post:
      tags:
      - Tasks
      summary: Create task
      operationId: apiV2TasksPOST
      parameters:
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                titulo: test
                fecha: 2021-01-10
                hora: 08:00
                prioridad: ALTA
                notas: lorem
      responses:
        "200":
          description: OK
          headers:
            Date:
              style: simple
              explode: false
              schema:
                type: string
                example: "Fri, 21 Jan 2022 22:23:54 GMT"
            Server:
              style: simple
              explode: false
              schema:
                type: number
            Vary:
              style: simple
              explode: false
              schema:
                type: string
                example: Authorization
            Cache-Control:
              style: simple
              explode: false
              schema:
                type: string
                example: "no-cache, private"
            X-RateLimit-Limit:
              style: simple
              explode: false
              schema:
                type: integer
                example: 60
            X-RateLimit-Remaining:
              style: simple
              explode: false
              schema:
                type: integer
                example: 59
            Content-Length:
              style: simple
              explode: false
              schema:
                type: integer
                example: 601
            Keep-Alive:
              style: simple
              explode: false
              schema:
                type: string
                example: "timeout=5, max=100"
            Connection:
              style: simple
              explode: false
              schema:
                type: string
                example: Keep-Alive
            Content-Type:
              style: simple
              explode: false
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                x-content-type: application/json
              example:
                ok: true
                message: success
                task:
                  titulo: test
                  due_time: 2021-01-10 08:00
                  prioridad: ALTA
                  notas: lorem
                  usuario_id: 4
                  updated_at: 2022-01-21 18:23:55
                  created_at: 2022-01-21 18:23:55
                  id: 26
                  usuario:
                    id: 4
                    nombres: Jose
                    apellidos: Quintero
                    email: jg.fernandez31@gmail.com
                    status: 1
                    estado_chat: 1
                    cliente_id: 18
                    rol_id: 3
                    first_login: 0
                    last_login: 2019-02-27 15:17:35
                    token: ""
                    is_demo: 0
                    api_token: 3I76g6NMw4bHlUXBiq2MckICnPAqPNO8GF7XtcoqJlzzzZ3JeYbxpaFA8KBU
                    default_lang: es
                    created_at: 2017-12-22 20:38:21
                    updated_at: 2019-04-16 20:16:26
        "401":
          description: Unauthorized
          headers:
            Date:
              style: simple
              explode: false
              schema:
                type: string
                example: "Fri, 21 Jan 2022 22:24:28 GMT"
            Server:
              style: simple
              explode: false
              schema:
                type: number
            Cache-Control:
              style: simple
              explode: false
              schema:
                type: string
                example: "no-cache, private"
            X-RateLimit-Limit:
              style: simple
              explode: false
              schema:
                type: integer
                example: 60
            X-RateLimit-Remaining:
              style: simple
              explode: false
              schema:
                type: integer
                example: 57
            Content-Length:
              style: simple
              explode: false
              schema:
                type: integer
                example: 27
            Keep-Alive:
              style: simple
              explode: false
              schema:
                type: string
                example: "timeout=5, max=100"
            Connection:
              style: simple
              explode: false
              schema:
                type: string
                example: Keep-Alive
            Content-Type:
              style: simple
              explode: false
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                x-content-type: application/json
              example:
                error: Unauthenticated
        "422":
          description: Unprocessable Entity
          headers:
            Date:
              style: simple
              explode: false
              schema:
                type: string
                example: "Fri, 21 Jan 2022 22:24:11 GMT"
            Server:
              style: simple
              explode: false
              schema:
                type: number
            Vary:
              style: simple
              explode: false
              schema:
                type: string
                example: Authorization
            Cache-Control:
              style: simple
              explode: false
              schema:
                type: string
                example: "no-cache, private"
            X-RateLimit-Limit:
              style: simple
              explode: false
              schema:
                type: integer
                example: 60
            X-RateLimit-Remaining:
              style: simple
              explode: false
              schema:
                type: integer
                example: 58
            Content-Length:
              style: simple
              explode: false
              schema:
                type: integer
                example: 215
            Keep-Alive:
              style: simple
              explode: false
              schema:
                type: string
                example: "timeout=5, max=100"
            Connection:
              style: simple
              explode: false
              schema:
                type: string
                example: Keep-Alive
            Content-Type:
              style: simple
              explode: false
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                x-content-type: application/json
              example:
                ok: false
                message: errors
                errors:
                  titulo:
                  - El titulo is required
                  fecha:
                  - El fecha is required
                  hora:
                  - El hora is required
                  prioridad:
                  - El prioridad is required
                  notas:
                  - El notas is required
      security:
      - bearerAuth: []
      x-swagger-router-controller: Tasks
  /api/v2/negotiations:
    post:
      tags:
      - Negotiations
      summary: Create negotiation
      operationId: apiV2NegotiationsPOST
      parameters:
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                titulo: lorem 1
                precio: 250
                moneda: USD
                por: fijo
                etapa: 2
                estado: en proceso
                contacto: 25
                fecha_cierre: 2022-01-10
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Negotiations
  /api/v2/negotiations/12:
    put:
      tags:
      - Negotiations
      summary: Edit negotiation
      operationId: apiV2Negotiations12PUT
      parameters:
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                titulo: lorem edit
                precio: 250
                moneda: USD_$
                por: fijo
                etapa: 2
                estado: en proceso
                contacto: 25
                fecha_cierre: 2022-01-10
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Negotiations
  /api/v2/contacts:
    post:
      tags:
      - Contacts
      summary: Create contact
      operationId: apiV2ContactsPOST
      parameters:
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                nombres: jose
                empresa: mya ca
                puesto_trabajo: lorem
                direccion: lorem
                data:
                - content: "123456"
                  tag: casa
                  type: phone
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Contacts
  /api/v2/contacts/63:
    put:
      tags:
      - Contacts
      summary: Edit contact
      operationId: apiV2Contacts63PUT
      parameters:
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                nombres: pepe
                empresa: mya ca
                puesto_trabajo: lorem
                direccion: lorem
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Contacts
  /api/v2/contacts/2/data/6:
    put:
      tags:
      - Contacts
      summary: Update contact data
      operationId: apiV2Contacts2Data6PUT
      parameters:
      - name: Accept
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      - name: Content-Type
        in: header
        required: false
        style: simple
        explode: false
        schema:
          type: string
        example: application/json
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                content: "12345"
                tag: casa
                type: phone
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      security:
      - bearerAuth: []
      x-swagger-router-controller: Contacts
  /api/v1/webhook/unbounce/2/12:
    post:
      tags:
      - Integrations
      summary: Unbounce
      operationId: apiV1WebhookUnbounce212POST
      parameters:
      - name: api_token
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
        example: GAWJ4oAePq2zAVSaWweY8QCpcpeyhWff69SawNGjFu8QM7IAX6awQRMqvtom
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example:
                page_url: http://info.rebill.to/ebook-gratuito-como-mejorar-la-retencion-de-mis-clientes/
                page_name: "[eBook] Como mejorar la retencion de mis clientes"
                page_id: 3b05d96b-8dc8-4a1e-832f-d72fc1967a69
                variant: a
                data_json: "{\"time_submitted\":[\"03:54 PM UTC\"],\"page_uuid\":[\"\
                  3b05d96b-8dc8-4a1e-832f-d72fc1967a69\"],\"empresa\":[\"123123\"\
                  ],\"email\":[\"test@test.com\"],\"page_name\":[\"[eBook] Como mejorar\
                  \ la retencion de mis clientes\"],\"date_submitted\":[\"2022-01-28\"\
                  ],\"name\":[\"test\"],\"last_name\":[\"hello\"],\"ip_address\":[\"\
                  190.73.87.227\"],\"page_url\":[\"http://info.rebill.to/ebook-gratuito-como-mejorar-la-retencion-de-mis-clientes/\"\
                  ],\"variant\":[\"a\"]}"
                data_xml: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><form_data><time_submitted>03:54\
                  \ PM UTC</time_submitted><page_uuid>3b05d96b-8dc8-4a1e-832f-d72fc1967a69</page_uuid><empresa>123123</empresa><email>test@test.com</email><page_name>[eBook]\
                  \ Como mejorar la retencion de mis clientes</page_name><date_submitted>2022-01-28</date_submitted><name>test</name><last_name>hello</last_name><ip_address>190.73.87.227</ip_address><page_url>http://info.rebill.to/ebook-gratuito-como-mejorar-la-retencion-de-mis-clientes/</page_url><variant>a</variant></form_data>"
                api_token: 3I76g6NMw4bHlUXBiq2MckICnPAqPNO8GF7XtcoqJlzzzZ3JeYbxpaFA8KBU
      responses:
        "200":
          description: Successful response
          content:
            application/json: {}
      x-swagger-router-controller: Integrations
components:
  schemas: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
