Skip to main content

Create a part

POSThttps://carchost.fieldcontrol.com.br/parts

Creates a part, already with the equipment types it can be installed in and the custom fields.

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 name. Must be unique in the account.

codestringrequired

Part code. Must be unique in the account.

partTypeIdstringrequired

Part type identifier.

descriptionstring

Part description.

imageUrlstring

URL of the part image.

usageConditionstring

Usage condition.

Accepted values: new, semi_new, used, refurbished, defective.Default: new.

valuenumber

Unit price.

externalIdstring

Part identifier in your system.

archivedboolean

Archives the part.

minimalQuantitynumber

Minimum quantity in storage. Cannot be negative.

minimalQuantityAtRisknumber

Quantity from which the stock is considered at risk. Cannot be negative.

equipmentTypeIdslist of string

Identifiers of the equipment types the part can be installed in. Only considered on creation.

customFieldslist of objects

Custom fields. When sent, it replaces all current fields.

Fields of customFields
namestring

Field name.

valuestring

Field value.

typestringrequired

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

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

positioninteger

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

Responses

  • 201

    Part 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, code or partTypeId missing (reason: missing required field), name or code already used in the account (reason: duplicate), nonexistent part type or invalid usageCondition.

  • 429

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

  • 500

    Unexpected server error.