- 03 May 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
ID Templates Configuration
- Updated On 03 May 2023
- 2 Minutes To Read
- Print
- DarkLight
- PDF
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.
Action | Endpoint | Description |
---|---|---|
GET | /configuration/iddocumenttemplates.yaml | Get current ID templates configuration. |
PUT | /configuration/iddocumenttemplates.yaml | Write a new ID templates configuration to Mambu. |
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
Name | Type | Description | Required |
---|---|---|---|
id | String | The ID of the template. | ✔ |
documentType | String | The type of the document. | ✔ |
issuingAuthority | String | The authority that issued the document. | ✔ |
documentIdTemplate | String | The document id template constraint. | ✔ |
mandatoryForClients | Boolean | Whether this template it's mandatory for all the clients or not. | ✔ |
allowAttachments | Boolean | Whether 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.
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.
Name | Requirements |
---|---|
id | It must not be blank, must not exceed 32 characters in length, must be unique in the configuration, and must only contain letters and number. |
documentType | It must not be blank, must not exceed 256 characters in length. |
issuingAuthority | It must not be blank, must not exceed 256 characters in length. |
documentIdTemplate | It must not be blank, must not exceed 256 characters in length. |
mandatoryForClients | It must not be blank. |
allowAttachments | It must not be blank. |