opobla

avalon-swaggerfile

Mar 15th, 2022 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 36.54 KB | None | 0 0
  1. openapi: 3.0.1
  2. info:
  3.   title: Avalon PMS API
  4.   description: This is the API that salesforce exposes as PMS role
  5.   termsOfService: 'http://swagger.io/terms/'
  6.   contact:
  7.     email: apiteam@swagger.io
  8.   license:
  9.     name: Apache 2.0
  10.     url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
  11.   version: 1.0.0
  12. externalDocs:
  13.   description: Find out more about Swagger
  14.   url: 'http://swagger.io'
  15. servers:
  16.   - url: 'https://avalonproperties--dev.my.salesforce.com/services/apexrest/WSAPIsForSFRecords'
  17.     description: Salesforce DEV
  18.   - url: 'https://stoplight.io/mocks/makingscience/avalon-web/43413384'
  19.     description: StoplightIO
  20. tags:
  21.   - name: promotion
  22.   - name: appointments
  23.     description: 'Services related with customers that want to visit the properties or the promotions. Although appointments are managed externally, they must be notified to SalesForce, and this is the purpose of these endpoints'
  24.   - name: inventory
  25.   - name: document
  26.   - name: customer
  27.   - name: opportunity
  28.     description: Everything about your Pets
  29.     externalDocs:
  30.       description: Find out more
  31.       url: 'http://swagger.io'
  32.   - name: user
  33.     description: Operations about user
  34.     externalDocs:
  35.       description: Find out more about our store
  36.       url: 'http://swagger.io'
  37.   - name: rent
  38.     description: All the rents for a given customer
  39. paths:
  40.   /customer:
  41.     get:
  42.       tags:
  43.         - customer
  44.       description: Get all the customers
  45.       operationId: getCustomer
  46.       parameters:
  47.         - name: email
  48.           in: query
  49.           description: email
  50.           schema:
  51.             type: string
  52.       responses:
  53.         '200':
  54.           description: The customer's profile
  55.          content:
  56.            application/json:
  57.              schema:
  58.                $ref: '#/components/schemas/Customer'
  59.    put:
  60.      tags:
  61.        - customer
  62.      summary: Update an existing customer
  63.      description: Update an existing customer
  64.      operationId: updateCustomer
  65.      requestBody:
  66.        description: The customer to update
  67.        content:
  68.          application/json:
  69.            schema:
  70.              $ref: '#/components/schemas/Customer'
  71.          application/xml:
  72.            schema:
  73.              $ref: '#/components/schemas/Customer'
  74.        required: true
  75.      responses:
  76.        '200':
  77.          description: OK
  78.          content:
  79.            application/xml:
  80.              schema:
  81.                $ref: '#/components/schemas/Customer'
  82.            application/json:
  83.              schema:
  84.                $ref: '#/components/schemas/Customer'
  85.      x-codegen-request-body-name: body
  86.    post:
  87.      tags:
  88.        - customer
  89.      summary: Add a new registered customer
  90.      description: Add a new registered customer
  91.      operationId: addCustomer
  92.      requestBody:
  93.        description: Customer Info
  94.        content:
  95.          application/json:
  96.            schema:
  97.              $ref: '#/components/schemas/Customer'
  98.            examples:
  99.              example-1:
  100.                value:
  101.                  name: John
  102.                  surname: Doe
  103.                  email: [email protected]
  104.                  phone: '+34637284533'
  105.                  legal_role: persona_fisica
  106.                  id: string
  107.                  id_doc_type: DNI
  108.                  id_doc: 26929560X
  109.                  company: WebClient
  110.        required: true
  111.      responses:
  112.        '200':
  113.          description: OK
  114.          content:
  115.            application/json:
  116.              schema:
  117.                $ref: '#/components/schemas/Customer'
  118.        '201':
  119.          description: Created
  120.          content:
  121.            application/json:
  122.              schema:
  123.                $ref: '#/components/schemas/Customer'
  124.              examples:
  125.                example-1:
  126.                  value:
  127.                    name: string
  128.                    surname: string
  129.                    email: string
  130.                    phone: string
  131.                    legal_role: persona_fisica
  132.                    id: string
  133.                    id_doc_type: DNI
  134.                    id_doc: string
  135.      security: []
  136.      x-codegen-request-body-name: body
  137.  /promotions:
  138.    get:
  139.      tags:
  140.        - promotion
  141.      summary: Get all the promotions
  142.      description: Retrieve all the promotions
  143.      operationId: get_promotions
  144.      parameters: []
  145.      responses:
  146.        '200':
  147.          description: The list of all the promotions available
  148.          content:
  149.            application/json:
  150.              schema:
  151.                type: array
  152.                items:
  153.                  $ref: '#/components/schemas/Promotion'
  154.              examples:
  155.                example-1:
  156.                  value:
  157.                    - id: 00Q3O000004VMQqUAO
  158.                      name: Promoción Torre Oscura II
  159.                      typologies:
  160.                        - id: string
  161.                          short_description: Apartamentos de 2 dormitorios extra large
  162.                          price_tag: 800
  163.                          price_tag_currency: EUR
  164.                          features:
  165.                            - id: string
  166.                              key: BEDROOM_COUNT
  167.                              value: 3
  168.                          availability:
  169.                            availability_count: 0
  170.                            occupied_count: 0
  171.                            next_count: 0
  172.                      features:
  173.                        - id: string
  174.                          key: BEDROOM_COUNT
  175.                          value: 3
  176.                      address:
  177.                        id: string
  178.                        street: C/Del Pez
  179.                        number: '34'
  180.                        block: Bloque 1
  181.                        portal: IV
  182.                        stair: derecha
  183.                        floor: '3'
  184.                        letter: D
  185.                        city: Alcalá de Henares
  186.                        country: España
  187.                        postal_code: '28806'
  188.                        state: Madrid
  189.                        latitude: '1.2345'
  190.                        longitude: '9.8765'
  191.                        adress_extra: Antiguo Camino del Sueño
  192.            example-1:
  193.              example:
  194.                - promotion:
  195.                    id: sf_abcdef01234
  196.                    description: Promoción Torre Oscura II
  197.                - promotion:
  198.                    id: sf_abcdef01235
  199.                    description: Promoción New Madrid I
  200.    parameters: []
  201.  '/document/{id}':
  202.    get:
  203.      tags:
  204.        - document
  205.      description: Retrieve a document from SF given its id
  206.      operationId: get_document_by_id
  207.      parameters:
  208.        - name: id
  209.          in: path
  210.          description: Additional data to pass to server
  211.          required: true
  212.          schema:
  213.            type: string
  214.            format: salesforce_id
  215.      responses:
  216.        '200':
  217.          description: dummy
  218.          content: {}
  219.  /document:
  220.    post:
  221.      summary: Upload a new document
  222.      tags:
  223.        - document
  224.      operationId: post-document
  225.      responses:
  226.        '200':
  227.          description: OK
  228.      requestBody:
  229.        content:
  230.          application/json:
  231.            schema:
  232.              $ref: '#/components/schemas/Filedocument'
  233.      description: Post a new document to the PMS
  234.    parameters: []
  235.  '/appointments/{appointmentId}':
  236.    delete:
  237.      tags:
  238.        - appointments
  239.      description: Delete and cancel an appointment
  240.      operationId: cancel_appointment
  241.      parameters:
  242.        - name: appointmentId
  243.          in: path
  244.          description: The customer id to retrieve appointments for
  245.          required: true
  246.          schema:
  247.            type: string
  248.            format: salesforce_id
  249.      responses:
  250.        '200':
  251.          description: successful operation
  252.          content:
  253.            application/json:
  254.              schema:
  255.                $ref: '#/components/schemas/ApiResponse'
  256.  /appointments:
  257.    get:
  258.      tags:
  259.        - appointments
  260.      description: Get the appointments of a customer
  261.      operationId: get_appointments_by_customer_id
  262.      parameters:
  263.        - name: customer
  264.          in: query
  265.          description: The customer id to retrieve appointments for
  266.          required: true
  267.          schema:
  268.            type: string
  269.            format: salesforce_id
  270.      responses:
  271.        '200':
  272.          description: The appointments history of the customer
  273.          content:
  274.            application/json:
  275.              schema:
  276.                type: array
  277.                items:
  278.                  $ref: '#/components/schemas/Appointment'
  279.    post:
  280.      tags:
  281.        - appointments
  282.      description: Notify salesforce of a new appoinments
  283.      operationId: post-appointments
  284.      responses:
  285.        '200':
  286.          description: OK
  287.          content:
  288.            application/json:
  289.              schema:
  290.                $ref: '#/components/schemas/Appointment'
  291.              examples:
  292.                example-1:
  293.                  value:
  294.                    id: 00Q3O000004VMQqUB0
  295.                    start_datetime: string
  296.                    provider:
  297.                      firstname: John
  298.                      lastname: Doe
  299.                      email: [email protected]
  300.                    promotion:
  301.                      id: 00Q3O000004VMQqUAO
  302.                      description: Promoción Torre Oscura II
  303.                      typologies:
  304.                        - id: string
  305.                          short_description: Apartamentos de 2 dormitorios extra large
  306.                          price_tag: 800
  307.                          price_tag_currency: EUR
  308.                          features:
  309.                            - id: string
  310.                              key: BEDROOM_COUNT
  311.                              value: 3
  312.                          availability:
  313.                            availability_count: 0
  314.                            occupied_count: 0
  315.                            next_count: 0
  316.                      name: string
  317.                      features:
  318.                        - id: string
  319.                          key: BEDROOM_COUNT
  320.                          value: 3
  321.                      address:
  322.                        id: string
  323.                        street: C/Del Pez
  324.                        city: Alcalá de Henares
  325.                        country: España
  326.                        postal_code: '28806'
  327.                        state: Madrid
  328.                        latitude: '1.2345'
  329.                        longitude: '9.8765'
  330.                        street_location: '3ºB Puerta II, Escalera 5, Bloque 3'
  331.                        street_extra: Anotaciones extra sobre la dirección
  332.                    typology:
  333.                      id: string
  334.                      short_description: Apartamentos de 2 dormitorios extra large
  335.                      price_tag: 800
  336.                      price_tag_currency: EUR
  337.                      features:
  338.                        - id: string
  339.                          key: BEDROOM_COUNT
  340.                          value: 3
  341.                      availability:
  342.                        availability_count: 0
  343.                        occupied_count: 0
  344.                        next_count: 0
  345.            example-1:
  346.              example:
  347.                id: string
  348.                start_datetime: string
  349.                provider:
  350.                  firstname: John
  351.                  lastname: Doe
  352.                  email: [email protected]
  353.                promotion:
  354.                  id: TORRE2
  355.                  description: Promoción Torre Oscura II
  356.                  typologies:
  357.                    - id: string
  358.                      short_description: Apartamentos de 2 dormitorios extra large
  359.                      price_tag: 800
  360.                      price_tag_currency: EUR
  361.                      features:
  362.                        - id: string
  363.                          key: BEDROOM_COUNT
  364.                          value: 3
  365.                      availability:
  366.                        availability_count: 0
  367.                        occupied_count: 0
  368.                        next_count: 0
  369.                typology:
  370.                  id: string
  371.                  short_description: Apartamentos de 2 dormitorios extra large
  372.                  price_tag: 800
  373.                  price_tag_currency: EUR
  374.                  features:
  375.                    - id: string
  376.                      key: BEDROOM_COUNT
  377.                      value: 3
  378.                  availability:
  379.                    availability_count: 0
  380.                    occupied_count: 0
  381.                    next_count: 0
  382.  /lead:
  383.    post:
  384.      tags:
  385.        - customer
  386.      summary: Create a lead
  387.      description: Create a new lead from contact forms and similar
  388.      operationId: createUser
  389.      requestBody:
  390.        description: Lead object definition
  391.        content:
  392.          application/json:
  393.            schema:
  394.              $ref: '#/components/schemas/Lead'
  395.            examples:
  396.              example-1:
  397.                value:
  398.                  lead:
  399.                    name: John
  400.                    surname: Doe
  401.                    email: [email protected]
  402.                    phone: '+34637284533'
  403.                    legal_role: persona_fisica
  404.                    id_doc_type: DNI
  405.                    id_doc: 26929560X
  406.                    company: WebClient
  407.                  promotion_id: a013O000004Wd81QAC
  408.                  typology_id: a023O000007dTkpQAE
  409.              Solo promo:
  410.                value:
  411.                  lead:
  412.                    name: John
  413.                    surname: Doe
  414.                    email: [email protected]
  415.                    phone: '+34637284533'
  416.                    legal_role: persona_fisica
  417.                    id: string
  418.                    id_doc_type: DNI
  419.                    id_doc: 26929560X
  420.                    company: WebClient
  421.                  promotion_id: a013O000004Wd81QAC
  422.              Simple Lead:
  423.                value:
  424.                  lead:
  425.                    name: John
  426.                    surname: Doe
  427.                    email: [email protected]
  428.                    company: WebClient
  429.          application/xml:
  430.            schema:
  431.              type: object
  432.              properties: {}
  433.          multipart/form-data:
  434.            schema:
  435.              type: object
  436.              properties: {}
  437.        required: true
  438.      responses:
  439.        '200':
  440.          description: 'The answer is the same json document, but with an `id` for the newly created lead'
  441.          content:
  442.            application/json:
  443.              schema:
  444.                $ref: '#/components/schemas/Lead'
  445.              examples:
  446.                example-1:
  447.                  value:
  448.                    lead:
  449.                      name: John
  450.                      surname: Doe
  451.                      email: [email protected]
  452.                      phone: '+34637284533'
  453.                      legal_role: persona_fisica
  454.                      id: string
  455.                      id_doc_type: DNI
  456.                      id_doc: 26929560X
  457.                      company: WebClient
  458.                    promotion_id: a013O000004Wd81QAC
  459.                    typology_id: a023O000007dTkpQAE
  460.                    id: 00Q3O000004Vj8MUAS
  461.            application/xml:
  462.              schema:
  463.                type: object
  464.                properties: {}
  465.        '201':
  466.          description: successful operation
  467.          content: {}
  468.      security:
  469.        - BearerToken: []
  470.    parameters: []
  471.  /opportunities:
  472.    get:
  473.      tags:
  474.        - opportunity
  475.      summary: Get all the opportunities
  476.      description: Get all the opportunities filtering by customer id
  477.      operationId: get_opportunities
  478.      parameters:
  479.        - name: customer
  480.          in: query
  481.          description: The customer id
  482.          schema:
  483.            type: string
  484.      responses:
  485.        '200':
  486.          description: OK
  487.          content:
  488.            application/json:
  489.              schema:
  490.                type: array
  491.                items:
  492.                  type: object
  493.                  properties:
  494.                    opportunity_id:
  495.                      type: string
  496.                    status:
  497.                      type: string
  498.              examples:
  499.                example-1:
  500.                  value:
  501.                    - opportunity_id: string
  502.            example-1:
  503.              example:
  504.                id: string
  505.                customer:
  506.                  id: 0
  507.                  username: string
  508.                  firstName: string
  509.                  lastName: string
  510.                  email: string
  511.                  password: string
  512.                  phone: string
  513.                  userStatus: 0
  514.                promotion:
  515.                  id: TORRE2
  516.                  description: Promoción Torre Oscura II
  517.                  typologies:
  518.                    - id: string
  519.                      short_description: Apartamentos de 2 dormitorios extra large
  520.                      price_tag: 800
  521.                      price_tag_currency: EUR
  522.                      features:
  523.                        - id: string
  524.                          key: BEDROOM_COUNT
  525.                          value: 3
  526.                      availability:
  527.                        availability_count: 0
  528.                        occupied_count: 0
  529.                        next_count: 0
  530.                typology:
  531.                  id: string
  532.                  short_description: Apartamentos de 2 dormitorios extra large
  533.                  price_tag: 800
  534.                  price_tag_currency: EUR
  535.                  features:
  536.                    - id: string
  537.                      key: BEDROOM_COUNT
  538.                      value: 3
  539.                  availability:
  540.                    availability_count: 0
  541.                    occupied_count: 0
  542.                    next_count: 0
  543.                status: string
  544.                requisites:
  545.                  - id: string
  546.                    document_id: sf123qwe
  547.                    sample_document_id: sf123123qweqwe
  548.                    history:
  549.                      - timestamp: '2022-02-02T18:00:00'
  550.                        approval_status: Rejected
  551.                        comment: Missing owner signature. Expiration date due
  552.                    title: Identification Document
  553.                    description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '
  554.                    label: DNI
  555.    post:
  556.      tags:
  557.        - opportunity
  558.      summary: Create a new opportunity
  559.      description: Create a new opportunity for a customer
  560.      operationId: post-opportunity
  561.      requestBody:
  562.        content:
  563.          application/json:
  564.            schema:
  565.              required:
  566.                - customer_id
  567.                - promotion_id
  568.              type: object
  569.              properties:
  570.                customer_id:
  571.                  type: string
  572.                  example: sf_customer_id
  573.                promotion_id:
  574.                  type: string
  575.                  example: sf_promotion_id
  576.                typology_id:
  577.                  type: string
  578.                  example: sf_typology_id
  579.        required: false
  580.      responses:
  581.        '200':
  582.          description: OK
  583.          content:
  584.            application/json:
  585.              schema:
  586.                type: object
  587.      x-codegen-request-body-name: body
  588.  '/opportunities/{opportunity_id}':
  589.    get:
  590.      tags:
  591.        - opportunity
  592.      summary: Get an opportunity
  593.      description: Get a given opportunity
  594.      operationId: get_opportunity_by_ud
  595.      parameters: []
  596.      responses:
  597.        '200':
  598.          description: OK
  599.          content:
  600.            application/json:
  601.              schema:
  602.                $ref: '#/components/schemas/Opportunity'
  603.              examples:
  604.                example-1:
  605.                  value:
  606.                    - opportunity_id: 00Q3O000004VMQqUb1
  607.            example-1:
  608.              example:
  609.                id: string
  610.                customer:
  611.                  id: 0
  612.                  username: string
  613.                  firstName: string
  614.                  lastName: string
  615.                  email: string
  616.                  password: string
  617.                  phone: string
  618.                  userStatus: 0
  619.                promotion:
  620.                  id: TORRE2
  621.                  description: Promoción Torre Oscura II
  622.                  typologies:
  623.                    - id: string
  624.                      short_description: Apartamentos de 2 dormitorios extra large
  625.                      price_tag: 800
  626.                      price_tag_currency: EUR
  627.                      features:
  628.                        - id: string
  629.                          key: BEDROOM_COUNT
  630.                          value: 3
  631.                      availability:
  632.                        availability_count: 0
  633.                        occupied_count: 0
  634.                        next_count: 0
  635.                typology:
  636.                  id: string
  637.                  short_description: Apartamentos de 2 dormitorios extra large
  638.                  price_tag: 800
  639.                  price_tag_currency: EUR
  640.                  features:
  641.                    - id: string
  642.                      key: BEDROOM_COUNT
  643.                      value: 3
  644.                  availability:
  645.                    availability_count: 0
  646.                    occupied_count: 0
  647.                    next_count: 0
  648.                status: string
  649.                requisites:
  650.                  - id: string
  651.                    document_id: sf123qwe
  652.                    sample_document_id: sf123123qweqwe
  653.                    history:
  654.                      - timestamp: '2022-02-02T18:00:00'
  655.                        approval_status: Rejected
  656.                        comment: Missing owner signature. Expiration date due
  657.                    title: Identification Document
  658.                    description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '
  659.                    label: DNI
  660.    parameters:
  661.      - schema:
  662.          type: string
  663.        name: opportunity_id
  664.        in: path
  665.        required: true
  666.  '/requisite/{requisite_id}':
  667.    patch:
  668.      tags:
  669.        - opportunity
  670.      summary: Submit a requisite
  671.      description: 'This method is used to add a new document to this requirement. For this, a `document_id` is necessary and it is the one obtained when the document itself was posted with the `/document` POST endpoint.'
  672.      operationId: patch-requisite-requisite_id
  673.      parameters:
  674.        - name: requisite_id
  675.          in: path
  676.          required: true
  677.          schema:
  678.            type: string
  679.      requestBody:
  680.        content:
  681.          application/json:
  682.            schema:
  683.              required:
  684.                - document_id
  685.              type: object
  686.              properties:
  687.                document_id:
  688.                  minLength: 1
  689.                  type: string
  690.              description: ''
  691.              x-examples:
  692.                example-1:
  693.                  document_id: sd_doc_id_123abc
  694.        required: false
  695.      responses:
  696.        '200':
  697.          description: OK
  698.          content:
  699.            application/json:
  700.              schema:
  701.                $ref: '#/components/schemas/Requisite'
  702.      x-codegen-request-body-name: body
  703. components:
  704.  schemas:
  705.    Appointment:
  706.      type: object
  707.      properties:
  708.        id:
  709.          type: string
  710.          format: salesforceId
  711.        start_datetime:
  712.          type: string
  713.          format: ISOFORMAT
  714.        provider:
  715.          type: object
  716.          properties:
  717.            firstname:
  718.              type: string
  719.              example: John
  720.            lastname:
  721.              type: string
  722.              example: Doe
  723.            email:
  724.              type: string
  725.              format: email
  726.              example: [email protected]
  727.        promotion:
  728.          $ref: '#/components/schemas/Promotion'
  729.        typology:
  730.          $ref: '#/components/schemas/Typology'
  731.        customer_id:
  732.          type: string
  733.    Filedocument:
  734.      type: object
  735.      properties:
  736.        id:
  737.          type: string
  738.          format: salesforce_id
  739.          example: sf_023123abc
  740.        b64content:
  741.          type: string
  742.          format: base64
  743.          example: JVBERi0xLjIgCjkgMCBvYmoKPDwKPj4Kc3RyZWFtCkJULyA5IFRmKFRlc3QpJyBFVAplbmRzdHJlYW0KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCA1IDAgUgovQ29udGVudHMgOSAwIFIKPj4KZW5kb2JqCjUgMCBvYmoKPDwKL0tpZHMgWzQgMCBSIF0KL0NvdW50IDEKL1R5cGUgL1BhZ2VzCi9NZWRpYUJveCBbIDAgMCA5OSA5IF0KPj4KZW5kb2JqCjMgMCBvYmoKPDwKL1BhZ2VzIDUgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iagp0cmFpbGVyCjw8Ci9Sb290IDMgMCBSCj4+CiUlRU9G
  744.        mimetype:
  745.          type: string
  746.          example: application/pdf
  747.        filename:
  748.          type: string
  749.          example: dni.pdf
  750.      description: ''
  751.    User:
  752.      type: object
  753.      properties:
  754.        id:
  755.          type: integer
  756.          format: int64
  757.        username:
  758.          type: string
  759.        firstName:
  760.          type: string
  761.        lastName:
  762.          type: string
  763.        email:
  764.          type: string
  765.        password:
  766.          type: string
  767.        phone:
  768.          type: string
  769.        userStatus:
  770.          type: integer
  771.          description: User Status
  772.          format: int32
  773.      xml:
  774.        name: User
  775.    Promotion:
  776.      type: object
  777.      x-examples:
  778.        example-1:
  779.          id: 00Q3O000004VMQqUAO
  780.          name: Promoción Torre Oscura II
  781.          typologies:
  782.            - id: string
  783.              short_description: Apartamentos de 2 dormitorios extra large
  784.              price_tag: 800
  785.              price_tag_currency: EUR
  786.              features:
  787.                - id: string
  788.                  key: BEDROOM_COUNT
  789.                  value: 3
  790.              availability:
  791.                availability_count: 0
  792.                occupied_count: 0
  793.                next_count: 0
  794.          features:
  795.            - id: string
  796.              key: BEDROOM_COUNT
  797.              value: 3
  798.          address:
  799.            id: string
  800.            street: C/Del Pez
  801.            number: '34'
  802.            block: Bloque 1
  803.            portal: IV
  804.            stair: derecha
  805.            floor: '3'
  806.            letter: D
  807.            city: Alcalá de Henares
  808.            country: España
  809.            postal_code: '28806'
  810.            state: Madrid
  811.            latitude: '1.2345'
  812.            longitude: '9.8765'
  813.            adress_extra: Antiguo Camino del Sueño
  814.      properties:
  815.        id:
  816.          type: string
  817.          format: salesforce_id
  818.          example: 00Q3O000004VMQqUAO
  819.        name:
  820.          type: string
  821.          example: Promoción Torre Oscura II
  822.        typologies:
  823.          type: array
  824.          items:
  825.            $ref: '#/components/schemas/Typology'
  826.        features:
  827.          type: array
  828.          items:
  829.            $ref: '#/components/schemas/Feature'
  830.        address:
  831.          $ref: '#/components/schemas/Address'
  832.        parameters:
  833.          type:
  834.            - string
  835.            - object
  836.          properties:
  837.            min_surface:
  838.              type: string
  839.            max_surface:
  840.              type: string
  841.            min_bedroom_count:
  842.              type: string
  843.            max_bedroom_count:
  844.              type: string
  845.            min_price:
  846.              type: string
  847.            max_price:
  848.              type: string
  849.            min_bath_count:
  850.              type: string
  851.            max_bath_count:
  852.              type: string
  853.    TypologyAvailability:
  854.      type: object
  855.      properties:
  856.        availability_count:
  857.          type: number
  858.        occupied_count:
  859.          type: number
  860.        next_count:
  861.          type: number
  862.          description: Units that will be available soon
  863.    Typology:
  864.      type: object
  865.      description: ''
  866.      x-examples:
  867.        example-1:
  868.          id: string
  869.          short_description: Apartamentos de 2 dormitorios extra large
  870.          price_tag: 800
  871.          price_tag_currency: EUR
  872.          features:
  873.            - id: sf_idxxxxx
  874.              key: BEDROOM_COUNT
  875.              value: 2
  876.            - id: sf_idxxxxy
  877.              key: IS_AVALON_UX
  878.              value: true
  879.          availability:
  880.            availability_count: 0
  881.            occupied_count: 0
  882.            next_count: 0
  883.      properties:
  884.        id:
  885.          type: string
  886.        short_description:
  887.          type: string
  888.          example: Piso de 2 habitaciones
  889.        price_tag:
  890.          type: number
  891.          description: The price of the category
  892.          format: money
  893.          example: 800
  894.        price_tag_currency:
  895.          type: string
  896.          description: The currency for the `price_tag`
  897.          format: currency
  898.          example: EUR
  899.        features:
  900.          type: array
  901.          items:
  902.            $ref: '#/components/schemas/Feature'
  903.        availability:
  904.          $ref: '#/components/schemas/TypologyAvailability'
  905.        is_visible:
  906.          type: boolean
  907.          description: Show or not this typology in the web
  908.    Feature:
  909.      type: object
  910.      properties:
  911.        id:
  912.          type: string
  913.        key:
  914.          type: string
  915.          example: BEDROOM_COUNT
  916.        value:
  917.          type: number
  918.          example: 3
  919.      title: ''
  920.    Opportunity:
  921.      title: Opportunity
  922.      required:
  923.        - customer
  924.      type: object
  925.      properties:
  926.        id:
  927.          type: string
  928.        customer:
  929.          $ref: '#/components/schemas/User'
  930.        promotion:
  931.          $ref: '#/components/schemas/Promotion'
  932.        typology:
  933.          $ref: '#/components/schemas/Typology'
  934.        status:
  935.          type: string
  936.        requisites:
  937.          type: array
  938.          items:
  939.            $ref: '#/components/schemas/Requisite'
  940.      description: 'This models an opportunity that starts in the interest of the customer in a promotion, or even in a typology of a promotion, and finishes with the rent of a particular asset.                                                                                                                                                                                                                                                                                                      '
  941.      x-tags:
  942.        - opportunity
  943.      x-examples: {}
  944.    ApiResponse:
  945.      type: object
  946.      properties:
  947.        code:
  948.          type: integer
  949.          format: int32
  950.        type:
  951.          type: string
  952.        message:
  953.          type: string
  954.    Customer:
  955.      type: object
  956.      description: ''
  957.      x-examples:
  958.        example-1:
  959.          name: John
  960.          surname: Doe
  961.          email: [email protected]
  962.          phone: '+34637284533'
  963.          legal_role: persona_fisica
  964.          id_doc_type: DNI
  965.          id_doc: 26929560X
  966.          company: WebClient
  967.      title: ''
  968.      properties:
  969.        name:
  970.          type: string
  971.          minLength: 1
  972.          example: John
  973.        surname:
  974.          type: string
  975.          minLength: 1
  976.          example: Doe
  977.        email:
  978.          type: string
  979.          minLength: 1
  980.          example: [email protected]
  981.        phone:
  982.          type: string
  983.          minLength: 1
  984.          example: '+34637284533'
  985.        legal_role:
  986.          type: string
  987.          example: persona_fisica
  988.          enum:
  989.            - persona_fisica
  990.            - persona_juridica
  991.        id:
  992.          type: string
  993.          format: salesforce id
  994.          readOnly: true
  995.        id_doc_type:
  996.          type: string
  997.          enum:
  998.            - DNI
  999.            - NIE
  1000.            - NIF
  1001.        id_doc:
  1002.          type: string
  1003.          example: 26929560X
  1004.      required:
  1005.        - name
  1006.        - surname
  1007.        - email
  1008.    Lead:
  1009.      title: Lead
  1010.      type: object
  1011.      properties:
  1012.        lead:
  1013.          $ref: '#/components/schemas/Customer'
  1014.        promotion_id:
  1015.          type: string
  1016.        typology_id:
  1017.          type: string
  1018.        id:
  1019.          type: string
  1020.    Requisite:
  1021.      title: Requisite
  1022.      type: object
  1023.      properties:
  1024.        id:
  1025.          type: string
  1026.        document_id:
  1027.          type: string
  1028.          description: This is the ID of the document uploaded by the customer. This ID is obtained by posting the document with the `/document` endpooint.
  1029.          format: salesforce_id
  1030.          example: sf123qwe
  1031.        sample_document_id:
  1032.          type: string
  1033.          example: sf123123qweqwe
  1034.        history:
  1035.          type: array
  1036.          description: The history this approval has gone through
  1037.          readOnly: true
  1038.          items:
  1039.            type: object
  1040.            properties:
  1041.              timestamp:
  1042.                type: string
  1043.                format: date-time
  1044.              approval_status:
  1045.                type: string
  1046.                example: Rejected
  1047.                enum:
  1048.                  - Approved
  1049.                  - Rejected
  1050.                  - Pending
  1051.              comment:
  1052.                type: string
  1053.                example: Missing owner signature. Expiration date due
  1054.            readOnly: true
  1055.        title:
  1056.          type: string
  1057.          readOnly: true
  1058.          example: Identification Document
  1059.        description:
  1060.          type: string
  1061.          readOnly: true
  1062.          example: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '
  1063.        label:
  1064.          type: string
  1065.          description: This label will help the frontend to determine where to show or request this requisite
  1066.          readOnly: true
  1067.          example: DNI
  1068.      description: 'This models a document that has to be uploaded by the customer, and then approved or rejected by an external operator.'
  1069.      x-tags:
  1070.        - opportunity
  1071.        - requisite
  1072.      x-internal: false
  1073.      x-examples:
  1074.        example-1:
  1075.          id: string
  1076.          document_id: sf123qwe
  1077.          sample_document_id: sf123123qweqwe
  1078.          history:
  1079.            - timestamp: '2022-02-02T18:00:00'
  1080.              approval_status: Approved
  1081.              comment: Missing owner signature. Expiration date due
  1082.          document_title: Identification Document
  1083.          document_description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. '
  1084.          label: DNI
  1085.    Address:
  1086.      title: Address
  1087.      type: object
  1088.      x-tags:
  1089.        - promotion
  1090.      x-examples:
  1091.        example-1:
  1092.          id: string
  1093.          street: C/Del pez
  1094.          city: Alcalá de Henares
  1095.          country: España
  1096.          postal_code: '28806'
  1097.          state: Madrid
  1098.          latitude: '3.34'
  1099.          longitude: '234.34'
  1100.          street_location: '3ºB Puerta II, Escalera 7, Torre 5'
  1101.          street_extra: string
  1102.      properties:
  1103.        id:
  1104.          type: string
  1105.        street:
  1106.          type: string
  1107.          example: C/Del Pez
  1108.        number:
  1109.          type: string
  1110.          example: '34'
  1111.        block:
  1112.          type: string
  1113.          example: Bloque 1
  1114.        portal:
  1115.          type: string
  1116.          example: IV
  1117.        stair:
  1118.          type: string
  1119.          example: derecha
  1120.        floor:
  1121.          type: string
  1122.          example: '3'
  1123.        letter:
  1124.          type: string
  1125.          example: D
  1126.        city:
  1127.          type: string
  1128.          example: Alcalá de Henares
  1129.        country:
  1130.          type: string
  1131.          example: España
  1132.        postal_code:
  1133.          type: string
  1134.          example: '28806'
  1135.        state:
  1136.          type: string
  1137.          example: Madrid
  1138.        latitude:
  1139.          type: string
  1140.          example: '1.2345'
  1141.        longitude:
  1142.          type: string
  1143.          example: '9.8765'
  1144.        adress_extra:
  1145.          type: string
  1146.          example: Antiguo Camino del Sueño
  1147.  securitySchemes:
  1148.    BearerToken:
  1149.      name: Authorization
  1150.      type: apiKey
  1151.      in: header
  1152.      description: ''
  1153.    SFOauth:
  1154.      type: oauth2
  1155.      flows:
  1156.        password:
  1157.          tokenUrl: ''
  1158.          refreshUrl: ''
  1159.          scopes: {}
  1160. security:
  1161.  - SFOauth: []
  1162.  
Add Comment
Please, Sign In to add comment