Accounts and company
This page covers:
GET /api/UserPUT /api/UserGET /api/CompanyProfilePUT /api/CompanyProfilePUT /api/CompanyLogoDELETE /api/CompanyLogoGET /api/IsEmployee
GET /api/User
Section titled “GET /api/User”Validate user credentials and return the user profile.
| Item | Value |
|---|---|
| Method | GET |
| Path | /api/User |
| Auth | App bearer token |
| Response | UserProfile JSON, null, or a 302 response with ServerURL |
Query parameters
Section titled “Query parameters”| Parameter | Required | Notes |
|---|---|---|
emailID | Yes | User email address |
password | Yes | SHA-1 hex digest of the password |
Response behavior to know
Section titled “Response behavior to know”- Valid credentials return a
UserProfile. - Invalid credentials often return HTTP
200with anullbody. - Some lockout or validation paths return
400. - If the email belongs to a redirected server, the endpoint returns
302and a body withServerURL.
Example
Section titled “Example”import hashlibimport requests
email = "user@example.com"password_hash = hashlib.sha1("YourPlainTextPassword".encode("utf-8")).hexdigest()
resp = requests.get( f"{server}/api/User", headers={"Authorization": f"Bearer {app_token}"}, params={"emailID": email, "password": password_hash},)print(resp.status_code)print(resp.text)PUT /api/User
Section titled “PUT /api/User”Create a new user.
| Item | Value |
|---|---|
| Method | PUT |
| Path | /api/User |
| Auth | App bearer token |
| Response | 201 Created with UserProfile, or 302 with ServerURL |
Query parameters
Section titled “Query parameters”| Parameter | Required | Notes |
|---|---|---|
emailID | Yes | New user’s email |
firstName | Yes | URL-encoded first name |
lastName | Yes | URL-encoded last name |
password | Yes | SHA-1 hex digest |
companyId | No | Company to associate immediately |
Use this only for new users. It is not a safe “upsert” endpoint.
Example
Section titled “Example”curl -X PUT "https://your-server.example.com/api/User?emailID=new.user%40example.com&firstName=New&lastName=User&password=SHA1_HEX_PASSWORD&companyId=24395dfe-7917-4976-a198-0fe3aa9a6a06" \ -H "Authorization: Bearer APP_BEARER_TOKEN"GET /api/CompanyProfile
Section titled “GET /api/CompanyProfile”Get a company’s profile by company ID.
| Item | Value |
|---|---|
| Method | GET |
| Path | /api/CompanyProfile |
| Auth | Protected endpoint. Use a user bearer token unless VizSeek tells you otherwise. |
| Response | CompanyProfile JSON or 404 |
Query parameters
Section titled “Query parameters”| Parameter | Required | Notes |
|---|---|---|
companyID | Yes | Company GUID/ID |
Typical response shape
Section titled “Typical response shape”{ "PublicURL": null, "Name": "Example Manufacturing", "ICode": "24395dfe-7917-4976-a198-0fe3aa9a6a06", "Logo": "folder/com/24395dfe-7917-4976-a198-0fe3aa9a6a06.png", "WebSearchType": 0, "RasterSearchMethod": 0, "VectorSearchMethod": 0, "PubliclyAccessible": false, "UseTextHighlighting": true, "ShowMatchingShapes": true, "UseRAG": false}Example
Section titled “Example”curl -G "https://your-server.example.com/api/CompanyProfile" \ -H "Authorization: Bearer USER_BEARER_TOKEN" \ --data-urlencode "companyID=24395dfe-7917-4976-a198-0fe3aa9a6a06"PUT /api/CompanyLogo
Section titled “PUT /api/CompanyLogo”Replace the current company’s logo.
| Item | Value |
|---|---|
| Method | PUT |
| Path | /api/CompanyLogo |
| Auth | User bearer token |
| Content-Type | application/json |
| Response | Boolean |
Request body format
Section titled “Request body format”The body is a JSON string whose value is the base64-encoded logo bytes:
"BASE64_PNG_BYTES"Use PNG content for best results. The server stores the logo under a .png file name.
Example
Section titled “Example”import base64import json
with open("logo.png", "rb") as f: body = json.dumps(base64.b64encode(f.read()).decode("ascii"))
resp = requests.put( f"{server}/api/CompanyLogo", headers={ "Authorization": f"Bearer {token}", "Content-Type": "application/json", }, data=body,)resp.raise_for_status()print(resp.json())DELETE /api/CompanyLogo
Section titled “DELETE /api/CompanyLogo”Remove the current company’s logo.
| Item | Value |
|---|---|
| Method | DELETE |
| Path | /api/CompanyLogo |
| Auth | User bearer token |
| Response | Boolean |
Example
Section titled “Example”curl -X DELETE "https://your-server.example.com/api/CompanyLogo" \ -H "Authorization: Bearer USER_BEARER_TOKEN"GET /api/IsEmployee
Section titled “GET /api/IsEmployee”Check whether the current user belongs to a specific company.
| Item | Value |
|---|---|
| Method | GET |
| Path | /api/IsEmployee |
| Auth | User bearer token |
| Response | Boolean |
Query parameters
Section titled “Query parameters”| Parameter | Required | Notes |
|---|---|---|
companyID | Yes | Company GUID/ID |
Example
Section titled “Example”curl -G "https://your-server.example.com/api/IsEmployee" \ -H "Authorization: Bearer USER_BEARER_TOKEN" \ --data-urlencode "companyID=24395dfe-7917-4976-a198-0fe3aa9a6a06"