curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/resolutions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "loss",
"quantity": 2,
"reason": "<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}/resolutions"
payload = {
"type": "loss",
"quantity": 2,
"reason": "<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({
type: 'loss',
quantity: 2,
reason: '<string>',
sources: [{asset_id: '<string>', group_id: '<string>', quantity: 2}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/resolutions', 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}/resolutions",
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([
'type' => 'loss',
'quantity' => 2,
'reason' => '<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}/resolutions"
payload := strings.NewReader("{\n \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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}/resolutions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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}/resolutions")
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 \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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{
"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"
}{
"message": "<string>",
"errors": {}
}Declare transferred goods lost
Records that part of the goods already withdrawn for a transfer line were lost and will not arrive.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/resolutions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "loss",
"quantity": 2,
"reason": "<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}/resolutions"
payload = {
"type": "loss",
"quantity": 2,
"reason": "<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({
type: 'loss',
quantity: 2,
reason: '<string>',
sources: [{asset_id: '<string>', group_id: '<string>', quantity: 2}]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/segments/{segment}/lines/{line}/resolutions', 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}/resolutions",
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([
'type' => 'loss',
'quantity' => 2,
'reason' => '<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}/resolutions"
payload := strings.NewReader("{\n \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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}/resolutions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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}/resolutions")
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 \"type\": \"loss\",\n \"quantity\": 2,\n \"reason\": \"<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{
"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"
}{
"message": "<string>",
"errors": {}
}transfers.resolve-loss
Conditions
- Requires the transfers.resolve-loss permission.
- The company must own the transfer or be able to operate the destination step of the segment; the transfer must be visible to it.
- The transfer must be running.
- The line must have executed withdrawals and no destination reception may be recorded.
- quantity must be between 1 and the line’s remaining quantity and cannot exceed the withdrawn quantity left.
- type must be loss, the only supported type.
- When sources are sent they must match the original dispatch intent.
- Reduces the line’s remaining quantity and withdrawn stock by the lost quantity.
- Removes from the segment the share of route costs that belonged to the lost goods and records it on the resolution (route cost in minor units).
- Creates the resolution, which is attached to the destination step and cannot be removed through the API.
- The goods are not returned to stock and no stock entry is created by this call.
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
Kind of resolution. Only loss is supported: part of the goods withdrawn for the line will not arrive. Required.
loss Quantity declared lost, in the line's unit, between 1 and the line's remaining quantity. Required.
x >= 1Optional free text explaining the loss.
Optional choice of the dispatched sources the lost quantity is taken from. Entries must match the original dispatch plan; when omitted the server picks the withdrawn stock itself.
1Show child attributes
Show child attributes
Response
TransferLineResolutionResource
Identifier of the resolution (27-character KSUID).
Identifier of the transfer.
Identifier of the line the loss is declared on.
Destination step of the line's segment, where the goods were expected.
Kind of resolution; only loss exists.
Quantity declared lost, in the line's unit.
Free text given with the declaration; null when none.
Identifier of the company the record belongs to.
Member who recorded the declaration; null when unknown.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).