Examples

POST /api/report_templates
{
  "report_template": {
    "name": "report_template_test",
    "template": ""
  }
}
422
{
  "error": {
    "id": null,
    "errors": {
      "template": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Template can't be blank"
    ]
  }
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

report_template
Required

Validations:

  • Must be a Hash

report_template[name]
Required

Validations:

  • Must be a String

report_template[description]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

report_template[template]
Required

Validations:

  • Must be a String

report_template[snippet]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be one of: true, false, 1, 0.

report_template[audit_comment]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Validations:

  • Must be a String

report_template[locked]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Determina si una plantilla està bloquejada o no per a l’edició

Validations:

  • Must be one of: true, false, 1, 0.

report_template[default]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

Whether or not the template is added automatically to new organizations and locations

Validations:

  • Must be one of: true, false, 1, 0.

report_template[location_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les ubicacions amb els ID donats

Validations:

  • Must be an array of any type

report_template[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ca.apipie.nil_allowed">Nil Allowed</span>

SUBSTITUEIX les organitzacions amb els ID donats.

Validations:

  • Must be an array of any type