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

# customsCodeSettings

> Whether the store's custom customs code is on, and what code is deployed for it, without the code itself. Not found when the store doesn't have custom customs code available.

**Required scopes:** [`returns_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-returns_read)

## Returns

**customsCodeSettings** `[CustomsCodeSettings!](/docs/api-reference/v3/reference/returns/customs-code-settings)` *required*

Whether the store's custom customs code runs. The code reshapes the line items used for duty quotes at checkout and for outbound customs forms. It is written in the Redo app; the API only turns it on or off and never returns its source.

**fields**

**codeAvailable** `Boolean!` *required*

Whether the store has usable code deployed that `enabled` can turn on. When false, turning it on fails.

**deployedArtifactId** `String`

The id of the deployed code. Null when none is deployed.

**deployedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When the deployed code went live. Null when none is deployed.

**deployedContract** `String`

The customs contract version the deployed code is written against. Null when none is deployed.

**enabled** `Boolean!` *required*

Whether the code is turned on in the store's settings. It only runs when `running` is also true.

**productMetafieldKeys** `[String!]!` *required*

Product metafield keys the code can read as `item.productMetafields`.

**running** `Boolean!` *required*

Whether customs is running the store's code right now: it is `enabled` and usable code is deployed. When false, customs uses the line items as they are.

**variantMetafieldKeys** `[String!]!` *required*

Variant metafield keys the code can read as `item.variantMetafields`.

## Example

```graphql theme={null}
query {
  customsCodeSettings {
    codeAvailable
    deployedArtifactId
    deployedAt
    deployedContract
    enabled
    productMetafieldKeys
    running
    variantMetafieldKeys
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.