Create customers batch
curl --request POST \
--url https://api.hyperline.co/v1/customers/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customers": [
{
"batch_customer_id": "customer-123",
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": false,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [
{
"value": "FR123456789"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": [
"card",
"direct_debit"
],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": [
"usr_KMcxRWc1ZQwvJG"
]
}
]
}
'import requests
url = "https://api.hyperline.co/v1/customers/batch"
payload = { "customers": [
{
"batch_customer_id": "customer-123",
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": False,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [{ "value": "FR123456789" }],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": None,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": None,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": ["accounting@acme.com"],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": ["card", "direct_debit"],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": True,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": ["usr_KMcxRWc1ZQwvJG"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customers: [
{
batch_customer_id: 'customer-123',
name: 'Acme',
type: 'corporate',
currency: 'EUR',
country: 'FR',
is_government_affiliated: false,
vat_number: '<string>',
vat_rate_custom: 50,
tax_ids: [{value: 'FR123456789'}],
tax_rate_custom: 50,
taxability: 'taxable',
registration_number: '36252187900034',
external_id: '<string>',
domain: 'acme.com',
invoicing_entity_id: '<string>',
billing_address: {
name: 'Acme',
line1: '5 rue de Paradis',
line2: null,
city: 'Paris',
zip: '75010',
state: 'CA',
country: 'FR'
},
shipping_address: {
name: 'Acme',
line1: '5 rue de Paradis',
line2: null,
city: 'Paris',
zip: '75010',
state: 'CA',
country: 'FR'
},
billing_email: 'billing@acme.com',
invoice_emails: ['accounting@acme.com'],
language: 'fr',
timezone: 'Europe/Paris',
available_payment_methods: ['card', 'direct_debit'],
payment_method_type: 'card',
bank_account: {
format: 'iban_bic_swift',
iban: 'FR7630006000011234567890189',
bic_swift: 'BNPAFRPP'
},
custom_payment_delay: 30,
custom_payment_initiation_delay: 7,
organisation_id: '<string>',
organisation_invoicing: 'none',
properties: {},
custom_properties: {},
invoice_reminders_enabled: true,
price_book_id: 'prib_613_WbVIZ1329e',
owner_id: 'usr_KMcxRWc1ZQwvJG',
follower_ids: ['usr_KMcxRWc1ZQwvJG']
}
]
})
};
fetch('https://api.hyperline.co/v1/customers/batch', 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.hyperline.co/v1/customers/batch",
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([
'customers' => [
[
'batch_customer_id' => 'customer-123',
'name' => 'Acme',
'type' => 'corporate',
'currency' => 'EUR',
'country' => 'FR',
'is_government_affiliated' => false,
'vat_number' => '<string>',
'vat_rate_custom' => 50,
'tax_ids' => [
[
'value' => 'FR123456789'
]
],
'tax_rate_custom' => 50,
'taxability' => 'taxable',
'registration_number' => '36252187900034',
'external_id' => '<string>',
'domain' => 'acme.com',
'invoicing_entity_id' => '<string>',
'billing_address' => [
'name' => 'Acme',
'line1' => '5 rue de Paradis',
'line2' => null,
'city' => 'Paris',
'zip' => '75010',
'state' => 'CA',
'country' => 'FR'
],
'shipping_address' => [
'name' => 'Acme',
'line1' => '5 rue de Paradis',
'line2' => null,
'city' => 'Paris',
'zip' => '75010',
'state' => 'CA',
'country' => 'FR'
],
'billing_email' => 'billing@acme.com',
'invoice_emails' => [
'accounting@acme.com'
],
'language' => 'fr',
'timezone' => 'Europe/Paris',
'available_payment_methods' => [
'card',
'direct_debit'
],
'payment_method_type' => 'card',
'bank_account' => [
'format' => 'iban_bic_swift',
'iban' => 'FR7630006000011234567890189',
'bic_swift' => 'BNPAFRPP'
],
'custom_payment_delay' => 30,
'custom_payment_initiation_delay' => 7,
'organisation_id' => '<string>',
'organisation_invoicing' => 'none',
'properties' => [
],
'custom_properties' => [
],
'invoice_reminders_enabled' => true,
'price_book_id' => 'prib_613_WbVIZ1329e',
'owner_id' => 'usr_KMcxRWc1ZQwvJG',
'follower_ids' => [
'usr_KMcxRWc1ZQwvJG'
]
]
]
]),
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.hyperline.co/v1/customers/batch"
payload := strings.NewReader("{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hyperline.co/v1/customers/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/customers/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"successes": [
{
"id": "cus_Typ0px2W0aiEtl",
"name": "Acme",
"type": "corporate",
"status": "active",
"currency": "EUR",
"country": "FR",
"domain": "acme.com",
"vat_number": "<string>",
"vat_number_valid": true,
"vat_rate_custom": 123,
"tax_ids": [
{
"value": "FR123456789",
"status": "valid"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"is_government_affiliated": false,
"language": "fr",
"timezone": "Europe/Paris",
"external_id": null,
"properties": null,
"custom_properties": {},
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"invoicing_entity_id": "ive_484dn4U48E",
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"available_payment_methods": [
"card",
"direct_debit"
],
"current_payment_method_type": "card",
"current_payment_method_id": "pm_UTclbc1US8GzCe",
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"subscriptions": [
{
"id": "sub_0kIc7jrF7gV00V",
"status": "active",
"current_period_started_at": "2024-10-12T07:00:01.860Z",
"current_period_ends_at": "2024-11-12T07:00:01.860Z",
"plan_id": "plan_34hdd843hReh",
"checkout_session_id": "che_949djdj39RJj"
}
],
"segment_ids": [
"seg_0kIc7jrF7gV00V"
],
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"created_at": "2024-10-12T07:00:01.860Z",
"updated_at": "2024-10-12T07:00:01.860Z",
"deleted_at": null,
"providers": {
"adyen": "<string>",
"stripe": "<string>",
"mollie": "<string>",
"gocardless": "<string>",
"airwallex": "<string>",
"salesforce": "<string>",
"hubspot": "<string>",
"attio": "<string>",
"xero": "<string>",
"pennylane": "<string>",
"zoho-books": "<string>",
"exact-online": "<string>",
"quickbooks": "<string>",
"netsuite": "<string>",
"anrok": "<string>",
"chargebee": "<string>",
"slack": "<string>",
"plain": "<string>",
"zendesk": "<string>",
"pylon": "<string>",
"intercom": "<string>",
"claap": "<string>",
"grain": "<string>"
},
"current_payment_method": {
"id": "pm_1xMpj5bwRqN7LM",
"status": "active",
"type": "card",
"last_4_digits": 2718,
"expiration_date": "2027-11",
"brand": "<string>"
},
"bank_account": "<unknown>",
"organisation_id": null,
"organisation_invoicing": null,
"batch_customer_id": "customer-123"
}
],
"errors": [
{
"batch_customer_id": "<string>",
"customer_payload": {
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": false,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [
{
"value": "FR123456789"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": [
"card",
"direct_debit"
],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": [
"usr_KMcxRWc1ZQwvJG"
]
},
"error": "<unknown>"
}
]
}Customers
Create customers batch
Create a batch of new customers.
POST
/
v1
/
customers
/
batch
Create customers batch
curl --request POST \
--url https://api.hyperline.co/v1/customers/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customers": [
{
"batch_customer_id": "customer-123",
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": false,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [
{
"value": "FR123456789"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": [
"card",
"direct_debit"
],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": [
"usr_KMcxRWc1ZQwvJG"
]
}
]
}
'import requests
url = "https://api.hyperline.co/v1/customers/batch"
payload = { "customers": [
{
"batch_customer_id": "customer-123",
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": False,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [{ "value": "FR123456789" }],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": None,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": None,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": ["accounting@acme.com"],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": ["card", "direct_debit"],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": True,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": ["usr_KMcxRWc1ZQwvJG"]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customers: [
{
batch_customer_id: 'customer-123',
name: 'Acme',
type: 'corporate',
currency: 'EUR',
country: 'FR',
is_government_affiliated: false,
vat_number: '<string>',
vat_rate_custom: 50,
tax_ids: [{value: 'FR123456789'}],
tax_rate_custom: 50,
taxability: 'taxable',
registration_number: '36252187900034',
external_id: '<string>',
domain: 'acme.com',
invoicing_entity_id: '<string>',
billing_address: {
name: 'Acme',
line1: '5 rue de Paradis',
line2: null,
city: 'Paris',
zip: '75010',
state: 'CA',
country: 'FR'
},
shipping_address: {
name: 'Acme',
line1: '5 rue de Paradis',
line2: null,
city: 'Paris',
zip: '75010',
state: 'CA',
country: 'FR'
},
billing_email: 'billing@acme.com',
invoice_emails: ['accounting@acme.com'],
language: 'fr',
timezone: 'Europe/Paris',
available_payment_methods: ['card', 'direct_debit'],
payment_method_type: 'card',
bank_account: {
format: 'iban_bic_swift',
iban: 'FR7630006000011234567890189',
bic_swift: 'BNPAFRPP'
},
custom_payment_delay: 30,
custom_payment_initiation_delay: 7,
organisation_id: '<string>',
organisation_invoicing: 'none',
properties: {},
custom_properties: {},
invoice_reminders_enabled: true,
price_book_id: 'prib_613_WbVIZ1329e',
owner_id: 'usr_KMcxRWc1ZQwvJG',
follower_ids: ['usr_KMcxRWc1ZQwvJG']
}
]
})
};
fetch('https://api.hyperline.co/v1/customers/batch', 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.hyperline.co/v1/customers/batch",
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([
'customers' => [
[
'batch_customer_id' => 'customer-123',
'name' => 'Acme',
'type' => 'corporate',
'currency' => 'EUR',
'country' => 'FR',
'is_government_affiliated' => false,
'vat_number' => '<string>',
'vat_rate_custom' => 50,
'tax_ids' => [
[
'value' => 'FR123456789'
]
],
'tax_rate_custom' => 50,
'taxability' => 'taxable',
'registration_number' => '36252187900034',
'external_id' => '<string>',
'domain' => 'acme.com',
'invoicing_entity_id' => '<string>',
'billing_address' => [
'name' => 'Acme',
'line1' => '5 rue de Paradis',
'line2' => null,
'city' => 'Paris',
'zip' => '75010',
'state' => 'CA',
'country' => 'FR'
],
'shipping_address' => [
'name' => 'Acme',
'line1' => '5 rue de Paradis',
'line2' => null,
'city' => 'Paris',
'zip' => '75010',
'state' => 'CA',
'country' => 'FR'
],
'billing_email' => 'billing@acme.com',
'invoice_emails' => [
'accounting@acme.com'
],
'language' => 'fr',
'timezone' => 'Europe/Paris',
'available_payment_methods' => [
'card',
'direct_debit'
],
'payment_method_type' => 'card',
'bank_account' => [
'format' => 'iban_bic_swift',
'iban' => 'FR7630006000011234567890189',
'bic_swift' => 'BNPAFRPP'
],
'custom_payment_delay' => 30,
'custom_payment_initiation_delay' => 7,
'organisation_id' => '<string>',
'organisation_invoicing' => 'none',
'properties' => [
],
'custom_properties' => [
],
'invoice_reminders_enabled' => true,
'price_book_id' => 'prib_613_WbVIZ1329e',
'owner_id' => 'usr_KMcxRWc1ZQwvJG',
'follower_ids' => [
'usr_KMcxRWc1ZQwvJG'
]
]
]
]),
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.hyperline.co/v1/customers/batch"
payload := strings.NewReader("{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hyperline.co/v1/customers/batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/customers/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customers\": [\n {\n \"batch_customer_id\": \"customer-123\",\n \"name\": \"Acme\",\n \"type\": \"corporate\",\n \"currency\": \"EUR\",\n \"country\": \"FR\",\n \"is_government_affiliated\": false,\n \"vat_number\": \"<string>\",\n \"vat_rate_custom\": 50,\n \"tax_ids\": [\n {\n \"value\": \"FR123456789\"\n }\n ],\n \"tax_rate_custom\": 50,\n \"taxability\": \"taxable\",\n \"registration_number\": \"36252187900034\",\n \"external_id\": \"<string>\",\n \"domain\": \"acme.com\",\n \"invoicing_entity_id\": \"<string>\",\n \"billing_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"shipping_address\": {\n \"name\": \"Acme\",\n \"line1\": \"5 rue de Paradis\",\n \"line2\": null,\n \"city\": \"Paris\",\n \"zip\": \"75010\",\n \"state\": \"CA\",\n \"country\": \"FR\"\n },\n \"billing_email\": \"billing@acme.com\",\n \"invoice_emails\": [\n \"accounting@acme.com\"\n ],\n \"language\": \"fr\",\n \"timezone\": \"Europe/Paris\",\n \"available_payment_methods\": [\n \"card\",\n \"direct_debit\"\n ],\n \"payment_method_type\": \"card\",\n \"bank_account\": {\n \"format\": \"iban_bic_swift\",\n \"iban\": \"FR7630006000011234567890189\",\n \"bic_swift\": \"BNPAFRPP\"\n },\n \"custom_payment_delay\": 30,\n \"custom_payment_initiation_delay\": 7,\n \"organisation_id\": \"<string>\",\n \"organisation_invoicing\": \"none\",\n \"properties\": {},\n \"custom_properties\": {},\n \"invoice_reminders_enabled\": true,\n \"price_book_id\": \"prib_613_WbVIZ1329e\",\n \"owner_id\": \"usr_KMcxRWc1ZQwvJG\",\n \"follower_ids\": [\n \"usr_KMcxRWc1ZQwvJG\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"successes": [
{
"id": "cus_Typ0px2W0aiEtl",
"name": "Acme",
"type": "corporate",
"status": "active",
"currency": "EUR",
"country": "FR",
"domain": "acme.com",
"vat_number": "<string>",
"vat_number_valid": true,
"vat_rate_custom": 123,
"tax_ids": [
{
"value": "FR123456789",
"status": "valid"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"is_government_affiliated": false,
"language": "fr",
"timezone": "Europe/Paris",
"external_id": null,
"properties": null,
"custom_properties": {},
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"invoicing_entity_id": "ive_484dn4U48E",
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"available_payment_methods": [
"card",
"direct_debit"
],
"current_payment_method_type": "card",
"current_payment_method_id": "pm_UTclbc1US8GzCe",
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"subscriptions": [
{
"id": "sub_0kIc7jrF7gV00V",
"status": "active",
"current_period_started_at": "2024-10-12T07:00:01.860Z",
"current_period_ends_at": "2024-11-12T07:00:01.860Z",
"plan_id": "plan_34hdd843hReh",
"checkout_session_id": "che_949djdj39RJj"
}
],
"segment_ids": [
"seg_0kIc7jrF7gV00V"
],
"integrations": [
{
"entity_id": "123456789",
"provider_name": "stripe",
"provider_account_id": "acc_1234567890"
}
],
"created_at": "2024-10-12T07:00:01.860Z",
"updated_at": "2024-10-12T07:00:01.860Z",
"deleted_at": null,
"providers": {
"adyen": "<string>",
"stripe": "<string>",
"mollie": "<string>",
"gocardless": "<string>",
"airwallex": "<string>",
"salesforce": "<string>",
"hubspot": "<string>",
"attio": "<string>",
"xero": "<string>",
"pennylane": "<string>",
"zoho-books": "<string>",
"exact-online": "<string>",
"quickbooks": "<string>",
"netsuite": "<string>",
"anrok": "<string>",
"chargebee": "<string>",
"slack": "<string>",
"plain": "<string>",
"zendesk": "<string>",
"pylon": "<string>",
"intercom": "<string>",
"claap": "<string>",
"grain": "<string>"
},
"current_payment_method": {
"id": "pm_1xMpj5bwRqN7LM",
"status": "active",
"type": "card",
"last_4_digits": 2718,
"expiration_date": "2027-11",
"brand": "<string>"
},
"bank_account": "<unknown>",
"organisation_id": null,
"organisation_invoicing": null,
"batch_customer_id": "customer-123"
}
],
"errors": [
{
"batch_customer_id": "<string>",
"customer_payload": {
"name": "Acme",
"type": "corporate",
"currency": "EUR",
"country": "FR",
"is_government_affiliated": false,
"vat_number": "<string>",
"vat_rate_custom": 50,
"tax_ids": [
{
"value": "FR123456789"
}
],
"tax_rate_custom": 50,
"taxability": "taxable",
"registration_number": "36252187900034",
"external_id": "<string>",
"domain": "acme.com",
"invoicing_entity_id": "<string>",
"billing_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"shipping_address": {
"name": "Acme",
"line1": "5 rue de Paradis",
"line2": null,
"city": "Paris",
"zip": "75010",
"state": "CA",
"country": "FR"
},
"billing_email": "billing@acme.com",
"invoice_emails": [
"accounting@acme.com"
],
"language": "fr",
"timezone": "Europe/Paris",
"available_payment_methods": [
"card",
"direct_debit"
],
"payment_method_type": "card",
"bank_account": {
"format": "iban_bic_swift",
"iban": "FR7630006000011234567890189",
"bic_swift": "BNPAFRPP"
},
"custom_payment_delay": 30,
"custom_payment_initiation_delay": 7,
"organisation_id": "<string>",
"organisation_invoicing": "none",
"properties": {},
"custom_properties": {},
"invoice_reminders_enabled": true,
"price_book_id": "prib_613_WbVIZ1329e",
"owner_id": "usr_KMcxRWc1ZQwvJG",
"follower_ids": [
"usr_KMcxRWc1ZQwvJG"
]
},
"error": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Create customers batch payload
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Was this page helpful?
⌘I

