Skip to main content

Edit customer

Edit the customer details.

curl -X POST \
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...' \
-H 'content-type: application/json' \
-H 'Idempotency-Key: da7ca8f9-915b-472b-b5f0-81945bff9e4a' \
-d '{
"billingAddress": {
"attentionName": "",
"careOf": "",
"city": "Stockholm",
"companyName": "Ledyer AB",
"country": "SE",
"postalCode": "11359",
"streetAddress": "Sveavägen 49"
},
"email": "jan.jonsson@business.com",
"invoiceChannel": {
"details": "a detail",
},
"phone": "004613371337",
"reference1": "ref #1",
"reference2": "ref #2",
"shippingAddress": {
"attentionName": "Anders",
"careOf": "",
"city": "Stockholm",
"companyName": "Ledyer AB",
"contact": {
"email": "anders.andersson@example.com",
"firstName": "Anders",
"lastName": "Andersson",
"phone": "004612341234"
},
"country": "SE",
"postalCode": "11359",
"streetAddress": "Sveavägen 49"
}
}'
https://api.sandbox.ledyer.com/v1/orders/:orderId/customer

Request Headers

Idempotency-Key

stringOptional

By providing a unique value for this header, the idempotency of the operation will be guaranteed. This means that retries of requests will be safe to apply in case of network errors, socket errors and timeouts, etc. We recommend using UUID version 4 for the key.

Path parameters

orderId

The order ID string that was obtained when the order session was created.

Request body

billingAddress

companyAddressOptional

The billing address. Replaces the existing shipping address for the customer.

email

stringOptional

The customer's email address.

invoiceChannel

objectOptional

An object containing the property details, which is a string.

phone

stringOptional

The customer's phone number.

reference1

stringOptional

Merchant reference 1. For example, reference code or cost center.

reference2

stringOptional

Merchant reference 2. For example, purchase order number.

shippingAddress

companyAddressOptional

The shipping address. Replaces the existing shipping address for the customer.