curl --request PATCH \
--url https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_creditable": true,
"max_debt_balance": 1,
"max_order_amount": 1,
"standard_payment_terms": 1
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile"
payload = {
"is_creditable": True,
"max_debt_balance": 1,
"max_order_amount": 1,
"standard_payment_terms": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_creditable: true,
max_debt_balance: 1,
max_order_amount: 1,
standard_payment_terms: 1
})
};
fetch('https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile', 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.exowpee.com/v1/catalog/vendors/{id}/credit-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_creditable' => true,
'max_debt_balance' => 1,
'max_order_amount' => 1,
'standard_payment_terms' => 1
]),
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://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile"
payload := strings.NewReader("{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"id_number": "<string>",
"phone_number": "<string>",
"address": "<string>",
"country": "<string>",
"email": "<string>",
"is_creditable": true,
"max_debt_balance": 123,
"max_order_amount": 123,
"standard_payment_terms": 123,
"computed_debt": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}Set vendor credit terms
Sets whether you can buy on credit from a supplier, the payment terms and the debt and order limits.
curl --request PATCH \
--url https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_creditable": true,
"max_debt_balance": 1,
"max_order_amount": 1,
"standard_payment_terms": 1
}
'import requests
url = "https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile"
payload = {
"is_creditable": True,
"max_debt_balance": 1,
"max_order_amount": 1,
"standard_payment_terms": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
is_creditable: true,
max_debt_balance: 1,
max_order_amount: 1,
standard_payment_terms: 1
})
};
fetch('https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile', 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.exowpee.com/v1/catalog/vendors/{id}/credit-profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_creditable' => true,
'max_debt_balance' => 1,
'max_order_amount' => 1,
'standard_payment_terms' => 1
]),
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://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile"
payload := strings.NewReader("{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/vendors/{id}/credit-profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_creditable\": true,\n \"max_debt_balance\": 1,\n \"max_order_amount\": 1,\n \"standard_payment_terms\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"id_number": "<string>",
"phone_number": "<string>",
"address": "<string>",
"country": "<string>",
"email": "<string>",
"is_creditable": true,
"max_debt_balance": 123,
"max_order_amount": 123,
"standard_payment_terms": 123,
"computed_debt": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"errors": {}
}vendors.update
Conditions
- is_creditable is required.
- max_debt_balance and max_order_amount, when sent, must be 0 or more and have at most currency_exponent decimals; null removes the limit.
- standard_payment_terms must be an integer of 0 or more.
- Only the credit settings are changed: existing purchases and debts are not modified.
- Omitted limits keep their current value; the new limits apply to later purchase submissions.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the supplier (the {vendor} segment of the route).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, name, id_number, phone_number, address, country, email, is_creditable, max_debt_balance, max_order_amount, standard_payment_terms, computed_debt, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: .
Body
Whether the company can buy on credit from this supplier. Required.
Maximum total debt allowed toward this supplier, in major units, 0 or more. Null removes the limit; when omitted the current limit is kept.
x >= 0Maximum payable total of a single credit purchase, in major units, 0 or more. Null removes the limit; when omitted the current limit is kept.
x >= 0Number of days after the purchase date that a credit purchase is due when no due_date is given, an integer of 0 or more.
x >= 0Response
Resource (only with response=resource).
Identifier of the supplier (27-character KSUID).
Supplier name, stored in lower case.
Tax or registration number of the supplier.
Phone number of the supplier.
Postal address of the supplier.
Country of the supplier, free text as entered.
Email address of the supplier.
Whether the company may buy on credit from this supplier.
Maximum total debt allowed toward this supplier; null means no limit. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Maximum payable total of a single credit purchase; null means no limit. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Default number of days before a credit purchase is due, used when a credit purchase has no due date.
Amount currently owed to the supplier: the sum of remaining_amount of its credit purchases in pending, completed or closed status. In major units (the stored minor-unit amount divided by 10 to the power currency_exponent).
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).