Stock
Create a stock transfer
POST
/
v1
/
stocks
/
transfer
Create a stock transfer
curl --request POST \
--url https://dev.flextell.ai/api/v1/stocks/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"product_id": 2,
"source_warehouse_id": 2,
"destination_warehouse_id": 2,
"quantity": 1.0001,
"notes": "<string>"
}
'{
"success": "<string>",
"data": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"source_warehouse": {
"id": 123,
"name": "<string>"
},
"destination_warehouse": {
"id": 123,
"name": "<string>"
},
"quantity": 123,
"unit_label": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"transferred_at": "2023-11-07T05:31:56Z",
"source_movement": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"destination_movement": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"movements": [
{
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}Authorizations
oauth2bearer
The access token received from the authorization server in the OAuth 2.0 flow.
Headers
Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.
Body
application/json
Filter by product ID.
Required range:
x >= 1Source warehouse ID.
Required range:
x >= 1Destination warehouse ID.
Required range:
x >= 1The quantity value.
Required range:
x >= 0.0001Internal notes.
Maximum string length:
65535⌘I
Create a stock transfer
curl --request POST \
--url https://dev.flextell.ai/api/v1/stocks/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Tenant: <x-tenant>' \
--data '
{
"product_id": 2,
"source_warehouse_id": 2,
"destination_warehouse_id": 2,
"quantity": 1.0001,
"notes": "<string>"
}
'{
"success": "<string>",
"data": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"source_warehouse": {
"id": 123,
"name": "<string>"
},
"destination_warehouse": {
"id": 123,
"name": "<string>"
},
"quantity": 123,
"unit_label": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"transferred_at": "2023-11-07T05:31:56Z",
"source_movement": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"destination_movement": {
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"movements": [
{
"id": 123,
"product": {
"id": 123,
"name": "<string>"
},
"warehouse": {
"id": 123,
"name": "<string>"
},
"type": "<string>",
"direction": "<string>",
"quantity": 123,
"unit_label": "<string>",
"reference": "<string>",
"user": {
"id": 123,
"name": "<string>"
},
"notes": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}
}