Update a product post

put

/swm/rs/v1/spaces/{spaceId}/products/{contentId}

Update the product content post for a space, including moving a post to another space.

The API user must be a member of the space and own the content.

Any corresponding product image file for the post can be updated using the Media API.

All request parameters are optional, but the request must include at least one parameter.
  • productPrice is a free form character string and is not limited. This value will update the existing stored price for the product post; it is not used in the email notification. Use notificationProductPrice to show a price in the email notification.
  • productSalePrice is optional. This value will update the existing stored sale price for the product post
  • productDesiredQuantity is optional and maybe a blank value
  • productCurrencyCode
    • if not included, the existing value for the resource will not change
    • if included, it must be a three-character alphanumeric value; it cannot be blank or null
  • productImageUrl may be a blank value, which will pass through as blank to the email notification
    • if not blank, then must be an absolute URL that includes the protocol (HTTP or HTTPS) with either the store domain (i.e. the CC host value) or the SWM host: &lthttp_or_https>://&ltcchost>/&ltwhatever> or &lthttp_or_https>://&ltswmhost>/&ltwhatever>
  • productDesiredPriority is one of these priority settings:
    • 0 - Priority not specified
    • 1 - Low
    • 2 - Medium
    • 3 - High
  • targetSpaceId can not be the same as {spaceid} in the endpoint path
  • notificationProductPrice is optional. If not included, it will result in blank price value in any email notification. If included,
    • value will pass through to include with any email notification,
    • it cannot be blank or empty,
    • must be text string,
    • minimum 2 characters,
    • maximum 30 characters,
    • supports Unicode-8 characters
    • Examples: A$14.89 or ?400
Triggers an email notification if the product post is moved to another space that has other members who have opted-in to receive the notification.

The finalSpaceId value in the response will be same as targetSpaceId if product post (with matching productSkuId) does not already exist in targetSpaceId; otherwise, finalSpaceId will be same as {spaceid} in the endpoint path.

The parameter emailConfigMissing will appear in the response if the system is not configured to send out email notifications.

Request

Supported Media Types
Path Parameters
Body ()
{
"productTitle":"string", - A new title for the product post (optional)
"productCurrencyCode":"string", - A new three-character alphanumeric value (optional)
"productPrice":"string", - The new list price of the product (optional)
"productSalePrice":"string", - The new sale price of the product, if any (optional)
"productDesiredQuantity":"number", - The new user's desired quantity for the product (optional)
"productDesiredPriority":"number", - The user's desired priority for the product (optional)
"targetSpaceId":"string", - The destination space ID, if moving the product post (optional)
"productImageUrl":"string", - The URL of the product image on the store to use for the email notification (optional)
"notificationProductPrice":"string" - The product price to include with any email notification for post (optional)
}
Root Schema : schema
Type: string
Back to Top

Response

Supported Media Types

200 Response

product resource updated

403 Response

not product creator

404 Response

product resource not found
Back to Top

Examples

Sample Request:

       {
        "productTitle":"Samsung - F90BN Camcorder",
        "productPrice":"699.99",
        "productSalePrice":"596.89",
        "targetSpaceId":"789283",
        "productCurrencyCode":"USD",
        "notificationProductPrice":"$596.00",
        "productImageUrl":"http://mystore.example.com/images/?source=Samsung_F90BN.jpg",
        "productDesiredQuantity":"1",
        "productDesiredPriority":"2"
       }    

Sample Response:

       {"response":{"code":"200.1","developerMessage":"product resource updated"},
        "contentId":"2269693",
        "finalSpaceId":"789283"}    

Possible Error Codes:

       {
          "code":"403.1","developerMessage":"not space member",
          "code":"403.2","developerMessage":"not content creator",
          "code":"404.0","developerMessage":"product resource not found"
       }    
Back to Top