> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Authorization Controls

> Use authorization controls to configure user spending limits and specify the merchants where users can transact.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

An authorization control limits spending by specified users at specified merchants. You can limit spending at a single merchant or at a group of merchants, and you can limit spending by a single user, users with a particular card product, or all users.

You can block spending at all merchants by default and then allow it for specific merchants, or you can allow spending at all merchants by default and block it at specific merchants.

<Tip>
  **Tip**\
  See [Controlling Spending](/developer-guides/controlling-spending/) for a tutorial that walks you through the creation of a spend control, as well as links to more information about merchant category codes.
</Tip>

<h2 id="post_authcontrols">
  Create authorization control
</h2>

**Action:** `POST`\
**Endpoint:** `/authcontrols`

{/* <EndpointCard
title="Create authorization control"
path="/authcontrols"
method="post"
/> */}

Limit where a user can make transactions to a single merchant or group of merchants. If multiple authorization controls apply to the same user, the limits of all controls are combined.

<h3 id="_request_body">
  Request body
</h3>

| Fields                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Optional                                    | Indicates whether the authorization control is active.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                                                                                                                                                                                                                                                                                                                                                                    |
| association<br /><br />object<br /><br />Optional                                | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token`                     |
| association.**card\_product\_token**<br /><br />string<br /><br />Optional       | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                             |
| association.**user\_token**<br /><br />string<br /><br />Optional                | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                       |
| end\_time<br /><br />datetime<br /><br />Optional                                | Date and time when the exception ends, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                                                            |
| merchant\_scope<br /><br />object<br /><br />Optional                            | Defines the group of merchants to which the authorization control applies. This object is required if the `association` object is not included in your request. Your request can include both the `merchant_scope` and `association` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `merchant_group_token`, `mid` |
| merchant\_scope.**mcc**<br /><br />string<br /><br />Optional                    | Merchant Category Code (MCC). Identifies the type of goods or services provided by the merchant.<br /><br />Enter a value to control access to a particular type of product or service.<br /><br />See <a href="/developer-guides/controlling-spending/">Controlling Spending</a> for links to more information about merchant category codes.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                            |
| merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Optional             | Token identifying a group of MCCs.<br /><br />Enter a value to control access to a group of product or service types.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                    |
| merchant\_scope.**merchant\_group\_token**<br /><br />string<br /><br />Optional | Unique identifier of a merchant group.<br /><br />Enter a value to control access to a group of merchants.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                               |
| merchant\_scope.**mid**<br /><br />string<br /><br />Optional                    | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control access to a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                          |
| name<br /><br />string<br /><br />Required                                       | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| start\_time<br /><br />datetime<br /><br />Optional                              | Date and time when the exception goes into effect, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                                                |
| token<br /><br />string<br /><br />Optional                                      | Unique identifier of the authorization control.<br /><br />If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                  |

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "merchant_scope": {
    "mid": "98765"
  },
  "association": {
    "user_token": "my_user_01"
  },
  "token": "my_authcontrol",
  "name": "My Auth Control"
}
```

<h3 id="_response_body">
  Response body
</h3>

| Fields                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Conditionally returned                                    | Indicates whether the authorization control is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                                                                              |
| association<br /><br />object<br /><br />Conditionally returned                                | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token`                     |
| association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned       | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                             |
| association.**user\_token**<br /><br />string<br /><br />Conditionally returned                | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                       |
| end\_time<br /><br />datetime<br /><br />Conditionally returned                                | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                            |
| merchant\_scope<br /><br />object<br /><br />Conditionally returned                            | Defines the group of merchants to which the authorization control applies. This object is required if the `association` object is not included in your request. Your request can include both the `merchant_scope` and `association` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `merchant_group_token`, `mid` |
| merchant\_scope.**mcc**<br /><br />string<br /><br />Conditionally returned                    | Merchant Category Code (MCC). Identifies the type of goods or services provided by the merchant.<br /><br />Enter a value to control access to a particular type of product or service.<br /><br />See <a href="/developer-guides/controlling-spending/">Controlling Spending</a> for links to more information about merchant category codes.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                            |
| merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Conditionally returned             | Token identifying a group of MCCs.<br /><br />Enter a value to control access to a group of product or service types.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                    |
| merchant\_scope.**merchant\_group\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a merchant group.<br /><br />Enter a value to control access to a group of merchants.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                               |
| merchant\_scope.**mid**<br /><br />string<br /><br />Conditionally returned                    | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control access to a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                          |
| name<br /><br />string<br /><br />Returned                                                     | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| start\_time<br /><br />datetime<br /><br />Conditionally returned                              | Date and time when the exception goes into effect, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                |
| token<br /><br />string<br /><br />Conditionally returned                                      | Unique identifier of the authorization control.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                          |

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_authcontrol",
  "name": "My Auth Control",
  "active": true,
  "association": {
    "user_token": "my_user_01"
  },
  "merchant_scope": {
    "mid": "98765"
  }
}
```

<h2 id="get_authcontrols">
  List authorization controls
</h2>

**Action:** `GET`\
**Endpoint:** `/authcontrols`

{/* <EndpointCard
title="List authorization controls"
path="/authcontrols"
method="get"
/> */}

List all authorization controls associated with a specific user or card product, or list all authorization controls defined in your program.

Include either a `user` or a `card_product` query parameter to indicate the user or card product whose associated authorization controls you want to retrieve (do not include both).

To list all authorization controls for your program, omit the `user` and `card_product` query parameters from your request.

<h3 id="_url_query_parameters">
  URL query parameters
</h3>

| Fields                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| card\_product<br /><br />string<br /><br />Optional | Unique identifier of the card product whose associated authorization controls you want to retrieve.<br /><br />Enter the string "null" to list authorization controls that are not associated with a card product.<br /><br />**Allowable Values:**<br /><br />Existing `card_product` token, or "null"                                                                                                                   |
| user<br /><br />string<br /><br />Optional          | Unique identifier of the user whose associated authorization controls you want to retrieve.<br /><br />Enter the string "null" to list authorization controls that are not associated with a user.<br /><br />**Allowable Values:**<br /><br />Existing user token, or "null"                                                                                                                                             |
| count<br /><br />integer<br /><br />Optional        | The number of resources to retrieve.<br /><br />**Allowable Values:**<br /><br />1-10<br /><br />**Default value:**<br />5                                                                                                                                                                                                                                                                                                |
| start\_index<br /><br />integer<br /><br />Optional | Sort order index of the first resource in the returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                                                                                                                                                                                                                                     |
| fields<br /><br />string<br /><br />Optional        | Comma-delimited list of fields to return (`field_1,field_2`, and so on). Leave blank to return all fields.<br /><br />**Allowable Values:**<br /><br />Comma-delimited list of fields, or blank                                                                                                                                                                                                                           |
| sort\_by<br /><br />string<br /><br />Optional      | Field on which to sort. Use any field in the resource model, or one of the system fields `lastModifiedTime` or `createdTime`. Prefix the field name with a hyphen (`-`) to sort in descending order. Omit the hyphen to sort in ascending order.<br /><br />**Allowable Values:**<br /><br />`createdTime`, `lastModifiedTime`, or any field in the resource model<br /><br />**Default value:**<br />`-lastModifiedTime` |

<h3 id="_response_body_2">
  Response body
</h3>

| Fields                                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count<br /><br />integer<br /><br />Conditionally returned                                             | Number of resources retrieved.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />1-10                                                                                                                                                                                                                                                                                                                                                                |
| data<br /><br />array of objects<br /><br />Conditionally returned                                     | Array of objects in a returned resource.<br /><br />Objects are returned as appropriate to your query.<br /><br />**Allowable Values:**<br /><br />Valid array of one or more authorization control objects                                                                                                                                                                                                                                                                                                                     |
| data\[].**active**<br /><br />boolean<br /><br />Conditionally returned                                | Indicates whether the authorization control is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                                                                              |
| data\[].**association**<br /><br />object<br /><br />Conditionally returned                            | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token`                     |
| data\[].association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned       | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                             |
| data\[].association.**user\_token**<br /><br />string<br /><br />Conditionally returned                | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                       |
| data\[].**end\_time**<br /><br />datetime<br /><br />Conditionally returned                            | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                            |
| data\[].**merchant\_scope**<br /><br />object<br /><br />Conditionally returned                        | Defines the group of merchants to which the authorization control applies. This object is required if the `association` object is not included in your request. Your request can include both the `merchant_scope` and `association` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `merchant_group_token`, `mid` |
| data\[].merchant\_scope.**mcc**<br /><br />string<br /><br />Conditionally returned                    | Merchant Category Code (MCC). Identifies the type of goods or services provided by the merchant.<br /><br />Enter a value to control access to a particular type of product or service.<br /><br />See <a href="/developer-guides/controlling-spending/">Controlling Spending</a> for links to more information about merchant category codes.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                            |
| data\[].merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Conditionally returned             | Token identifying a group of MCCs.<br /><br />Enter a value to control access to a group of product or service types.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                    |
| data\[].merchant\_scope.**merchant\_group\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a merchant group.<br /><br />Enter a value to control access to a group of merchants.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                               |
| data\[].merchant\_scope.**mid**<br /><br />string<br /><br />Conditionally returned                    | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control access to a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                          |
| data\[].**name**<br /><br />string<br /><br />Returned                                                 | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| data\[].**start\_time**<br /><br />datetime<br /><br />Conditionally returned                          | Date and time when the exception goes into effect, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                |
| data\[].**token**<br /><br />string<br /><br />Conditionally returned                                  | Unique identifier of the authorization control.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                          |
| end\_index<br /><br />integer<br /><br />Conditionally returned                                        | Sort order index of the last resource in the returned array.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                                                                                                                                                                                                                                                           |
| is\_more<br /><br />boolean<br /><br />Conditionally returned                                          | A value of `true` indicates that more unreturned resources exist. A value of `false` indicates that no more unreturned resources exist.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                            |
| start\_index<br /><br />integer<br /><br />Conditionally returned                                      | Sort order index of the first resource in the returned array.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                                                                                                                                                                                                                                                          |

<h3 id="_sample_response_body_2">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "count": 1,
  "start_index": 0,
  "end_index": 0,
  "is_more": false,
  "data": [
    {
      "token": "my_authcontrol",
      "name": "My Auth Control",
      "active": true,
      "association": {
        "user_token": "my_user_01"
      },
      "merchant_scope": {
        "mcc": "5111"
      }
    }
  ]
}
```

<h2 id="get_authcontrols_token">
  Retrieve authorization control
</h2>

**Action:** `GET`\
**Endpoint:** `/authcontrols/{token}`

{/* <EndpointCard
title="Retrieve authorization control"
path="/authcontrols/{token}"
method="get"
/> */}

Retrieve a specific authorization control.

<h3 id="_url_path_parameters">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                                                                                 |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Existing authorization control token.<br /><br />Send a `GET` request to `/authcontrols` to retrieve authorization control tokens.<br /><br />**Allowable Values:**<br /><br />Existing `authcontrol` token |

<h3 id="_url_query_parameters_2">
  URL query parameters
</h3>

| Fields                                       | Description                                                                                                                                                                                     |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fields<br /><br />string<br /><br />Optional | Comma-delimited list of fields to return (`field_1,field_2`, and so on). Leave blank to return all fields.<br /><br />**Allowable Values:**<br /><br />Comma-delimited list of fields, or blank |

<h3 id="_response_body_3">
  Response body
</h3>

| Fields                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Conditionally returned                                    | Indicates whether the authorization control is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                                                                              |
| association<br /><br />object<br /><br />Conditionally returned                                | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token`                     |
| association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned       | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                             |
| association.**user\_token**<br /><br />string<br /><br />Conditionally returned                | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                       |
| end\_time<br /><br />datetime<br /><br />Conditionally returned                                | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                            |
| merchant\_scope<br /><br />object<br /><br />Conditionally returned                            | Defines the group of merchants to which the authorization control applies. This object is required if the `association` object is not included in your request. Your request can include both the `merchant_scope` and `association` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `merchant_group_token`, `mid` |
| merchant\_scope.**mcc**<br /><br />string<br /><br />Conditionally returned                    | Merchant Category Code (MCC). Identifies the type of goods or services provided by the merchant.<br /><br />Enter a value to control access to a particular type of product or service.<br /><br />See <a href="/developer-guides/controlling-spending/">Controlling Spending</a> for links to more information about merchant category codes.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                            |
| merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Conditionally returned             | Token identifying a group of MCCs.<br /><br />Enter a value to control access to a group of product or service types.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                    |
| merchant\_scope.**merchant\_group\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a merchant group.<br /><br />Enter a value to control access to a group of merchants.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                               |
| merchant\_scope.**mid**<br /><br />string<br /><br />Conditionally returned                    | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control access to a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                          |
| name<br /><br />string<br /><br />Returned                                                     | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| start\_time<br /><br />datetime<br /><br />Conditionally returned                              | Date and time when the exception goes into effect, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                |
| token<br /><br />string<br /><br />Conditionally returned                                      | Unique identifier of the authorization control.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                          |

<h3 id="_sample_response_body_3">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_authcontrol",
  "name": "My Auth Control",
  "active": true,
  "association": {
    "user_token": "my_user_01"
  },
  "merchant_scope": {
    "mid": "98765"
  }
}
```

<h2 id="put_authcontrols_token">
  Update authorization control
</h2>

**Action:** `PUT`\
**Endpoint:** `/authcontrols/{token}`

{/* <EndpointCard
title="Update authorization control"
path="/authcontrols/{token}"
method="put"
/> */}

Update a specific authorization control.

<h3 id="_url_path_parameters_2">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                                                                                 |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Existing authorization control token.<br /><br />Send a `GET` request to `/authcontrols` to retrieve authorization control tokens.<br /><br />**Allowable Values:**<br /><br />Existing `authcontrol` token |

<h3 id="_request_body_2">
  Request body
</h3>

| Fields                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Optional                              | Indicates whether the authorization control is active.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                                                                                                                                                                                                                                                                                                                                                |
| association<br /><br />object<br /><br />Optional                          | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token` |
| association.**card\_product\_token**<br /><br />string<br /><br />Optional | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| association.**user\_token**<br /><br />string<br /><br />Optional          | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                   |
| end\_time<br /><br />datetime<br /><br />Optional                          | Date and time when the exception ends, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                                        |
| merchant\_scope<br /><br />object<br /><br />Optional                      | Defines the group of merchants to which the velocity control applies.<br /><br />Populate no more than one field of the `merchant_scope` object. If no fields are populated, the velocity control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `mid`, or null (no value)                                                                                                                                                                                       |
| merchant\_scope.**mcc**<br /><br />string<br /><br />Optional              | Merchant Category Code (MCC). Identifies the type of products or services provided by the merchant.<br /><br />Enter a value to control spending on a particular type of product or service.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                                                                                                                                                          |
| merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Optional       | Token identifying a group of MCCs. Enter a value to control spending on a group of product or service types.<br /><br />Send a `GET` request to `/mccgroups` to retrieve MCC group tokens.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                           |
| merchant\_scope.**mid**<br /><br />string<br /><br />Optional              | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control spending with a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                  |
| name<br /><br />string<br /><br />Optional                                 | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                 |
| start\_time<br /><br />datetime<br /><br />Optional                        | Date and time when the exception goes into effect, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                            |
| token<br /><br />string<br /><br />Required                                | Unique identifier of the authorization control.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                                                                      |

<h3 id="_sample_request_body_2">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_authcontrol",
  "merchant_scope": {
    "mcc": "5111"
  }
}
```

<h3 id="_response_body_4">
  Response body
</h3>

| Fields                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Conditionally returned                                    | Indicates whether the authorization control is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                                                                              |
| association<br /><br />object<br /><br />Conditionally returned                                | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token`                     |
| association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned       | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                             |
| association.**user\_token**<br /><br />string<br /><br />Conditionally returned                | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                       |
| end\_time<br /><br />datetime<br /><br />Conditionally returned                                | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                            |
| merchant\_scope<br /><br />object<br /><br />Conditionally returned                            | Defines the group of merchants to which the authorization control applies. This object is required if the `association` object is not included in your request. Your request can include both the `merchant_scope` and `association` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all merchants.<br /><br />**Allowable Values:**<br /><br />`mcc`, `mcc_group`, `merchant_group_token`, `mid` |
| merchant\_scope.**mcc**<br /><br />string<br /><br />Conditionally returned                    | Merchant Category Code (MCC). Identifies the type of goods or services provided by the merchant.<br /><br />Enter a value to control access to a particular type of product or service.<br /><br />See <a href="/developer-guides/controlling-spending/">Controlling Spending</a> for links to more information about merchant category codes.<br /><br />**Allowable Values:**<br /><br />1–4 chars                                                                                                                            |
| merchant\_scope.**mcc\_group**<br /><br />string<br /><br />Conditionally returned             | Token identifying a group of MCCs.<br /><br />Enter a value to control access to a group of product or service types.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                    |
| merchant\_scope.**merchant\_group\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a merchant group.<br /><br />Enter a value to control access to a group of merchants.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                               |
| merchant\_scope.**mid**<br /><br />string<br /><br />Conditionally returned                    | Merchant identifier (MID). Identifies a specific merchant.<br /><br />Enter a value to control access to a particular merchant.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                          |
| name<br /><br />string<br /><br />Returned                                                     | Name of the authorization control.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| start\_time<br /><br />datetime<br /><br />Conditionally returned                              | Date and time when the exception goes into effect, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                |
| token<br /><br />string<br /><br />Conditionally returned                                      | Unique identifier of the authorization control.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                          |

<h3 id="_sample_response_body_4">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_authcontrol",
  "name": "My Auth Control",
  "active": true,
  "association": {
    "user_token": "my_user_01"
  },
  "merchant_scope": {
    "mcc": "5111"
  }
}
```

<h2 id="post_authcontrols_exemptmids">
  Create a merchant identifier (MID) exemption
</h2>

**Action:** `POST`\
**Endpoint:** `/authcontrols/exemptmids`

{/* <EndpointCard
title="Create a merchant identifier (MID) exemption"
path="/authcontrols/exemptmids"
method="post"
/> */}

Exempt an individual merchant from authorization controls by merchant identifier (MID). Transactions originating from this MID ignore any otherwise applicable authorization controls.

<Note>
  **Note**\
  You can create MID exemptions in your user sandbox. However, you must work with your Marqeta representative to create MID exemptions in a production environment.
</Note>

<h3 id="_request_body_3">
  Request body
</h3>

| Fields                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| association<br /><br />object<br /><br />Optional                          | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token` |
| association.**card\_product\_token**<br /><br />string<br /><br />Optional | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| association.**user\_token**<br /><br />string<br /><br />Optional          | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                   |
| end\_time<br /><br />datetime<br /><br />Optional                          | Date and time when the exception ends, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                                        |
| merchant\_group\_token<br /><br />string<br /><br />Optional               | Unique identifier of the merchant group to be exempted. This field is required if there is no entry in the `mid` field. Pass either this field or the `mid` field, not both.<br /><br />For information about merchant groups, see <a href="/core-api/merchant-groups/">Merchant Groups</a>.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| mid<br /><br />string<br /><br />Optional                                  | Merchant to be exempted. This field is required if there is no entry in the `merchant_group_token` field. Use either this field or the `merchant_group_token` field, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                       |
| name<br /><br />string<br /><br />Required                                 | Name of the merchant identifier authorization control exemption.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                   |
| start\_time<br /><br />datetime<br /><br />Optional                        | Date and time when the exception starts, in UTC.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                                                                                      |
| token<br /><br />string<br /><br />Optional                                | Unique identifier of the merchant identifier authorization control exemption.<br /><br />If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                               |

<h3 id="_sample_request_body_3">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_exempt_token",
  "name": "my_exempt_mid",
  "association": {
    "card_product_token": "my_card_product"
  },
  "mid": "12345678901"
}
```

<h3 id="_response_body_5">
  Response body
</h3>

| Fields                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Conditionally returned                              | Indicates whether the merchant identifier authorization control exception is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                            |
| association<br /><br />object<br /><br />Conditionally returned                          | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token` |
| association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| association.**user\_token**<br /><br />string<br /><br />Conditionally returned          | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                   |
| created<br /><br />datetime<br /><br />Conditionally returned                            | Date and time when the resource was created, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                  |
| end\_time<br /><br />datetime<br /><br />Conditionally returned                          | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                        |
| last\_updated<br /><br />datetime<br /><br />Conditionally returned                      | Date and time when the resource was last updated, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                             |
| merchant\_group\_token<br /><br />string<br /><br />Conditionally returned               | Unique identifier of the merchant group to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                              |
| mid<br /><br />string<br /><br />Conditionally returned                                  | Merchant to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                             |
| name<br /><br />string<br /><br />Returned                                               | Name of the merchant identifier authorization control exemption.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                   |
| start\_time<br /><br />datetime<br /><br />Conditionally returned                        | Date and time when the exception starts, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                      |
| token<br /><br />string<br /><br />Conditionally returned                                | Unique identifier of the merchant identifier authorization control exemption.<br /><br />This field is always returned.<br /><br />**Allowable Values:**<br /><br />Existing merchant identifier authorization control exemption token                                                                                                                                                                                                                                                                      |

<h3 id="_sample_response_body_5">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_exempt_token",
  "name": "my_exempt_mid",
  "association": {
    "card_product_token": "my_card_product"
  },
  "mid": "12345678901",
  "active": true,
  "created_time": "2022-06-19T13:22:07Z",
  "last_modified_time": "2022-06-19T13:22:07Z"
}
```

<h2 id="get_authcontrols_exemptmids">
  List merchant identifier (MID) exemptions
</h2>

**Action:** `GET`\
**Endpoint:** `/authcontrols/exemptmids`

{/* <EndpointCard
title="List merchant identifier (MID) exemptions"
path="/authcontrols/exemptmids"
method="get"
/> */}

Retrieve a list of all merchant (MID) exemptions.

<h3 id="_url_query_parameters_3">
  URL query parameters
</h3>

| Fields                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| card\_product<br /><br />string<br /><br />Optional | Unique identifier of the card product whose associated MID exemptions you want to retrieve.<br /><br />Enter the string "null" to list MID exemptions that are not associated with a card product.<br /><br />**Allowable Values:**<br /><br />Existing `card_product` token, or "null"                                                                                                                                   |
| user<br /><br />string<br /><br />Optional          | Unique identifier of the user whose associated MID exemptions you want to retrieve.<br /><br />Enter the string "null" to list MID exemptions that are not associated with a user.<br /><br />**Allowable Values:**<br /><br />Existing user token, or "null"                                                                                                                                                             |
| count<br /><br />integer<br /><br />Optional        | The number of resources to retrieve.<br /><br />**Allowable Values:**<br /><br />1-10<br /><br />**Default value:**<br />5                                                                                                                                                                                                                                                                                                |
| start\_index<br /><br />integer<br /><br />Optional | The sort order index of the first resource in the returned array.<br /><br />**Allowable Values:**<br /><br />Any integer<br /><br />**Default value:**<br />0                                                                                                                                                                                                                                                            |
| fields<br /><br />string<br /><br />Optional        | Comma-delimited list of fields to return (`field_1,field_2`, and so on). Leave blank to return all fields.<br /><br />**Allowable Values:**<br /><br />Comma-delimited list of fields, or blank                                                                                                                                                                                                                           |
| sort\_by<br /><br />string<br /><br />Optional      | Field on which to sort. Use any field in the resource model, or one of the system fields `lastModifiedTime` or `createdTime`. Prefix the field name with a hyphen (`-`) to sort in descending order. Omit the hyphen to sort in ascending order.<br /><br />**Allowable Values:**<br /><br />`createdTime`, `lastModifiedTime`, or any field in the resource model<br /><br />**Default value:**<br />`-lastModifiedTime` |

<h3 id="_response_body_6">
  Response body
</h3>

| Fields                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count<br /><br />integer<br /><br />Conditionally returned                                       | Number of resources retrieved.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />1-10                                                                                                                                                                                                                                                                                                                                            |
| data<br /><br />array of objects<br /><br />Conditionally returned                               | Array of objects in a returned resource.<br /><br />Objects are returned as appropriate to your query.<br /><br />**Allowable Values:**<br /><br />Valid data array of one or more authorization control objects                                                                                                                                                                                                                                                                                            |
| data\[].**active**<br /><br />boolean<br /><br />Conditionally returned                          | Indicates whether the merchant identifier authorization control exception is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                            |
| data\[].**association**<br /><br />object<br /><br />Conditionally returned                      | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token` |
| data\[].association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| data\[].association.**user\_token**<br /><br />string<br /><br />Conditionally returned          | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                   |
| data\[].**created**<br /><br />datetime<br /><br />Conditionally returned                        | Date and time when the resource was created, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                  |
| data\[].**end\_time**<br /><br />datetime<br /><br />Conditionally returned                      | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                        |
| data\[].**last\_updated**<br /><br />datetime<br /><br />Conditionally returned                  | Date and time when the resource was last updated, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                             |
| data\[].**merchant\_group\_token**<br /><br />string<br /><br />Conditionally returned           | Unique identifier of the merchant group to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                              |
| data\[].**mid**<br /><br />string<br /><br />Conditionally returned                              | Merchant to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                             |
| data\[].**name**<br /><br />string<br /><br />Returned                                           | Name of the merchant identifier authorization control exemption.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                   |
| data\[].**start\_time**<br /><br />datetime<br /><br />Conditionally returned                    | Date and time when the exception starts, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                      |
| data\[].**token**<br /><br />string<br /><br />Conditionally returned                            | Unique identifier of the merchant identifier authorization control exemption.<br /><br />This field is always returned.<br /><br />**Allowable Values:**<br /><br />Existing merchant identifier authorization control exemption token                                                                                                                                                                                                                                                                      |
| end\_index<br /><br />integer<br /><br />Conditionally returned                                  | Sort order index of the last resource in the returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                                                                                                                                                                                                                                                                                                                        |
| is\_more<br /><br />boolean<br /><br />Conditionally returned                                    | A value of `true` indicates that more unreturned resources exist. A value of `false` indicates that no more unreturned resources exist.<br /><br />This field is returned if there are resources in your returned array.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                        |
| start\_index<br /><br />integer<br /><br />Conditionally returned                                | Sort order index of the first resource in the returned array.<br /><br />**Allowable Values:**<br /><br />Any integer                                                                                                                                                                                                                                                                                                                                                                                       |

<h3 id="_sample_response_body_6">
  Sample response body
</h3>

```json JSON expandable lines wrap theme={null}
{
  "count": 2,
  "start_index": 0,
  "end_index": 1,
  "is_more": false,
  "data": [
    {
      "token": "my_exempt_authcontrol",
      "name": "My Exempt Auth Control",
      "active": true,
      "mid": "984226812886",
      "created_time": "2022-07-03T13:22:07Z",
      "last_modified_time": "2022-07-03T17:22:07Z"
    },
    {
      "token": "my_exempt_authcontrol_2",
      "name": "My Exempt Auth Control 2",
      "active": true,
      "association": {
        "card_product_token": "my_card_product"
      },
      "mid": "1234567891",
      "created_time": "2022-07-03T17:22:07Z",
      "last_modified_time": "2022-07-03T17:22:07Z"
    }
  ]
}
```

<h2 id="get_authcontrols_exemptmids_token">
  Retrieve a merchant identifier (MID) exemption
</h2>

**Action:** `GET`\
**Endpoint:** `/authcontrols/exemptmids/{token}`

{/* <EndpointCard
title="Retrieve a merchant identifier (MID) exemption"
path="/authcontrols/exemptmids/{token}"
method="get"
/> */}

Retrieve a merchant (MID) exemption.

<h3 id="_url_path_parameters_3">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                        |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Unique identifier of the authorization control resource.<br /><br />**Allowable Values:**<br /><br />Existing authorization control resource token |

<h3 id="_response_body_7">
  Response body
</h3>

| Fields                                                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Conditionally returned                              | Indicates whether the merchant identifier authorization control exception is active.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                            |
| association<br /><br />object<br /><br />Conditionally returned                          | Defines the group of users to which the authorization control applies. This object is required if the `merchant_scope` object is not included in your request. Your request can include both the `association` and `merchant_scope` objects.<br /><br />If you include this object in your request, you must populate one or more of its fields. If no fields are populated, the authorization control applies to all users.<br /><br />**Allowable Values:**<br /><br />`card_product_token`, `user_token` |
| association.**card\_product\_token**<br /><br />string<br /><br />Conditionally returned | Unique identifier of a card product.<br /><br />Specify a card product token in the `card_product_token` field to apply the authorization control to all users holding active cards associated with the card product.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                         |
| association.**user\_token**<br /><br />string<br /><br />Conditionally returned          | Unique identifier of a user.<br /><br />Specify a user token in the `user_token` field to apply the authorization control to a single user.<br /><br />Pass either `card_product_token` or `user_token`, not both.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                   |
| created<br /><br />datetime<br /><br />Conditionally returned                            | Date and time when the resource was created, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                  |
| end\_time<br /><br />datetime<br /><br />Conditionally returned                          | Date and time when the exception ends, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                        |
| last\_updated<br /><br />datetime<br /><br />Conditionally returned                      | Date and time when the resource was last updated, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                             |
| merchant\_group\_token<br /><br />string<br /><br />Conditionally returned               | Unique identifier of the merchant group to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                              |
| mid<br /><br />string<br /><br />Conditionally returned                                  | Merchant to be exempted.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                                                                                                                                                             |
| name<br /><br />string<br /><br />Returned                                               | Name of the merchant identifier authorization control exemption.<br /><br />**Allowable Values:**<br /><br />255 char max                                                                                                                                                                                                                                                                                                                                                                                   |
| start\_time<br /><br />datetime<br /><br />Conditionally returned                        | Date and time when the exception starts, in UTC.<br /><br />This field is returned if it exists in the resource.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                                                                                                                                                      |
| token<br /><br />string<br /><br />Conditionally returned                                | Unique identifier of the merchant identifier authorization control exemption.<br /><br />This field is always returned.<br /><br />**Allowable Values:**<br /><br />Existing merchant identifier authorization control exemption token                                                                                                                                                                                                                                                                      |

<h3 id="_sample_response_body_7">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "my_exempt_token",
  "name": "my_exempt_mid",
  "association": {
    "card_product_token": "my_card_product"
  },
  "mid": "12345678901",
  "active": true,
  "created_time": "2022-06-19T13:22:07Z",
  "last_modified_time": "2022-06-19T13:22:07Z"
}
```

<h2 id="put_authcontrols_exemptmids_token">
  Update a merchant identifier (MID) exemption
</h2>

**Action:** `PUT`\
**Endpoint:** `/authcontrols/exemptmids/{token}`

{/* <EndpointCard
title="Update a merchant identifier (MID) exemption"
path="/authcontrols/exemptmids/{token}"
method="put"
/> */}

Update a merchant identifier exemption.

<h3 id="_url_path_parameters_4">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                        |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Unique identifier of the authorization control resource.<br /><br />**Allowable Values:**<br /><br />Existing authorization control resource token |

<h3 id="_request_body_4">
  Request body
</h3>

| Fields                                        | Description                                                                                                                                                                                 |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active<br /><br />boolean<br /><br />Optional | Indicates whether the merchant identifier authorization control exception is active.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false` |

<h3 id="_sample_request_body_4">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "active": false
}
```


## Related topics

- [Limits and Controls in Europe](/docs/developer-guides/mq-eu-limits-controls.md)
- [Velocity Controls](/docs/core-api/velocity-controls.md)
- [MCC Groups](/docs/core-api/mcc-groups.md)
- [Controlling Spending](/docs/developer-guides/controlling-spending.md)
- [RiskControl Schema](/docs/developer-guides/riskcontrol-schema.md)
