Skip to main content

Create a part type

POSThttps://carchost.fieldcontrol.com.br/part-types

Creates a part type, already with the custom fields that parts of this type answer.

Requires the X-Api-Key, User-Agent and Content-Type: application/json headers. Limit: 1 request per second (learn more).

Request​

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

JSON, sent with the Content-Type: application/json header.

namestringrequired

Part type name. Must be unique in the account.

descriptionstring

Part type description.

archivedboolean

Accepted, but ignored. Use the archive and unarchive endpoints.

externalobject
Fields of external
idstring

Part type identifier in your system. Texts longer than 100 characters are truncated.

Accepts: null.

customFieldslist of objects

Custom fields. When sent, it replaces all current fields and their options.

Fields of customFields
idstring

Field UUID. If omitted, the API generates one.

namestring

Field name.

typestringrequired

Field type. Missing or outside this list results in a 500 error and nothing is stored.

Accepted values: question, multiple-choice, date, number.

requiredboolean

Whether an answer is required.

Default: false.

positioninteger

Display position. Defaults to the order in the array, starting at 1.

optionslist of objects

Answer options, for multiple-choice fields.

Fields of options
idstring

Option UUID. If omitted, the API generates one.

valuestring

Option text.

positioninteger

Display 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): name missing (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.