curl --request POST \
--url https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm"
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/vendor-returns/{vendorReturn}/confirm', 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/vendor-returns/{vendorReturn}/confirm",
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/vendor-returns/{vendorReturn}/confirm"
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/vendor-returns/{vendorReturn}/confirm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm")
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>",
"vendor_id": "<string>",
"reference": "<string>",
"status": "<string>",
"replacement_expected": true,
"returned_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "<string>",
"return_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"stock_sources": "<array>",
"quantity": 123,
"cost_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}Confirm a vendor return
Finalizes a draft return to a supplier and takes the returned goods out of stock.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm"
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/vendor-returns/{vendorReturn}/confirm', 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/vendor-returns/{vendorReturn}/confirm",
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/vendor-returns/{vendorReturn}/confirm"
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/vendor-returns/{vendorReturn}/confirm")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendor-returns/{vendorReturn}/confirm")
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>",
"vendor_id": "<string>",
"reference": "<string>",
"status": "<string>",
"replacement_expected": true,
"returned_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"id": "<string>",
"return_id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"stock_sources": "<array>",
"quantity": 123,
"cost_total": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}vendor_returns.confirm
Conditions
- The supplier return must still be a draft; a confirmed return is refused with a conflict (409).
- replacement_expected cannot be true.
- The return must have at least one item (409).
- Every item is checked again against the stock tagged with this supplier in the chosen sources, after the quantities reserved by other drafts of the same supplier; insufficient stock is refused.
- Withdraws the quantity of each stock-tracked item from its stock sources (assets or groups), as a supplier-return stock operation.
- Records on each item the cost of the stock that left (cost_total, in minor units internally); untracked items keep a cost of 0.
- Sets the status to confirmed and returned_at to the time of confirmation. A confirmed return can no longer be edited or deleted.
- No accounting entry is posted and no purchase balance changes.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the vendor return (27-character KSUID string).
Response
VendorReturnResource
Identifier of the supplier return (27-character KSUID string).
Identifier of the supplier the goods go back to.
Free reference of the return, unique among the company's supplier returns.
Lifecycle status: draft while it can still be edited or deleted, confirmed once the goods have left stock.
Whether a replacement was expected. Always false today: replacement tracking is not supported.
Date and time the return was confirmed (ISO 8601); null while it is a draft.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Lines of the return, when loaded (they are on the show, create, update and confirm answers and on each item of the list).
Show child attributes
Show child attributes