Tenders
Reject tender
Reject an inbound tender by tender ID with a reason code, sending an EDI 990-style decline back to the customer so they can retender the shipment.
POST
/
api
/
p
/
v
{version}
/
tenders
/
{tenderId}
/
reject
Reject tender
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"ReasonCode": "<string>",
"ReasonDescription": "<string>",
"CancelLinkedLoad": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({ReasonCode: '<string>', ReasonDescription: '<string>', CancelLinkedLoad: true})
};
fetch('https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject"
payload = {
"ReasonCode": "<string>",
"ReasonDescription": "<string>",
"CancelLinkedLoad": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject",
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([
'ReasonCode' => '<string>',
'ReasonDescription' => '<string>',
'CancelLinkedLoad' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+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://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject"
payload := strings.NewReader("{\n \"ReasonCode\": \"<string>\",\n \"ReasonDescription\": \"<string>\",\n \"CancelLinkedLoad\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+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://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"ReasonCode\": \"<string>\",\n \"ReasonDescription\": \"<string>\",\n \"CancelLinkedLoad\": true\n}")
.asString();{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}OpenAPI definition
{
"openapi": "3.0.1",
"info": {
"title": "Alvys",
"description": "Alvys provides a robust set of REST APIs to allow you to integrate Alvys into virtually any platform. These APIs cover most of Alvys' major product areas with additional endpoints being added regularly based on customer requests.",
"contact": {
"name": "Alvys Support",
"url": "https://www.alvys.com/resources/contact/"
},
"version": "v1"
},
"servers": [
{
"url": "https://integrations.alvys.com",
"description": "Public API Server"
},
{
"url": "https://api.alvys.com/",
"description": "Public API Server"
}
],
"paths": {
"/api/p/v{version}/tenders/{tenderId}/reject": {
"post": {
"tags": [
"Tenders"
],
"parameters": [
{
"name": "tenderId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "version",
"in": "path",
"description": "API version (e.g., 1.0)",
"required": true,
"schema": {
"type": "string",
"default": "1.0",
"example": "1.0"
}
}
],
"requestBody": {
"content": {
"application/json-patch+json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Alvys.Models.Tenders.Request.RejectTenderRequest"
}
]
}
},
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Alvys.Models.Tenders.Request.RejectTenderRequest"
}
]
}
},
"text/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Alvys.Models.Tenders.Request.RejectTenderRequest"
}
]
}
},
"application/*+json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Alvys.Models.Tenders.Request.RejectTenderRequest"
}
]
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails"
}
}
}
}
},
"summary": "Reject tender",
"security": [
{
"Public": []
}
]
}
}
},
"components": {
"schemas": {
"Alvys.Models.Tenders.Request.RejectTenderRequest": {
"required": [
"CancelLinkedLoad",
"ReasonCode",
"ReasonDescription"
],
"type": "object",
"properties": {
"ReasonCode": {
"type": "string"
},
"ReasonDescription": {
"type": "string"
},
"CancelLinkedLoad": {
"type": "boolean"
}
},
"additionalProperties": false
},
"Microsoft.AspNetCore.Mvc.ProblemDetails": {
"type": "object",
"properties": {
"Type": {
"type": "string",
"nullable": true
},
"Title": {
"type": "string",
"nullable": true
},
"Status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"Detail": {
"type": "string",
"nullable": true
},
"Instance": {
"type": "string",
"nullable": true
}
},
"additionalProperties": {}
},
"Microsoft.AspNetCore.Mvc.ValidationProblemDetails": {
"required": [
"Errors"
],
"type": "object",
"properties": {
"Errors": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
},
"Type": {
"type": "string",
"nullable": true
},
"Title": {
"type": "string",
"nullable": true
},
"Status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"Detail": {
"type": "string",
"nullable": true
},
"Instance": {
"type": "string",
"nullable": true
}
},
"additionalProperties": {}
}
},
"securitySchemes": {
"Public": {
"type": "apiKey",
"description": "JWT token needed to access the endpoints. (eg.) Bearer: <token>",
"name": "Authorization",
"in": "header"
}
}
}
}
Authorizations
OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.
Path Parameters
API version (e.g., 1.0)
Example:
"1.0"
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
OK
Was this page helpful?
⌘I
Reject tender
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"ReasonCode": "<string>",
"ReasonDescription": "<string>",
"CancelLinkedLoad": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({ReasonCode: '<string>', ReasonDescription: '<string>', CancelLinkedLoad: true})
};
fetch('https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject"
payload = {
"ReasonCode": "<string>",
"ReasonDescription": "<string>",
"CancelLinkedLoad": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject",
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([
'ReasonCode' => '<string>',
'ReasonDescription' => '<string>',
'CancelLinkedLoad' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+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://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject"
payload := strings.NewReader("{\n \"ReasonCode\": \"<string>\",\n \"ReasonDescription\": \"<string>\",\n \"CancelLinkedLoad\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+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://integrations.alvys.com/api/p/v{version}/tenders/{tenderId}/reject")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"ReasonCode\": \"<string>\",\n \"ReasonDescription\": \"<string>\",\n \"CancelLinkedLoad\": true\n}")
.asString();{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}