Say which customer a WhatsApp conversation is from
POST
/whatsapp/conversations/{id}/customer
const url = 'https://example.com/whatsapp/conversations/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/customer';const options = { method: 'POST', headers: { cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"customerId":"019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/whatsapp/conversations/019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f/customer \ --header 'Content-Type: application/json' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token> \ --data '{ "customerId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }'For a number Bottle does not know, or one several customers share. The conversation is read again straight away for that customer.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
customerId
required
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fResponses
Section titled “Responses”The conversation, read again
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
contactPhone
required
string
profileName
required
string | null
status
required
string
customer
required
object
id
required
UUID v7
string format: uuid
name
required
string
customerChosen
required
boolean
candidates
required
Array<object>
object
id
required
UUID v7
string format: uuid
name
required
string
orderId
required
UUID v7
string | null format: uuid
summary
required
string | null
lines
required
Array<object>
object
productId
required
UUID v7
string | null format: uuid
productName
required
string | null
quantity
required
integer
said
required
string
reason
required
string | null
unsure
required
Array<string>
orderConfirmed
required
boolean
addressConfirmed
required
boolean
empties
required
object
answer
required
string | null
count
required
integer | null
waitingFor
required
string | null
failed
required
boolean
bottleReplying
required
boolean
messages
required
Array<object>
object
id
required
UUID v7
string format: uuid
direction
required
string
kind
required
string
body
required
string | null
translation
required
string | null
sentByBottle
required
boolean
buttons
required
Array<string> | null
sentAt
required
string format: date-time
lastMessageAt
required
string format: date-time
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "status": "waiting", "customer": { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" }, "candidates": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "orderId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "lines": [ { "productId": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f" } ], "empties": { "answer": "yes" }, "waitingFor": "address", "messages": [ { "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "direction": "in" } ]}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or without the permission this needs
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not found
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Conflicts with how things are now
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}