Skip to main content

Update a part type

PUThttps://carchost.fieldcontrol.com.br/part-types/{id}

Updates a part type. Send only the fields that will change.

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

Request​

Path parameters

idstringrequired

Part type identifier.

Example: YTFiMmMzZDQtZTVmNi03ODkwLWFiY2QtZWYxMjM0NTY3ODkwOjIyOTE1.

Headers

User-Agentstringrequired

Identification of your application.

Example: MinhaIntegracao/1.0.

Request body

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

namestring

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

  • 200

    Part type updated.

  • 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 already used in the account or invalid URL identifier (property: @.id). Nonexistent part type: 422 resourceNotFound (there is no 404). Invalid identifier or one from another account: uriValidationErr.

  • 429

    Limit of 1 request per second exceeded. See Rate limit.

  • 500

    Unexpected server error.