Class: HighLevel::Resources::Forms
- Defined in:
- lib/high_level/resources/forms.rb
Instance Method Summary collapse
-
#get_forms(location_id: nil, skip: nil, limit: nil, type: nil, **_opts) ⇒ Object
Get Forms.
-
#get_forms_submissions(location_id: nil, page: nil, limit: nil, form_id: nil, q: nil, start_at: nil, end_at: nil, **_opts) ⇒ Object
Get Forms Submissions.
-
#upload_to_custom_fields(body:, contact_id: nil, location_id: nil, **_opts) ⇒ Object
Upload files to custom fields.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HighLevel::Resources::Base
Instance Method Details
#get_forms(location_id: nil, skip: nil, limit: nil, type: nil, **_opts) ⇒ Object
Get Forms
33 34 35 36 37 38 39 40 |
# File 'lib/high_level/resources/forms.rb', line 33 def get_forms(location_id: nil, skip: nil, limit: nil, type: nil, **_opts) request( method: :get, path: "/forms/", security: ["bearer"], params: { "locationId" => location_id, "skip" => skip, "limit" => limit, "type" => type }.compact ) end |
#get_forms_submissions(location_id: nil, page: nil, limit: nil, form_id: nil, q: nil, start_at: nil, end_at: nil, **_opts) ⇒ Object
Get Forms Submissions
10 11 12 13 14 15 16 17 |
# File 'lib/high_level/resources/forms.rb', line 10 def get_forms_submissions(location_id: nil, page: nil, limit: nil, form_id: nil, q: nil, start_at: nil, end_at: nil, **_opts) request( method: :get, path: "/forms/submissions", security: ["bearer"], params: { "locationId" => location_id, "page" => page, "limit" => limit, "formId" => form_id, "q" => q, "startAt" => start_at, "endAt" => end_at }.compact ) end |
#upload_to_custom_fields(body:, contact_id: nil, location_id: nil, **_opts) ⇒ Object
Upload files to custom fields
Post the necessary fields for the API to upload files. The files need to be a buffer with the key “< custom_field_id >_< file_id >”. <br /> Here custom field id is the ID of your custom field and file id is a randomly generated id (or uuid) <br /> There is support for multiple file uploads as well. Have multiple fields in the format mentioned.<br />File size is limited to 50 MB.<br /><br /> The allowed file types are: <br/> <ul><li>PDF</li><li>DOCX</li><li>DOC</li><li>JPG</li><li>JPEG</li><li>PNG</li><li>GIF</li><li>CSV</li><li>XLSX</li><li>XLS</li><li>MP4</li><li>MPEG</li><li>ZIP</li><li>RAR</li><li>TXT</li><li>SVG</li></ul> <br /><br /> The API will return the updated contact object.
22 23 24 25 26 27 28 29 30 |
# File 'lib/high_level/resources/forms.rb', line 22 def upload_to_custom_fields(body:, contact_id: nil, location_id: nil, **_opts) request( method: :post, path: "/forms/upload-custom-files", security: %w[bearer Location-Access], params: { "contactId" => contact_id, "locationId" => location_id }.compact, body: body ) end |