> ## 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.

# Accepted Countries

> Use the accepted countries endpoint to manage the countries where you authorize your cardholders to 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>;
};

Use the `/acceptedcountries` endpoint to manage the countries where you authorize your cardholders to transact.

<h2 id="get_acceptedcountries">
  List accepted countries objects
</h2>

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

{/* <EndpointCard
title="Lists all accepted countries"
path="/acceptedcountries"
method="get"
/> */}

Retrieve a list of `acceptedcountries` objects.

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

| Fields                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| count<br /><br />integer<br /><br />Optional        | Number of accepted countries objects 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<br /><br />**Default value:**<br />0 (the first accepted countries object in your system)                                                                                                                                                                                                                                            |
| name<br /><br />string<br /><br />Optional          | Name of the accepted countries object.<br /><br />**Allowable Values:**<br /><br />Existing accepted countries object name                                                                                                                                                                                                                                                                                                                                 |
| whitelist<br /><br />boolean<br /><br />Optional    | Specifies if the accepted countries object is an allow list.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                                                                                                                                                                                                                                                                   |
| search\_type<br /><br />string<br /><br />Optional  | Specifies the type of search you want to perform.<br /><br />**Allowable Values:**<br /><br />`query_then_fetch`, `dfs_query_then_fetch`                                                                                                                                                                                                                                                                                                                   |
| fields<br /><br />string<br /><br />Optional        | Comma-delimited list of fields to return (`field_1,field_2`, and so on).<br /><br />Leave blank to return all fields.<br /><br />**Allowable Values:**<br /><br />`token`, `name`, `is_whitelist`, `country_codes`, `created_time`, `last_modified_time`, or blank                                                                                                                                                                                         |
| sort\_by<br /><br />string<br /><br />Optional      | Field on which to sort.<br /><br />Use any field in the resource model, or one of the system fields `lastModifiedTime` or `createdTime`.<br /><br />Prefix the field name with a hyphen (`-`) to sort in descending order.<br /><br />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">
  Response body
</h3>

| Fields                                                                                 | Description                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| count<br /><br />integer<br /><br />Conditionally returned                             | Number of `acceptedcountries` objects retrieved.<br /><br />This field is returned if there are objects in your returned array.<br /><br />**Allowable Values:**<br /><br />1-10                                                                                                                                                                                                     |
| data<br /><br />array of objects<br /><br />Conditionally returned                     | Array of `acceptedcountries` objects.<br /><br />Objects are returned as appropriate to your query.<br /><br />**Allowable Values:**<br /><br />Valid array of one or more `acceptedcountries` objects                                                                                                                                                                               |
| data\[].**country\_codes**<br /><br />array of strings<br /><br />Returned             | Comma-delimited list of accepted countries by ISO 3166 three-digit country code.<br /><br />**Allowable Values:**<br /><br />ISO 3166 three-digit numeric codes. For example, the numeric code for the United States is `840`.<br /><br />The ISO maintains the <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener">ISO-3166 country codes</a>. |
| data\[].**created\_time**<br /><br />datetime<br /><br />Conditionally returned        | Date and time when the accepted countries object was created, in UTC. This field is returned when included in your query.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                      |
| data\[].**is\_whitelist**<br /><br />boolean<br /><br />Returned                       | Specifies if the list of accepted countries in this object is an allow list. If set to `true`, transactions are accepted for all countries included in the object’s `country_codes` array. If set to `false`, transactions are prohibited for all countries included in the object’s `country_codes` array.<br /><br />**Allowable Values:**<br /><br />`true`, `false`              |
| data\[].**last\_modified\_time**<br /><br />datetime<br /><br />Conditionally returned | Date and time when the accepted countries object was last updated, in UTC. This field is returned when included in your query.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                 |
| data\[].**name**<br /><br />string<br /><br />Returned                                 | Name of the `acceptedcountries` object.<br /><br />**Allowable Values:**<br /><br />99 char max                                                                                                                                                                                                                                                                                      |
| data\[].**token**<br /><br />string<br /><br />Conditionally returned                  | The unique identifier of the `acceptedcountries` object.<br /><br />This field is always returned.<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                                                                                                                                                                               |

<h2 id="get_acceptedcountries_token">
  Retrieve an accepted countries object
</h2>

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

{/* <EndpointCard
title="Returns a specific accepted country"
path="/acceptedcountries/{token}"
method="get"
/> */}

Retrieve a specific `acceptedcountries` object. Send a `GET` request to the `/acceptedcountries` endpoint to retrieve existing `acceptedcountries` object tokens.

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

| Fields                                      | Description                                                                                                                              |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | Unique identifier of the accepted countries object.<br /><br />**Allowable Values:**<br /><br />Existing accepted countries object 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 />`token`, `name`, `is_whitelist`, `country_codes`, `created_time`, `last_modified_time`, or blank |

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

| Fields                                                                     | Description                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| country\_codes<br /><br />array of strings<br /><br />Returned             | Comma-delimited list of accepted countries by ISO 3166 three-digit country code.<br /><br />**Allowable Values:**<br /><br />ISO 3166 three-digit numeric codes. For example, the numeric code for the United States is `840`.<br /><br />The ISO maintains the <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank" rel="noopener">ISO-3166 country codes</a>. |
| created\_time<br /><br />datetime<br /><br />Conditionally returned        | Date and time when the accepted countries object was created, in UTC. This field is returned when included in your query.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                      |
| is\_whitelist<br /><br />boolean<br /><br />Returned                       | Specifies if the list of accepted countries in this object is an allow list. If set to `true`, transactions are accepted for all countries included in the object’s `country_codes` array. If set to `false`, transactions are prohibited for all countries included in the object’s `country_codes` array.<br /><br />**Allowable Values:**<br /><br />`true`, `false`              |
| last\_modified\_time<br /><br />datetime<br /><br />Conditionally returned | Date and time when the accepted countries object was last updated, in UTC. This field is returned when included in your query.<br /><br />**Allowable Values:**<br /><br />datetime<br /><br />**Format:**<br />yyyy-MM-ddThh:mm:ssZ                                                                                                                                                 |
| name<br /><br />string<br /><br />Returned                                 | Name of the `acceptedcountries` object.<br /><br />**Allowable Values:**<br /><br />99 char max                                                                                                                                                                                                                                                                                      |
| token<br /><br />string<br /><br />Conditionally returned                  | The unique identifier of the `acceptedcountries` object.<br /><br />This field is always returned.<br /><br />**Allowable Values:**<br /><br />1–36 chars                                                                                                                                                                                                                            |
