---
agentTools:
  projectIndex: https://kentro.readme.io/llms.txt
---

# update customer(s)

If request contains one object in array, response will be sent after request is fully processed, if request has more then one object in array, call will be processed asynchronously and response will be sent without waiting for request to be processed.

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://api.kentro.dev",
      "description": "Sandbox"
    },
    {
      "url": "https://api.kentro.live",
      "description": "Production"
    }
  ],
  "info": {
    "title": "Channel API",
    "version": "1.149.3",
    "description": "Channel-centric management made simple. The Channel-API serves as your primary gateway to work with channel-specific resources like orders, customers, invoices, and products, all while maintaining a unified data format.",
    "termsOfService": "https://kentro.io/terms-and-conditions",
    "contact": {
      "name": "support",
      "url": "https://kentro.io/contact-us",
      "email": "support@kentro.io"
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "x-proxy-enabled": true,
    "proxy-enabled": true
  },
  "paths": {
    "/v1/channel/customer/update": {
      "post": {
        "parameters": [
          {
            "description": "Channel Object ID",
            "in": "query",
            "required": true,
            "name": "$channel",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "required": false,
            "name": "idempotency",
            "schema": {
              "type": "string",
              "minimum": 7,
              "maximum": 50
            },
            "description": "Provide unique value with each request to avoid duplicated requests in case of network / connection failure"
          }
        ],
        "responses": {
          "201": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1_channel_customer_update_createResponse"
                }
              }
            }
          },
          "401": {
            "description": "Request is not authenticated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "NotAuthenticated",
                    "message": "error message",
                    "code": 401,
                    "className": "not-authenticated",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Request is forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "Forbidden",
                    "message": "error message",
                    "code": 403,
                    "className": "forbidden",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "405": {
            "description": "Request method is not allowed on this endpoint",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "MethodNotAllowed",
                    "message": "error message",
                    "code": 405,
                    "className": "method-not-allowed",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request is unprocessable",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The error name"
                    },
                    "message": {
                      "type": "string",
                      "description": "The error message"
                    },
                    "code": {
                      "type": "number",
                      "description": "An HTTP error code"
                    },
                    "className": {
                      "type": "string",
                      "description": "The full name of the error class"
                    },
                    "data": {
                      "type": "object",
                      "description": "Additional data to include in the error"
                    },
                    "errors": {
                      "type": "object",
                      "description": "Error object"
                    }
                  },
                  "required": [
                    "name",
                    "message",
                    "code",
                    "className",
                    "data",
                    "errors"
                  ],
                  "example": {
                    "name": "Unprocessable",
                    "message": "error message",
                    "code": 422,
                    "className": "unprocessable",
                    "data": {
                      "key": "value"
                    },
                    "errors": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          }
        },
        "description": "If request contains one object in array, response will be sent after request is fully processed, if request has more then one object in array, call will be processed asynchronously and response will be sent without waiting for request to be processed.",
        "summary": "update customer(s)",
        "tags": [
          "customer"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1_channel_customer_update_createRequest"
              }
            }
          }
        },
        "x-code-samples": [
          {
            "lang": "Node + Request",
            "source": "const request = require('request');\n\nconst options = {\n  method: 'POST',\n  url: 'https://api.kentro.dev/v1/channel/customer/update',\n  qs: {$channel: 'SOME_STRING_VALUE', idempotency: 'SOME_STRING_VALUE'},\n  headers: {'content-type': 'application/json'},\n  body: [\n    {\n      externalId: 'string',\n      name: 'string',\n      firstName: 'string',\n      lastName: 'string',\n      email: 'example@email.com',\n      phone: 'string',\n      password: 'string',\n      skipPasswordHashing: false,\n      addresses: [\n        {\n          type: 'shipping',\n          name: 'string',\n          phone: 'string',\n          email: 'string',\n          address1: 'string',\n          address2: 'string',\n          unitSuit: 'string',\n          city: 'string',\n          stateProvince: 'string',\n          postalCode: 'string',\n          country: 'string',\n          vatId: 'string',\n          note: 'string'\n        }\n      ],\n      isActive: false,\n      metaData: [{key: 'string', value: 'string'}]\n    }\n  ],\n  json: true\n};\n\nrequest(options, function (error, response, body) {\n  if (error) throw new Error(error);\n\n  console.log(body);\n});\n"
          },
          {
            "lang": "Python + Python3",
            "source": "import http.client\n\nconn = http.client.HTTPSConnection(\"api.kentro.dev\")\n\npayload = \"[{\\\"externalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"email\\\":\\\"example@email.com\\\",\\\"phone\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"skipPasswordHashing\\\":false,\\\"addresses\\\":[{\\\"type\\\":\\\"shipping\\\",\\\"name\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"address1\\\":\\\"string\\\",\\\"address2\\\":\\\"string\\\",\\\"unitSuit\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"stateProvince\\\":\\\"string\\\",\\\"postalCode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"vatId\\\":\\\"string\\\",\\\"note\\\":\\\"string\\\"}],\\\"isActive\\\":false,\\\"metaData\\\":[{\\\"key\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}]}]\"\n\nheaders = { 'content-type': \"application/json\" }\n\nconn.request(\"POST\", \"/v1/channel/customer/update?%24channel=SOME_STRING_VALUE&idempotency=SOME_STRING_VALUE\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"
          },
          {
            "lang": "Ruby + Native",
            "source": "require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI(\"https://api.kentro.dev/v1/channel/customer/update?%24channel=SOME_STRING_VALUE&idempotency=SOME_STRING_VALUE\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\nhttp.verify_mode = OpenSSL::SSL::VERIFY_NONE\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"content-type\"] = 'application/json'\nrequest.body = \"[{\\\"externalId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"firstName\\\":\\\"string\\\",\\\"lastName\\\":\\\"string\\\",\\\"email\\\":\\\"example@email.com\\\",\\\"phone\\\":\\\"string\\\",\\\"password\\\":\\\"string\\\",\\\"skipPasswordHashing\\\":false,\\\"addresses\\\":[{\\\"type\\\":\\\"shipping\\\",\\\"name\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"email\\\":\\\"string\\\",\\\"address1\\\":\\\"string\\\",\\\"address2\\\":\\\"string\\\",\\\"unitSuit\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"stateProvince\\\":\\\"string\\\",\\\"postalCode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"vatId\\\":\\\"string\\\",\\\"note\\\":\\\"string\\\"}],\\\"isActive\\\":false,\\\"metaData\\\":[{\\\"key\\\":\\\"string\\\",\\\"value\\\":\\\"string\\\"}]}]\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "v1_channel_customer_update_createRequest": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "externalId": {
              "type": "string",
              "description": "Required for update if \"objectId\" is not provided"
            },
            "createdAt": {
              "type": "string",
              "format": "date-time",
              "description": "Original timestamp from your system when record was created",
              "default": "time when request is processed"
            },
            "name": {
              "type": "string"
            },
            "firstName": {
              "type": "string"
            },
            "lastName": {
              "type": "string"
            },
            "email": {
              "type": "string",
              "format": "email",
              "description": "Required when creating new customer"
            },
            "phone": {
              "type": "string"
            },
            "password": {
              "type": "string",
              "minLength": 8,
              "default": "Random uuid/v1"
            },
            "skipPasswordHashing": {
              "type": "boolean",
              "default": false,
              "description": "Useful when migrating customers, and want to save password as bcrypt without hashing"
            },
            "addresses": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "shipping",
                      "billing",
                      "mailing",
                      "general"
                    ],
                    "default": "general"
                  },
                  "name": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string"
                  },
                  "address1": {
                    "type": "string"
                  },
                  "address2": {
                    "type": "string"
                  },
                  "unitSuit": {
                    "type": "string"
                  },
                  "city": {
                    "type": "string"
                  },
                  "stateProvince": {
                    "type": "string"
                  },
                  "postalCode": {
                    "type": "string"
                  },
                  "country": {
                    "type": "string"
                  },
                  "vatId": {
                    "type": "string"
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "address1",
                  "city",
                  "country"
                ]
              }
            },
            "isActive": {
              "type": "boolean",
              "default": true
            },
            "metaData": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "value": {
                    "type": "string"
                  }
                },
                "required": [
                  "key",
                  "value"
                ]
              }
            }
          }
        },
        "example": [
          {
            "externalId": "string",
            "name": "string",
            "firstName": "string",
            "lastName": "string",
            "email": "example@email.com",
            "phone": "string",
            "password": "string",
            "skipPasswordHashing": false,
            "addresses": [
              {
                "type": "shipping",
                "name": "string",
                "phone": "string",
                "email": "string",
                "address1": "string",
                "address2": "string",
                "unitSuit": "string",
                "city": "string",
                "stateProvince": "string",
                "postalCode": "string",
                "country": "string",
                "vatId": "string",
                "note": "string"
              }
            ],
            "isActive": false,
            "metaData": [
              {
                "key": "string",
                "value": "string"
              }
            ]
          }
        ]
      },
      "v1_channel_customer_update_createResponse": {
        "type": "object",
        "properties": {
          "objectId": {
            "type": "string",
            "description": "Customer Object ID"
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "updated",
              "skipped"
            ]
          }
        },
        "required": [
          "objectId",
          "status"
        ],
        "example": {
          "objectId": "string",
          "status": "created"
        }
      }
    }
  },
  "openapi": "3.0.2",
  "_id": {
    "buffer": {
      "0": 98,
      "1": 224,
      "2": 225,
      "3": 31,
      "4": 13,
      "5": 239,
      "6": 112,
      "7": 0,
      "8": 20,
      "9": 48,
      "10": 103,
      "11": 238
    }
  }
}
```