Site
  • 05 Jul 2022
  • 6 Minutes to read
  • Dark
    Light

Site

  • Dark
    Light

Article summary

You need the Manage Site permission to manage sites.

Site JSON Format

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

NameTypeDescription
idintegerID of site.
externalIdstringExternal ID of site.
partnerIdintegerPartner ID of site.
platformIdintegerPlatform ID of site.
statusstringAllowed values are "Open","Suspended","Closed","Purged".
firstNamestringFirst Name of site registrant.
lastNamestringLast Name of site registrant.
companystringCompany name.
websitestringCompany website.
phonestringCompany phone number.
faxstringCompany fax number.
companySizestringThe number of staff members of the company. Value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddressstringThe mailing address of the company.
citystringCity where the company is located.
languageIdstringThe language of site.
stateOrProvincestringState/Province where the company is located.
postalOrZipCodestringPostal/Zip Code where the company is located.
subDomainstringThe sub domain of the site.
customDomainstringThe custom domain of the site.
countryOrRegionstringCountry/Region where the company is located.
datetimeFormatstringAllowed 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".
timeZonestringTime zone of the site. Values include all Time Zone Option identifers.
IndustrystringAllowed 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"
OtherIndustryDescriptionstringAvailable when Industry is 'Others'.
isDeletedboolWhether the site is deleted or not.

Get the list of Sites

GET global/sites

Parameters:

NameTypeinRequiredDescription
statusstringquerynoAllowed values are "Open","Suspended","Closed","Purged".
emailstringquerynoEmail of site or agent
externalIdstringquerynoExternal ID of site
platformIdstringquerynoPlatform 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:

NameTypeinRequiredDescription
platformIdintbodyyesPlatform where the site will register
externalIdstringbodynoExternal ID for Register
emailstringbodyyesEmail For Register
passwordstringbodyyesPassword for Register
firstNamestringbodynoFirst Name of site registrant.
lastNamestringbodynoLast Name of site registrant.
timeZonestringbodynoTime zone of the site. The values include all Time Zone Option identifers.
datetimeFormatstringbodynoAllowed 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".
languageIdstringbodynoAllowed values are 'en','zh-CN'.
companystringbodynoCompany name.
industrystringbodynoIndustry name.
otherIndustryDescriptionstringbodynoAvailable when Industry is 'Others'.
companySizestringbodynoThe number of staff of the company, value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddressstringbodynoThe mailing address of the company.
countryOrRegionstringbodynoCountry/Region where the company is located.
stateOrProvincestringbodynoState/Province where the company is located.
postalOrZipCodestringbodynoPostal/Zip Code where the company is located.
citystringbodynoCity where the company is located.
planIdintbodyyesPlanId selected for site register.
websitestringbodynoCompany website.
phonestringbodynoCompany phone number.
faxstringbodynoCompany fax number.
subDomainstringbodynoThe sub domain of the site.
customDomainstringbodynoThe 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:

NameTypeinRequiredDescription
externalIdstringbodynoExternal ID for Register
partnerIdintegerbodynoPartner ID of site.
platformIdintbodynoPlatform where the site will register
firstNamestringbodyyesFirst Name of site registrant.
lastNamestringbodyyesLast Name of site registrant.
timeZonestringbodynoTime zone of the site. The values include all Time Zone Option identifers.
datetimeFormatstringbodynoAllowed 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".
languageIdstringbodynoAllowed values are 'en','zh-CN'.
companystringbodyyesCompany name.
industrystringbodynoIndustry name.
otherIndustryDescriptionstringbodynoAvailable when Industry is 'Others'.
companySizestringbodyyesThe number of staff of the company, value options include: 1-20, 21-50, 51-100, 101-180, 181-310, 311-600, Above 600.
mailingAddressstringbodynoThe mailing address of the company.
countryOrRegionstringbodynoCountry/Region where the company is located.
stateOrProvincestringbodynoState/Province where the company is located.
postalOrZipCodestringbodynoPostal/Zip Code where the company is located.
citystringbodynoCity where the company is located.
websitestringbodynoCompany website.
phonestringbodynoCompany phone number.
faxstringbodynoCompany fax number.
isDeletedstringbodynoWhether the site is deleted or not.
subDomainstringbodynoThe sub domain of the site.
customDomainstringbodynoThe 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:

NameTypeinRequiredDescription
statusstringbodyyesAllowed 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"
} 

Was this article helpful?

What's Next