Skip to main content

update_config

Update

Replaces a configuration's payload and returns the updated configuration. The name is fixed at creation.

Endpoint​

POST /keys/{key}/configs/{config}

See the API reference for this endpoint.

This operation needs a Management Key. Pass it as the required user_token keyword argument; the client sends it in the Authorization header. See setup.

Import​

from addresszen import AddressZen

Call update_config on the AddressZen client. Path parameters are positional; query and body parameters are keyword-only.

Path Parameters​

NameTypeRequiredDescription
keystryesAPI Key The API Key to retrieve. Begins ak_.
configstryesConfiguration Name User-provided configuration object name.

Query Parameters​

None.

Request Body​

NameTypeRequiredDescription
payloadstrnoA serialized payload of up to 65536 characters

Response Type​

from addresszen.types import UpdateConfigResult

Errors​

Unsuccessful HTTP responses raise APIError or a subclass, with the HTTP status and the API error code and message. Connection failures and timeouts raise TransportError. Unexpected responses raise ProtocolError. All derive from ClientError. See error handling.

Example​

update_config.pypython
import json

from addresszen import AddressZen

with AddressZen("ak_test") as client:
config = client.update_config(
"ak_test", "checkout", user_token="uk_example", payload=json.dumps({"enabled": False})
)