List Contracts
curl --request GET \
--url https://api.sandbox.usenash.com/v1/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/contracts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/contracts', 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.sandbox.usenash.com/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/contracts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.usenash.com/v1/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contracts": [
{
"contract_id": "<string>",
"first_version_contract_id": "<string>",
"display_name": "<string>",
"is_active": true,
"currency": "<string>",
"provider_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"next_version_contract_id": "<string>",
"version": 123,
"cancellation_binding_mode": "pinned",
"cancellation_policy_version_id": "<string>",
"provider_name": "<string>",
"external_identifier": "<string>",
"delivery_price_type": "<string>",
"delivery_price": {},
"eligibility_criteria": {},
"wait_fee": {},
"cancellation_fee": {},
"return_fee": {},
"insurance_price": {},
"tip_amount": {},
"toll_fee": {},
"properties": {},
"has_enabled_vehicles": true,
"supported_orgs": [
"<string>"
],
"excluded_orgs": [
"<string>"
],
"prev_version_contract_id": "<string>",
"commit_message": "<string>",
"created_by": "<string>",
"delivery_price_function": "<string>",
"unassigned_driver_timeout_minutes": 123
}
],
"next_cursor": "<string>"
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]List Contracts
List contracts visible to the authenticated organization. Returns a slim summary payload by default; pass include=details for the full record. Supports keyset pagination via the cursor returned in next_cursor.
GET
/
v1
/
contracts
List Contracts
curl --request GET \
--url https://api.sandbox.usenash.com/v1/contracts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/contracts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/contracts', 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.sandbox.usenash.com/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.usenash.com/v1/contracts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.usenash.com/v1/contracts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/contracts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"contracts": [
{
"contract_id": "<string>",
"first_version_contract_id": "<string>",
"display_name": "<string>",
"is_active": true,
"currency": "<string>",
"provider_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"next_version_contract_id": "<string>",
"version": 123,
"cancellation_binding_mode": "pinned",
"cancellation_policy_version_id": "<string>",
"provider_name": "<string>",
"external_identifier": "<string>",
"delivery_price_type": "<string>",
"delivery_price": {},
"eligibility_criteria": {},
"wait_fee": {},
"cancellation_fee": {},
"return_fee": {},
"insurance_price": {},
"tip_amount": {},
"toll_fee": {},
"properties": {},
"has_enabled_vehicles": true,
"supported_orgs": [
"<string>"
],
"excluded_orgs": [
"<string>"
],
"prev_version_contract_id": "<string>",
"commit_message": "<string>",
"created_by": "<string>",
"delivery_price_function": "<string>",
"unassigned_driver_timeout_minutes": 123
}
],
"next_cursor": "<string>"
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Available options:
summary, details Required range:
1 <= x <= 500Response
OK
Response body for GET /v1/contracts.
Items are typed as the wider ContractReadDetailed. In summary mode the
service nulls the detailed fields so summary callers get a uniform shape
with the extra fields blanked.
Was this page helpful?