Update customer
curl --request PUT \
--url https://rcur.app/api/v2/customers/{id} \
--header 'Content-Type: application/json' \
--data '
{
"number": "CUST-001",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"organization_name": "Acme B.V.",
"phone": "+31612345678",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl"
}
'import requests
url = "https://rcur.app/api/v2/customers/{id}"
payload = {
"number": "CUST-001",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"organization_name": "Acme B.V.",
"phone": "+31612345678",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
number: 'CUST-001',
first_name: 'John',
last_name: 'Doe',
email: 'john@example.com',
organization_name: 'Acme B.V.',
phone: '+31612345678',
address: 'Keizersgracht 1',
postal_code: '1015AA',
city: 'Amsterdam',
country: 'NL',
vat_number: 'NL123456789B01',
locale: 'nl'
})
};
fetch('https://rcur.app/api/v2/customers/{id}', 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://rcur.app/api/v2/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'number' => 'CUST-001',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'organization_name' => 'Acme B.V.',
'phone' => '+31612345678',
'address' => 'Keizersgracht 1',
'postal_code' => '1015AA',
'city' => 'Amsterdam',
'country' => 'NL',
'vat_number' => 'NL123456789B01',
'locale' => 'nl'
]),
CURLOPT_HTTPHEADER => [
"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://rcur.app/api/v2/customers/{id}"
payload := strings.NewReader("{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://rcur.app/api/v2/customers/{id}")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rcur.app/api/v2/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}"
response = http.request(request)
puts response.read_body{
"id": "abc123def456",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"created_at": "2025-01-15 10:30:00",
"number": "CUST-001",
"phone": "+31612345678",
"organization_name": "Acme B.V.",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl",
"mollie_customer_id": "cst_abc123"
}{
"status": 404,
"error": "Resource not found"
}{
"status": 422,
"error": "Could not process request. Some fields contain invalid data",
"fields": {
"email": [
"The email field is required."
]
}
}Customers
Update customer
PUT
/
api
/
v2
/
customers
/
{id}
Update customer
curl --request PUT \
--url https://rcur.app/api/v2/customers/{id} \
--header 'Content-Type: application/json' \
--data '
{
"number": "CUST-001",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"organization_name": "Acme B.V.",
"phone": "+31612345678",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl"
}
'import requests
url = "https://rcur.app/api/v2/customers/{id}"
payload = {
"number": "CUST-001",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"organization_name": "Acme B.V.",
"phone": "+31612345678",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
number: 'CUST-001',
first_name: 'John',
last_name: 'Doe',
email: 'john@example.com',
organization_name: 'Acme B.V.',
phone: '+31612345678',
address: 'Keizersgracht 1',
postal_code: '1015AA',
city: 'Amsterdam',
country: 'NL',
vat_number: 'NL123456789B01',
locale: 'nl'
})
};
fetch('https://rcur.app/api/v2/customers/{id}', 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://rcur.app/api/v2/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'number' => 'CUST-001',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'john@example.com',
'organization_name' => 'Acme B.V.',
'phone' => '+31612345678',
'address' => 'Keizersgracht 1',
'postal_code' => '1015AA',
'city' => 'Amsterdam',
'country' => 'NL',
'vat_number' => 'NL123456789B01',
'locale' => 'nl'
]),
CURLOPT_HTTPHEADER => [
"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://rcur.app/api/v2/customers/{id}"
payload := strings.NewReader("{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://rcur.app/api/v2/customers/{id}")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://rcur.app/api/v2/customers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"CUST-001\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"john@example.com\",\n \"organization_name\": \"Acme B.V.\",\n \"phone\": \"+31612345678\",\n \"address\": \"Keizersgracht 1\",\n \"postal_code\": \"1015AA\",\n \"city\": \"Amsterdam\",\n \"country\": \"NL\",\n \"vat_number\": \"NL123456789B01\",\n \"locale\": \"nl\"\n}"
response = http.request(request)
puts response.read_body{
"id": "abc123def456",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"created_at": "2025-01-15 10:30:00",
"number": "CUST-001",
"phone": "+31612345678",
"organization_name": "Acme B.V.",
"address": "Keizersgracht 1",
"postal_code": "1015AA",
"city": "Amsterdam",
"country": "NL",
"vat_number": "NL123456789B01",
"locale": "nl",
"mollie_customer_id": "cst_abc123"
}{
"status": 404,
"error": "Resource not found"
}{
"status": 422,
"error": "Could not process request. Some fields contain invalid data",
"fields": {
"email": [
"The email field is required."
]
}
}Body
application/json
Customer data to update
Customer number
Example:
"CUST-001"
First name
Example:
"John"
Last name
Example:
"Doe"
Email address
Example:
"john@example.com"
Organization name
Example:
"Acme B.V."
Phone number
Example:
"+31612345678"
Street address
Example:
"Keizersgracht 1"
Postal code
Example:
"1015AA"
City
Example:
"Amsterdam"
ISO 3166-1 alpha-2 country code
Example:
"NL"
VAT number
Example:
"NL123456789B01"
Available options:
nl, en, de, fr, es Example:
"nl"
Response
Customer details
Example:
"abc123def456"
Example:
"John"
Example:
"Doe"
Example:
"john@example.com"
Example:
"2025-01-15 10:30:00"
Example:
"CUST-001"
Example:
"+31612345678"
Example:
"Acme B.V."
Example:
"Keizersgracht 1"
Example:
"1015AA"
Example:
"Amsterdam"
Example:
"NL"
Example:
"NL123456789B01"
Available options:
nl, en, fr, de, es Example:
"nl"
Example:
"cst_abc123"
⌘I