Make a movement
https://carchost.fieldcontrol.com.br/storages-movements-v2Records 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-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.
typestringrequiredentry (entry), removal (removal) or transfer (transfer from the storageRemoval storage to the storage storage).
Accepted values: entry, removal, transfer.
quantitynumberrequiredQuantity, greater than zero. An integer for products measured in units; up to 3 decimal places for other measures.
productobjectrequiredFields of product
idstringrequiredProduct identifier.
storageobjectrequiredMovement storage. In a transfer, it is the destination storage.
Fields of storage
idstringrequiredStorage identifier.
storageRemovalobjectSource storage. Required when type is transfer, and different from storage.
Fields of storageRemoval
idstringrequiredSource storage identifier.
orderobjectWork order linked to the movement.
Fields of order
idstringWork order identifier.
identifierstringFree identifier of the movement in your process.
Up to 255 characters.Accepts: null.
descriptionstringMovement description.
Up to 1000 characters.Accepts: null.
externalobjectFields of external
idstringMovement identifier in your system.
Accepts: null.
minimalQuantitynumberMinimum quantity of the product in the storage. Only considered on the product's first entry into the storage.
minimalQuantityAtRisknumberQuantity 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 withoutstorageRemovalor 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.