Update Party
curl --request POST \
--url https://{workspace}.spreesuite.com/billspree/users/update-user \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"partyID": 789,
"partyNumber": 789,
"name": "Jane Doe",
"email": "jane@example.com",
"connectionGroups": [
{
"connectionGroupLabel": "BA-001"
}
]
},
"method": "Update",
"action": "Update Parties",
"apiVersion": "v2"
}
'import requests
url = "https://{workspace}.spreesuite.com/billspree/users/update-user"
payload = {
"user": {
"partyID": 789,
"partyNumber": 789,
"name": "Jane Doe",
"email": "jane@example.com",
"connectionGroups": [{ "connectionGroupLabel": "BA-001" }]
},
"method": "Update",
"action": "Update Parties",
"apiVersion": "v2"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {
partyID: 789,
partyNumber: 789,
name: 'Jane Doe',
email: 'jane@example.com',
connectionGroups: [{connectionGroupLabel: 'BA-001'}]
},
method: 'Update',
action: 'Update Parties',
apiVersion: 'v2'
})
};
fetch('https://{workspace}.spreesuite.com/billspree/users/update-user', 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://{workspace}.spreesuite.com/billspree/users/update-user",
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([
'user' => [
'partyID' => 789,
'partyNumber' => 789,
'name' => 'Jane Doe',
'email' => 'jane@example.com',
'connectionGroups' => [
[
'connectionGroupLabel' => 'BA-001'
]
]
],
'method' => 'Update',
'action' => 'Update Parties',
'apiVersion' => 'v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{workspace}.spreesuite.com/billspree/users/update-user"
payload := strings.NewReader("{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://{workspace}.spreesuite.com/billspree/users/update-user")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.spreesuite.com/billspree/users/update-user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Request Succeeded.",
"error": null,
"data": {}
}Parties
Update Party
Updates a Customer, Employee, or Vendor party’s own fields. The optional connectionGroups array on user creates or updates Billing Accounts under this party as part of the same call. Archiving or restoring a party also goes through this endpoint, via archiveStatus — there is no separate archive endpoint.
POST
/
billspree
/
users
/
update-user
Update Party
curl --request POST \
--url https://{workspace}.spreesuite.com/billspree/users/update-user \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"user": {
"partyID": 789,
"partyNumber": 789,
"name": "Jane Doe",
"email": "jane@example.com",
"connectionGroups": [
{
"connectionGroupLabel": "BA-001"
}
]
},
"method": "Update",
"action": "Update Parties",
"apiVersion": "v2"
}
'import requests
url = "https://{workspace}.spreesuite.com/billspree/users/update-user"
payload = {
"user": {
"partyID": 789,
"partyNumber": 789,
"name": "Jane Doe",
"email": "jane@example.com",
"connectionGroups": [{ "connectionGroupLabel": "BA-001" }]
},
"method": "Update",
"action": "Update Parties",
"apiVersion": "v2"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user: {
partyID: 789,
partyNumber: 789,
name: 'Jane Doe',
email: 'jane@example.com',
connectionGroups: [{connectionGroupLabel: 'BA-001'}]
},
method: 'Update',
action: 'Update Parties',
apiVersion: 'v2'
})
};
fetch('https://{workspace}.spreesuite.com/billspree/users/update-user', 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://{workspace}.spreesuite.com/billspree/users/update-user",
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([
'user' => [
'partyID' => 789,
'partyNumber' => 789,
'name' => 'Jane Doe',
'email' => 'jane@example.com',
'connectionGroups' => [
[
'connectionGroupLabel' => 'BA-001'
]
]
],
'method' => 'Update',
'action' => 'Update Parties',
'apiVersion' => 'v2'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://{workspace}.spreesuite.com/billspree/users/update-user"
payload := strings.NewReader("{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://{workspace}.spreesuite.com/billspree/users/update-user")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{workspace}.spreesuite.com/billspree/users/update-user")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user\": {\n \"partyID\": 789,\n \"partyNumber\": 789,\n \"name\": \"Jane Doe\",\n \"email\": \"jane@example.com\",\n \"connectionGroups\": [\n {\n \"connectionGroupLabel\": \"BA-001\"\n }\n ]\n },\n \"method\": \"Update\",\n \"action\": \"Update Parties\",\n \"apiVersion\": \"v2\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Request Succeeded.",
"error": null,
"data": {}
}Authorizations
Auth token returned from the login endpoint. Send as: Authorization: <token> (no Bearer prefix)
Body
application/json
Was this page helpful?
⌘I
