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:
  • user
  • fulfilment_customer
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:
  • user
  • fulfilment_customer
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

GET https://example.picqer.com/api/v1/comments
HTTP/1.1 200 OK [ { "idcomment": 25612312, "body": "@Bob Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis maximus arcu.", "author_type": "user", "author": { "iduser": 2671, "username": "alice", "full_name": "Alice", "image_url": "https://example.picqer.com/api/v1/users/2671/avatar" }, "source_type": "picklist", "source": { "idpicklist": 1025721, "picklistid": "P2023-2056" }, "mentions": [ { "text": "@Bob", "mentioned_type": "user", "mentioned": { "iduser": 3056, "username": "bob", "full_name": "Bob", "image_url": "https://example.picqer.com/api/v1/users/3056/avatar" } } ], "show_at_related": true, "created_at": "2023-09-18 10:23:07", "updated_at": "2023-09-18 10:23:07" }, { "idcomment": 25612010, "body": "Etiam tristique, nunc porttitor blandit tempor, libero nunc dignissim erat, sit amet laoreet magna turpis vel tortor.", "author_type": "user", "author": { "iduser": 3056, "username": "bob", "full_name": "Bob", "image_url": "https://example.picqer.com/api/v1/users/3056/avatar" }, "source_type": "picklist", "source": { "idpicklist": 1025721, "picklistid": "P2023-2056" }, "mentions": [], "show_at_related": true, "created_at": "2023-09-18 10:19:51", "updated_at": "2023-09-18 10:19:51" } ]
This endpoint uses pagination.

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

GET https://example.picqer.com/api/v1/comments/{idcomment}
HTTP/1.1 200 OK { "idcomment": 25612312, "body": "@Bob Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque quis maximus arcu.", "author_type": "user", "author": { "iduser": 2671, "username": "alice", "full_name": "Alice", "image_url": "https://example.picqer.com/api/v1/users/2671/avatar" }, "source_type": "picklist", "source": { "idpicklist": 1025721, "picklistid": "P2023-2056" }, "mentions": [ { "text": "@Bob", "mentioned_type": "user", "mentioned": { "iduser": 3056, "username": "bob", "full_name": "Bob", "image_url": "https://example.picqer.com/api/v1/users/3056/avatar" } } ], "show_at_related": true, "created_at": "2023-09-18 10:23:07", "updated_at": "2023-09-18 10:23:07" }

Delete a comment

DELETE https://example.picqer.com/api/v1/comments/{idcomment}
HTTP/1.1 204 No Content

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

GET https://example.picqer.com/api/v1/orders/{idorder}/comments
This endpoint uses pagination.

Adding comments to an order

POST https://example.picqer.com/api/v1/orders/{idorder}/comments

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

GET https://example.picqer.com/api/v1/returns/{idreturn}/comments
This endpoint uses pagination.

Add a comment to an return

POST https://example.picqer.com/api/v1/returns/{idreturn}/comments

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

GET https://example.picqer.com/api/v1/picklists/{idpicklist}/comments
This endpoint uses pagination.

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

POST https://example.picqer.com/api/v1/picklists/{idpicklist}/comments

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

GET https://example.picqer.com/api/v1/suppliers/{idsupplier}/comments
This endpoint uses pagination.

Add a comment to a supplier

POST https://example.picqer.com/api/v1/suppliers/{idsupplier}/comments

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

GET https://example.picqer.com/api/v1/purchaseorders/{idpurchaseorder}/comments
This endpoint uses pagination.

Add a comment to a purchase order

POST https://example.picqer.com/api/v1/purchaseorders/{idpurchaseorder}/comments

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

GET https://example.picqer.com/api/v1/receipts/{idreceipt}/comments
This endpoint uses pagination.

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

POST https://example.picqer.com/api/v1/receipts/{idreceipt}/comments

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

GET https://example.picqer.com/api/v1/products/{idproduct}/comments
This endpoint uses pagination.

Add a comment to a product

POST https://example.picqer.com/api/v1/products/{idproduct}/comments

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

GET https://example.picqer.com/api/v1/customers/{idcustomer}/comments
This endpoint uses pagination.

Add a comment to a customer

POST https://example.picqer.com/api/v1/customers/{idcustomer}/comments

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
Read more Warehouses