Update customer

Changes a customer's details. Send only what you want to change. The body has the same fields as Create customer.

What's replaced and what's kept

  • A field or block you leave out keeps its current value.
  • To clear a text field, such as phone, send '' or null. A field cleared with '' comes back as ''.
  • customer_id can't be empty. If you clear it, BillPro creates a new 10-character ID.
  • organisation, billing_address and shipping_address change only the fields you send.
  • organisation: null removes the organisation. If the customer has none yet, send name too.
  • billing_address: null is ignored. To clear the billing address, send each field as ''.
  • shipping_address: null removes the shipping address and sets same_as_billing_address to false. Sending a shipping_address without same_as_billing_address: true also sets it to false.
  • same_as_billing_address: true copies the billing address to the shipping address. Any shipping_address you send with it is ignored.
  • The copy isn't kept in sync. When you change the billing address, send same_as_billing_address: true again, or the shipping address keeps the old copy.
  • tag_list replaces all the customer's tags. Send [] to remove every tag. Leave it out to keep them. To change only the tags, use Replace customer tags.
  • customer.status changes the status. Send active or dormant, in lowercase. Other values are ignored without an error, and the status doesn't change.

Existing orders keep the customer details they were created with. Only new orders use the updated details.

The response is the updated customer, without tags.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required
≥ 1

Your merchant profile ID. Required in every request.

Find it in the BillPro dashboard address, after /profiles/. For example, in /profiles/1234/orders the profile ID is 1234.

string
required

ID of the customer.

Body Params

Every key is optional. Send only what you want to change.

customer
object

Optional. The customer's details.

organisation
object | null

Optional. The customer's company. Only the fields you send change. Send null to remove it. If the customer has no organisation yet, send name too. A blank name returns 422.

billing_address
object

Optional. The billing address. Only the fields you send change. null is ignored.

shipping_address
object | null

Optional. The shipping address. Only the fields you send change. Send null to remove it. Ignored when you also send same_as_billing_address: true. Otherwise it sets same_as_billing_address to false.

boolean

Optional. true copies the billing address to the shipping address. The copy isn't kept in sync: send true again after you change the billing address. false keeps the current shipping address.

tag_list
array of strings

Optional. The customer's complete list of tags. Replaces the current list. Send [] to remove every tag. Leave it out to keep the current tags. Saved as described in Replace customer tags.

tag_list
Responses

Language
Credentials
Bearer
API token
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json