Crear transferencia de stock
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/stock-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_date": "2023-11-07T05:31:56Z",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"notes": "<string>",
"save_as_draft": true,
"mark_as_received": true
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/stock-transfers"
payload = {
"source_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_date": "2023-11-07T05:31:56Z",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"notes": "<string>",
"save_as_draft": True,
"mark_as_received": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_warehouse_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_warehouse_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
transfer_date: '2023-11-07T05:31:56Z',
items: [{product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
notes: '<string>',
save_as_draft: true,
mark_as_received: true
})
};
fetch('https://api.lapyme.com.ar/api/v1/stock-transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lapyme.com.ar/api/v1/stock-transfers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_warehouse_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_warehouse_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'transfer_date' => '2023-11-07T05:31:56Z',
'items' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'notes' => '<string>',
'save_as_draft' => true,
'mark_as_received' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lapyme.com.ar/api/v1/stock-transfers"
payload := strings.NewReader("{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lapyme.com.ar/api/v1/stock-transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/stock-transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}"
response = http.request(request)
puts response.read_body{
"request_id": "req_transfer_commit_1",
"data": {
"transfer": {
"id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
"organization_id": "550e8400-e29b-41d4-a716-446655440001",
"source_warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
"target_warehouse_id": "550e8400-e29b-41d4-a716-446655440011",
"transfer_date": "2026-04-18T13:00:00.000Z",
"notes": "Storefront replenishment",
"status": "in_transit",
"created_at": "2026-04-18T13:00:00.000Z",
"updated_at": "2026-04-18T13:05:00.000Z",
"created_by": "550e8400-e29b-41d4-a716-446655440020",
"updated_by": "550e8400-e29b-41d4-a716-446655440020",
"source_warehouse": {
"id": "550e8400-e29b-41d4-a716-446655440010",
"name": "Central warehouse"
},
"target_warehouse": {
"id": "550e8400-e29b-41d4-a716-446655440011",
"name": "Showroom"
},
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440030",
"product_id": "550e8400-e29b-41d4-a716-446655440040",
"quantity": 5,
"received_quantity": 0,
"rejected_quantity": 0,
"product": {
"id": "550e8400-e29b-41d4-a716-446655440040",
"name": "Cable HDMI 2m",
"sku": "HDMI-2M",
"variant_options": null,
"option_names": []
}
}
]
},
"idempotent_replay": false
},
"warnings": []
}{
"request_id": "req_transfer_1",
"error": {
"code": "VALIDATION_ERROR",
"message": "Source and target warehouses must be different",
"retryable": false,
"details": [
{
"field": "source_warehouse_id",
"code": "VALIDATION",
"message": "The source warehouse must be different from the target warehouse."
}
],
"type": "invalid_request_error"
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "API key is required in the Authorization header",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "FORBIDDEN",
"message": "Your API key does not have permission for this operation",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "NOT_FOUND",
"message": "Transfer not found",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "CONFLICT",
"message": "Stock insuficiente para transferir 5 unidades.",
"retryable": false,
"details": [
{
"field": "items",
"code": "CONFLICT",
"message": "Stock insuficiente para transferir 5 unidades."
}
],
"type": "invalid_request_error"
}
}{
"request_id": "req_rate_limit_1",
"error": {
"type": "rate_limit_error",
"code": "RATE_LIMITED",
"message": "The organization request limit was reached. Try again later.",
"retryable": true,
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "INTERNAL_ERROR",
"message": "Could not process the stock transfer",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}Crear transferencia de stock
Crea una transferencia para mover productos entre depósitos.
POST
/
api
/
v1
/
stock-transfers
Crear transferencia de stock
curl --request POST \
--url https://api.lapyme.com.ar/api/v1/stock-transfers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_date": "2023-11-07T05:31:56Z",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"notes": "<string>",
"save_as_draft": true,
"mark_as_received": true
}
'import requests
url = "https://api.lapyme.com.ar/api/v1/stock-transfers"
payload = {
"source_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_warehouse_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_date": "2023-11-07T05:31:56Z",
"items": [
{
"product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 2
}
],
"notes": "<string>",
"save_as_draft": True,
"mark_as_received": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_warehouse_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_warehouse_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
transfer_date: '2023-11-07T05:31:56Z',
items: [{product_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', quantity: 2}],
notes: '<string>',
save_as_draft: true,
mark_as_received: true
})
};
fetch('https://api.lapyme.com.ar/api/v1/stock-transfers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lapyme.com.ar/api/v1/stock-transfers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_warehouse_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_warehouse_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'transfer_date' => '2023-11-07T05:31:56Z',
'items' => [
[
'product_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'quantity' => 2
]
],
'notes' => '<string>',
'save_as_draft' => true,
'mark_as_received' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lapyme.com.ar/api/v1/stock-transfers"
payload := strings.NewReader("{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lapyme.com.ar/api/v1/stock-transfers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lapyme.com.ar/api/v1/stock-transfers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_warehouse_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"transfer_date\": \"2023-11-07T05:31:56Z\",\n \"items\": [\n {\n \"product_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"quantity\": 2\n }\n ],\n \"notes\": \"<string>\",\n \"save_as_draft\": true,\n \"mark_as_received\": true\n}"
response = http.request(request)
puts response.read_body{
"request_id": "req_transfer_commit_1",
"data": {
"transfer": {
"id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
"organization_id": "550e8400-e29b-41d4-a716-446655440001",
"source_warehouse_id": "550e8400-e29b-41d4-a716-446655440010",
"target_warehouse_id": "550e8400-e29b-41d4-a716-446655440011",
"transfer_date": "2026-04-18T13:00:00.000Z",
"notes": "Storefront replenishment",
"status": "in_transit",
"created_at": "2026-04-18T13:00:00.000Z",
"updated_at": "2026-04-18T13:05:00.000Z",
"created_by": "550e8400-e29b-41d4-a716-446655440020",
"updated_by": "550e8400-e29b-41d4-a716-446655440020",
"source_warehouse": {
"id": "550e8400-e29b-41d4-a716-446655440010",
"name": "Central warehouse"
},
"target_warehouse": {
"id": "550e8400-e29b-41d4-a716-446655440011",
"name": "Showroom"
},
"items": [
{
"id": "550e8400-e29b-41d4-a716-446655440030",
"product_id": "550e8400-e29b-41d4-a716-446655440040",
"quantity": 5,
"received_quantity": 0,
"rejected_quantity": 0,
"product": {
"id": "550e8400-e29b-41d4-a716-446655440040",
"name": "Cable HDMI 2m",
"sku": "HDMI-2M",
"variant_options": null,
"option_names": []
}
}
]
},
"idempotent_replay": false
},
"warnings": []
}{
"request_id": "req_transfer_1",
"error": {
"code": "VALIDATION_ERROR",
"message": "Source and target warehouses must be different",
"retryable": false,
"details": [
{
"field": "source_warehouse_id",
"code": "VALIDATION",
"message": "The source warehouse must be different from the target warehouse."
}
],
"type": "invalid_request_error"
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "AUTHENTICATION_REQUIRED",
"message": "API key is required in the Authorization header",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "FORBIDDEN",
"message": "Your API key does not have permission for this operation",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "NOT_FOUND",
"message": "Transfer not found",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "CONFLICT",
"message": "Stock insuficiente para transferir 5 unidades.",
"retryable": false,
"details": [
{
"field": "items",
"code": "CONFLICT",
"message": "Stock insuficiente para transferir 5 unidades."
}
],
"type": "invalid_request_error"
}
}{
"request_id": "req_rate_limit_1",
"error": {
"type": "rate_limit_error",
"code": "RATE_LIMITED",
"message": "The organization request limit was reached. Try again later.",
"retryable": true,
"details": []
}
}{
"request_id": "req_transfer_1",
"error": {
"code": "INTERNAL_ERROR",
"message": "Could not process the stock transfer",
"retryable": false,
"type": "invalid_request_error",
"details": []
}
}Authorizations
Incluí tu API key en el header Authorization con el prefijo Bearer.
Headers
Clave opcional para deduplicar reintentos de la misma creación de transferencia. Si se omite, no hay protección automática contra repeticiones.
ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.
Body
application/json
Was this page helpful?
⌘I

