Site

Prev Next

You need the Manage Site permission to manage sites.

Site JSON Format

Site is represented as simple flat JSON objects with the following keys:

Name Type Description
id integer ID of site.
externalId string External ID of site.
partnerId integer Partner ID of site.
platformId integer Platform ID of site.
status string Allowed values are "Open","Suspended","Closed","Purged".
firstName string First Name of site registrant.
lastName string Last Name of site registrant.
company string Company name.
website string Company website.
phone string Company phone number.
fax string Company fax number.
companySize string The number of staff members of the company. Value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddress string The mailing address of the company.
city string City where the company is located.
languageId string The language of site.
stateOrProvince string State/Province where the company is located.
postalOrZipCode string Postal/Zip Code where the company is located.
subDomain string The sub domain of the site.
customDomain string The custom domain of the site.
countryOrRegion string Country/Region where the company is located.
datetimeFormat string Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
timeZone string Time zone of the site. Values include all Time Zone Option identifers.
Industry string Allowed values are "Accommodation & Food Services", "Administration & Business Support Services", "Agriculture, Forestry, Fishing & Hunting", "Arts, Entertainment & Recreation", "Construction", "Educational Services", "Finance & Insurance", "Healthcare & Social Assistance", "Information", "Manufacturing", "Mining", "Personal Services", "Professional, Scientific & Technical Services", "Public Administration & Safety", "Real Estate, Rental & Leasing", "Retail Trade", "Transportation & Warehousing", "Thematic Reports", "Utilities", "Wholesale Trade", "Others"
OtherIndustryDescription string Available when Industry is 'Others'.
isDeleted bool Whether the site is deleted or not.

Get the list of Sites

GET global/sites

Parameters:

Name Type in Required Description
status string query no Allowed values are "Open","Suspended","Closed","Purged".
email string query no Email of site or agent
externalId string query no External ID of site
platformId string query no Platform ID of site

Response:

An arrary of Site

Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites?externalId=DA2E1FF1-A151-4FFE-9701-C1C8F234C632 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
    "id": 10001,
    "externalId": "DA2E1FF1-A151-4FFE-9701-C1C8F234C632",
    "partnerId": 10000,
    "platformId":100,
    "firstName": "Jason",
    "lastName": "Statham",
    "company": "Comm100",
    "website": "https://www.comm100.com",
    "companySize": "101-180",
    "countryOrRegion": "Canada",
    "stateOrProvince": "British Columbia",
    "status": "Open",
    "subDomain": "",
    "customDomain": "",
    "phone": "88654987",
    "fax": "58469215",
    "mailingAddress": "mail@comm100.com",
    "postalOrZipCode": "V7J",
    "city": "Vancouver",
    "languageId": "en",
    "datetimeFormat": "MM/DD/YYYY HH:mm:ss",
    "timeZone": "Atlantic Standard Time",
    "industry": "Educational Services",
    "otherIndustryDescription": "",
    "isDeleted": false
  } 
]

Get a single Site

GET global/sites/{id}

Parameters:

No Parameters

Response:

Site

Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites/10001 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

 {
    "id": 10001,
    "externalId": "DA2E1FF1-A151-4FFE-9701-C1C8F234C632",
    "partnerId": 10000,
    "platformId":100,
    "firstName": "Jason",
    "lastName": "Statham",
    "company": "Comm100",
    "website": "https://www.comm100.com",
    "companySize": "101-180",
    "countryOrRegion": "Canada",
    "stateOrProvince": "British Columbia",
    "status": "Open",
    "subDomain": "",
    "customDomain": "",
    "phone": "88654987",
    "fax": "58469215",
    "mailingAddress": "mail@comm100.com",
    "postalOrZipCode": "V7J",
    "city": "Vancouver",
    "languageId": "en",
    "datetimeFormat": "MM/DD/YYYY HH:mm:ss",
    "timeZone": "Atlantic Standard Time",
    "industry": "Educational Services",
    "otherIndustryDescription": "",
    "isDeleted": false
  } 

Create a new Site

POST global/sites

Parameters:

Name Type in Required Description
platformId int body yes Platform where the site will register
externalId string body no External ID for Register
email string body yes Email For Register
password string body yes Password for Register
firstName string body no First Name of site registrant.
lastName string body no Last Name of site registrant.
timeZone string body no Time zone of the site. The values include all Time Zone Option identifers.
datetimeFormat string body no Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
languageId string body no Allowed values are 'en','zh-CN'.
company string body no Company name.
industry string body no Industry name.
otherIndustryDescription string body no Available when Industry is 'Others'.
companySize string body no The number of staff of the company, value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddress string body no The mailing address of the company.
countryOrRegion string body no Country/Region where the company is located.
stateOrProvince string body no State/Province where the company is located.
postalOrZipCode string body no Postal/Zip Code where the company is located.
city string body no City where the company is located.
planId int body yes PlanId selected for site register.
website string body no Company website.
phone string body no Company phone number.
fax string body no Company fax number.
subDomain string body no The sub domain of the site.
customDomain string body no The custom domain of the site.

Response:

Site Object

Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \
    -D '{"platformId":100,"externalId":"DA2E1FF1-A151-4FFE-9701-C1C8F234C632","email":"mail@comm100.com","password":"12345","planId":233}'

Response:

HTTP/1.1 200 OK

{
  "siteId": 10001,
  "email": "mail@comm100.com",
  "externalId": "DA2E1FF1-A151-4FFE-9701-C1C8F234C632"
} 

Update the Site

PUT global/sites/{id}

Parameters:

Name Type in Required Description
externalId string body no External ID for Register
partnerId integer body no Partner ID of site.
platformId int body no Platform where the site will register
firstName string body yes First Name of site registrant.
lastName string body yes Last Name of site registrant.
timeZone string body no Time zone of the site. The values include all Time Zone Option identifers.
datetimeFormat string body no Allowed values are "YYYY/MM/DD HH:mm:ss", "YYYY-MM-DD HH:mm:ss", "MM/DD/YYYY HH:mm:ss", "MM-DD-YYYY HH:mm:ss", "DD/MM/YYYY HH:mm:ss", "DD-MM-YYYY HH:mm:ss".
languageId string body no Allowed values are 'en','zh-CN'.
company string body yes Company name.
industry string body no Industry name.
otherIndustryDescription string body no Available when Industry is 'Others'.
companySize string body yes The number of staff of the company, value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddress string body no The mailing address of the company.
countryOrRegion string body no Country/Region where the company is located.
stateOrProvince string body no State/Province where the company is located.
postalOrZipCode string body no Postal/Zip Code where the company is located.
city string body no City where the company is located.
website string body no Company website.
phone string body no Company phone number.
fax string body no Company fax number.
isDeleted string body no Whether the site is deleted or not.
subDomain string body no The sub domain of the site.
customDomain string body no The custom domain of the site.

Response:

Updated Site

Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites/10001 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -D '{"id": 10001,"externalId": "sadasdc32ada123sd2","firstName": "Jason","lastName": "Statham","company": "Comm100","website": "https://www.comm100.com","phone": "88654987","fax": "58469215","companySize": "101-180","mailingAddress": "mail@comm100.com","city": "Vancouver","stateOrProvince": "British Columbia","postalOrZipCode": "V7J","countryOrRegion": "Canada","datetimeFormat": "MM/DD/YYYY HH:mm:ss","timeZone": "Atlantic Standard Time"} '

Response:

HTTP/1.1 200 OK

{
  "id": 10001,
  "externalId": "sadasdc32ada123sd2",
  "partnerId": 10000,
  "platformId": 100,
  "firstName": "Jason",
  "lastName": "Statham",
  "company": "Comm100",
  "website": "https://www.comm100.com",
  "phone": "88654987",
  "fax": "58469215",
  "companySize": "101-180",
  "mailingAddress": "mail@comm100.com",
  "city": "Vancouver",
  "languageId": "en",
  "stateOrProvince": "British Columbia",
  "postalOrZipCode": "V7J",
  "countryOrRegion": "Canada",
  "datetimeFormat": "MM/DD/YYYY HH:mm:ss",
  "timeZone": "Atlantic Standard Time",
  "status": "Open",
  "subDomain": "",
  "customDomain": "",
  "industry": "Educational Services",
  "otherIndustryDescription": "",
  "isDeleted": false
} 

Change Site Status

POST global/sites/{id}:changeSiteStatus

Parameters:

Name Type in Required Description
status string body yes Allowed values are "Open","Suspended","Closed".

Response:

Updated Site

Example

Sample Request:

curl https://partnerapi.comm100.io/v4/global/sites/10001:changeSiteStatus \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -D '{"status":"open"}'

Response:

HTTP/1.1 200 OK

{
  "id": 10001,
  "externalId": "sadasdc32ada123sd2",
  "status": "open"
} 
Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.