FormsData

List of values from the registration from

Introduction

This API provides the data to create the default TraceParts registration form.

API Key

This web service requires an API Key. Please use the form to request your API Key.

Description

The API returns all fields, rules and list of values for the TraceParts registration. These lists can also be used to know the values, in the related language, for some fields of the TraceParts Analytics reports.

Building a URL

The FormsData API request takes the following form:

https://ws.tracepartsonline.net/tpowebservices/FormsData?parameters

Parameters

Certain parameters are required while others are optional. As it is standard in URLs, all parameters are separated using the ampersand (&) character. The list of parameters and their possible values are enumerated below.

Required parameters

Parameter NameData typeDefault valueDescription
ApiKeystringnoneCode calling an API to track and control how the API is used
FormatstringnoneAnswer file type (json)
LanguagestringenLanguageID given by the LanguagesList API
FormIdstringnonePlease always use the value “userRegistration_AllFields”

Example of FormsData API

The request below returns all data to used for a TraceParts registration and matches it to the IDs of each field from the TraceParts Analytics reports.

https://ws.tracepartsonline.net/tpowebservices/FormsData?Language=en&FormId=userRegistration_AllFields&format=json&ApiKey={ApiKey}

FormsData responses

FormsData responses are returned in the format indicated by the Format parameter within the URL request’s path.

JSON Output

A sample HTTP request is shown below, displaying a registration field in the English language.

{"formsDataList":[{
"fieldId":"f_Service",
"label":"Your department",
"type":"CMB",
"defaultValue":"",
"mandatory":"True",
"lengthMin":"1",
"lengtMax":"50",
"regex":"",
"values":[
{"id":"SERV02","label":"AFTER-SALES"},
{"id":"SERV03","label":"ASSEMBLY & PRODUCTION"},
{"id":"SERV04","label":"ENGINEERING"},
{"id":"SERV06","label":"GENERAL MANAGEMENT"},
{"id":"SERV07","label":"IT DEPARTMENT"},
{"id":"SERV08","label":"LOGISTICS"},
{"id":"SERV09","label":"MAINTENANCE & REPAIR OPERATIONS"},
{"id":"SERV11","label":"METHODS"},
,"noMatchRegex":""}
}]}

FormsData response elements

FormsData responses contain ten elements:

  • “FieldId”: TraceParts ID of the field.
  • “Label”: label of the field, depending on the language.
  • “Type”: Type of the field (Text box, drop list, check box…).
  • “DefaultValue”: default value.
  • “Mandatory”: boolean (True/False) if the field is mandatory or not.
  • “LengthMin”: minimum length.
  • “LengthMax”: maximum length.
  • “Regex”: regular expression to validate the value of the text field.
  • “Values”: list of values for a list control.
  • “NoMatchRegex”: N/A.

Developer support

Please contact us for any problems, questions or comments related to this web service.

Last updated July 29, 2016