Delete one, multiple or all product segregation records from the segregation table. To delete all records for a single product, use the calls ending with ‘/all’.
Request
Request URI
Method | Request URI |
---|---|
DELETE | https://{company-name}.helloid.com/api/v1/selfservice/products/{<SelfServiceProductGuid> Guid}/segregatedproducts |
DELETE | https://{company-name}.helloid.com/api/v1/selfservice/products/{<SelfServiceProductGuid> Guid}/segregatedproducts/all |
DELETE | https://{company-name}.helloid.com/api/v1/selfservice/products/{<SKU>string}/segregatedproducts |
DELETE | https://{company-name}.helloid.com/api/v1/selfservice/products/{<SKU>string}/segregatedproducts/all |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
{<SelfServiceProductGuid>Guid} | The GUID of the self-service products to retrieve the segregate products list from. |
{<SKU>string} | The product SKU of the self-service products to retrieve the segregate products list from. |
Request headers
Parameter | Description |
---|---|
Content-Type | Required for the calls that do not end with ‘/all’. Must be set to application/json. |
Request body
/* Request by SKU */ { “selfServiceProducts”:["20171219NYBEYFFDKA", "20171219NYBEYFFDKB"] } /* Request by GUID */ { “selfServiceProducts”:["c1d8a8df-7864-44d6-a548-951df66ed24a", "5bf8ac38-62c7-486a-8dae-5b41be5076e8"] }
Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
Please also see common HTTP status codes.
Sample response body
None.
Example request with cURL
Replace placeholder values surrounded by { } with the actual values.
/* Delete by product SKU */ curl -u {api-key}:{api-secret} -X DELETE https://{company-name}.helloid.com/api/v1/selfservice/products/20171222RZTAUTFJGK/segregatedproducts -H "Content-Type:application/json" -d "{"selfServiceProducts":["20180124HWKQTTGBGJ","20171219NYBEYFFDKX"]}" /* Delete by product GUID*/ curl -u {api-key}:{api-secret} -X DELETE https://{company-name}.helloid.com/api/v1/selfservice/products/a32bb63b-b45f-45e2-b10f-30dc5c13827/segregatedproducts -H "Content-Type:application/json" -d "{"selfServiceProducts":["87ed7ecc-0ee7-4d9c-a718-341d2f6861fe","c1d8a8df-7864-44d6-a548-951df66ed24a"]}" /* Delete all by product SKU */ curl -u {api-key}:{api-secret} -X DELETE https://{company-name}.helloid.com/api/v1/selfservice/products/20171222RZTAUTFJGK/segregatedproducts/all /* Delete all by product GUID*/ curl -u {api-key}:{api-secret} -X DELETE https://{company-name}.helloid.com/api/v1/selfservice/products/a32bb63b-b45f-45e2-b10f-30dc5c13827/segregatedproducts/all