Signup API Overview
The Signup API handles the registration of new users or companies in GNet Connect. This endpoint supports both dry mode and live mode for flexible registration workflows.- Dry Mode: Simulates the registration process, providing a preview of the data without saving it to the database.
- Live Mode: Commits the registration data, creating the user or company record.
Endpoint
POST /api/company/register
Request Body Schema
Required Fields
| Field | Type | Description | Validation |
|---|---|---|---|
| name | string | Company or full name | Min 1, Max 250 characters |
| mainEmail | string | Primary email address | Must be a valid email |
| mainPhone | string | Primary phone number | Required |
| countryCode | string | Country code | Required |
| coType | ”IO” or “CO” | Company type | Required |
| address | string | Company address | Optional |
| mode | ”dry” or “live” | Registration mode | Required |
| password | string | Password | Min 8, Max 100 characters |
| confirmPassword | string | Password confirmation | Must match password |
Optional Fields
| Field | Type | Description | Validation |
|---|---|---|---|
| vendor_platform | string | Vendor platform | Optional |
| notes | string | How did you hear about us | Optional |
Example Request Body
Success Responses
200 - Success
Returned for both successful company registration and successful dry run validation. Standard Success Response:Error Responses
422 - Unprocessable Entity
Occurs when the request payload fails schema validation.428 - Precondition Required
Returned when the AI verification score is below the required threshold.409 - Conflict
Indicates that a user or company with the given email or phone already exists.424 - Failed Dependency
Occurs when an issue with dependent services or database operations prevents registration.501 - Not Implemented
Occurs when an invalid company type is provided or when an unimplemented registration path is used.502 - Bad Gateway
Returned for server-side errors during Independent Operator (IO) registration.503 - Service Unavailable
Returned for server-side errors during Company (CO) registration.Response Format
All responses follow a consistent structure:| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the operation succeeded |
| status | number | HTTP status code |
| error | string | Error message (if applicable) |
| additional fields | varies | Context-specific fields like griddid |
Notes
- Fields marked as
nullishin the schema are optional. passwordandconfirmPasswordmust match.- The API automatically generates fields like
griddidandcreatedAt. - Default AI verification score threshold is 30.
- The payment object, if needed, is handled through separate endpoints.