curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"cost": "<string>",
"costs": "<string>",
"started_at": "<string>",
"ended_at": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments"
payload = {
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"cost": "<string>",
"costs": "<string>",
"started_at": "<string>",
"ended_at": "<string>"
}
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({
from_step_id: '<string>',
from_step_position: 2,
to_step_id: '<string>',
to_step_position: 2,
cost: '<string>',
costs: '<string>',
started_at: '<string>',
ended_at: '<string>'
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments', 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",
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([
'from_step_id' => '<string>',
'from_step_position' => 2,
'to_step_id' => '<string>',
'to_step_position' => 2,
'cost' => '<string>',
'costs' => '<string>',
'started_at' => '<string>',
'ended_at' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments")
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 \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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": {}
}Add a transfer segment
Adds a run between two steps of the transfer to carry goods on.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"cost": "<string>",
"costs": "<string>",
"started_at": "<string>",
"ended_at": "<string>"
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments"
payload = {
"from_step_id": "<string>",
"from_step_position": 2,
"to_step_id": "<string>",
"to_step_position": 2,
"cost": "<string>",
"costs": "<string>",
"started_at": "<string>",
"ended_at": "<string>"
}
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({
from_step_id: '<string>',
from_step_position: 2,
to_step_id: '<string>',
to_step_position: 2,
cost: '<string>',
costs: '<string>',
started_at: '<string>',
ended_at: '<string>'
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments', 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",
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([
'from_step_id' => '<string>',
'from_step_position' => 2,
'to_step_id' => '<string>',
'to_step_position' => 2,
'cost' => '<string>',
'costs' => '<string>',
'started_at' => '<string>',
'ended_at' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments")
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 \"from_step_id\": \"<string>\",\n \"from_step_position\": 2,\n \"to_step_id\": \"<string>\",\n \"to_step_position\": 2,\n \"cost\": \"<string>\",\n \"costs\": \"<string>\",\n \"started_at\": \"<string>\",\n \"ended_at\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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_segments.create
Conditions
- Only the company that owns the transfer can do this.
- The transfer must be in draft or running status.
- Each endpoint must be given by step id or by step position (at least one of the two); the step must belong to the transfer.
- The destination step must come after the source step in the route.
- When the transfer is running, neither step may be current, done or skipped.
- The route legs between the two steps must form a complete continuous path, otherwise the call is refused.
- A transfer cannot hold two segments with the same source and destination steps.
- cost, costs, started_at and ended_at are refused.
- Creates the segment with no start or end time and attaches the route legs between its two steps.
- Stock does not move.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the transfer.
Body
Identifier of the step the segment leaves from (27-character KSUID). Required unless from_step_position is sent.
27Position (starting at 1) of the step the segment leaves from, as an alternative to from_step_id. Required unless from_step_id is sent.
x >= 1Identifier of the step the segment arrives at (27-character KSUID). Required unless to_step_position is sent; it must come after the source step.
27Position (starting at 1) of the destination step, as an alternative to to_step_id. Required unless to_step_id is sent.
x >= 1Not accepted: segment costs come from the route-leg costs of the transfer, not from the segment.
Not accepted: segment costs come from the route-leg costs of the transfer, not from the segment.
Not accepted: the start time is set by the server.
Not accepted: the end time is set by the server.
Response
TransferSegmentResource
Identifier of the segment.
Identifier of the transfer.
Step the goods leave.
Step the goods go to; later in the route than the source.
When goods were first withdrawn for this segment, ISO 8601; null before.
When goods were first received at the destination, ISO 8601; null before.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Identifiers of the route legs the segment travels over.
Total of the segment's costs in minor units. Present only for the owner company.
Source step, when included.
Show child attributes
Show child attributes
Destination step, when included.
Show child attributes
Show child attributes
Costs allocated to the segment; shown to the owner company only.
Show child attributes
Show child attributes
Lines of goods carried by the segment.
Show child attributes
Show child attributes