curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"receipts": [
{
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 2
}
],
"dispatches": [
{
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations"
payload = {
"receipts": [
{
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 2
}
],
"dispatches": [
{
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"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({
receipts: [{transfer_line_id: '<string>', asset_id: '<string>', quantity: 2}],
dispatches: [
{
transfer_segment_id: '<string>',
transfer_line_id: '<string>',
asset_id: '<string>',
group_id: '<string>',
quantity: 2
}
]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations', 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}/steps/{step}/approve-operations",
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([
'receipts' => [
[
'transfer_line_id' => '<string>',
'asset_id' => '<string>',
'quantity' => 2
]
],
'dispatches' => [
[
'transfer_segment_id' => '<string>',
'transfer_line_id' => '<string>',
'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}/steps/{step}/approve-operations"
payload := strings.NewReader("{\n \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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}/steps/{step}/approve-operations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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}/steps/{step}/approve-operations")
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 \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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>",
"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>"
}
]
}{
"message": "<string>",
"errors": {}
}Approve a transfer step
Approves the next step so it becomes current and its planned stock movements are carried out.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"receipts": [
{
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 2
}
],
"dispatches": [
{
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"asset_id": "<string>",
"group_id": "<string>",
"quantity": 2
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations"
payload = {
"receipts": [
{
"transfer_line_id": "<string>",
"asset_id": "<string>",
"quantity": 2
}
],
"dispatches": [
{
"transfer_segment_id": "<string>",
"transfer_line_id": "<string>",
"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({
receipts: [{transfer_line_id: '<string>', asset_id: '<string>', quantity: 2}],
dispatches: [
{
transfer_segment_id: '<string>',
transfer_line_id: '<string>',
asset_id: '<string>',
group_id: '<string>',
quantity: 2
}
]
})
};
fetch('https://api.exowpee.com/v1/catalog/transfers/{transfer}/steps/{step}/approve-operations', 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}/steps/{step}/approve-operations",
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([
'receipts' => [
[
'transfer_line_id' => '<string>',
'asset_id' => '<string>',
'quantity' => 2
]
],
'dispatches' => [
[
'transfer_segment_id' => '<string>',
'transfer_line_id' => '<string>',
'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}/steps/{step}/approve-operations"
payload := strings.NewReader("{\n \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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}/steps/{step}/approve-operations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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}/steps/{step}/approve-operations")
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 \"receipts\": [\n {\n \"transfer_line_id\": \"<string>\",\n \"asset_id\": \"<string>\",\n \"quantity\": 2\n }\n ],\n \"dispatches\": [\n {\n \"transfer_segment_id\": \"<string>\",\n \"transfer_line_id\": \"<string>\",\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>",
"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>"
}
]
}{
"message": "<string>",
"errors": {}
}transfers.approve
Conditions
- The company does not need to own the transfer: once it is no longer a draft, a company that holds a location of one of its step groups can act.
- The step must be accessible to the company: it must hold a location of the step’s group.
- The transfer must be running and the step must belong to it.
- Only an upcoming step can be approved; no other step may be current; the previous step must be done or skipped.
- When receipts are sent, each line must arrive at this step, each location must be an accessible location of the step’s group, and received quantities per line are checked against what remains. When dispatches are sent, each segment must start from this step, a line must belong to its segment, a location/lot source may appear once per line, FIFO and explicit lots cannot be mixed for the same line and location, and an explicit lot must hold enough stock at that location.
- The step becomes current, with approver company, member and time.
- When receipts or dispatches are sent, the whole reception plan or dispatch plan of the step is replaced by the one sent; keys not sent keep the existing plan.
- Pending route leg costs up to this step are allocated to goods.
- Stock is received (stock in) at the receiving locations for segments arriving at this step, lines’ remaining quantity is reduced and segments get an end time; stock is withdrawn from the dispatch locations for lines leaving this step. Operations run once per step.
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 step, which must belong to the transfer.
Body
Reception plan of the step. When the key is sent it replaces all receptions already planned for the step (an empty list clears them).
Show child attributes
Show child attributes
Dispatch plan of the step. When sent it replaces all dispatches already planned for the step.
Show child attributes
Show child attributes
Response
TransferStepResource
Identifier of the step.
Identifier of the transfer.
Order of the step in the route, from 1.
Location group visited at this step.
upcoming (not reached), current (being operated), done or skipped.
When the planned stock movements of the step were executed, ISO 8601; null before.
Company that made the step current.
Member who made the step current.
When the step became current, ISO 8601.
Company that completed the step.
Member who completed the step.
When the step was completed, ISO 8601.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
The group of the step (id and name), when loaded.
Show child attributes
Show child attributes
Planned or executed receptions of goods at the locations of the step.
Show child attributes
Show child attributes
Planned or executed withdrawals of goods from the locations of the step.
Show child attributes
Show child attributes