---
updatedAt: 2025-09-29T10:27:27.000Z
agentTools:
  projectIndex: https://route-stripe.readme.io/llms.txt
---

# Update Company by field

Updates a single field of a company. Use strict requestBody with enum fields.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "RouteStripe API",
    "version": "1.0.0",
    "description": "Unified API specification for managing routing, plans, visits, vehicles, warehouses, members, attachments, and companies in a logistics system.\nSchemas, parameters, request bodies, and responses are consolidated to eliminate duplication.\n"
  },
  "servers": [
    {
      "url": "https://api.routestripe.com",
      "description": "Production"
    },
    {
      "url": "https://test-api.routestripe.com",
      "description": "Test"
    },
    {
      "url": "http://routestripe.local:81",
      "description": "Development"
    }
  ],
  "tags": [
    {
      "name": "Companies"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key"
      }
    },
    "schemas": {
      "ApiResponse": {
        "type": "object",
        "required": [
          "status",
          "data"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "fail"
            ]
          },
          "data": {
            "type": "object",
            "items": {}
          }
        },
        "additionalProperties": false
      },
      "UpdateReqFieldBase": {
        "type": "object",
        "required": [
          "id",
          "name",
          "value"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "value": {}
        }
      }
    },
    "requestBodies": {
      "CompanyUpdateFieldBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UpdateReqFieldBase"
            },
            "examples": {
              "sample": {
                "value": {
                  "id": 85,
                  "name": "default_squash_duration",
                  "value": 1
                }
              }
            }
          }
        }
      }
    },
    "responses": {
      "UpdateMessage": {
        "description": "Update successful.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ApiResponse"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                }
              ]
            }
          }
        }
      },
      "BadRequest": {
        "description": "Invalid request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            },
            "examples": {
              "notFound": {
                "value": {
                  "data": "Bad Request",
                  "status": "fail"
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            },
            "examples": {
              "notFound": {
                "value": {
                  "data": "Not found",
                  "status": "fail"
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Unauthorized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiResponse"
            },
            "examples": {
              "Unauthorized": {
                "value": {
                  "data": "Invalid API key provided. Please check and try again.",
                  "status": "fail"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/company/update-field": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Update Company by field",
        "description": "Updates a single field of a company. Use strict requestBody with enum fields.",
        "requestBody": {
          "$ref": "#/components/requestBodies/CompanyUpdateFieldBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/UpdateMessage"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  }
}
```