Skip to main content

Make a movement

POSThttps://carchost.fieldcontrol.com.br/storages-movements-v2

Records an entry, a removal or a transfer between storages and updates the product balance. The movement value is calculated from the product unit price. Requires the inventory control module.

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.

typestringrequired

entry (entry), removal (removal) or transfer (transfer from the storageRemoval storage to the storage storage).

Accepted values: entry, removal, transfer.

quantitynumberrequired

Quantity, greater than zero. An integer for products measured in units; up to 3 decimal places for other measures.

productobjectrequired
Fields of product
idstringrequired

Product identifier.

storageobjectrequired

Movement storage. In a transfer, it is the destination storage.

Fields of storage
idstringrequired

Storage identifier.

storageRemovalobject

Source storage. Required when type is transfer, and different from storage.

Fields of storageRemoval
idstringrequired

Source storage identifier.

orderobject

Work order linked to the movement.

Fields of order
idstring

Work order identifier.

identifierstring

Free identifier of the movement in your process.

Up to 255 characters.Accepts: null.

descriptionstring

Movement description.

Up to 1000 characters.Accepts: null.

externalobject
Fields of external
idstring

Movement identifier in your system.

Accepts: null.

minimalQuantitynumber

Minimum quantity of the product in the storage. Only considered on the product's first entry into the storage.

minimalQuantityAtRisknumber

Quantity from which the stock is considered at risk; must be greater than minimalQuantity. Only considered on the product's first entry into the storage.

Responses

  • 201

    Movement created. With type: transfer, the response is the transfer (StorageMovementTransfer), with the identifiers of the removal and the entry.

  • 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): nonexistent product, storage or order (reason: not found), removal greater than the balance or of a product with no balance (reason: Invalid removal), quantity with too many decimal places, or transfer without storageRemoval or with the same storages. Account without the inventory control module: resourceNotAllowed.

  • 429

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

  • 500

    Unexpected server error.