Skip to navigation

Sites

View as Markdown

List sites

Retrieve sites, EMP zones, area, and location. Send a site ID as site_id in submission-v2.

Request: GET https://one.mtxsci.com/api/1.1/wf/sites-v2

Authentication: Authorization: Bearer <token>, using response.token from authenticate-v2.

Success: 200 OK with a JSON body recorded as text/plain;charset=utf-8.

Request body: None.

Query parameters

ParameterFormatRequirement and usage
pageInteger in query stringPage to retrieve; start at 1.
customer_idStringRequired. Authorized customer from customers-v2.
site_idStringOptional site identifier filter.

Response envelope

FieldTypeDescription
pageStringReturned page number, for example "1".
hasNextPageBooleanWhether another page is available.
sitesArray of objectsRecords in this page.

Keep the customer and filters unchanged while paging. Increment page while hasNextPage is true; stop when it is false.

Site fields

FieldTypeDescription
site_idStringSite identifier; preserve numeric-looking IDs as strings.
site_nameStringSite display name.
emp_zoneIntegerEMP zone in the site catalog. Submission emp_zone uses a string in its saved request.
custom_field_01StringCustom site field.
custom_field_02StringCustom site field.
custom_field_03StringCustom site field.
custom_field_04StringCustom site field.
custom_field_05StringCustom site field.
areaStringArea the site belongs to.
locationStringLocation the site belongs to.

Saved example

The attached 200 OK example preserves the documented field names, nesting, and types using generic placeholders. Use the actual hasNextPage flag to determine whether another page is available.

Authentication

AuthorizationBearer

Use response.token from authenticate-v2. response.expires is the lifetime in seconds (86400 = 24 hours).

Query parameters

pageintegerOptional>=1Defaults to 1

Returned page number, for example "1".

customer_idstringRequired

Required authorized customer_id from customers-v2.

site_idstringOptional

Site identifier; preserve numeric-looking IDs as strings.

Response

OK