ProductLists Resource (Shop API 16.2)

Summary

Http Method Resource Description
GET /Product_lists Retrieves a list of all product lists as defined by the given search term (hence email, firstname, lastname). If no search term is given all owned product lists will be retrieved.
POST /Product_lists Creates a product list.
GET /Product_lists/{List_id} Retrieves a product list by id.
PATCH /Product_lists/{List_id} Changes a product list. Changeable properties are:
  • name
  • description
  • if the list is public
  • event
  • registrant
  • co registrant
  • shipping address
  • post even shipping address
DELETE /Product_lists/{List_id} Deletes a product list.
GET /Product_lists/{List_id}/Items Retrieves a product list's items.
POST /Product_lists/{List_id}/Items Adds a product to a product list.
PATCH /Product_lists/{List_id}/Items/{Item_id} Change an item of a product list. You can change the priority, quantity and if this item is public.
DELETE /Product_lists/{List_id}/Items/{Item_id} Deletes an item of a product list.

Get List of Product Lists

Retrieves a list of all product lists as defined by the given search term (hence email, firstname, lastname). If no search term is given all owned product lists will be retrieved.

Url

GET http://hostname:port/dw/shop/v16_2/product_lists?email={String}&firstname={String}&lastname={String}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Response Document

ProductListResult

Query Parameters

Parameter Type Description Constraints
email String email address of the customer, the product lists belong to  
firstname String first name of the customer, the product lists belong to  
lastname String last name of the customer, the product lists belong to  

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductListSearchTermException   Indicates that the anonymous customer did not provide a proper search term.
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_lists.afterGET

afterGET (doc : Document) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
  • Status.OK for success.
  • Status.ERROR in case something went wrong.

Sample

REQUEST:
GET /dw/shop/v16_2/product_lists?firstname=john&lastname=doe HTTP/1.1
Host: example.com
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

RESPONSE:
Cache-Control:max-age=0,no-cache,no-store,must-revalidate
Keep-Alive:timeout=15, max=99
Connection:Keep-Alive
Content-Type:application/json;charset=UTF-8
Content-Length:483
{
   "_v" : "16.2",
   "count" : 2,
   "data" : 
   [
      
      {
         "href" : "https://example.com/dw/shop/v16_2/product_lists/cd2Id9aaabTQYaaadj9vRpVGwg",
         "name" : "WAPI-Wedding",
         "public" : false,
         "title" : "WAPI-Wedding",
         "type" : "gift_registry"
      },
      
      {
         "href" : "https://example.com/dw/shop/v16_2/product_lists/ghjMV9aaab9d2aaafjycppVGwe",
         "public" : false,
         "title" : "Wish List",
         "type" : "wish_list"
      }
   ],
   "total" : 2
}

Create a Product List

Creates a product list.

Url

POST https://hostname:port/dw/shop/v16_2/product_lists

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Request Document

ProductList

Response Document

ProductList

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidProductListTypeException   Indicates that there was no or an invalid type given for the to be created product list.
400 InvalidAddressLinkException

addressId (String)

customerNo (String)

Indicates that the id of the given address link does not reference an address of the current customer.
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.

Sample

REQUEST:
POST /dw/shop/v16_2/product_lists HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

{
    "type": "gift_registry",
    "name": "MyWeddingGiftRegistry",
    "description": "my wedding gift registry",
    "public": false,
    "post_event_shipping_address_link" : 
    {
       "address_id" : "home"
    },
    "shipping_address_link" : 
    {
       "address_id" : "work"
    },
    "co_registrant" : 
    {
       "email" : "[email protected]",
       "first_name" : "Jane",
       "last_name" : "Doe",
       "role" : "Bride"
    },
    "registrant" : 
    {
       "email" : "[email protected]",
       "first_name" : "John",
       "last_name" : "Doe",
       "role" : "Groom"
    },
    "event" : 
    {
       "city" : "Washington",
       "country" : "US",
       "date" : "2015-07-30T00:00Z",
       "state" : "DC",
       "type" : "Wedding"
    }
}

# in case of success

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "_type" : "product_list",
   "co_registrant" : 
   {
      "_type" : "product_list_registrant",
      "email" : "[email protected]",
      "first_name" : "Jane",
      "last_name" : "Doe",
      "role" : "Bride"
   },
   "current_shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "work",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/work",
      "title" : "work, John Doe, Washington"
   },
   "description" : "my wedding gift registry",
   "event" : 
   {
      "_type" : "product_list_event",
      "city" : "Washington",
      "country" : "US",
      "date" : "2015-07-30T00:00Z",
      "state" : "DC",
      "type" : "Wedding"
   },
   "id" : "cd5YN9aaab82QaaadpEuRQ00Y8",
   "items_link" : 
   {
      "_type" : "product_list_item_link",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/product_lists/cd5YN9aaab82QaaadpEuRQ00Y8/items",
      "title" : "0 items"
   },
   "name" : "MyWeddingGiftRegistry",
   "post_event_shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "home",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/home",
      "title" : "home, Jane Doe, Washington"
   },
   "public" : false,
   "registrant" : 
   {
      "_type" : "product_list_registrant",
      "email" : "[email protected]",
      "first_name" : "John",
      "last_name" : "Doe",
      "role" : "Groom"
   },
   "shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "work",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/work",
      "title" : "work, John Doe, Washington"
   },
   "type" : "gift_registry"
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (missing product list type):
 
RESPONSE:
HTTP/1.1 400 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "InvalidProductListTypeException",
      "message" : "Productlist type missing or invalid."
   }
}

Get Product List

Retrieves a product list by id.

Url

GET http://hostname:port/dw/shop/v16_2/product_lists/{list_id}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Response Document

ProductList

Path Parameters

Parameter Type Description Constraints
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_list.afterGET

afterGET (doc : Document) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
  • Status.OK for success.
  • Status.ERROR in case something went wrong.

Sample

REQUEST:
GET /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY HTTP/1.1
Host: example.com
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

# in case of success (own list):
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "co_registrant" : 
   {
      "email" : "[email protected]",
      "first_name" : "Jane",
      "last_name" : "Doe",
      "role" : "Bride"
   },
   "current_shipping_address_link" : 
   {
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/f93jdf93jdfd/addresses/me?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title" : "me, John Doe, Woburn"
   },
   "event" : 
   {
      "city" : "Washington",
      "country" : "US",
      "date" : "2015-07-30T00:00Z",
      "state" : "DC",
      "type" : "Wedding"
   },
   "id" : "bcqg6iWbw4XEYaaadjixFLTWP0",
   "items_link" : 
   {
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/product_lists/bcqg6iWbw4XEYaaadjixFLTWP0/items?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title" : "2 items"
   },
   "name" : "DC-Doe-Wedding",
   "post_event_shipping_address_link" : 
   {
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/f93jdf93jdfd/addresses/jane?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title" : "jane, Jane Doe, Springfield"
   },
   "public": true, 
   "registrant" : 
   {
      "email" : "[email protected]",
      "first_name" : "John",
      "last_name" : "Doe",
      "role" : "Groom"
   },
   "shipping_address_link" : 
   {
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/f93jdf93jdfd/addresses/me?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title" : "me, John Doe, Woburn"
   },
   "type" : "gift_registry"
}

# in case of success (public list of another one):
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "co_registrant" : 
   {
      "first_name" : "Jane",
      "last_name" : "Doe",
      "role" : "Bride"
   },
   "event" : 
   {
      "city" : "Washington",
      "country" : "US",
      "date" : "2015-07-30T00:00Z",
      "state" : "DC",
      "type" : "Wedding"
   },
   "id" : "bcqg6iWbw4XEYaaadjixFLTWP0",
   "items_link" : 
   {
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/product_lists/bcqg6iWbw4XEYaaadjixFLTWP0/items?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "title" : "2 items"
   },
   "name" : "DC-Doe-Wedding",
   "public": true, 
   "registrant" : 
   {
      "first_name" : "John",
      "last_name" : "Doe",
      "role" : "Groom"
   },
   "product_list_shipping_address" : 
   {
      "address_id" : "me",
      "first_name" : "John",
      "last_name" : "Doe",
      "city" : "Woburn"
   },
   "type" : "gift_registry"
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTZ' not found."
   }
}

Change Product List

Changes a product list. Changeable properties are:

Url

PATCH https://hostname:port/dw/shop/v16_2/product_lists/{list_id}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Request Document

ProductList

Response Document

ProductList

Path Parameters

Parameter Type Description Constraints
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 InvalidAddressLinkException

addressId (String)

customerNo (String)

Indicates that the id of the given address link does not reference an address of the current customer.
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist

Sample

REQUEST:
PATCH /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 
{
    "name": "MyWeddingGiftRegistry",
    "description": "my wedding gift registry",
    "public": false,
    "post_event_shipping_address_link" : 
    {
       "address_id" : "home"
    },
    "shipping_address_link" : 
    {
       "address_id" : "work"
    },
    "co_registrant" : 
    {
       "email" : "[email protected]",
       "first_name" : "Jane",
       "last_name" : "Doe",
       "role" : "Bride"
    },
    "registrant" : 
    {
       "email" : "[email protected]",
       "first_name" : "John",
       "last_name" : "Doe",
       "role" : "Groom"
    },
    "event" : 
    {
       "city" : "Washington",
       "country" : "US",
       "date" : "2015-07-30T00:00Z",
       "state" : "DC",
       "type" : "Wedding"
    }
}

# in case of success

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "_type" : "product_list",
   "co_registrant" : 
   {
      "_type" : "product_list_registrant",
      "email" : "[email protected]",
      "first_name" : "Jane",
      "last_name" : "Doe",
      "role" : "Bride"
   },
   "current_shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "work",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/work",
      "title" : "work, John Doe, Washington"
   },
   "description" : "my wedding gift registry",
   "event" : 
   {
      "_type" : "product_list_event",
      "city" : "Washington",
      "country" : "US",
      "date" : "2015-07-30T00:00Z",
      "state" : "DC",
      "type" : "Wedding"
   },
   "id" : "cd5YN9aaab82QaaadpEuRQ00Y8",
   "items_link" : 
   {
      "_type" : "product_list_item_link",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/product_lists/bcqg6iWbw4XEYaaadjixFLTWP0/items",
      "title" : "2 items"
   },
   "name" : "MyWeddingGiftRegistry",
   "post_event_shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "home",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/home",
      "title" : "home, Jane Doe, Washington"
   },
   "public" : false,
   "registrant" : 
   {
      "_type" : "product_list_registrant",
      "email" : "[email protected]",
      "first_name" : "John",
      "last_name" : "Doe",
      "role" : "Groom"
   },
   "shipping_address_link" : 
   {
      "_type" : "address_link",
      "address_id" : "work",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/customers/adR8MyHDFHNOTbQGu1ssGsKaif/addresses/work",
      "title" : "work, John Doe, Washington"
   },
   "type" : "gift_registry"
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTY' not found."
   }
}

Delete Product List

Deletes a product list.

Url

DELETE https://hostname:port/dw/shop/v16_2/product_lists/{list_id}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Path Parameters

Parameter Type Description Constraints
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list.
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist.

Sample

REQUEST:
DELETE /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

# in case of success:
 
RESPONSE:
HTTP/1.1 204 No Content
Content-Type : text/plain; charset=ISO-8859-1
Cache-Control: max-age=0,no-cache,no-store,must-revalidate


# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTZ' not found."
   }
}

Get Product List Items

Retrieves a product list's items.

Url

GET http://hostname:port/dw/shop/v16_2/product_lists/{list_id}/items

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Response Document

ProductListItemResult

Path Parameters

Parameter Type Description Constraints
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist

Customization

This Resource supports server-side customization.

Extension Point Method Detail
dw.ocapi.shop.product_list.item.afterGET

afterGET (doc : Document) : Status

The function is called after the request has been processed.

Parameters:
doc - the document
Returns:
  • Status.OK for success.
  • Status.ERROR in case something went wrong.

Sample

REQUEST:
GET /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY/items HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

# in case of success (own list):
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "count" : 2,
   "data" : 
   [
      
      {
         "id" : "cdPIB9aaabYFEaaadjOdBoMrMt",
         "position" : -1,
         "priority" : 2,
         "product_details_link" : 
         {
            "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/products/008884303989?locale=en-US&client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "product_id" : "008884303989",
            "product_name" : "Platinum Blue Stripes Easy Care Fitted Shirt",
            "title" : "Platinum Blue Stripes Easy Care Fitted Shirt"
         },
         "public" : true,
         "purchased_quantity" : 0,
         "quantity" : 10,
         "type" : "product"
      },
      
      {
         "id" : "cdH9N9aaabYFIaaadjOdBoMrMt",
         "position" : -1,
         "priority" : 2,
         "product_details_link" : 
         {
            "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/products/008885535488?locale=en-US&client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "product_id" : "008885535488",
            "product_name" : "Must Have Washable No-Iron Georgette Blouse",
            "title" : "Must Have Washable No-Iron Georgette Blouse"
         },
         "public" : false,
         "purchased_quantity" : 0,
         "quantity" : 1,
         "type" : "product"
      }
   ],
   "total" : 2
}

# in case of success (public list of another one):
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "count" : 1,
   "data" : 
   [
      
      {
         "id" : "cdPIB9aaabYFEaaadjOdBoMrMt",
         "position" : -1,
         "priority" : 2,
         "product_details_link" : 
         {
            "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/products/008884303989?locale=en-US&client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
            "product_id" : "008884303989",
            "product_name" : "Platinum Blue Stripes Easy Care Fitted Shirt",
            "title" : "Platinum Blue Stripes Easy Care Fitted Shirt"
         },
         "public" : true,
         "purchased_quantity" : 0,
         "quantity" : 10,
         "type" : "product"
      }
   ],
   "total" : 1
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTZ' not found."
   }
}

Add Product to Product List

Adds a product to a product list.

Url

POST http://hostname:port/dw/shop/v16_2/product_lists/{list_id}/items

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Request Document

ProductListItem

Response Document

ProductListItem

Path Parameters

Parameter Type Description Constraints
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ProductListProductIdMissingException   Indicates that there was no product id given for the desired item.
400 ProductListItemTypeMissingException   Indicates that there was not item type given, which is required create a product item.
400 ProductListProductNotFoundException

productId (String)

Indicates that there is no product existing for the given product id.
400 ProductListDuplicateGiftCertificateException   Indicates that the given gift certificate could not be added due to an existing one (there can be only one gift certificate per product list).
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist

Sample

#
# Example 1: add product
#
REQUEST:
POST /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY/items HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

{
    "type" : "product",
    "quantity" : 5,
    "priority" : 10,
    "public" : false,
    "product_details_link" :
    {
        "product_id" : "008884303989"
    }
}

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "_type" : "product_list_item",
   "id" : "cdHYN9aaabZCEaaadj7dhW0d1L",
   "position" : -1,
   "priority" : 10,
   "product_details_link" : 
   {
      "_type" : "product_details_link",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/products/008884303989?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "product_id" : "008884303989",
      "product_name" : "Platinum Blue Stripes Easy Care Fitted Shirt",
      "title" : "Platinum Blue Stripes Easy Care Fitted Shirt"
   },
   "public" : false,
   "purchased_quantity" : 0,
   "quantity" : 5,
   "type" : "product"
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTZ' not found."
   }
}

# in case of failure (product id missing):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "ProductListProductIdMissingException",
      "message" : "Product id missing."
   }
}

# in case of failure (product not found for given id):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "ProductListProductNotFoundException",
      "message" : "Product with id '008884303987' not found."
   }
}

# in case of failure (product item type invalid):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "ProductListInvalidItemTypeException",
      "message" : "Productlist item type '999' unknown."
   }
}

#
# Example 2: add gift certificate
#
REQUEST:
POST /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY/items HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

{
    "type" : "gift_certificate",
    "priority" : 10,
    "public" : false,
}

# in case of success:
 
RESPONSE:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "_type" : "product_list_item",
   "id" : "ceOe79aaabcKgaaadjm3RW0d1T",
   "position" : -1,
   "priority" : 5,
   "public" : false,
   "purchased_quantity" : 0,
   "type" : "gift_certificate"
}

# in case of failure (list already contained a gift certificate when trying to add another one):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "ProductListDuplicateGiftCertificateException",
      "message" : "Productlist already contains a gift certificate."
   }
}

Change Item of Product List

Change an item of a product list. You can change the priority, quantity and if this item is public.

Url

PATCH http://hostname:port/dw/shop/v16_2/product_lists/{list_id}/items/{item_id}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Request Document

ProductListItem

Response Document

ProductListItem

Path Parameters

Parameter Type Description Constraints
item_id String id of the item mandatory=true, maxLength=28, minLength=1, nullable=false
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist
404 ProductListItemNotFoundException

itemId (String)

Indicates that this item doesn't exist

Sample

REQUEST:
PATCH /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY/items/egxlF9aaabd0kaaaejqgaDhv2c HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

{
    "quantity":5,
    "priority":10,
    "public":false
}

# in case of success

RESPONSE:
HTTP/1.1 200 OK
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "_type" : "product_list_item",
   "id" : "egxlF9aaabd0kaaaejqgaDhv2c",
   "position" : -1,
   "priority" : 10,
   "product_details_link" : 
   {
      "_type" : "product_details_link",
      "link" : "https://example.com/s/SiteGenesis/dw/shop/v16_2/products/008884303989?client_id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "product_id" : "008884303989",
      "product_name" : "Platinum Blue Stripes Easy Care Fitted Shirt",
      "title" : "Platinum Blue Stripes Easy Care Fitted Shirt"
   },
   "public" : false,
   "purchased_quantity" : 0,
   "quantity" : 5,
   "type" : "product"
}

# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTY' not found."
   }
}


# in case of failure (item not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist item with id 'egxlF9aaabd0kaaaejqgaDhv2c' not found."
   }
}

Delete Product from Product List

Deletes an item of a product list.

Url

DELETE http://hostname:port/dw/shop/v16_2/product_lists/{list_id}/items/{item_id}

Formats

json, xml

Authentication

Name Description
JWT Authentication via Customer JWT token.

Path Parameters

Parameter Type Description Constraints
item_id String id of the item mandatory=true, maxLength=28, minLength=1, nullable=false
list_id String id of the list mandatory=true, maxLength=28, minLength=1, nullable=false

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
401 CustomerNotAuthenticatedException   Indicates that the customer is not authenticated and must be logged in.
403 CustomerNotAuthorizedException   Indicates that the authenticated customer is not the owner of the list
404 ProductListNotFoundException

productListId (String)

Indicates that this list doesn't exist
404 ProductListItemNotFoundException

itemId (String)

Indicates that this item doesn't exist

Sample

REQUEST:
DELETE /dw/shop/v16_2/product_lists/cdmeh9aaabqtwaaadjcLADJaTY/items/cdHYN9aaabZCEaaadj7dhW0d1L HTTP/1.1
Host: example.com
Content-Type: application/json; charset=UTF-8
Authorization:Bearer eyJfdiI6IjXXXXXX.eyJfdiI6IjEiLCJleHAXXXXXXX.-d5wQW4c4O4wt-Zkl7_fiEiALW1XXXX 

# in case of success:
 
RESPONSE:
HTTP/1.1 204 No Content
Content-Type : text/plain; charset=ISO-8859-1
Cache-Control: max-age=0,no-cache,no-store,must-revalidate


# in case of failure (authentication failed):
 
RESPONSE:
HTTP/1.1 401 Unauthorized
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthenticatedException",
      "message" : "Customer must be authenticated."
   }
}

# in case of failure (authorization failed):
 
RESPONSE:
HTTP/1.1 403 Forbidden
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "CustomerNotAuthorizedException",
      "message" : "Customer is not authorized for this action."
   }
}

# in case of failure (list not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist with id 'cdmeh9aaabqtwaaadjcLADJaTZ' not found."
   }
}

# in case of failure (item not found):
 
RESPONSE:
HTTP/1.1 404 Not Found
Expires: Thu, 01-Jan-1970 00:00:00 GMT
Content-Type: application/json;charset=UTF-8
Cache-Control: max-age=0,no-cache,no-store,must-revalidate
{
   "_v" : "16.2",
   "fault" : 
   {
      "type" : "NotFoundException",
      "message" : "Productlist item with id 'cdHYN9aaabZCEaaadj7dhW0d1L' not found."
   }
}