ID Templates Configuration
  • 03 May 2023
  • 2 Minutes To Read
  • Dark
    Light
  • PDF

ID Templates Configuration

  • Dark
    Light
  • PDF

Article Summary

An ID template is a representation of a type of ID document. For more information, see ID Templates.

With Configuration as Code (CasC), you may batch configure your ID templates configuration via the API using YAML. For general information on CasC, see Configuration as Code Overview.

API Operations

CasC for ID templates supports two operations.

ActionEndpointDescription
GET/configuration/iddocumenttemplates.yamlGet current ID templates configuration.
PUT/configuration/iddocumenttemplates.yamlWrite a new ID templates configuration to Mambu.
Please Note

If you PUT a configuration to Mambu, any current configuration settings not included in the new YAML configuration will be deleted. PATCH requests are not currently supported.

Requests

For general information on CasC requests such as authentication and required headers, see Configuration as Code Overview.

The following section shows sample requests using curl and basic authentication. For all examples, replace TENANT_NAME with your actual tenant name.

GET configuration

curl -X GET 'https://TENANT_NAME.mambu.com/api/configuration/iddocumenttemplates.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Authorization: Basic {auth}'

{auth} is the base-64-encoded value of username:password. For more information, see Authentication in our API reference.

PUT configuration

curl -X PUT 'https://TENANT_NAME.mambu.com/api/configuration/iddocumenttemplates.yaml' \
-H 'Accept: application/vnd.mambu.v2+yaml' \
-H 'Content-Type: application/yaml' \
-H 'Authorization: Basic {auth}' \
--data-binary @iddocumenttemplates.yaml

{auth} is the base-64-encoded value of username:password. For more information, see Authentication in our API reference.

“@iddocumenttemplates.yaml” represents the absolute path of the file on your device.

Use “--data-raw” if you want to specify the YAML body inline.

Configuration body example

idDocumentTemplates:
- id: "438499999"
  documentType: "Passport"
  issuingAuthority: "Government"
  documentIdTemplate: "#########"
  mandatoryForClients: false
  allowAttachments: false
- id: "662323814"
  documentType: "ID Card"
  issuingAuthority: "Government"
  documentIdTemplate: "#########"
  mandatoryForClients: true
  allowAttachments: true

Attributes

NameTypeDescriptionRequired
idStringThe ID of the template.
documentTypeStringThe type of the document.
issuingAuthorityStringThe authority that issued the document.
documentIdTemplateStringThe document id template constraint.
mandatoryForClientsBooleanWhether this template it's mandatory for all the clients or not.
allowAttachmentsBooleanWhether this template allows files to be attached or not

Replies

If you do not receive a 200 OK status code then fix any validation errors and make another PUT request until you receive a 200 OK status code.

Please Note

If you PUT a valid YAML configuration to the API and you do not receive a 200 OK status code within 60 seconds, you may receive a 504 Gateway Timeout status code. We expect all responses to be below 60 seconds.

If you encounter this issue, please contact us through Mambu Support so we can investigate it.

Requirements

The endpoints do not accept empty configurations or null/empty entries in a configuration.

NameRequirements
idIt must not be blank, must not exceed 32 characters in length, must be unique in the configuration, and must only contain letters and number.
documentTypeIt must not be blank, must not exceed 256 characters in length.
issuingAuthorityIt must not be blank, must not exceed 256 characters in length.
documentIdTemplateIt must not be blank, must not exceed 256 characters in length.
mandatoryForClientsIt must not be blank.
allowAttachmentsIt must not be blank.

Was this article helpful?