curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reroute_quantity": 2,
"reroute_to_step_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"remaining_quantity": "<string>",
"stock_sources": "<string>",
"dispatches": "<string>",
"stock_withdrawals": "<string>",
"cost_minor": "<string>",
"cost_remainder_minor": "<string>",
"sources": [
{
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute"
payload = {
"reroute_quantity": 2,
"reroute_to_step_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"remaining_quantity": "<string>",
"stock_sources": "<string>",
"dispatches": "<string>",
"stock_withdrawals": "<string>",
"cost_minor": "<string>",
"cost_remainder_minor": "<string>",
"sources": [
{
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
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({
reroute_quantity: 2,
reroute_to_step_id: '<string>',
stockable_id: '<string>',
stockable_unit_id: '<string>',
remaining_quantity: '<string>',
stock_sources: '<string>',
dispatches: '<string>',
stock_withdrawals: '<string>',
cost_minor: '<string>',
cost_remainder_minor: '<string>',
sources: [{asset_id: '<string>', group_id: '<string>', quantity: 2}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute', 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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute",
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([
'reroute_quantity' => 2,
'reroute_to_step_id' => '<string>',
'stockable_id' => '<string>',
'stockable_unit_id' => '<string>',
'remaining_quantity' => '<string>',
'stock_sources' => '<string>',
'dispatches' => '<string>',
'stock_withdrawals' => '<string>',
'cost_minor' => '<string>',
'cost_remainder_minor' => '<string>',
'sources' => [
[
'asset_id' => '<string>',
'group_id' => '<string>',
'quantity' => 2
]
]
]),
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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute"
payload := strings.NewReader("{\n \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute")
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 \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"original_line": {
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
},
"rerouted_line": {
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
},
"reroute_segment": {
"id": "<string>",
"transfer_id": "<string>",
"from_step_id": "<string>",
"to_step_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"route_leg_ids": "<array>",
"cost_total_minor": 123,
"from_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"to_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"costs": [
{
"id": "<string>",
"transfer_segment_id": "<string>",
"transfer_route_leg_cost_id": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"label": "<string>",
"amount": 123,
"amount_minor": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"lines": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
}
]
}
}{
"message": "<string>",
"errors": {}
}Reroute goods in transit
Sends the remaining quantity of a line that has already left to a different destination step.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reroute_quantity": 2,
"reroute_to_step_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"remaining_quantity": "<string>",
"stock_sources": "<string>",
"dispatches": "<string>",
"stock_withdrawals": "<string>",
"cost_minor": "<string>",
"cost_remainder_minor": "<string>",
"sources": [
{
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute"
payload = {
"reroute_quantity": 2,
"reroute_to_step_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"remaining_quantity": "<string>",
"stock_sources": "<string>",
"dispatches": "<string>",
"stock_withdrawals": "<string>",
"cost_minor": "<string>",
"cost_remainder_minor": "<string>",
"sources": [
{
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
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({
reroute_quantity: 2,
reroute_to_step_id: '<string>',
stockable_id: '<string>',
stockable_unit_id: '<string>',
remaining_quantity: '<string>',
stock_sources: '<string>',
dispatches: '<string>',
stock_withdrawals: '<string>',
cost_minor: '<string>',
cost_remainder_minor: '<string>',
sources: [{asset_id: '<string>', group_id: '<string>', quantity: 2}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute', 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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute",
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([
'reroute_quantity' => 2,
'reroute_to_step_id' => '<string>',
'stockable_id' => '<string>',
'stockable_unit_id' => '<string>',
'remaining_quantity' => '<string>',
'stock_sources' => '<string>',
'dispatches' => '<string>',
'stock_withdrawals' => '<string>',
'cost_minor' => '<string>',
'cost_remainder_minor' => '<string>',
'sources' => [
[
'asset_id' => '<string>',
'group_id' => '<string>',
'quantity' => 2
]
]
]),
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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute"
payload := strings.NewReader("{\n \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\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.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/reroute")
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 \"reroute_quantity\": 2,\n \"reroute_to_step_id\": \"<string>\",\n \"stockable_id\": \"<string>\",\n \"stockable_unit_id\": \"<string>\",\n \"remaining_quantity\": \"<string>\",\n \"stock_sources\": \"<string>\",\n \"dispatches\": \"<string>\",\n \"stock_withdrawals\": \"<string>\",\n \"cost_minor\": \"<string>\",\n \"cost_remainder_minor\": \"<string>\",\n \"sources\": [\n {\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\",\n \"quantity\": 2\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"original_line": {
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
},
"rerouted_line": {
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
},
"reroute_segment": {
"id": "<string>",
"transfer_id": "<string>",
"from_step_id": "<string>",
"to_step_id": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"route_leg_ids": "<array>",
"cost_total_minor": 123,
"from_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"to_step": {
"id": "<string>",
"transfer_id": "<string>",
"position": 123,
"location_group_id": "<string>",
"status": "<string>",
"operations_executed_at": "2023-11-07T05:31:56Z",
"approved_by_company_id": "<string>",
"approved_by_user_id": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"completed_by_company_id": "<string>",
"completed_by_user_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"location_group": {
"id": "<string>",
"name": "<string>"
},
"receipts": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
]
},
"costs": [
{
"id": "<string>",
"transfer_segment_id": "<string>",
"transfer_route_leg_cost_id": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"label": "<string>",
"amount": 123,
"amount_minor": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"lines": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_segment_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"base_quantity": 123,
"remaining_quantity": 123,
"in_transit_quantity": 123,
"created_by_company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"resolutions": [
{
"id": "<string>",
"transfer_id": "<string>",
"transfer_line_id": "<string>",
"transfer_step_id": "<string>",
"type": "<string>",
"quantity": 123,
"reason": "<string>",
"company_id": "<string>",
"creator_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"dispatches": [
{
"id": "<string>",
"transfer_step_id": "<string>",
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"position": 123,
"asset_id": "<string>",
"group_id": "<string>",
"vendor_name": "<string>",
"quantity": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"asset_name": "<string>"
}
],
"stockable": {
"id": "<string>",
"title": "<string>"
},
"stockable_unit": {
"id": "<string>",
"name": "<string>"
}
}
]
}
}{
"message": "<string>",
"errors": {}
}transfer_lines.reroute
Conditions
- The transfer must be visible to the current company and must be running.
- The company must own the transfer or be the company that created the line.
- The line must already have left: its withdrawn stock must match its quantity, and no destination reception may be recorded.
- The line’s remaining quantity must still equal its base quantity.
- reroute_quantity must be at least 1 and strictly less than the line’s base quantity, so some goods stay on the original destination.
- The original destination step must still be upcoming; the new step must belong to the transfer, be upcoming and come after the original destination.
- When sources are sent they must match the original dispatch intent: the asset (and group) must have been dispatched and the quantity cannot exceed what was dispatched.
- Item, unit, remaining quantity, dispatches, stock withdrawals and cost fields are refused.
- Creates a new line on the reroute segment carrying reroute_quantity, with the matching share of withdrawn stock, and reduces the original line to the quantity that remains.
- Reuses the segment from the same source step to the new step, or creates it with its start time set to now.
- Moves the share of the original segment’s route costs that belongs to the rerouted goods to the reroute segment.
- Splits the planned dispatches between the two lines.
- This action keeps its own response shape (original_line, rerouted_line, reroute_segment).
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the transfer.
Identifier of the transfer segment (27-character KSUID).
Identifier of the transfer line (27-character KSUID).
Body
Quantity of the line to send to the new destination, in the line's unit. Required, at least 1 and strictly less than the line's base quantity.
x >= 1Identifier of the transfer step (27-character KSUID) that receives the rerouted goods. Required; it must belong to the transfer, still be upcoming and come after the line's current destination.
27Not accepted: the rerouted line keeps the item of the original line.
Not accepted: the rerouted line keeps the unit of the original line.
Not accepted: the server computes the remaining quantities of both lines from reroute_quantity.
Not accepted: use sources to choose where the rerouted goods come from.
Not accepted: the planned dispatches are split by the server between the original and the rerouted line.
Not accepted: the withdrawals come from the stock already withdrawn for the original line.
Not accepted: route costs are moved by the server in proportion to the goods rerouted.
Not accepted: route costs are moved by the server in proportion to the goods rerouted.
Optional choice of the dispatched sources the rerouted quantity is taken from. Each entry must match a source of the original dispatch plan; when omitted the server picks the withdrawn stock itself.
1Show child attributes
Show child attributes
Response
TransferLineRerouteResource
The original line after the reroute, reduced to the quantity that stays on its destination.
Show child attributes
Show child attributes
The new line carrying the rerouted quantity to the new destination step.
Show child attributes
Show child attributes
The segment from the original source step to the new destination step that carries the rerouted line; created by the call when none existed.
Show child attributes
Show child attributes