Editing User/Company API
The Editing User/Company API allows you to modify existing company or user details, such as contact information, address, and branding assets. This endpoint ensures that your data remains up to date and accurate.Endpoint
PUT /api/company/edit
Request Body Schema
The following schema defines the updatable fields for user or company details:| Field | Type | Description | Required |
|---|---|---|---|
| griddid | string | Unique GNET ID for the company | Yes |
| mainEmail | string | Primary email for contact | No |
| mainPhone | string | Primary phone number | No |
| mainContact | string | Name of the main contact person | No |
| webURL | string | Company website URL | No |
| address | string | Street address of the company | No |
| city | string | City where the company is located | No |
| state | string | State where the company is located | No |
| zipCode | string | Postal/ZIP code | No |
| country | string | Country where the company operates | No |
| logo | number | ID of the company logo asset | No |
Example Request
Success Response
200 - OK
Indicates that the company or user details were successfully updated. Example Response:Error Responses
| Status | Description | Possible Causes |
|---|---|---|
| 400 | Bad request | Invalid or missing fields in the request |
| 404 | Not found | No company or user associated with the provided GNET ID |
| 422 | Parsing error | The input data does not meet schema validation rules |
| 500 | Internal server error | An error occurred on the server while processing the request |
Example Error Response
Best Practices
- Validate your inputs: Use the dry run functionality in the Signup API to confirm the format of inputs before making live updates.
- Provide only necessary fields: You do not need to include all fields in the request body—only the ones you want to update.
- Handle 404 errors gracefully: If a GNET ID does not exist, suggest checking the ID or creating a new company.