Download OpenAPI specification:Download
Make sure that in all requests you set the X-WP-Nonce header.
For collections the pagination is in the response header:
X-WP-Page
X-WP-Total
X-WP-TotalPages
Product related parts will only be available on a woocommerce install.
You can find out more about UPC at https:e//github.com/tauri77/user-post-collections.
Multiple filters values can be provided
context | string Scope under which the request is made; determines fields present in response. |
page | integer Current page of the collection. |
per_page | integer Maximum number of items to be returned in result set. |
search | string Limit results to those matching a string. |
after | string <date-time> Limit response to lists created after a given ISO8601 compliant date. |
modified_after | string <date-time> Limit response to lists modified after a given ISO8601 compliant date. |
before | string <date-time> Limit response to lists created before a given ISO8601 compliant date. |
modified_before | string <date-time> Limit response to lists modified before a given ISO8601 compliant date. |
author | Array of integers Limit result set to lists assigned to specific authors. |
include | Array of integers Limit result set to lists with specific IDs. |
offset | integer Offset the result set by a specific number of items. |
order | string Enum: "asc" "desc" Order sort attribute ascending or descending. |
orderby | string Enum: "author" "date" "id" "modified" "slug" "title" Sort collection by attribute. |
slug | Array of strings Limit result set to lists with one or more specific slugs. |
status | Array of strings Items Enum: "publish" "private" "any" Limit result set to lists assigned one or more statuses. |
types | Array of strings Items Enum: "simple" "numbered" "vote" "favorites" "bookmarks" "cart" "any" Limit result set to lists assigned one or more types. |
[- {
- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
]
Return the user list (without items).
page | integer Current page of the collection. |
per_page | integer Maximum number of items to be returned in result set. |
adding | integer Show only list that can add this post. |
[- {
- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
]
author | integer Author to set (requires user permissions). |
title required | string List title. |
content | string List text description. |
type required | string Enum: "simple" "numbered" "vote" "favorites" "bookmarks" "cart" List type. |
adding | integer Create list, and add a post (postID). |
status required | string Enum: "publish" "private" List status. |
{- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
Returns a single list
listId required | integer <int64> List ID requested |
context | string Scope under which the request is made; determines fields present in response. |
{- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
Response with edited list (without items).
listId required | integer <int64> ID of list that needs to be updated |
author | integer Author to set. |
title | string List title. |
content | string List text description. |
status | string Enum: "publish" "private" List status. |
{- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
Return deleted list as 'previous' property (without items).
listId required | integer <int64> List ID to delete |
{- "deleted": true,
- "previus": {
- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
}
Returns a single list (The user bookmark).
context | string Scope under which the request is made; determines fields present in response. |
{- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
Returns a single list (The user favorites).
context | string Scope under which the request is made; determines fields present in response. |
{- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
Usually for page > 1, the get for list return first page as property 'items'.
listId required | integer <int64> ID of list to return |
page | integer Current page of the collection. |
per_page | integer Maximum number of items to be returned in result set. |
order | string Enum: "asc" "desc" Order sort attribute ascending or descending. |
orderby | string Enum: "" "votes" "position" "post_id" "added" Sort collection by attribute. |
[- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
listId required | integer <int64> ID of list that needs to be updated |
post_id required | integer The post id for add to the list. |
description | string The item comment. |
quantity | integer The quantity for the post on the list. |
context | string Scope under which the request is made; determines fields present in response. |
{- "added": true,
- "data": {
- "status": 201
}, - "list": {
- "id": 231,
- "title": "My List",
- "content": "This is my list description",
- "author": 31,
- "type": "simple",
- "status": "private",
- "count": 23,
- "created": "2022-07-14T05:30:47+0000",
- "modified": "2002-10-10T07:00:00Z",
- "slug": "my-list-by-username",
- "user_login": "UserName",
- "user_link": "",
- "vote_counter": 22,
- "items_page": {
- "X-WP-Total": 53,
- "X-WP-Page": 1,
- "X-WP-TotalPages": 3
}, - "items": [
- {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
]
}
}
If you change the position the other items in the list will also be updated. The new version of the item is returned as the -item- property.
listId required | integer <int64> The list ID |
postId required | integer <int64> The post ID |
position | integer The position for the post on the list. |
description | string The description/comment for the post on the list. |
quantity | integer The quantity for the post on the list. |
{- "updated": true,
- "item": {
- "list_id": 231,
- "post_id": 2341,
- "title": "The post/product title",
- "description": "The item comment",
- "quantity": 2,
- "position": 0,
- "votes": 5,
- "post_type": "product",
- "excerpt": "Cool product for you",
- "featured_media": 5342,
- "product_type": "variable",
- "stock_html": "",
- "is_in_stock": true,
- "price_html": "<del aria-hidden=\"true\"><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><span class=\"woocommerce-Price-currencySymbol\">$</span>4.84</bdi></span></ins> <small class=\"woocommerce-price-suffix\">TAX include</small>",
- "is_on_sale": true,
- "price": "undefined(real)",
- "sale_price": "$4.84",
- "regular_price": "$4.84",
- "price_min": "$5.86",
- "price_max": "$20.50",
- "price_suffix": "TAX include"
}
}
It is required that the list has support for votes
listId required | integer <int64> The list ID |
postId required | integer <int64> The post ID |
context | string Example: context=web Scope under which the request is made; determines fields present in response. |
posts | string Example: posts=55,58,56 Posts present in response, comma separated. |
{- "vote": true,
- "vote_counter": 3,
- "posts": [
- {
- "post_id": 2352,
- "votes": 2
}
]
}
list required | integer The list id for add to cart. |
{- "cart_hash": "64efa61dcfee4aaf4a4be2c4471487e0",
- "msg": "10 x “Sunglasses”, “Hoodie with Zipper”, “Vneck Tshirt” y “Hoodie” added.",
- "err": "Product \"Beanie\" with quantity equal to zero was not added.\nProduct \"Belt\" with quantity equal to zero was not added.",
- "fragments": {
- "fragmentQuery1": "<span>Code for fragment1</span>",
- "fragmentQuery2": "<span>Code for fragment2</span>"
}
}