Skip to main content

Send a message to the shopper

POST /v2/post_checkout/chat/{order_id}/messages

Sends a message to the shopper associated with the order.

Security

NameInDescription
AuthorizationheaderThe Authorization header with the bearer token acquired during authentication.

Parameters

NameInTypeRequiredDescription
order_idpathstringRequiredThe order ID for this message.

Request

FieldTypeRequiredDescription
bodystringRequiredThe body of the message. Maximum length is 1000 characters.

Request examples

curl --request POST \
--url 'https://connect.instacart.com/v2/post_checkout/chat/{order_id}/messages' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"body": "string"
}'

Response

FieldTypeRequiredDescription
idintegerRequiredThe ID of this message.
typestringRequiredThe type of the chat message.
created_atstringRequiredWhen the message was created.
timezonestringRequiredThe time zone for this message.

Response examples

200 Success

{
"id": 123,
"type": "CHAT",
"created_at": "2021-01-01T05:00:00Z",
"timezone": "Timezone"
}

4XX Errors

Error responses return either a single error or multiple errors.

HTTP CodeCauseError MessageError CodeError Meta
400Body length exceeds maximum"is too long (maximum is 1000 characters)"1001{"key":"body"}
403Chat Action Disabled"Sending a message is not allowed at this time"nullNot applicable
403Shopper Not Available"Sending a message is not allowed at this time"nullNot applicable
404Order not found"Resource not found"4000Not applicable