cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/return_vendor_authorizations" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"return_vendor_authorization": {
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": true,
"lines": [
{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1
}
]
}
}'from exsited import build_client
client = build_client()
response = client.return_vendor_authorizations.create_return_vendor_authorization(
{
"return_vendor_authorization": {
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": True,
"lines": [
{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1,
}
],
}
}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.returnVendorAuthorizations.createReturnVendorAuthorization({
return_vendor_authorization: {
purchase_order: 'PURCHASE_ORDER_ID',
create_as_draft: true,
lines: [{purchase_order_line: 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c', rva_qty: 1}],
},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->returnVendorAuthorizations->createReturnVendorAuthorization([
'return_vendor_authorization' => [
'purchase_order' => 'PURCHASE_ORDER_ID',
'create_as_draft' => true,
'lines' => [
['purchase_order_line' => 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c', 'rva_qty' => 1],
],
],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.return_vendor_authorizations.return_vendor_authorizations_dto.ReturnVendorAuthorizationsDto.ReturnVendorAuthorizationView;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<ReturnVendorAuthorizationView> response = client.returnVendorAuthorizations().createReturnVendorAuthorization(
Map.of(
"return_vendor_authorization", Map.of(
"purchase_order", "PURCHASE_ORDER_ID",
"create_as_draft", true,
"lines", List.of(
Map.of(
"purchase_order_line", "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty", 1)))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.ReturnVendorAuthorizations.CreateReturnVendorAuthorizationAsync(new Dictionary<string, object?>
{
["return_vendor_authorization"] = new Dictionary<string, object?>
{
["purchase_order"] = "PURCHASE_ORDER_ID",
["create_as_draft"] = true,
["lines"] = new List<object?>
{
new Dictionary<string, object?>
{
["purchase_order_line"] = "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
["rva_qty"] = 1,
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.returnVendorAuthorizations
.createReturnVendorAuthorization({
'return_vendor_authorization': {
'purchase_order': 'PURCHASE_ORDER_ID',
'create_as_draft': true,
'lines': [
{
'purchase_order_line': 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c',
'rva_qty': 1,
},
],
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.ReturnVendorAuthorizations().CreateReturnVendorAuthorization(context.Background(), map[string]any{
"return_vendor_authorization": map[string]any{
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": true,
"lines": []any{
map[string]any{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1,
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"return_vendor_authorization": {
"account": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"code": "<string>",
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"href": "<string>",
"id": "<string>",
"item_count": 123,
"last_updated_by": "<unknown>",
"last_updated_on": "<unknown>",
"note": "<string>",
"object": "<string>",
"purchase_order": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"object": "<string>"
},
"return_status": "<string>",
"rva_date": "<string>",
"status": "<string>",
"version": 123,
"lines": [
"<unknown>"
],
"receive_rvas": [
"<unknown>"
]
}
}Return vendor authorizations
Create a return vendor authorization
Creates a return to a supplier for purchase order lines and returns it under return_vendor_authorization.
POST
/
return_vendor_authorizations
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/return_vendor_authorizations" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"return_vendor_authorization": {
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": true,
"lines": [
{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1
}
]
}
}'from exsited import build_client
client = build_client()
response = client.return_vendor_authorizations.create_return_vendor_authorization(
{
"return_vendor_authorization": {
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": True,
"lines": [
{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1,
}
],
}
}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.returnVendorAuthorizations.createReturnVendorAuthorization({
return_vendor_authorization: {
purchase_order: 'PURCHASE_ORDER_ID',
create_as_draft: true,
lines: [{purchase_order_line: 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c', rva_qty: 1}],
},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->returnVendorAuthorizations->createReturnVendorAuthorization([
'return_vendor_authorization' => [
'purchase_order' => 'PURCHASE_ORDER_ID',
'create_as_draft' => true,
'lines' => [
['purchase_order_line' => 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c', 'rva_qty' => 1],
],
],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.return_vendor_authorizations.return_vendor_authorizations_dto.ReturnVendorAuthorizationsDto.ReturnVendorAuthorizationView;
import java.util.List;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<ReturnVendorAuthorizationView> response = client.returnVendorAuthorizations().createReturnVendorAuthorization(
Map.of(
"return_vendor_authorization", Map.of(
"purchase_order", "PURCHASE_ORDER_ID",
"create_as_draft", true,
"lines", List.of(
Map.of(
"purchase_order_line", "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty", 1)))));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.ReturnVendorAuthorizations.CreateReturnVendorAuthorizationAsync(new Dictionary<string, object?>
{
["return_vendor_authorization"] = new Dictionary<string, object?>
{
["purchase_order"] = "PURCHASE_ORDER_ID",
["create_as_draft"] = true,
["lines"] = new List<object?>
{
new Dictionary<string, object?>
{
["purchase_order_line"] = "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
["rva_qty"] = 1,
},
},
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.returnVendorAuthorizations
.createReturnVendorAuthorization({
'return_vendor_authorization': {
'purchase_order': 'PURCHASE_ORDER_ID',
'create_as_draft': true,
'lines': [
{
'purchase_order_line': 'line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c',
'rva_qty': 1,
},
],
},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.ReturnVendorAuthorizations().CreateReturnVendorAuthorization(context.Background(), map[string]any{
"return_vendor_authorization": map[string]any{
"purchase_order": "PURCHASE_ORDER_ID",
"create_as_draft": true,
"lines": []any{
map[string]any{
"purchase_order_line": "line_3f2a9c1e7b4d4e8a9c0b1d2e3f4a5b6c",
"rva_qty": 1,
},
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"return_vendor_authorization": {
"account": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"code": "<string>",
"created_by": {
"name": "<string>",
"object": "<string>"
},
"created_on": "<string>",
"href": "<string>",
"id": "<string>",
"item_count": 123,
"last_updated_by": "<unknown>",
"last_updated_on": "<unknown>",
"note": "<string>",
"object": "<string>",
"purchase_order": {
"code": "<string>",
"href": "<string>",
"id": "<string>",
"object": "<string>"
},
"return_status": "<string>",
"rva_date": "<string>",
"status": "<string>",
"version": 123,
"lines": [
"<unknown>"
],
"receive_rvas": [
"<unknown>"
]
}
}Creates a return vendor authorization for lines of a purchase order, wrapped in
return_vendor_authorization. Name the purchase order by its id, and each line by its purchase_order_line id with the rva_qty to return. Send create_as_draft: true to save it as a draft.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Body
application/json
Show child attributes
Show child attributes
Response
201 - application/json
The new return vendor authorization, under return_vendor_authorization.
Show child attributes
Show child attributes