{
  "name": "AddOrUpdateCustomerInStore",
  "fully_qualified_name": "MailchimpTransactionApi.AddOrUpdateCustomerInStore@0.1.0",
  "description": "Add or update a customer in an eCommerce store.\n\nUse this tool to add a new customer or update an existing customer's information in a specific eCommerce store using Mailchimp Marketing.",
  "toolkit": {
    "name": "ArcadeMailchimpMarketingApi",
    "description": null,
    "version": "0.1.0"
  },
  "input": {
    "parameters": [
      {
        "name": "store_identifier",
        "required": true,
        "description": "The unique identifier for the eCommerce store where the customer will be added or updated.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The store id."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "store_id"
      },
      {
        "name": "customer_identifier",
        "required": true,
        "description": "The unique identifier for the customer in the specified store. This ID is necessary for adding or updating customer details.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The id for the customer of a store."
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "customer_id"
      },
      {
        "name": "customer_data",
        "required": true,
        "description": "JSON object containing the customer's unique id, email, phone number, opt-in status, company, name, and address details for addition or update in the store.",
        "value_schema": {
          "val_type": "json",
          "inner_val_type": null,
          "enum": null,
          "properties": {
            "id": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "A unique identifier for the customer. Limited to 50 characters."
            },
            "email_address": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's email address."
            },
            "sms_phone_number": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "A US phone number for SMS contact."
            },
            "opt_in_status": {
              "val_type": "boolean",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers)."
            },
            "company": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's company."
            },
            "first_name": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's first name."
            },
            "last_name": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's last name."
            },
            "address": {
              "val_type": "json",
              "inner_val_type": null,
              "enum": null,
              "properties": {
                "address1": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The mailing address of the customer."
                },
                "address2": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "An additional field for the customer's mailing address."
                },
                "city": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The city the customer is located in."
                },
                "province": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's state name or normalized province."
                },
                "province_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The two-letter code for the customer's province or state."
                },
                "postal_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's postal or zip code."
                },
                "country": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's country."
                },
                "country_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The two-letter code for the customer's country."
                }
              },
              "inner_properties": null,
              "description": "The customer's address."
            }
          },
          "inner_properties": null,
          "description": ""
        },
        "inferrable": true,
        "http_endpoint_parameter_name": "requestBody"
      }
    ]
  },
  "output": {
    "description": "Response from the API endpoint 'putEcommerceStoresIdCustomersId'.",
    "available_modes": [
      "value",
      "error",
      "null"
    ],
    "value_schema": {
      "val_type": "json",
      "inner_val_type": null,
      "enum": null,
      "properties": null,
      "inner_properties": null,
      "description": null
    }
  },
  "requirements": {
    "authorization": {
      "provider_id": "arcade-mailchimp",
      "provider_type": "oauth2",
      "id": null,
      "oauth2": null
    },
    "secrets": null,
    "metadata": null
  },
  "deprecation_message": null,
  "metadata": {
    "object_type": "api_wrapper_tool",
    "version": "1.1.0",
    "description": "Tools that enable LLMs to interact directly with the Mailchimp Marketing API."
  },
  "http_endpoint": {
    "metadata": {
      "object_type": "http_endpoint",
      "version": "1.2.0",
      "description": ""
    },
    "url": "/ecommerce/stores/{store_id}/customers/{customer_id}",
    "http_method": "PUT",
    "headers": {},
    "parameters": [
      {
        "name": "store_id",
        "tool_parameter_name": "store_identifier",
        "description": "The store id.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The store id."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "customer_id",
        "tool_parameter_name": "customer_identifier",
        "description": "The id for the customer of a store.",
        "value_schema": {
          "val_type": "string",
          "inner_val_type": null,
          "enum": null,
          "properties": null,
          "inner_properties": null,
          "description": "The id for the customer of a store."
        },
        "accepted_as": "path",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      },
      {
        "name": "requestBody",
        "tool_parameter_name": "customer_data",
        "description": "",
        "value_schema": {
          "val_type": "json",
          "inner_val_type": null,
          "enum": null,
          "properties": {
            "id": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "A unique identifier for the customer. Limited to 50 characters."
            },
            "email_address": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's email address."
            },
            "sms_phone_number": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "A US phone number for SMS contact."
            },
            "opt_in_status": {
              "val_type": "boolean",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers)."
            },
            "company": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's company."
            },
            "first_name": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's first name."
            },
            "last_name": {
              "val_type": "string",
              "inner_val_type": null,
              "enum": null,
              "properties": null,
              "inner_properties": null,
              "description": "The customer's last name."
            },
            "address": {
              "val_type": "json",
              "inner_val_type": null,
              "enum": null,
              "properties": {
                "address1": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The mailing address of the customer."
                },
                "address2": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "An additional field for the customer's mailing address."
                },
                "city": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The city the customer is located in."
                },
                "province": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's state name or normalized province."
                },
                "province_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The two-letter code for the customer's province or state."
                },
                "postal_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's postal or zip code."
                },
                "country": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The customer's country."
                },
                "country_code": {
                  "val_type": "string",
                  "inner_val_type": null,
                  "enum": null,
                  "properties": null,
                  "inner_properties": null,
                  "description": "The two-letter code for the customer's country."
                }
              },
              "inner_properties": null,
              "description": "The customer's address."
            }
          },
          "inner_properties": null,
          "description": ""
        },
        "accepted_as": "body",
        "required": true,
        "deprecated": false,
        "default": null,
        "documentation_urls": []
      }
    ],
    "documentation_urls": [],
    "secrets": [
      {
        "arcade_key": "auth_token",
        "parameter_name": "Authorization",
        "accepted_as": "header",
        "formatted_value": "Bearer {authorization}",
        "description": "The OAuth token to use for authentication.",
        "is_auth_token": true
      }
    ],
    "request_body_spec": "{\n  \"x-moar-converted-from-body-param\": true,\n  \"description\": \"\",\n  \"required\": true,\n  \"content\": {\n    \"application/json\": {\n      \"schema\": {\n        \"type\": \"object\",\n        \"title\": \"E-commerce Customer\",\n        \"description\": \"Information about a specific customer. Orders for existing customers should include only the `id` parameter in the `customer` object body.\",\n        \"required\": [\n          \"id\",\n          \"opt_in_status\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"type\": \"string\",\n            \"title\": \"Customer Foreign ID\",\n            \"description\": \"A unique identifier for the customer. Limited to 50 characters.\",\n            \"maxLength\": 50\n          },\n          \"email_address\": {\n            \"type\": \"string\",\n            \"title\": \"Email Address\",\n            \"description\": \"The customer's email address.\"\n          },\n          \"sms_phone_number\": {\n            \"type\": \"string\",\n            \"title\": \"SMS Phone Number\",\n            \"description\": \"A US phone number for SMS contact.\"\n          },\n          \"opt_in_status\": {\n            \"type\": \"boolean\",\n            \"title\": \"Opt-in Status\",\n            \"description\": \"The customer's opt-in status. This value will never overwrite the opt-in status of a pre-existing Mailchimp list member, but will apply to list members that are added through the e-commerce API endpoints. Customers who don't opt in to your Mailchimp list [will be added as `Transactional` members](https://mailchimp.com/developer/marketing/docs/e-commerce/#customers).\"\n          },\n          \"company\": {\n            \"type\": \"string\",\n            \"title\": \"Company\",\n            \"description\": \"The customer's company.\"\n          },\n          \"first_name\": {\n            \"type\": \"string\",\n            \"title\": \"First Name\",\n            \"description\": \"The customer's first name.\"\n          },\n          \"last_name\": {\n            \"type\": \"string\",\n            \"title\": \"Last Name\",\n            \"description\": \"The customer's last name.\"\n          },\n          \"address\": {\n            \"type\": \"object\",\n            \"title\": \"Address\",\n            \"description\": \"The customer's address.\",\n            \"properties\": {\n              \"address1\": {\n                \"type\": \"string\",\n                \"title\": \"Address Field 1\",\n                \"description\": \"The mailing address of the customer.\",\n                \"example\": \"675 Ponce de Leon Ave NE\"\n              },\n              \"address2\": {\n                \"type\": \"string\",\n                \"title\": \"Address Field 2\",\n                \"description\": \"An additional field for the customer's mailing address.\",\n                \"example\": \"Suite 5000\"\n              },\n              \"city\": {\n                \"type\": \"string\",\n                \"title\": \"City \",\n                \"description\": \"The city the customer is located in.\",\n                \"example\": \"Atlanta\"\n              },\n              \"province\": {\n                \"type\": \"string\",\n                \"title\": \"Province\",\n                \"description\": \"The customer's state name or normalized province.\",\n                \"example\": \"Georgia\"\n              },\n              \"province_code\": {\n                \"type\": \"string\",\n                \"title\": \"Province Code\",\n                \"description\": \"The two-letter code for the customer's province or state.\",\n                \"example\": \"GA\"\n              },\n              \"postal_code\": {\n                \"type\": \"string\",\n                \"title\": \"Postal Code\",\n                \"description\": \"The customer's postal or zip code.\",\n                \"example\": \"30308\"\n              },\n              \"country\": {\n                \"type\": \"string\",\n                \"title\": \"Country Code\",\n                \"description\": \"The customer's country.\",\n                \"example\": \"United States\"\n              },\n              \"country_code\": {\n                \"type\": \"string\",\n                \"title\": \"Country Code\",\n                \"description\": \"The two-letter code for the customer's country.\",\n                \"example\": \"US\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}",
    "use_request_body_schema_mode": true,
    "validate_request_body_schema": true,
    "url_method_call": "await utils.get_base_url(context, HTTP_CLIENT)",
    "url_method_call_field_name": "base_url"
  }
}
