# Get Purchase Template Detail
source: https://developer.mastercard.com/iccp/documentation/api-reference/soap_api/configuration-details/getcompanypurchasetemplatedetail/index.md
> Get all details about a specific purchase template. The template details help you decide which template to use to create a purchase request. The details include custom data fields, spending controls and whether the purchase template is enabled to add invoice addenda data.
## Parameters {#parameters}
| Name | Description | Required | Type |
|--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|
| `templateId` | ID of a template. You can also obtain it through the [getcompanypurchasetemplates](https://developer.mastercard.com/iccp/documentation/api-reference/soap_api/configuration-details/getcompanypurchasetemplates/index.md#response) call. | Yes | Numeric |
### Sample Request {#sample-request}
```xml
21680
```
## Response {#response}
For each API request, you will receive the following responses.
## template {#template}
Provides basic details about the template request.
| Name | Description | Type | Required for In Control | Required for ICMP |
|-----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------|-------------------|
| `templateId` | ID of the template. | Numeric | Yes | Yes |
| `templateName` | Name of the template. | Alphanumeric | Yes | Yes |
| `templateDescription` | Description of the template. | Alphanumeric | Yes | Yes |
| `templateType` | Type of the template, which is Purchase Control. | Alphanumeric | Yes | Yes |
| `icmpEnabled` | Identifies that the purchase request is for a mobile virtual card number (mVCN). If True, first name, last name, and phone number are required. If False, supplier is required. | Boolean | No | Yes |
## purchaseTypes {#purchasetypes}
Provides details about the merchant types. There can be multiple purchaseTypes defined in the template.
| Name | Description | Type | Required for In Control | Required for ICMP |
|------------------|-----------------------------------------------------------------------|--------------|-------------------------|-------------------|
| `Mcc` | Card Acceptor Business Codes used in the template. | Alphanumeric | Yes | Yes |
| `MccDescription` | Description of the Card Acceptor Business Codes used in the template. | Alphanumeric | Yes | Yes |
## templateRules {#templaterules}
Contains a set of rules defined for the template; defined by templateControls.
| Name | Description | Type | Required for In Control | Required for ICMP |
|------------|--------------------------------------------------------------------|--------------|-------------------------|-------------------|
| `ruleName` | Name of the rule. | Alphanumeric | No | No |
| `ruleType` | The ruleType must be set to A (Approve) for all purchase requests. | Boolean | No | No |
## templateControls {#templatecontrols}
Describes the controls making up the rules. There can be multiple templateControls in a templateRules node.
| Name | Description | Type | Required for In Control | Required for ICMP |
|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|-------------------------|-------------------|
| `templateControl` | Spending control available in the template to use. | Unlimited | Yes | Yes |
| `controlCode` | 2-character code of the template control name. Decides the type of control to use to create a purchase request. * AR (Amount range control) * CU (Curfew control) * GE (Geography control) * MA (Merchant amount control) * MI (Merchant ID control) * TD (Time of day control) * TL (Transaction limit control) * VA (Validity period control) * VG (Aging velocity control) * VL (Velocity control) * CB (Credit Block control) | Alphanumeric | Yes | Yes |
| `controlDescription` | Description of the template control. | Alphanumeric | Yes | Yes |
## templateCustomFieldDetails {#templatecustomfielddetails}
Describes any custom fields in the template in `templateCustomFieldAndValues` node.
## templateCustomFieldAndValues {#templatecustomfieldandvalues}
Defines a custom field.
| Name | Description | Type | Required for In Control | Required for ICMP |
|---------------------------|-------------------------------------------------------------------------------------------------|--------------|-------------------------|-------------------|
| `customFieldName` | Name of the custom field. | Alphanumeric | Yes | Yes |
| `customFieldValue` | Value of the custom field. Always populates when customFieldName is set to purchaseType. | Alphanumeric | No | No |
| `customFieldMaxLength` | Maximum length of the custom field. | Numeric | No | No |
| `customFieldDisplayType` | Display type of the custom field that is either text or list. | Alphanumeric | No | No |
| `customFieldDataType` | Data type of the custom field. | Alphanumeric | Yes | Yes |
| `customFieldDataRequired` | Whether the custom field is required or not. | Alphanumeric | Yes | Yes |
| `addendaType description` | Returns the value *Global Invoice* if Invoice Addenda Data is enabled on the Purchase Template. | Alphanumeric | No | No |
### Sample response {#sample-response}
```xml
21680
Sandbox Purchase Template
Used in Sandbox Environment, with Credit Block, Velocity and Validity Period controls, with addenda data allowed
PC
False
3000
UNITED AIRLINES
3001
AMERICAN AIRLINES
3002
PAN AM
3300
AZUL BRAZILIAN AIRLINES - AZUL AIR
3301
WIZZ AIR
4511
AIR CARRIERS, AIRLINES-NOT ELSEWHERE CLASSIFIED
CB
Credit Block
VA
Validity
VL
Velocity
Purchase Type
Airlines
69
Text
Alphanumeric
Y
Invoice Number
64
Text
Alphanumeric
N
```