# Updates levels 2 and 3 settings

PATCH {{baseURL}}/v2/settings/transaction-autofill
This endpoint updates or sets levels 2 and 3 autofill settings.
The additional levels 2 and 3 information must be included in transactions requiring that level.
This information can be pre-configured at the merchant settings level.
This allows merchants to automatically include the information instead of manually entering each time.
This automatic inclusion is called autofill.
With autofill, a merchant configures defaults once.
For the existing set of defaults and values, see `GET /v2/settings/transaction-autofill`.
Thereafter, Flute automatically appends those values to every transaction even if not included in the transaction request.
For example, a merchant selling the same product, such as a subscription service could set the following:
* taxRate: 8.5 for Level 2
* product.productCode: SUB-001, product.unitPrice: 29.99 for Level 3

Every transaction then automatically includes that data, qualifying for lower interchange rates without any extra work per transaction.
This is a partial update using JSON Merge Patch, defined by RFC (request for comments) 7396: send only the settings to change.
* An omitted field is left unchanged.
* An explicit
`null`
 clears a clearable field. The
`level2Settings`
 field and its
`taxRate`
 field are not clearable. Sending an explicit
`null`
 for either returns a 400 response instead.
* The nested level 2, level 3, and product groups merge recursively. Sending only
`level3Settings.product.unitPrice`
 leaves every other field, in
`product`
 and elsewhere, unchanged.

The `productCode` and `discountRate` fields on `level3Settings.product` replace the older `code` and `discountPercentage` field names.
A request that still uses either old name is rejected with a 400 response.
The response includes the full updated autofill settings, not just the fields that were sent.
This endpoint requires a merchant API token.
A partner API token is rejected with a 403 response, even if the partner has the `GeneralConfigurations` permission. This endpoint only runs for merchant-scoped tokens.
A merchant API token managed by a partner also requires that partner's account to have the `GeneralConfigurations` permission. Otherwise, the request returns a 403 response.
See Also:
To retrieve the payment configuration, see GET /v2/settings/payment-configuration.
To retrieve the merchant's locations, see GET /v2/settings/locations.
To retrieve the transaction autofill settings, see GET /v2/settings/transaction-autofill.

  [ Request body ]
  [ Response body ]

Endpoint: PATCH /v2/settings/transaction-autofill
Version: V2
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `level2Settings` (object)

  - `level2Settings.taxRate` (number)
    Specifies the default level 2 autofill sales tax rate.
In a PATCH request, this field cannot be cleared: an explicit `null` is rejected.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Examples:
5.0 (for 5.0%)
8.5 (for 8.5%)
99.9 (for 99.9%)
    Example: 8.5

  - `level3Settings` (object)

  - `level3Settings.product` (object)

  - `level3Settings.product.productName` (string)
    Specifies the name of the product.

This value may only contain letters, digits, spaces, commas, slashes, and hyphens.

Example: Widget
    Example: Widget

  - `level3Settings.product.productCode` (string)
    Specifies the merchant assigned unique product identification code.

This value may only contain letters, digits, spaces, and slashes. Hyphens are not allowed.

Example: SKU 12345
    Example: SKU 12345

  - `level3Settings.product.unitPrice` (number)
    Specifies the unit price for the product.

This value must be greater than zero.

Example: 19.99
    Example: 19.99

  - `level3Settings.product.measurementUnit` (string)
    Specifies the unit of measurement for the product.

This value may only contain letters, digits, and spaces.

Example: EA
    Example: EA

  - `level3Settings.product.quantity` (number)
    Specifies the quantity of the product.

This value must be greater than zero.

Example: 1
    Example: 1

  - `level3Settings.product.discountRate` (number)
    Specifies the product discount rate.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Example: 10 (for 10%)
    Example: 10

  - `level3Settings.shippingChargeRate` (number)
    Specifies the percentage for shipping or freight charges applied to a product or transaction.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Examples:
2.5 (for 2.5%)
8.5 (for 8.5%)
99.9 (for 99.9%)
    Example: 2.5

  - `level3Settings.dutyChargeRate` (number)
    Specifies the percentage for any import or export duties included in the order.
Examples:
2.5 (for 2.5%)
8.5 (for 8.5%)
10.25 (for 10.25%)
    Example: 2.5

## Request examples:

  - `Set every level 2 and level 3 field` (unknown)
    Replaces level 2 and level 3 settings in one request.

  - `Change a single field` (unknown)
    This request updates only `level3Settings.product.unitPrice`.
Every other level 2 and level 3 field, including every other `product` field, is left unchanged.

  - `Clear a clearable field` (unknown)
    This request removes a previously configured shipping charge rate by sending an explicit `null`.
Every other field is left unchanged. The `level2Settings` field and its `taxRate` field cannot be cleared this way.

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `level2Settings` (object)

  - `level2Settings.taxRate` (number)
    Specifies the default level 2 autofill sales tax rate.
In a PATCH request, this field cannot be cleared: an explicit `null` is rejected.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Examples:
5.0 (for 5.0%)
8.5 (for 8.5%)
99.9 (for 99.9%)
    Example: 8.5

  - `level3Settings` (object)

  - `level3Settings.product` (object)

  - `level3Settings.product.productName` (string)
    Specifies the name of the product.

This value may only contain letters, digits, spaces, commas, slashes, and hyphens.

Example: Widget
    Example: Widget

  - `level3Settings.product.productCode` (string)
    Specifies the merchant assigned unique product identification code.

This value may only contain letters, digits, spaces, and slashes. Hyphens are not allowed.

Example: SKU 12345
    Example: SKU 12345

  - `level3Settings.product.unitPrice` (number)
    Specifies the unit price for the product.

This value must be greater than zero.

Example: 19.99
    Example: 19.99

  - `level3Settings.product.measurementUnit` (string)
    Specifies the unit of measurement for the product.

This value may only contain letters, digits, and spaces.

Example: EA
    Example: EA

  - `level3Settings.product.quantity` (number)
    Specifies the quantity of the product.

This value must be greater than zero.

Example: 1
    Example: 1

  - `level3Settings.product.discountRate` (number)
    Specifies the product discount rate.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Example: 10 (for 10%)
    Example: 10

  - `level3Settings.shippingChargeRate` (number)
    Specifies the percentage for shipping or freight charges applied to a product or transaction.
This value is encoded as at most four characters, including the decimal point (e.g. 99.9 is accepted, 99.99 is not).
Examples:
2.5 (for 2.5%)
8.5 (for 8.5%)
99.9 (for 99.9%)
    Example: 2.5

  - `level3Settings.dutyChargeRate` (number)
    Specifies the percentage for any import or export duties included in the order.
Examples:
2.5 (for 2.5%)
8.5 (for 8.5%)
10.25 (for 10.25%)
    Example: 2.5

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)

  - `cause` (string)

  - `resolution` (string)

  - `documentationUrl` (string)
    https://developer.flute.com/

  - `errors` (object)

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 409:

  - `409` (unknown)
    Conflict

## Response 409 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 429:

  - `429` (unknown)
    Too Many Requests

## Response 429 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Unauthorized
    Example: Unauthorized

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Response | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

This is a unique identifier, a trace identifier, Flute attaches to a request/response pair so a single transaction can be traced end-to-end across systems and logs. 

Its intent is to support troubleshooting.
We recommend including this value when contacting support.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
This is a field on Flute's standard error response object, alongside values such as `correlationId`, `errorCode`, or `statusCode`.
It's the identifier of the specific resource the failed request was about.
Error messages may specify "Entity with identifier b31fbe9f-eebb-45ce-9cae-92265389f47f does not exist or has been deleted."
When a 404 (or similar entity-specific error, like a conflict) comes back,
check `entityId` to get the exact identifier of the record that couldn't be found or matched.
This is useful for confirming which resource reference was wrong, especially if the request touched multiple identifiers at once.
Example: null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

  - `title` (string)
    Indicates a short, human-readable summary of the error category.

Example: Resource not found
    Example: Resource not found

  - `cause` (string)
    Indicates the reason the error occurred.

Example: The requested resource does not exist or has been deleted.
    Example: The requested resource does not exist or has been deleted.

  - `resolution` (string)
    Indicates the recommended action for resolving the error.

Example: Verify the resource identifier is correct or retrieve a list of available resources.
    Example: Verify the resource identifier is correct or retrieve a list of available resources.

  - `documentationUrl` (string)
    https://developer.flute.com/

## Response 200 examples:

  - `Full updated settings` (unknown)
    The full updated autofill settings after a FullUpdate request.

  - `After a partial update` (unknown)
    The full updated autofill settings after a PartialUpdate request.
Only `unitPrice` changed. Every other previously configured field kept its prior value.

  - `After clearing a field` (unknown)
    The full updated autofill settings after a ClearAField request. `shippingChargeRate` is now `null`.

