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

# update cart shipping address

# OpenAPI definition

```json
{
  "servers": [
    {
      "url": "https://api.kentro.dev",
      "description": "Sandbox"
    },
    {
      "url": "https://api.kentro.live",
      "description": "Production"
    }
  ],
  "info": {
    "title": "Store API",
    "version": "1.149.3",
    "description": "Unlock the power of custom B2B storefronts. Manage and build your B2B store with comprehensive access to relevant features and functionalities through the Store-API.",
    "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/store/cart/update-shipping": {
      "post": {
        "parameters": [
          {
            "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"
          },
          {
            "description": "Use only on sandbox to simulate request origin, on production it will default to \"Host\" header",
            "in": "header",
            "name": "X-Host-Override",
            "required": false,
            "schema": {
              "type": "string",
              "default": "store-domain.com"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Ok",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/v1_store_cart_update-shipping_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"
                    }
                  }
                }
              }
            }
          }
        },
        "summary": "update cart shipping address",
        "tags": [
          "cart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/v1_store_cart_update-shipping_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/store/cart/update-shipping',\n  qs: {idempotency: 'SOME_STRING_VALUE'},\n  headers: {'content-type': 'application/json', 'X-Host-Override': 'SOME_STRING_VALUE'},\n  body: {\n    _id: '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    name: 'string',\n    phone: 'string',\n    email: 'example@email.com',\n    note: 'string',\n    geoLocation: {\n      unset: false,\n      formatted_address: 'string',\n      address_components: [{long_name: 'string', short_name: 'string', types: []}],\n      geometry: {\n        bounds: {south: 0, west: 0, north: 0, east: 0},\n        location: {lat: 0, lng: 0},\n        location_type: 'string',\n        viewport: {south: 0, west: 0, north: 0, east: 0}\n      },\n      place_id: 'string',\n      types: [],\n      source: 'google'\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 = \"{\\\"_id\\\":\\\"string\\\",\\\"address1\\\":\\\"string\\\",\\\"address2\\\":\\\"string\\\",\\\"unitSuit\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"stateProvince\\\":\\\"string\\\",\\\"postalCode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"vatId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"email\\\":\\\"example@email.com\\\",\\\"note\\\":\\\"string\\\",\\\"geoLocation\\\":{\\\"unset\\\":false,\\\"formatted_address\\\":\\\"string\\\",\\\"address_components\\\":[{\\\"long_name\\\":\\\"string\\\",\\\"short_name\\\":\\\"string\\\",\\\"types\\\":[]}],\\\"geometry\\\":{\\\"bounds\\\":{\\\"south\\\":0,\\\"west\\\":0,\\\"north\\\":0,\\\"east\\\":0},\\\"location\\\":{\\\"lat\\\":0,\\\"lng\\\":0},\\\"location_type\\\":\\\"string\\\",\\\"viewport\\\":{\\\"south\\\":0,\\\"west\\\":0,\\\"north\\\":0,\\\"east\\\":0}},\\\"place_id\\\":\\\"string\\\",\\\"types\\\":[],\\\"source\\\":\\\"google\\\"}}\"\n\nheaders = {\n    'content-type': \"application/json\",\n    'X-Host-Override': \"SOME_STRING_VALUE\"\n    }\n\nconn.request(\"POST\", \"/v1/store/cart/update-shipping?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/store/cart/update-shipping?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[\"X-Host-Override\"] = 'SOME_STRING_VALUE'\nrequest.body = \"{\\\"_id\\\":\\\"string\\\",\\\"address1\\\":\\\"string\\\",\\\"address2\\\":\\\"string\\\",\\\"unitSuit\\\":\\\"string\\\",\\\"city\\\":\\\"string\\\",\\\"stateProvince\\\":\\\"string\\\",\\\"postalCode\\\":\\\"string\\\",\\\"country\\\":\\\"string\\\",\\\"vatId\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"phone\\\":\\\"string\\\",\\\"email\\\":\\\"example@email.com\\\",\\\"note\\\":\\\"string\\\",\\\"geoLocation\\\":{\\\"unset\\\":false,\\\"formatted_address\\\":\\\"string\\\",\\\"address_components\\\":[{\\\"long_name\\\":\\\"string\\\",\\\"short_name\\\":\\\"string\\\",\\\"types\\\":[]}],\\\"geometry\\\":{\\\"bounds\\\":{\\\"south\\\":0,\\\"west\\\":0,\\\"north\\\":0,\\\"east\\\":0},\\\"location\\\":{\\\"lat\\\":0,\\\"lng\\\":0},\\\"location_type\\\":\\\"string\\\",\\\"viewport\\\":{\\\"south\\\":0,\\\"west\\\":0,\\\"north\\\":0,\\\"east\\\":0}},\\\"place_id\\\":\\\"string\\\",\\\"types\\\":[],\\\"source\\\":\\\"google\\\"}}\"\n\nresponse = http.request(request)\nputs response.read_body"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "v1_store_cart_update-shipping_createRequest": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Object ID of address from customer address book (if provided other fields are not required)"
          },
          "address1": {
            "type": "string",
            "description": "Required if (_id) is not provided"
          },
          "address2": {
            "type": "string"
          },
          "unitSuit": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "description": "Required if (_id) is not provided"
          },
          "stateProvince": {
            "type": "string"
          },
          "postalCode": {
            "type": "string",
            "description": "Required if (_id) is not provided"
          },
          "country": {
            "type": "string"
          },
          "vatId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "note": {
            "type": "string"
          },
          "geoLocation": {
            "type": "object",
            "properties": {
              "unset": {
                "type": "boolean"
              },
              "formatted_address": {
                "type": "string"
              },
              "address_components": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "long_name": {
                      "type": "string"
                    },
                    "short_name": {
                      "type": "string"
                    },
                    "types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "geometry": {
                "type": "object",
                "properties": {
                  "bounds": {
                    "type": "object",
                    "properties": {
                      "south": {
                        "type": "number"
                      },
                      "west": {
                        "type": "number"
                      },
                      "north": {
                        "type": "number"
                      },
                      "east": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "south",
                      "west",
                      "north",
                      "east"
                    ]
                  },
                  "location": {
                    "type": "object",
                    "properties": {
                      "lat": {
                        "type": "number"
                      },
                      "lng": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "lat",
                      "lng"
                    ]
                  },
                  "location_type": {
                    "type": "string"
                  },
                  "viewport": {
                    "type": "object",
                    "properties": {
                      "south": {
                        "type": "number"
                      },
                      "west": {
                        "type": "number"
                      },
                      "north": {
                        "type": "number"
                      },
                      "east": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "south",
                      "west",
                      "north",
                      "east"
                    ]
                  }
                },
                "required": [
                  "bounds",
                  "location",
                  "location_type",
                  "viewport"
                ]
              },
              "place_id": {
                "type": "string"
              },
              "types": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "source": {
                "type": "string",
                "default": "google",
                "enum": [
                  "google"
                ]
              }
            },
            "required": [
              "formatted_address",
              "address_components",
              "geometry",
              "place_id",
              "types"
            ],
            "example": {
              "unset": false,
              "formatted_address": "string",
              "address_components": [
                {
                  "long_name": "string",
                  "short_name": "string",
                  "types": []
                }
              ],
              "geometry": {
                "bounds": {
                  "south": 0,
                  "west": 0,
                  "north": 0,
                  "east": 0
                },
                "location": {
                  "lat": 0,
                  "lng": 0
                },
                "location_type": "string",
                "viewport": {
                  "south": 0,
                  "west": 0,
                  "north": 0,
                  "east": 0
                }
              },
              "place_id": "string",
              "types": [],
              "source": "google"
            }
          }
        },
        "example": {
          "_id": "string",
          "address1": "string",
          "address2": "string",
          "unitSuit": "string",
          "city": "string",
          "stateProvince": "string",
          "postalCode": "string",
          "country": "string",
          "vatId": "string",
          "name": "string",
          "phone": "string",
          "email": "example@email.com",
          "note": "string",
          "geoLocation": {
            "unset": false,
            "formatted_address": "string",
            "address_components": [
              {
                "long_name": "string",
                "short_name": "string",
                "types": []
              }
            ],
            "geometry": {
              "bounds": {
                "south": 0,
                "west": 0,
                "north": 0,
                "east": 0
              },
              "location": {
                "lat": 0,
                "lng": 0
              },
              "location_type": "string",
              "viewport": {
                "south": 0,
                "west": 0,
                "north": 0,
                "east": 0
              }
            },
            "place_id": "string",
            "types": [],
            "source": "google"
          }
        }
      },
      "v1_store_cart_update-shipping_createResponse": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "errorCode": {
            "type": "string"
          }
        },
        "required": [
          "result"
        ],
        "example": {
          "result": false,
          "error": "string",
          "message": "string",
          "errors": [],
          "errorCode": "string"
        }
      }
    }
  },
  "openapi": "3.0.2",
  "_id": {
    "buffer": {
      "0": 98,
      "1": 224,
      "2": 139,
      "3": 140,
      "4": 55,
      "5": 7,
      "6": 59,
      "7": 0,
      "8": 73,
      "9": 14,
      "10": 54,
      "11": 136
    }
  }
}
```