Skip to content
Main site Contact

Accounts and company

This page covers:

  • GET /api/User
  • PUT /api/User
  • GET /api/CompanyProfile
  • PUT /api/CompanyProfile
  • PUT /api/CompanyLogo
  • DELETE /api/CompanyLogo
  • GET /api/IsEmployee

Validate user credentials and return the user profile.

ItemValue
MethodGET
Path/api/User
AuthApp bearer token
ResponseUserProfile JSON, null, or a 302 response with ServerURL
ParameterRequiredNotes
emailIDYesUser email address
passwordYesSHA-1 hex digest of the password
  • Valid credentials return a UserProfile.
  • Invalid credentials often return HTTP 200 with a null body.
  • Some lockout or validation paths return 400.
  • If the email belongs to a redirected server, the endpoint returns 302 and a body with ServerURL.
import hashlib
import 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)

Create a new user.

ItemValue
MethodPUT
Path/api/User
AuthApp bearer token
Response201 Created with UserProfile, or 302 with ServerURL
ParameterRequiredNotes
emailIDYesNew user’s email
firstNameYesURL-encoded first name
lastNameYesURL-encoded last name
passwordYesSHA-1 hex digest
companyIdNoCompany to associate immediately

Use this only for new users. It is not a safe “upsert” endpoint.

Terminal window
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 a company’s profile by company ID.

ItemValue
MethodGET
Path/api/CompanyProfile
AuthProtected endpoint. Use a user bearer token unless VizSeek tells you otherwise.
ResponseCompanyProfile JSON or 404
ParameterRequiredNotes
companyIDYesCompany GUID/ID
{
"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
}
Terminal window
curl -G "https://your-server.example.com/api/CompanyProfile" \
-H "Authorization: Bearer USER_BEARER_TOKEN" \
--data-urlencode "companyID=24395dfe-7917-4976-a198-0fe3aa9a6a06"

Replace the current company’s logo.

ItemValue
MethodPUT
Path/api/CompanyLogo
AuthUser bearer token
Content-Typeapplication/json
ResponseBoolean

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.

import base64
import 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())

Remove the current company’s logo.

ItemValue
MethodDELETE
Path/api/CompanyLogo
AuthUser bearer token
ResponseBoolean
Terminal window
curl -X DELETE "https://your-server.example.com/api/CompanyLogo" \
-H "Authorization: Bearer USER_BEARER_TOKEN"

Check whether the current user belongs to a specific company.

ItemValue
MethodGET
Path/api/IsEmployee
AuthUser bearer token
ResponseBoolean
ParameterRequiredNotes
companyIDYesCompany GUID/ID
Terminal window
curl -G "https://your-server.example.com/api/IsEmployee" \
-H "Authorization: Bearer USER_BEARER_TOKEN" \
--data-urlencode "companyID=24395dfe-7917-4976-a198-0fe3aa9a6a06"