Related Documents
Document Properties
KbidP25501
Last Modified26-Nov-2018
Added to KB21-Jan-2014
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.6
  • ICM 7.7
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Create product stock notification SMB


Note

Starting with 7.10 our REST API is documented using Swagger notation accessible at developer.cloud.intershop.com.

URI

/customers/-/users/-/notifications/stock

Http Method

POST

Short Description

Creates product stock notification

Query Parameters

none

Example Requests

/customers/-/users/-/notifications/stock

HTTP Status Codes

201 Created

400 Bad Request
       Possible values for header "error-key":

    • account.productnotification.invalid_fields.error
    • account.productnotification.missing_fields.error
    • account.productnotification.product.in_stock.error

401 Unauthorized

404 Not Found
       Possible values for header "error-key":

    • account.productnotification.product.not_found.error

Description

Creates product stock notification

Cartridge

app_sf_rest, app_sf_rest_smb

Application

SMB Web Shop

Product Version

7.4

Product To Version

 

Status

final

JSON

Request Data Format

application/json

Request related java object

com.intershop.sellside.rest.common.capi.resource.customer.product.notification.CustomerProductNotificationsResource
com.intershop.sellside.rest.common.capi.resourceobject.product.notification.NewProductNotificationRO 

Request Example

{
    "sku" : "10809311",
    "notificationMailAddress": "pmiller@test.intershop.de"
}

Response Data Format

application/json

Response related java object

com.intershop.component.rest.capi.resourceobject.LinkRO

Response Example

With status code 201:

{
    "type": "Link",
    "title": "HP ZR22w 21.5-inch S-IPS LCD Monitor ",
    "uri": "PrimeTech-PrimeTechBusiness-Site/-/customers/-/users/-/notifications/stock/4565239"
}

With status code 400 response will be filled with error message and a possible error-key header. Example:

Status Code: 400 Bad Request
Accept-Ranges: bytes
Connection: close
Content-Length: 55
Content-Type: text/plain
Date: Fri, 08 Nov 2013 16:39:55 GMT
Server: Apache/2
authentication-token: standard@PBEWithMD5AndTripleDES:Jr1SDbg/tk4=|ew6VApXJdbVDd5mw3jiZTrIb4n07qzga5EueY21MjuA3m/Y9kKk1JA==
error-invalid-attributes: sku
error-key: account.productnotification.invalid_fields.error
error-type: error-invalid-attributes
 
Bad Request (The following attributes are invalid: sku)

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.sellside.rest.common.capi.resource.customer.product.notification.CustomerProductNotificationsResource
com.intershop.sellside.rest.common.capi.resourceobject.product.notification.NewProductNotificationRO

XML Request Example

<NewProductNotification type="NewProductNotification">
    <sku>10809311</sku>
    <notificationMailAddress>pmiller@test.intershop.de</notificationMailAddress>
</NewProductNotification>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.component.rest.capi.resourceobject.LinkRO

XML Response Example

With status code 201:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
    <title>Acer Predator G3 G3610</title>
    <uri>PrimeTech-PrimeTechBusiness-Site/-/customers/-/users/-/notifications/stock/10809311</uri>
</Link>

With status code 400 response will be filled with error message and a possible error-key header. Example:

Status Code: 400 Bad Request
Accept-Ranges: bytes
Connection: close
Content-Length: 55
Content-Type: text/plain
Date: Fri, 08 Nov 2013 16:39:55 GMT
Server: Apache/2
authentication-token: standard@PBEWithMD5AndTripleDES:Jr1SDbg/tk4=|ew6VApXJdbVDd5mw3jiZTrIb4n07qzga5EueY21MjuA3m/Y9kKk1JA==
error-invalid-attributes: sku
error-key: account.productnotification.invalid_fields.error
error-type: error-invalid-attributes
 
Bad Request (The following attributes are invalid: sku)

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Tickets