Customer's Address is Missing While Creating Booking

Hi, whenever a curl command is run for creating booking : https://connect.squareupsandbox.com/v2/bookings
It automatically replaces the address_line_1 and address_line_2 parameter of Customer.

Due to which I am getting blank address of customer while creating booking.
If the customer’s address is updated using : ```
https://connect.squareupsandbox.com/v2/customers/customer_id \
The address is again seen in appointment.
I think this is a bug related to square. Can you please look into this??

Do you have an example CURL request you’re seeing this with? Also what’s the application ID. Also when providing the request please redact the access token. They’re secret but everything else is fine. :slightly_smiling_face:

Currently customer with id = 8604Q8WX4V89MZ85RQ58DZHY3R is having :
“address_line_1”: “address1test”,
“address_line_2”: “address2test”,

  but when I try to run the curl command for booking as below, the address_line_1 and address_line_2 is replaced with blank and there's no address inside the appointment.

curl https://connect.squareupsandbox.com/v2/bookings
-X POST
-H ‘Square-Version: 2022-10-19’
-H ‘Authorization: TOKEN_HIDDEN’
-H ‘Content-Type: application/json’
-d ‘{
“booking”: {
“appointment_segments”: [
{
“team_member_id”: “8604Q8WX4V89MZ85RQ58DZHY3R”,
“service_variation_id”: “M63L5JK5LPS6PIV3HHIMDQUU”,
“service_variation_version”: 1664204513158
}
],
“location_type”: “CUSTOMER_LOCATION”,
“customer_id”: “8604Q8WX4V89MZ85RQ58DZHY3R”,
“location_id”: “LXTQT7NA7BXQQ”,
“start_at”: “2022-11-07T13:05:59.609Z”,
“customer_note”: “TESTnOTE”
}
}’

I haven’t run the curl command you can first check the address from :

curl https://connect.squareupsandbox.com/v2/customers/8604Q8WX4V89MZ85RQ58DZHY3R
-H ‘Square-Version: 2022-10-19’
-H ‘Authorization: TOKEN_HIDDEN’
-H ‘Content-Type: application/json’

After running : POST /v2/bookings
you will find that address is blank.

I can provide the access_token if needed, you can message me for token if required.

Thanks,

When you create a customer profile you’re given a customer_id. All the customer information like the address lives in the customer profile. To reduce the size of the CreateBooking request we only require the customer_id. So this is working as expected.

If your application wants to get the booking with the customers address you can call RetrieveCustomer to get the details from the customer profile. :slightly_smiling_face:

The actual bug that I am currently getting is that whenever I run a curl command for
" POST /v2/bookings " . The address_line_1 and address_line_2 of customer is replaced with blank values. So, after booking an appointment if you check the appointment details, the Street Address and Apt./Suite is blank. So, can you check what is causing this error at my end?

That’s correct cause the address isn’t a valid field when you call CreateBooking. :slightly_smiling_face:

Hi Bryan,
Thank you for your response. When we retrieve the customer, the address is deleted.
Steps to reproduce:

  1. Create(POST /v2/customers - Square API Reference) a customer with an address.
  2. Retrieve(GET /v2/customers/{customer_id} - Square API Reference) the Customer. → The customer address is as provided in Step 1.
  3. Create Booking(POST /v2/bookings - Square API Reference) with this customer ID.
  4. Retrieve(GET /v2/customers/{customer_id} - Square API Reference) the Customer again. The address is null.

Why is this a problem?
Our app creates a customer then books the appointment through the front end and our technicians don’t know where to go for HOME SERVICE.

Please feel free to reach out if you would like a HAR Capture or go over this in a screen share. Can you please confirm if this is an expected behavior or a bug?
If this is a bug, any tentative timelines to fix this would be very helpful.
Thank you! Have a good day ahead.

I haven’t been able to reproduce this. I went through the steps you provided and everything worked as expected. What’s the customer_id that you experienced this with. I see the one in your earlier example has been deleted. :slightly_smiling_face:

This is the customer id : 0136HZ42SNFXNQE98QXES01G8M , if you try to run

Create Booking(POST /v2/bookings - Square API Reference) with this customer ID.

The address will be deleted.

Can we have a work around session for further clarification of this issue?

Hi Bryan,

We are still facing this issue. How can we help you reproduce the issue? Please let me know if we can schedule a screen share. Thanks you!
Ashish

Do you have a recent example of this? :slightly_smiling_face: