curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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 line
Adds a quantity of an item to move on a segment of a transfer.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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.create
Conditions
- Only the company that owns the transfer can do this.
- The transfer must be in draft or running status.
- Neither step of the segment may be current, done or skipped.
- stockable_id and base_quantity (at least 1) are required; the item must be tracked in inventory.
- A stockable_unit_id must belong to that item.
- When dispatches are sent, each asset must be a location of the source step’s location group that the company can use, the dispatched quantities must add up to base_quantity, a source cannot be repeated, and FIFO and explicit group dispatches cannot be mixed for one asset.
- remaining_quantity, stock_withdrawals, stock_sources, cost fields and reroute fields are refused.
- Creates the line with remaining_quantity equal to base_quantity, no withdrawals, and records the current company and user as creators.
- Replaces nothing else; stock does not move until the transfer steps are executed.
- Saves the planned dispatches when dispatches are sent.
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).
Response
TransferLineResource
Identifier of the line (27-character KSUID).
Identifier of the transfer.
Identifier of the segment carrying the line.
Identifier of the item transferred.
Unit of the quantities; null when they are in the base unit.
Quantity planned for the line, in the line's unit.
Quantity not yet received at the destination, in the line's unit; it decreases with receptions and loss declarations.
Quantity already withdrawn from stock and still on its way: equal to remaining_quantity once withdrawals are executed, otherwise 0.
Company that created the line; a rerouted line keeps the company of the original line.
Member who created the line; null when unknown.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Loss declarations of the line; present only when loaded.
Show child attributes
Show child attributes
Planned or recorded sources the goods leave from, with asset, group and quantity.
Show child attributes
Show child attributes
Summary of the item.
Show child attributes
Show child attributes
Summary of the unit; null when the line uses the base unit.
Show child attributes
Show child attributes