curl --request POST \
--url https://app.solya.app/api/supplier-exchange-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deadline": "2025-10-15",
"description": "Exchange of overstocked FW25 items with new SS26 units from Nike",
"destinationShopId": "550e8400-e29b-41d4-a716-446655440021",
"name": "Nike FW25 Exchange Wave 1",
"reason": "Initiated by the inventory rebalancing agent",
"sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}
'import requests
url = "https://app.solya.app/api/supplier-exchange-plans"
payload = {
"deadline": "2025-10-15",
"description": "Exchange of overstocked FW25 items with new SS26 units from Nike",
"destinationShopId": "550e8400-e29b-41d4-a716-446655440021",
"name": "Nike FW25 Exchange Wave 1",
"reason": "Initiated by the inventory rebalancing agent",
"sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}
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({
deadline: '2025-10-15',
description: 'Exchange of overstocked FW25 items with new SS26 units from Nike',
destinationShopId: '550e8400-e29b-41d4-a716-446655440021',
name: 'Nike FW25 Exchange Wave 1',
reason: 'Initiated by the inventory rebalancing agent',
sourceShopId: '550e8400-e29b-41d4-a716-446655440020',
supplierId: '550e8400-e29b-41d4-a716-446655440011'
})
};
fetch('https://app.solya.app/api/supplier-exchange-plans', 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://app.solya.app/api/supplier-exchange-plans",
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([
'deadline' => '2025-10-15',
'description' => 'Exchange of overstocked FW25 items with new SS26 units from Nike',
'destinationShopId' => '550e8400-e29b-41d4-a716-446655440021',
'name' => 'Nike FW25 Exchange Wave 1',
'reason' => 'Initiated by the inventory rebalancing agent',
'sourceShopId' => '550e8400-e29b-41d4-a716-446655440020',
'supplierId' => '550e8400-e29b-41d4-a716-446655440011'
]),
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://app.solya.app/api/supplier-exchange-plans"
payload := strings.NewReader("{\n \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\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://app.solya.app/api/supplier-exchange-plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/supplier-exchange-plans")
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 \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sep-uuid-001",
"name": "Nike FW25 Exchange Wave 1",
"status": "DRAFT",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}Create supplier exchange plan
Creates a new supplier exchange plan in DRAFT status for the given supplier. Used by agents and external tools to initiate a bilateral exchange operation where items are both returned to and received from a supplier.
curl --request POST \
--url https://app.solya.app/api/supplier-exchange-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deadline": "2025-10-15",
"description": "Exchange of overstocked FW25 items with new SS26 units from Nike",
"destinationShopId": "550e8400-e29b-41d4-a716-446655440021",
"name": "Nike FW25 Exchange Wave 1",
"reason": "Initiated by the inventory rebalancing agent",
"sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}
'import requests
url = "https://app.solya.app/api/supplier-exchange-plans"
payload = {
"deadline": "2025-10-15",
"description": "Exchange of overstocked FW25 items with new SS26 units from Nike",
"destinationShopId": "550e8400-e29b-41d4-a716-446655440021",
"name": "Nike FW25 Exchange Wave 1",
"reason": "Initiated by the inventory rebalancing agent",
"sourceShopId": "550e8400-e29b-41d4-a716-446655440020",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}
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({
deadline: '2025-10-15',
description: 'Exchange of overstocked FW25 items with new SS26 units from Nike',
destinationShopId: '550e8400-e29b-41d4-a716-446655440021',
name: 'Nike FW25 Exchange Wave 1',
reason: 'Initiated by the inventory rebalancing agent',
sourceShopId: '550e8400-e29b-41d4-a716-446655440020',
supplierId: '550e8400-e29b-41d4-a716-446655440011'
})
};
fetch('https://app.solya.app/api/supplier-exchange-plans', 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://app.solya.app/api/supplier-exchange-plans",
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([
'deadline' => '2025-10-15',
'description' => 'Exchange of overstocked FW25 items with new SS26 units from Nike',
'destinationShopId' => '550e8400-e29b-41d4-a716-446655440021',
'name' => 'Nike FW25 Exchange Wave 1',
'reason' => 'Initiated by the inventory rebalancing agent',
'sourceShopId' => '550e8400-e29b-41d4-a716-446655440020',
'supplierId' => '550e8400-e29b-41d4-a716-446655440011'
]),
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://app.solya.app/api/supplier-exchange-plans"
payload := strings.NewReader("{\n \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\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://app.solya.app/api/supplier-exchange-plans")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.solya.app/api/supplier-exchange-plans")
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 \"deadline\": \"2025-10-15\",\n \"description\": \"Exchange of overstocked FW25 items with new SS26 units from Nike\",\n \"destinationShopId\": \"550e8400-e29b-41d4-a716-446655440021\",\n \"name\": \"Nike FW25 Exchange Wave 1\",\n \"reason\": \"Initiated by the inventory rebalancing agent\",\n \"sourceShopId\": \"550e8400-e29b-41d4-a716-446655440020\",\n \"supplierId\": \"550e8400-e29b-41d4-a716-446655440011\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sep-uuid-001",
"name": "Nike FW25 Exchange Wave 1",
"status": "DRAFT",
"supplierId": "550e8400-e29b-41d4-a716-446655440011"
}Authorizations
User session token issued by NextAuth. For human users accessing Solya via the web application.
Body
Identifier of the supplier for the exchange plan
1Optional exchange deadline in ISO-8601 format (e.g. 2025-09-30)
Optional free-text description of the plan
Optional identifier of the shop that will receive items from the supplier (RECEIVE side)
Optional display name for the plan; auto-generated when omitted
Optional free-text reason for creating the plan; recorded in the audit trail
500Optional identifier of the business-logic rule group to attach to the plan
Optional identifier of the shop from which items are returned (RETURN side)

