Set the primary offer
curl --request POST \
--url https://api.nextlevelmca.com/v1/offers/{id}/primary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nextlevelmca.com/v1/offers/{id}/primary"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nextlevelmca.com/v1/offers/{id}/primary', 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.nextlevelmca.com/v1/offers/{id}/primary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.nextlevelmca.com/v1/offers/{id}/primary"
req, _ := http.NewRequest("POST", 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.post("https://api.nextlevelmca.com/v1/offers/{id}/primary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/offers/{id}/primary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"deal_id": "<string>",
"lender_id": "<string>",
"lender_name": "<string>",
"submission_id": "<string>",
"amount": 123,
"factor_rate": 123,
"buy_rate": 123,
"term": 123,
"term_unit": "days",
"payment_frequency": "daily",
"payment_amount": 123,
"payback_amount": 123,
"points": 123,
"commission_estimate": 123,
"position": 123,
"status": "<string>",
"status_name": "<string>",
"status_type": "open",
"is_primary": true,
"is_selected": true,
"notes": "<string>",
"decline_reason": "<string>",
"merchant_response": "<string>",
"expires_at": "<string>",
"received_at": "<string>",
"accepted_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Offers
Set the primary offer
Side effects: makes this the deal’s primary offer (any other primary is cleared), syncs the deal status to this offer’s status, and from then on status changes on this offer drive the deal stage according to the location’s event bindings (contracts requested → sent → signed → funded). If CRM opportunity sync is enabled for the location, the offer is also pushed to the CRM pipeline. meta.deal_status reports the resulting deal status. Idempotent.
POST
/
v1
/
offers
/
{id}
/
primary
Set the primary offer
curl --request POST \
--url https://api.nextlevelmca.com/v1/offers/{id}/primary \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nextlevelmca.com/v1/offers/{id}/primary"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nextlevelmca.com/v1/offers/{id}/primary', 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.nextlevelmca.com/v1/offers/{id}/primary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.nextlevelmca.com/v1/offers/{id}/primary"
req, _ := http.NewRequest("POST", 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.post("https://api.nextlevelmca.com/v1/offers/{id}/primary")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nextlevelmca.com/v1/offers/{id}/primary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"deal_id": "<string>",
"lender_id": "<string>",
"lender_name": "<string>",
"submission_id": "<string>",
"amount": 123,
"factor_rate": 123,
"buy_rate": 123,
"term": 123,
"term_unit": "days",
"payment_frequency": "daily",
"payment_amount": 123,
"payback_amount": 123,
"points": 123,
"commission_estimate": 123,
"position": 123,
"status": "<string>",
"status_name": "<string>",
"status_type": "open",
"is_primary": true,
"is_selected": true,
"notes": "<string>",
"decline_reason": "<string>",
"merchant_response": "<string>",
"expires_at": "<string>",
"received_at": "<string>",
"accepted_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"meta": {}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "validation_error",
"message": "<string>",
"request_id": "<string>",
"code": "<string>",
"param": "<string>"
}
}Was this page helpful?