Lectronz API Reference, Version 1

Messages

Resource

No description provided

This object has the following properties:

idinteger

Unique identifier of the message.

contentstring

Content of the message.

attachmentobject, optional

Optional attachment of the message, typically an image or a document.

See details
urlstring

URL of the attachment, where the file can be downloaded.

filenamestring

Name of the attachment file.

content_typestring

MIME type of the attachment (e.g. "image/jpeg").

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

subjectobject

The subject of the message. Currently, orders are the only supported subject.

See details
idinteger

Unique identifier of the subject.

typestring

The type of the subject. Currently, the only supported type is "order".

linkstring

API URL pointing to the subject (see the order API).

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

read_atstring

UTC timestamp of when the message was read by the recipient in ISO 8601 format. The value is null if the message has not been read yet.

Get a message

Request

GET/api/v1/messages/{id}

Response body (object)

Response Body

details
idinteger

Unique identifier of the message.

contentstring

Content of the message.

attachmentobject, optional

Optional attachment of the message, typically an image or a document.

See details
urlstring

URL of the attachment, where the file can be downloaded.

filenamestring

Name of the attachment file.

content_typestring

MIME type of the attachment (e.g. "image/jpeg").

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

subjectobject

The subject of the message. Currently, orders are the only supported subject.

See details
idinteger

Unique identifier of the subject.

typestring

The type of the subject. Currently, the only supported type is "order".

linkstring

API URL pointing to the subject (see the order API).

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

read_atstring

UTC timestamp of when the message was read by the recipient in ISO 8601 format. The value is null if the message has not been read yet.

Mark a message as read

Mark a message as read. The message type must be set to: customer_order_message. The subject of the message must be an order.

The response code will be 200 if the message was successfully marked as read.

Request

POST/api/v1/messages/{id}/mark_as_read

Response body (object)

Response Body

details
idinteger

Unique identifier of the message.

contentstring

Content of the message.

attachmentobject, optional

Optional attachment of the message, typically an image or a document.

See details
urlstring

URL of the attachment, where the file can be downloaded.

filenamestring

Name of the attachment file.

content_typestring

MIME type of the attachment (e.g. "image/jpeg").

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

subjectobject

The subject of the message. Currently, orders are the only supported subject.

See details
idinteger

Unique identifier of the subject.

typestring

The type of the subject. Currently, the only supported type is "order".

linkstring

API URL pointing to the subject (see the order API).

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

read_atstring

UTC timestamp of when the message was read by the recipient in ISO 8601 format. The value is null if the message has not been read yet.

Get a list of messages

Get a list of messages from newest to oldest. You can use the limit and offset query parameters to paginate the results.

The list only provides minimal information about each message. To get the full details of a message, use the id property to fetch the message individually. If you have a copy of the message locally, you can use the updated_at property to check if the message has been updated since you last fetched it.

Request

GET/api/v1/messages

Response body (object)

Response Body

details
limitinteger

No description provided

offsetinteger

No description provided

total_countinteger

The total number of messages.

messagesarray of object

No description provided

See details
idinteger

Unique identifier of the message.

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

Create a message.

Create a message for an order. The message type must be one of the following: seller_order_message. The subject of the message must be an order.

It is currently not possible to add an attachment to a message.

The response code will be 201 if the message was successfully created.

Request

POST/api/v1/messages

Request body (object)

Request Body

details
idinteger

Unique identifier of the message.

contentstring

Content of the message.

attachmentobject, optional

Optional attachment of the message, typically an image or a document.

See details
urlstring

URL of the attachment, where the file can be downloaded.

filenamestring

Name of the attachment file.

content_typestring

MIME type of the attachment (e.g. "image/jpeg").

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

subjectobject

The subject of the message. Currently, orders are the only supported subject.

See details
idinteger

Unique identifier of the subject.

typestring

The type of the subject. Currently, the only supported type is "order".

linkstring

API URL pointing to the subject (see the order API).

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

read_atstring

UTC timestamp of when the message was read by the recipient in ISO 8601 format. The value is null if the message has not been read yet.

Response body (object)

Response Body

details
idinteger

Unique identifier of the message.

contentstring

Content of the message.

attachmentobject, optional

Optional attachment of the message, typically an image or a document.

See details
urlstring

URL of the attachment, where the file can be downloaded.

filenamestring

Name of the attachment file.

content_typestring

MIME type of the attachment (e.g. "image/jpeg").

typestring

The type of the message.

Valid values are: customer_order_message, seller_order_message, refund_order_message.

subjectobject

The subject of the message. Currently, orders are the only supported subject.

See details
idinteger

Unique identifier of the subject.

typestring

The type of the subject. Currently, the only supported type is "order".

linkstring

API URL pointing to the subject (see the order API).

created_atstring

UTC creation date of the message in ISO 8601 format.

updated_atstring

UTC timestamp of last update of the message in ISO 8601 format.

read_atstring

UTC timestamp of when the message was read by the recipient in ISO 8601 format. The value is null if the message has not been read yet.