2.0info: 1.4.0 stock description: Estoque do Agro x-senior-domain: agro x-senior-domain-path: agro x-senior-service-path: stock contact: name: Senior X Platform url: https://dev.senior.com.br email: seniorx-dev@senior.com.brhost: api.senior.com.br /agro/stocksecurityDefinitions: bearerAuth: type: apiKey in: header name: Authorization – application/json – application/jsonparameters: clientId: name: client_id type: string in: header required: true description: Identificação da aplicação cadastrada no portal do desenvolvedor (api.xplatform.com.br)paths: /processStockMovementResult: post: description: Processar resultado de movimentação do estoque x-senior-event: false deprecated: false tags: – Endpoints security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – stockMovementId – status properties: stockMovementId: type: string description: Id da movimentação status: #/definitions/movementStatus message: type: string description: Mensagem de retorno do ERP externalStockMovementId: type: string description: Id da movimentação feita no ERP responses: 200: description: Ok default: description: Error response schema: #/definitions/genericError /registerStockEntry: post: description: Registrar entrada de estoque x-senior-event: false deprecated: false tags: – Signals security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – eventControlItemId – stockMovements properties: eventControlItemId: type: string description: Código do item no evento stockMovements: type: array items: #/definitions/stockMovementData description: Registro de movimentação de estoque responses: 200: description: Ok default: description: Error response schema: #/definitions/genericError /registerStockExit: post: description: Registrar saída de estoque x-senior-event: false deprecated: false tags: – Signals security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – eventControlItemId – stockMovements properties: eventControlItemId: type: string description: Código do item no evento stockMovements: type: array items: #/definitions/stockMovementData description: Registro de movimentação de estoque responses: 200: description: Ok default: description: Error response schema: #/definitions/genericError /stockMovementCreatedEvent: post: description: Evento de movimentação de estoque x-senior-event: true deprecated: false tags: – Events security: – bearerAuth: [] parameters: – #/parameters/clientId – name: input in: body required: true schema: type: object required: – companyId – branchId – producerId – productId – transactionId – warehouseId – quantity – movementDate – movementType properties: stockMovementId: type: string description: Id de referencia do movimento de estoque companyId: type: string description: Empresa branchId: type: string description: Filial producerId: type: string description: Fornecedor productId: type: string description: Produto transactionId: type: string description: Transação warehouseId: type: string description: Depósito quantity: type: number description: Quantidade movementDate: type: string description: Data do movimento movementType: #/definitions/movementType responses: 200: description: Ok default: description: Error response schema: #/definitions/genericErrordefinitions: movementType: type: string enum: – IN – OUT movementStatus: type: string enum: – PENDING – PROCESSED – ERROR – CANCELLED stockMovementData: type: object required: – companyId – branchId – producerId – productId – transactionId – warehouseId – quantity – movementDate properties: originReferenceId: type: string description: Id de referencia da origem do registro companyId: type: string description: Empresa branchId: type: string description: Filial producerId: type: string description: Fornecedor productId: type: string description: Produto transactionId: type: string description: Transação warehouseId: type: string description: Depósito quantity: type: number description: Quantidade format: double movementDate: type: string description: Data do movimento format: date genericError: properties: message: type: string description: Messaging describing the error. reason: type: string description: A symbolic code identifying the category of the reason of the error. enum: – BAD_REQUEST – UNAUTHORIZED – PAYMENT_REQUIRED – FORBIDDEN – OBJECT_NOT_FOUND – REQUEST_TIMEOUT – GONE – UNPROCESSABLE – INTERNAL_ERROR – NOT_IMPLEMENTED – SERVICE_UNAVAILABLE – INSUFFICIENT_STORAGE