Create a part type
https://carchost.fieldcontrol.com.br/part-typesCreates a part type, already with the custom fields that parts of this type answer.
Requires the
X-Api-Key,User-AgentandContent-Type: application/jsonheaders. Limit: 1 request per second (learn more).
Request
Headers
User-AgentstringrequiredIdentification of your application.
Example: MinhaIntegracao/1.0.
Request body
JSON, sent with the Content-Type: application/json header.
namestringrequiredPart type name. Must be unique in the account.
descriptionstringPart type description.
archivedbooleanAccepted, but ignored. Use the archive and unarchive endpoints.
externalobjectFields of external
idstringPart type identifier in your system. Texts longer than 100 characters are truncated.
Accepts: null.
customFieldslist of objectsCustom fields. When sent, it replaces all current fields and their options.
Fields of customFields
idstringField UUID. If omitted, the API generates one.
namestringField name.
typestringrequiredField type. Missing or outside this list results in a 500 error and nothing is stored.
Accepted values: question, multiple-choice, date, number.
requiredbooleanWhether an answer is required.
Default: false.
positionintegerDisplay position. Defaults to the order in the array, starting at 1.
optionslist of objectsAnswer options, for multiple-choice fields.
Fields of options
idstringOption UUID. If omitted, the API generates one.
valuestringOption text.
positionintegerDisplay position. Defaults to the order in the array, starting at 1.
Responses
- 201
Part type created.
- 401
API key missing (
Missing API Key) or invalid (Invalid API Key). See Authentication. - 403
Account blocked (
Account blocked), expired (Account expired) or on a plan that does not allow integration (Account plan not allowed). See Authentication. - 422
Invalid body (resourceValidationErr):
namemissing (reason: missing required field) or already used in the account (reason: duplicate). - 429
Limit of 1 request per second exceeded. See Rate limit.
- 500
Unexpected server error.