curl --request PUT \
--url https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vendor_id": "<string>",
"reference": "<string>",
"replacement_expected": true,
"items": [
{
"stockable_id": "<string>",
"quantity": 123,
"stockable_unit_id": "<string>",
"stock_sources": [
{
"quantity": 123,
"asset_id": "<string>",
"group_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}"
payload = {
"vendor_id": "<string>",
"reference": "<string>",
"replacement_expected": True,
"items": [
{
"stockable_id": "<string>",
"quantity": 123,
"stockable_unit_id": "<string>",
"stock_sources": [
{
"quantity": 123,
"asset_id": "<string>",
"group_id": "<string>"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vendor_id: '<string>',
reference: '<string>',
replacement_expected: true,
items: [
{
stockable_id: '<string>',
quantity: 123,
stockable_unit_id: '<string>',
stock_sources: [{quantity: 123, asset_id: '<string>', group_id: '<string>'}]
}
]
})
};
fetch('https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}', 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/{vendor_return}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'vendor_id' => '<string>',
'reference' => '<string>',
'replacement_expected' => true,
'items' => [
[
'stockable_id' => '<string>',
'quantity' => 123,
'stockable_unit_id' => '<string>',
'stock_sources' => [
[
'quantity' => 123,
'asset_id' => '<string>',
'group_id' => '<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/vendor-returns/{vendor_return}"
payload := strings.NewReader("{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
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"
}
]
}{
"message": "<string>",
"errors": {}
}Edit a vendor return
Changes a draft return to a supplier.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"vendor_id": "<string>",
"reference": "<string>",
"replacement_expected": true,
"items": [
{
"stockable_id": "<string>",
"quantity": 123,
"stockable_unit_id": "<string>",
"stock_sources": [
{
"quantity": 123,
"asset_id": "<string>",
"group_id": "<string>"
}
]
}
]
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}"
payload = {
"vendor_id": "<string>",
"reference": "<string>",
"replacement_expected": True,
"items": [
{
"stockable_id": "<string>",
"quantity": 123,
"stockable_unit_id": "<string>",
"stock_sources": [
{
"quantity": 123,
"asset_id": "<string>",
"group_id": "<string>"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
vendor_id: '<string>',
reference: '<string>',
replacement_expected: true,
items: [
{
stockable_id: '<string>',
quantity: 123,
stockable_unit_id: '<string>',
stock_sources: [{quantity: 123, asset_id: '<string>', group_id: '<string>'}]
}
]
})
};
fetch('https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}', 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/{vendor_return}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'vendor_id' => '<string>',
'reference' => '<string>',
'replacement_expected' => true,
'items' => [
[
'stockable_id' => '<string>',
'quantity' => 123,
'stockable_unit_id' => '<string>',
'stock_sources' => [
[
'quantity' => 123,
'asset_id' => '<string>',
'group_id' => '<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/vendor-returns/{vendor_return}"
payload := strings.NewReader("{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendor-returns/{vendor_return}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"vendor_id\": \"<string>\",\n \"reference\": \"<string>\",\n \"replacement_expected\": true,\n \"items\": [\n {\n \"stockable_id\": \"<string>\",\n \"quantity\": 123,\n \"stockable_unit_id\": \"<string>\",\n \"stock_sources\": [\n {\n \"quantity\": 123,\n \"asset_id\": \"<string>\",\n \"group_id\": \"<string>\"\n }\n ]\n }\n ]\n}"
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"
}
]
}{
"message": "<string>",
"errors": {}
}vendor_returns.update
Conditions
- The supplier return must still be a draft.
- vendor_id and items cannot be changed here: they are refused.
- replacement_expected, when sent, cannot be true.
- The reference, when sent, must be unique among the company’s supplier returns (the return itself is ignored).
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).
Body
Identifier of the supplier the goods go back to (27-character KSUID string). Required when creating; it must be a supplier of the current company. Not accepted when changing a return.
Free reference of the return. Up to 255 characters, unique among the company's supplier returns.
255Whether a replacement is expected. Required when creating. Only false is accepted: replacement tracking is not supported for supplier returns.
Lines of the return. Optional when creating, at least one if sent; not accepted when changing a return (use the items routes).
1Show child attributes
Show child attributes
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