Comments
Various resources in the Picqer API support comments. Comments are used to provide a way to communicate about, for example, an order without having to leave Picqer. This can be done because an order may need additional information or if defective products were received in a purchase order.
Comments are supported for the following resources:
All comments added to resources are visible within Picqer in the interface and can be retrieved through the Comments API.
If Picqer Fulfilment is used, it is also possible to show comments within the fulfilment portal.
Mentions
It is possible to mention users in comments. Users receive a notification when they are mentioned in a comment. To mention a user, you can prefix the full name of the user with an "@"-symbol. For example: a comment containing the text "@Casper Bakker" will mention the user with the name Casper Bakker.
Any mention of a user or fulfilment customer in a comment will be included in the response of the comment API data. This includes the text
that caused to user to be mentioned as well as the mentioned
user or fulfilment customer.
Attributes
Name | Type | Required | Description |
---|---|---|---|
idcomment | integer | generated | Unique Picqer reference |
body | string | required | The body of the comment |
author_type | string | generated | The type of the author of the comment, one of:
|
author | object | generated | The author of the comment, see Authors & mentions for more information |
source_type | string | generated | The type of the object the comment was added to, one of: |
source | object | generated | The object the comment was added to, see Sources for more information |
mentions | array | generated | An array of users or fulfilment customers that were mentioned in the comment |
mentions.text | string | generated | The text in the comment body that caused the mention |
mentions.mentioned_type | string | generated | The type of the mentioned user or fulfilment customer, one of:
|
mention.mentioned | object | generated | The user or fulfilment customer that was mentioned, see Authors & mentions for more information |
show_at_related | boolean | optional | Whether the comment is visible on related resources. For example: comments added to orders can be shown when retrieving comments for a picklist of that order. |
is_visible_fulfilment | boolean | optional | Only for Picqer Fulfilment: Whether the comment is visible for the fulfilment customer the resource belongs to. |
created_at | datetime | generated | The date and time the comment was added |
updated_at | datetime | generated | The date and time the comment was last updated |
Get all comments
Filters
You can filter the comments using the following parameters. Add these filters as a query parameter to the URL.
Attribute | Description | Example |
---|---|---|
idauthor | Only return comments that were authored by the user or fulfilment customer with this identifier | 5123 |
author_type | The type of the author to filter comments for, provide fulfilment_customer to indicate that the given idauthor is the identifier of a fulfilment customer. If this parameter is omitted, the API will assume the given idauthor is the identifier of a user. |
fulfilment_customer |
idmentioned | Only return comments that mention the user or fulfilment customer with this identifier | 6162 |
mentioned_type | The type of the mentioned user or fulfilment customer to filter the comments for, provide fulfilment_customer to indicate that the given idmentioned is the identifier of a fulfilment customer. If this parameter is ommited, the API will assume the given idmentioned is the identifier of a user. |
fulfilment_customer |
Get a single comment
Delete a comment
Sources
Comments can be added to a variety of resources, the source
content of a comment depends on the resource it was added to.
Orders
Comments on orders have order
as the value for the source_type
attribute. The object within the source
attribute has the following fields:
Attribute | Type | Description |
---|---|---|
idorder | integer | Unique Picqer reference of the order |
orderid | string | Per-account order number |
Get all comments of an order
Adding comments to an order
Comments added to orders are shown on the picklist for the order by default. To add a comment that is only visible on an order, the show_at_related
attribute should be set to false
when creating the comment.
Returns
Comments on returns have return
as the value for the source_type
attribute. The object within the source
attribute has the following fields:
Attribute | Type | Description |
---|---|---|
idreturn | integer | Unique Picqer reference of the return |
returnid | string | Per-account return number |
Get all comments for an return
Add a comment to an return
Comments added to returns are shown on the picklist for the return by default. To add a comment that is only visible on an return, the show_at_related
attribute should be set to false
when creating the comment.
Picklists
Comments on picklists have picklist
as the value for the source_type
attribute. The object within the source
attribute has the following fields:
Attribute | Type | Description |
---|---|---|
idpicklist | integer | Unique Picqer reference of the picklist |
picklistid | string | Per-account picklist number |
Get all comments for a picklist
This endpoint can also return comments for the order or return the picklist is for. This is indicated by the source_type
field being order
or return
respectively.
Add a comment to a picklist
Suppliers
Comments on suppliers have supplier
as the value for the source_type
attribute. The attributes for the source
object are the following:
Attribute | Type | Description |
---|---|---|
idsupplier | integer | Unique Picqer reference of the supplier |
name | string | The name of the supplier |
Get all comments for a supplier
Add a comment to a supplier
Purchase orders
Comments on purchase orders have purchaseorder
as the value for the source_type
attribute. The attributes for the source
object are the following:
Attribute | Type | Description |
---|---|---|
idpurchaseorder | integer | Unique Picqer reference of the purchase order |
purchaseorderid | string | Per-account purchase order number |
Get all comments for a purchase order
Add a comment to a purchase order
Comments added to purchase orders can be shown on receipts for the purchase order by setting the show_at_related
field to true
when creating the comment.
Receipts
Comments on receipts have receipt
as the value for the source_type
attribute. The attributes for the source
object are the following:
Attribute | Type | Description |
---|---|---|
idreceipt | integer | Unique Picqer reference of the receipt |
receiptid | string | Per-account receipt number |
Get all comments for a receipt
This endpoint can also return comments for the purchase order the receipt is for. This is indicated by the source_type
of the comment being purchaseorder
.
Add a comment to a receipt
Products
Comments on products have product
as the value for the source_type
attribute. The attributes for the source
object are the following:
Attribute | Type | Description |
---|---|---|
idproduct | integer | Unique Picqer reference of the product |
productcode | string | Product code of product |
name | string | The name of the of the product |
Get all comments for a product
Add a comment to a product
Customers
Attribute | Type | Description |
---|---|---|
idcustomer | integer | Unique Picqer reference of the customer |
customerid | Per-account customer number (can be empty) | |
name | string | Name of the customer |
Get all comments for a customer
Add a comment to a customer
Authors & mentions
Users and fulfilment customers can create comments and can be mentioned in comments. The content of the author
and mentioned
fields in comment responses differ based on the author_type
and mentioned_type
fields, respectively.
user
Attribute | Type | Description |
---|---|---|
iduser | integer | Unique Picqer reference of the user |
username | string | The username of the user |
full_name | string | The full name of the user |
image_url | string | The URL of the avatar of the user |
fulfilment_customer
Attribute | Type | Description |
---|---|---|
idfulfilment_customer | integer | Unique Picqer reference of the fulfilment customer |
username | string | The username of the fulfilment customer |
name | string | The name of the user |