WhatsApp conversations from the last week
GET
/whatsapp/conversations
const url = 'https://example.com/whatsapp/conversations?orderId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&status=attention';const options = { method: 'GET', headers: {cookie: '__Host-bottle.session_token=<__Host-bottle.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/whatsapp/conversations?orderId=019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f&status=attention' \ --cookie __Host-bottle.session_token=<__Host-bottle.session_token>Newest first. Give orderId for the conversation a draft order came from, or status for one kind.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”orderId
UUID v7
string format: uuid
Example
019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8fUUID v7
status
string
Responses
Section titled “Responses”Conversations
Media typeapplication/json
object
items
required
Array<object>
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
{ "items": [ { "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" } ]}