Create VAS by return inventory ID
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"createVasList": [
{
"returnInventoryId": "<string>",
"createVasDetailList": [
{
"vasCode": "<string>",
"notes": "<string>",
"metaQuantity": 123,
"vasFileList": [
{
"filename": "<string>",
"fileKey": "<string>"
}
]
}
]
}
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId"
payload = { "createVasList": [
{
"returnInventoryId": "<string>",
"createVasDetailList": [
{
"vasCode": "<string>",
"notes": "<string>",
"metaQuantity": 123,
"vasFileList": [
{
"filename": "<string>",
"fileKey": "<string>"
}
]
}
]
}
] }
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
createVasList: [
{
returnInventoryId: '<string>',
createVasDetailList: [
{
vasCode: '<string>',
notes: '<string>',
metaQuantity: 123,
vasFileList: [{filename: '<string>', fileKey: '<string>'}]
}
]
}
]
})
};
fetch('https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId', 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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId",
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([
'createVasList' => [
[
'returnInventoryId' => '<string>',
'createVasDetailList' => [
[
'vasCode' => '<string>',
'notes' => '<string>',
'metaQuantity' => 123,
'vasFileList' => [
[
'filename' => '<string>',
'fileKey' => '<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId"
payload := strings.NewReader("{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"returnRequestLineItemId": 123,
"createVasDetailList": [
{}
]
}
]
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}Vas
Create VAS by return inventory ID
Create value-added service requests for one or more return inventories. Inventory must be set to On-hold handling before creating VAS. Split parcel VAS must be submitted separately from other VAS types.
POST
/
api
/
Vas
/
CreateByReturnInventoryId
Create VAS by return inventory ID
curl --request POST \
--url https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId \
--header 'Content-Type: application/json' \
--header 'x-rr-apikey: <api-key>' \
--header 'x-rr-apitoken: <api-key>' \
--data '
{
"createVasList": [
{
"returnInventoryId": "<string>",
"createVasDetailList": [
{
"vasCode": "<string>",
"notes": "<string>",
"metaQuantity": 123,
"vasFileList": [
{
"filename": "<string>",
"fileKey": "<string>"
}
]
}
]
}
]
}
'import requests
url = "https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId"
payload = { "createVasList": [
{
"returnInventoryId": "<string>",
"createVasDetailList": [
{
"vasCode": "<string>",
"notes": "<string>",
"metaQuantity": 123,
"vasFileList": [
{
"filename": "<string>",
"fileKey": "<string>"
}
]
}
]
}
] }
headers = {
"x-rr-apikey": "<api-key>",
"x-rr-apitoken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-rr-apikey': '<api-key>',
'x-rr-apitoken': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
createVasList: [
{
returnInventoryId: '<string>',
createVasDetailList: [
{
vasCode: '<string>',
notes: '<string>',
metaQuantity: 123,
vasFileList: [{filename: '<string>', fileKey: '<string>'}]
}
]
}
]
})
};
fetch('https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId', 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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId",
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([
'createVasList' => [
[
'returnInventoryId' => '<string>',
'createVasDetailList' => [
[
'vasCode' => '<string>',
'notes' => '<string>',
'metaQuantity' => 123,
'vasFileList' => [
[
'filename' => '<string>',
'fileKey' => '<string>'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-rr-apikey: <api-key>",
"x-rr-apitoken: <api-key>"
],
]);
$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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId"
payload := strings.NewReader("{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-rr-apikey", "<api-key>")
req.Header.Add("x-rr-apitoken", "<api-key>")
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.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId")
.header("x-rr-apikey", "<api-key>")
.header("x-rr-apitoken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.returnshelper.com/uat/user/api/Vas/CreateByReturnInventoryId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-rr-apikey"] = '<api-key>'
request["x-rr-apitoken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"createVasList\": [\n {\n \"returnInventoryId\": \"<string>\",\n \"createVasDetailList\": [\n {\n \"vasCode\": \"<string>\",\n \"notes\": \"<string>\",\n \"metaQuantity\": 123,\n \"vasFileList\": [\n {\n \"filename\": \"<string>\",\n \"fileKey\": \"<string>\"\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"returnRequestLineItemId": 123,
"createVasDetailList": [
{}
]
}
]
}{
"correlationId": "<string>",
"meta": {
"status": 123,
"data": {},
"errorCode": "<string>",
"error": {}
}
}Requests one or more value-added services (VAS) on received return inventory — quality inspection, repackaging, photo, split-parcel, etc. The warehouse executes the VAS and reports results back via subsequent webhook events.
Prerequisites
- Target inventory items exist and belong to your account. The
returnInventoryIdvalues come from thenewInventoryCreatedwebhook event — cache them on your side as parcels are logged. - Each target inventory’s
handlingCodemust beohd(on-hold). VAS is only allowed while the inventory is on-hold; if it’s already in another handling pathway, move it back to on-hold first via Update return inventory handling. - Pick valid
vasCodevalues from Get all VAS.
Required fields
createVasList— non-empty list of payloads. Each payload covers one inventory and one or more VAS requests on it.
returnInventoryId— string that parses to a long; must exist and be on-hold.createVasDetailList— list of VAS detail objects, each carrying avasCodeand any VAS-specific fields.
returnInventoryId values across the whole batch must be unique — you cannot create two payloads for the same inventory in one call.
Split-parcel rule
If any VAS in a payload usesvasCode: SPLIT_PARCEL:
- It must be the only VAS in that payload’s
createVasDetailList(you can’t combine split-parcel with other VAS in a single payload for the same inventory). - File attachments are allowed (and typically required) only for
SPLIT_PARCEL. Other VAS codes cannot have file attachments.
Side effects
- The inventory’s handling stays at
ohdwhile VAS is pending. - Subsequent webhook events report progress:
vasUpdated, ,splitLineItemandnewInventoryCreated(For parcel split). - For split-parcel VAS, completion may produce additional inventory records (the split items).
Related
- Get all VAS — valid
vasCodevalues. - Get all VAS statuses — code-to-label mappings for VAS lifecycle.
- Update return inventory handling — move an inventory back to
ohdif it’s left that state. - Webhooks — the
vasUpdatedevent reports VAS lifecycle progress to your endpoint.
Authorizations
Your API key
Your API token — keep this private
Body
application/json
List of VAS creation payloads grouped by return inventory ID
Show child attributes
Show child attributes
Response
Success
List of created VAS
Show child attributes
Show child attributes