Passer au contenu principal
PUT
/
v1
/
customers
/
{id}
/
archive
Archive customer
curl --request PUT \
  --url https://api.hyperline.co/v1/customers/{id}/archive \
  --header 'Authorization: Bearer <token>'
{
  "id": "cus_Typ0px2W0aiEtl",
  "name": "Acme",
  "type": "corporate",
  "status": "active",
  "currency": "EUR",
  "country": "FR",
  "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
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

id
string
requis

Réponse

Customer archived

id
string
requis

Customer ID.

Exemple:

"cus_Typ0px2W0aiEtl"

name
string
requis

Customer name.

Exemple:

"Acme"

type
enum<string> | null
requis

Customer type.

  • corporate: The customer is a business entity.
  • person: The customer is a natural person.
  • automatically_created: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
Options disponibles:
corporate,
person,
automatically_created
Exemple:

"corporate"

status
enum<string>
requis

Customer status.

Options disponibles:
active,
archived
Exemple:

"active"

currency
enum<string> | null
requis

Currency code. See ISO 4217.

Options disponibles:
EUR,
AED,
AFN,
XCD,
ALL,
AMD,
AOA,
ARS,
USD,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
XOF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
NOK,
BWP,
BYR,
BZD,
CAD,
CDF,
XAF,
CHF,
NZD,
CLP,
CNY,
COP,
CRC,
CUP,
CVE,
ANG,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
MAD,
ERN,
ETB,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LYD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
XPF,
NGN,
NIO,
NPR,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
S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SK,
SL,
SM,
SN,
SO,
SR,
SS,
ST,
SV,
SX,
SY,
SZ,
TC,
TD,
TF,
TG,
TH,
TJ,
TK,
TL,
TM,
TN,
TO,
TR,
TT,
TV,
TW,
TZ,
UA,
UG,
UM,
US,
UY,
UZ,
VA,
VC,
VE,
VG,
VI,
VN,
VU,
WF,
WS,
XK,
YE,
YT,
ZA,
ZM,
ZW
Exemple:

"FR"

vat_number
string | null
requis
obsolète

Deprecated field, please use tax_ids.

vat_number_valid
boolean
requis
obsolète

Deprecated field, please use tax_ids.

vat_rate_custom
number | null
requis
obsolète

Deprecated field, please use tax_rate_custom.

tax_ids
object[]
requis

Customer tax IDs.

tax_rate_custom
number | null
requis

Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.

Plage requise: 0 <= x <= 100
taxability
enum<string>
requis

Customer taxability.

  • taxable: Taxes are automatically determined for the customer.
  • exempt: The customer is exempt from tax.
Options disponibles:
taxable,
exempt
Exemple:

"taxable"

registration_number
string | null
requis

Customer registration number.

Exemple:

"36252187900034"

is_government_affiliated
boolean
requis

Indicates if the customer is affiliated with a government entity.

Exemple:

false

language
enum<string> | null
requis

Language used for invoices, emails, and hosted pages.

Options disponibles:
fr,
en,
de,
it,
nl,
es,
pt,
pl
Exemple:

"fr"

timezone
enum<string> | null
requis

Customer timezone.

Options disponibles:
Pacific/Midway,
Pacific/Pago_Pago,
Pacific/Niue,
Pacific/Rarotonga,
Pacific/Honolulu,
Pacific/Tahiti,
Pacific/Marquesas,
Pacific/Gambier,
America/Adak,
America/Anchorage,
Pacific/Pitcairn,
America/Hermosillo,
America/Phoenix,
America/Los_Angeles,
America/Tijuana,
America/Vancouver,
America/Whitehorse,
America/Belize,
America/Guatemala,
America/Managua,
America/Mexico_City,
America/Costa_Rica,
America/El_Salvador,
America/Regina,
America/Tegucigalpa,
Pacific/Easter,
Pacific/Galapagos,
America/Edmonton,
America/Ciudad_Juarez,
America/Denver,
America/Rio_Branco,
America/Chicago,
America/Matamoros,
America/Winnipeg,
America/Bogota,
America/Atikokan,
America/Cancun,
America/Cayman,
America/Jamaica,
America/Panama,
America/Guayaquil,
America/Lima,
America/Manaus,
America/St_Kitts,
America/Blanc-Sablon,
America/Montserrat,
America/Barbados,
America/Port_of_Spain,
America/Martinique,
America/St_Lucia,
America/St_Barthelemy,
America/St_Vincent,
America/Kralendijk,
America/Guadeloupe,
America/Marigot,
America/Aruba,
America/Lower_Princes,
America/Tortola,
America/Dominica,
America/St_Thomas,
America/Grenada,
America/Antigua,
America/Puerto_Rico,
America/Santo_Domingo,
America/Anguilla,
America/Curacao,
America/La_Paz,
America/Santiago,
America/Havana,
America/Nassau,
America/New_York,
America/Port-au-Prince,
America/Grand_Turk,
America/Toronto,
America/Guyana,
America/Caracas,
America/Argentina/Buenos_Aires,
America/Halifax,
Atlantic/Bermuda,
America/Thule,
America/Sao_Paulo,
Antarctica/Palmer,
America/Punta_Arenas,
Atlantic/Stanley,
America/Cayenne,
America/Asuncion,
America/Paramaribo,
America/Montevideo,
America/St_Johns,
America/Noronha,
Atlantic/South_Georgia,
America/Miquelon,
Atlantic/Cape_Verde,
America/Nuuk,
Atlantic/Azores,
Etc/UTC,
Africa/Abidjan,
Africa/Bamako,
Africa/Bissau,
Africa/Conakry,
Africa/Dakar,
America/Danmarkshavn,
Africa/Freetown,
Atlantic/St_Helena,
Africa/Accra,
Africa/Lome,
Africa/Monrovia,
Africa/Nouakchott,
Africa/Ouagadougou,
Atlantic/Reykjavik,
Africa/Sao_Tome,
Africa/Banjul,
Africa/Algiers,
Africa/Tunis,
Europe/Isle_of_Man,
Europe/Dublin,
Europe/London,
Europe/Jersey,
Europe/Guernsey,
Africa/Bangui,
Africa/Malabo,
Africa/Brazzaville,
Africa/Porto-Novo,
Africa/Douala,
Africa/Kinshasa,
Africa/Lagos,
Africa/Libreville,
Africa/Luanda,
Africa/Ndjamena,
Africa/Niamey,
Africa/Casablanca,
Africa/El_Aaiun,
Atlantic/Canary,
Europe/Lisbon,
Atlantic/Faroe,
Africa/Bujumbura,
Africa/Gaborone,
Africa/Harare,
Africa/Juba,
Africa/Khartoum,
Africa/Kigali,
Africa/Blantyre,
Africa/Lubumbashi,
Africa/Lusaka,
Africa/Maputo,
Africa/Windhoek,
Europe/Andorra,
Europe/Belgrade,
Europe/Berlin,
Europe/Bratislava,
Europe/Brussels,
Europe/Budapest,
Europe/Copenhagen,
Europe/Gibraltar,
Europe/Ljubljana,
Arctic/Longyearbyen,
Europe/Luxembourg,
Europe/Madrid,
Europe/Monaco,
Europe/Oslo,
Europe/Paris,
Europe/Podgorica,
Europe/Prague,
Europe/Rome,
Europe/Amsterdam,
Europe/San_Marino,
Europe/Malta,
Europe/Sarajevo,
Europe/Skopje,
Europe/Stockholm,
Europe/Tirane,
Europe/Vaduz,
Europe/Vatican,
Europe/Vienna,
Europe/Warsaw,
Europe/Zagreb,
Europe/Zurich,
Europe/Kaliningrad,
Africa/Tripoli,
Antarctica/Troll,
Africa/Johannesburg,
Africa/Mbabane,
Africa/Maseru,
Asia/Kuwait,
Asia/Bahrain,
Asia/Baghdad,
Asia/Qatar,
Asia/Riyadh,
Asia/Aden,
Asia/Amman,
Asia/Damascus,
Africa/Addis_Ababa,
Indian/Antananarivo,
Africa/Asmara,
Africa/Dar_es_Salaam,
Africa/Djibouti,
Africa/Kampala,
Indian/Mayotte,
Africa/Mogadishu,
Indian/Comoro,
Africa/Nairobi,
Europe/Athens,
Asia/Beirut,
Europe/Bucharest,
Africa/Cairo,
Europe/Chisinau,
Asia/Hebron,
Europe/Helsinki,
Europe/Kyiv,
Europe/Mariehamn,
Asia/Nicosia,
Europe/Riga,
Europe/Sofia,
Europe/Tallinn,
Europe/Vilnius,
Asia/Jerusalem,
Europe/Minsk,
Europe/Moscow,
Europe/Simferopol,
Antarctica/Syowa,
Europe/Istanbul,
Asia/Tehran,
Asia/Yerevan,
Asia/Baku,
Asia/Tbilisi,
Asia/Dubai,
Asia/Muscat,
Indian/Mauritius,
Indian/Reunion,
Europe/Samara,
Indian/Mahe,
Asia/Kabul,
Indian/Kerguelen,
Asia/Almaty,
Indian/Maldives,
Antarctica/Mawson,
Asia/Karachi,
Asia/Dushanbe,
Asia/Ashgabat,
Asia/Tashkent,
Asia/Yekaterinburg,
Asia/Colombo,
Asia/Kolkata,
Asia/Kathmandu,
Asia/Dhaka,
Asia/Thimphu,
Asia/Urumqi,
Indian/Chagos,
Asia/Bishkek,
Asia/Omsk,
Indian/Cocos,
Asia/Yangon,
Indian/Christmas,
Antarctica/Davis,
Asia/Hovd,
Asia/Bangkok,
Asia/Ho_Chi_Minh,
Asia/Phnom_Penh,
Asia/Vientiane,
Asia/Novosibirsk,
Asia/Jakarta,
Antarctica/Casey,
Australia/Perth,
Asia/Brunei,
Asia/Makassar,
Asia/Macau,
Asia/Shanghai,
Asia/Hong_Kong,
Asia/Irkutsk,
Asia/Kuala_Lumpur,
Asia/Manila,
Asia/Singapore,
Asia/Taipei,
Asia/Ulaanbaatar,
Australia/Eucla,
Asia/Jayapura,
Asia/Tokyo,
Asia/Pyongyang,
Asia/Seoul,
Pacific/Palau,
Asia/Dili,
Asia/Chita,
Australia/Adelaide,
Australia/Darwin,
Australia/Brisbane,
Australia/Sydney,
Pacific/Guam,
Pacific/Saipan,
Pacific/Chuuk,
Antarctica/DumontDUrville,
Pacific/Port_Moresby,
Asia/Vladivostok,
Australia/Lord_Howe,
Pacific/Bougainville,
Pacific/Kosrae,
Pacific/Noumea,
Pacific/Norfolk,
Asia/Sakhalin,
Pacific/Guadalcanal,
Pacific/Efate,
Pacific/Fiji,
Pacific/Tarawa,
Asia/Kamchatka,
Pacific/Majuro,
Pacific/Nauru,
Pacific/Auckland,
Antarctica/McMurdo,
Pacific/Funafuti,
Pacific/Wake,
Pacific/Wallis,
Pacific/Chatham,
Pacific/Kanton,
Pacific/Apia,
Pacific/Fakaofo,
Pacific/Tongatapu,
Pacific/Kiritimati
Exemple:

"Europe/Paris"

external_id
string | null
requis

ID of the customer in your system. This helps matching your customer with the one on Hyperline.

Exemple:

null

properties
object
requis

Key/value pairs to store any metadata useful in your context.

Exemple:

null

custom_properties
object
requis

A list of key value with the slug of the custom property as the key and the custom property value as value.

billing_address
object
requis

Customer billing address.

shipping_address
object
requis

Customer shipping address.

billing_email
string<email> | null
requis

Email to which all communications will be sent.

Exemple:

"billing@acme.com"

invoice_emails
string<email>[]
requis

Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the billing_email; otherwise, they won't be sent to the billing_email.

Exemple:
["accounting@acme.com"]
invoicing_entity_id
string
requis

ID of the invoicing entity this customer will be attached to.

Exemple:

"ive_484dn4U48E"

invoice_reminders_enabled
requis

Indicates if invoice reminders are enabled for the customer.

price_book_id
string | null
requis

Default price book ID assigned to the customer.

Exemple:

"prib_613_WbVIZ1329e"

available_payment_methods
enum<string>[]
requis

List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.

Options disponibles:
card,
apple_pay,
google_pay,
direct_debit,
direct_debit_ach,
direct_debit_bacs,
stripe_link,
transfer,
transfer_automated
Exemple:
["card", "direct_debit"]
current_payment_method_type
enum<string> | null
requis

Default payment method type used to pay subscriptions and one-off invoices.

Options disponibles:
card,
apple_pay,
google_pay,
direct_debit,
direct_debit_ach,
direct_debit_bacs,
stripe_link,
transfer,
transfer_automated,
external
Exemple:

"card"

current_payment_method_id
string | null
requis

ID of the default payment method of the customer. Only applies to card and direct debit.

Exemple:

"pm_UTclbc1US8GzCe"

custom_payment_delay
number | null
requis

Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.

Exemple:

30

custom_payment_initiation_delay
number | null
requis

Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.

Exemple:

7

subscriptions
object[]
requis
segment_ids
string[]
requis

IDs of segments this customer belongs to.

Exemple:
["seg_0kIc7jrF7gV00V"]
integrations
object[]
requis
created_at
string<date-time>
requis

Customer creation date. UTC date time string in the ISO 8601 format.

Exemple:

"2024-10-12T07:00:01.860Z"

updated_at
string<date-time>
requis

Customer last edition date. UTC date time string in the ISO 8601 format.

Exemple:

"2024-10-12T07:00:01.860Z"

deleted_at
string<date-time> | null
requis

UTC date time string in the ISO 8601 format.

Exemple:

null