Skip to main content

Update customer

POST 

/customers/:id

Update customer.

Authorization Action:

pay:customers:update

Request

Path Parameters

    id stringrequired

Bodyrequired

    address object
    citystring
    countrystring

    Two-letter country code (ISO 3166-1 alpha-2).

    line1string

    Address line 1 (e.g., street, block, PO Box, or company name).

    line2string

    Address line 2 (e.g., apartment, suite, unit, or building).

    postal_codestring

    ZIP or postal code.

    statestring

    State, county, province, prefecture, or region.

    descriptionstring
    emailstring
    invoice_prefixstring

    The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.

    next_invoice_sequencenumber

    The sequence to be used on the customer's next invoice. Defaults to 1.

    namestring
    phonestring
    preferred_localesstring[]
    tax_exemptstring

    Possible values: [exempt, none, reverse]

    expandstring[]

    Specifies which fields in the response should be expanded.

Responses

Schema
    address object

    The customer's address.

    citystring
    countrystring

    Two-letter country code (ISO 3166-1 alpha-2).

    line1string

    Address line 1 (e.g., street, block, PO Box, or company name).

    line2string

    Address line 2 (e.g., apartment, suite, unit, or building).

    postal_codestring

    ZIP or postal code.

    statestring

    State, county, province, prefecture, or region.

    delinquentbooleanrequired

    When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.

    emailstring

    The customer's email address.

    namestring

    The customer's full name or business name.

    phonestring

    The customer's phone number.

    subscriptionsobject

    The customer's current subscriptions, if any.

    idstringrequired

    Unique identifier for the object.

    creatednumberrequired

    Time at which the object was created. Measured in seconds since the Unix epoch.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://connhex.com/customers/:id");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"address\": {\n \"city\": \"string\",\n \"country\": \"string\",\n \"line1\": \"string\",\n \"line2\": \"string\",\n \"postal_code\": \"string\",\n \"state\": \"string\"\n },\n \"description\": \"string\",\n \"email\": \"string\",\n \"invoice_prefix\": \"string\",\n \"next_invoice_sequence\": 0,\n \"name\": \"string\",\n \"phone\": \"string\",\n \"preferred_locales\": [\n \"string\"\n ],\n \"tax_exempt\": \"exempt\",\n \"expand\": [\n \"string\"\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Parameters
— pathrequired
Body required
{
  "address": {
    "city": "string",
    "country": "string",
    "line1": "string",
    "line2": "string",
    "postal_code": "string",
    "state": "string"
  },
  "description": "string",
  "email": "string",
  "invoice_prefix": "string",
  "next_invoice_sequence": 0,
  "name": "string",
  "phone": "string",
  "preferred_locales": [
    "string"
  ],
  "tax_exempt": "exempt",
  "expand": [
    "string"
  ]
}