Related Documents
Document Properties
Kbid28366M
Last Modified23-Jun-2020
Added to KB19-Jul-2017
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.9
  • ICM 7.10

REST API - Assign cost object to basket


Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

/baskets/<basket-id>/costobjects

Http Method

POST

Short Description

Assigns a cost object to the basket

Query Parameters

none

Example Requests

/baskets/CNoKDAB_V4MAAAFSY78enLBi/costobjects

HTTP Status Codes

201 Created
400 Bad Request

Possible values for header value "error-key":

  • basket.cost_object.missing_body.error
  • basket.cost_object.missing_attributes.error
  • basket.cost_object.invalid_attributes.error
  • basket.cost_object.already_set.error

401 Unauthorized
403 Forbidden

Description

Assigns a cost object to the basket with the given ID

Cartridge

app_sf_rest_b2b
ApplicationSMB Responsive Shop
Access Restrictions

Requires authentication with user having assigned the following permissions:

  • Assign Cost Object To Basket (APP_B2B_ASSIGN_COSTOBJECT_TO_BASKET)

Product Version

7.9

Product To Version

 
Status

final

JSON

Request data format

application/json

Request related java object

com.intershop.application.storefront.rest.b2b.capi.costobject.resourceobject.CostObjectAssignmentRO
com.intershop.application.storefront.rest.b2b.capi.order.costobject.resource.BasketCostObjectListResource

Request data example

{
    "type": "Project",
    "name": "451"
}    

Response data format

application/json

Response related java object

com.intershop.component.rest.capi.resourceobject.LinkRO
com.intershop.application.storefront.rest.b2b.capi.order.costobject.resource.BasketCostObjectListResource

Response data example

201 Created
{
    "type": "Link",
    "uri": "inSPIRED-inTRONICS_Business-Site/-/baskets/LokKDAB_8qwAAAFTne5q6Gta/costobjects/49AKDAB_4JYAAAFUARyVxJ9I",
    "title": "Project"
}   

XML

Request data format

text/xml

Request related java object

com.intershop.application.storefront.rest.b2b.capi.costobject.resourceobject.CostObjectAssignmentRO
com.intershop.application.storefront.rest.b2b.capi.order.costobject.resource.BasketCostObjectListResource

Request data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CostObject>
  <name>451</name>
  <type>Project</type>
</CostObject>

Response data format

text/xml

Response related java object

com.intershop.component.rest.capi.resourceobject.LinkRO
com.intershop.application.storefront.rest.b2b.capi.order.costobject.resource.BasketCostObjectListResource

Response data example

201 Created
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
  <title>Project</title>
  <uri>inSPIRED-inTRONICS_Business-Site/-/baskets/LokKDAB_8qwAAAFTne5q6Gta/costobjects/49AKDAB_4JYAAAFUARyVxJ9I</uri>
</Link>

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
Support Tickets