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

# productCustomsUpdate

> Save customs details (HS code, country of origin, customs description, material, weight, dimensions, manufacturer) on product variants, the same job as the customs CSV upload in the merchant app. Each row names variants by `sourceId` or `sku` and carries only the fields to change. Rows are validated first; the ones that are ready are saved by a background job, which `productCustomsUpdateJob` reports. With `dryRun`, nothing is saved and the result only says what each row would do. A variant of another store is never found. Throws a 400 error with an extension code of NO_PRODUCT_CUSTOMS_ROWS_READY when no row is ready to save, or BAD_USER_INPUT when `rows` is empty or has more than 500 rows.

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

## Arguments

**dryRun** `Boolean`

Validate the rows and report what saving would do, without saving.

**fillMissingOnly** `Boolean`

Write a value only where the variant has none, so nothing already saved changes.

**rows** `[\[ProductCustomsRowInput!\]!](/docs/api-reference/v3/reference/catalog/product-customs-row-input)` *required*

The variants to update and the values to save, at most 500 rows.

**fields**

**customsDescription** `String`

The plain description customs officers read, up to 45 characters.

**dimensions** `[ProductCustomsDimensionsInput](/docs/api-reference/v3/reference/catalog/product-customs-dimensions-input)`

The package's dimensions.

**fields**

**height** `Float!` *required*

The height.

**length** `Float!` *required*

The length.

**unit** `[DimensionUnit!](/docs/api-reference/v3/reference/catalog/dimension-unit)` *required*

The unit all three measurements are in.

**width** `Float!` *required*

The width.

**hsCode** `String`

The Harmonized System code, up to 50 characters. A code that is not 6 to 10 digits is saved with a warning.

**manufacturer** `[ProductCustomsManufacturerInput](/docs/api-reference/v3/reference/catalog/product-customs-manufacturer-input)`

The manufacturer to set.

**fields**

**city** `String`

City.

**country** `[CountryCode](/docs/api-reference/v3/reference/common/country-code)`

The country the manufacturer is in.

**mid** `String`

The manufacturer identification code (MID): letters and digits, up to 15 characters.

**name** `String!` *required*

The manufacturer's company or contact name.

**postalCode** `String`

Postal code.

**state** `String`

State, province, or region.

**street1** `String`

Street address.

**street2** `String`

Second address line.

**materialDescription** `String`

What the product is made of, up to 255 characters, e.g. 100% cotton.

**originCountry** `[CountryCode](/docs/api-reference/v3/reference/common/country-code)`

The country the product was made in.

**sku** `String`

The variant's SKU. Every variant with this SKU is updated. Used when `sourceId` is not given.

**sourceId** `String`

The variant's id on the sales channel it came from, e.g. a Shopify variant GID. Names exactly one variant. Give this or `sku`.

**weight** `[WeightInput](/docs/api-reference/v3/reference/catalog/weight-input)`

The item's weight, positive with up to 2 decimals, in grams, kilograms, ounces, or pounds.

**fields**

**unit** `[WeightUnit!](/docs/api-reference/v3/reference/catalog/weight-unit)` *required*

The unit the value is expressed in.

**value** `Float!` *required*

The numeric magnitude of the weight.

## Returns

**productCustomsUpdate** `[ProductCustomsUpdate!](/docs/api-reference/v3/reference/catalog/product-customs-update)` *required*

The outcome of a product customs update: the job saving the ready rows, and what each row does.

**fields**

**invalidCount** `Int!` *required*

Rows with errors, which are not saved.

**jobId** `ID`

The id of the background job saving the ready rows; read it with `productCustomsUpdateJob`. Null for a `dryRun`.

**noChangesCount** `Int!` *required*

Rows with an identifier but no customs values, which are not saved.

**notFoundCount** `Int!` *required*

Rows that matched no variant, which are not saved.

**readyCount** `Int!` *required*

Rows that are saved.

**rows** `[\[ProductCustomsRowPreview!\]!](/docs/api-reference/v3/reference/catalog/product-customs-row-preview)` *required*

What each row does, in the order given.

**fields**

**errors** `[String!]!` *required*

Why the row will not be saved.

**identifier** `String!` *required*

The row's `sourceId` or `sku`.

**matchCount** `Int!` *required*

The variants the row updates. A SKU can name several.

**rowNumber** `Int!` *required*

The row's 1-based position in `rows`.

**status** `[ProductCustomsRowStatus!](/docs/api-reference/v3/reference/catalog/product-customs-row-status)` *required*

Whether the row will be saved.

**warnings** `[String!]!` *required*

Things to check on a row that is saved, such as a SKU that matches several variants.

**variantsToUpdate** `Int!` *required*

The variants the ready rows update.

## Example

```graphql theme={null}
mutation {
  productCustomsUpdate(dryRun: true, fillMissingOnly: true, rows: { ... }) {
    invalidCount
    jobId
    noChangesCount
    notFoundCount
    readyCount
    variantsToUpdate
  }
}
```


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