Related Documents
Document Properties
Kbid
2E8437
Last Modified
23-Jun-2020
Added to KB
23-Aug-2017
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.9
  • ICM 7.10

REST API - Create new cost object type


Note

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

URI

/customers/-/costobjecttypes

Http Method

POST

Short Description

Creates a new cost object type

Query Parameters

none

Example Requests

/customers/-/costobjecttypes

HTTP Status Codes

201 Created
400 Bad Request

Possible values for header value "error-key":

    • cost_object_type.missing_body.error
    • cost_object_type.missing_attributes.error
    • cost_object_type.invalid_attributes.error
    • cost_object_type.already_exists.error

401 Unauthorized
403 Forbidden

Description

Creates a new cost object type

Cartridge

app_sf_rest_b2b
Application

SMB Responsive Shop

Access Restrictions

Requires authentication with user having assigned the following permissions:

  • Create Cost Object Types (APP_B2B_CREATE_COSTOBJECTTYPE)

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.CostObjectTypeRO
com.intershop.application.storefront.rest.b2b.capi.costobject.resource.CostObjectTypeListResource

Request data example

{
	"name": "Project",
    "displayName": "Project",
    "description": "Project object type"
 }

The name attribute is mandatory.

Response data format

application/json

Response related java object

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

Response data example

201 Created
{
	"type": "Link",
	"url": "inSPIRED-inTRONICS_Business-Site/-/customers/-/costobjecttypes/A0wKDAB_cmoAAAFScGoZ4KdJ",
	"title": "Project"
}

XML

Request data format

text/xml

Request related java object

com.intershop.application.storefront.rest.b2b.capi.costobject.resource.CostObjectTypeListResource
com.intershop.application.storefront.rest.b2b.capi.costobject.resourceobject.CostObjectTypeRO 

Request data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CostObjectType>
  <description>Project object type</description>
  <displayName>Project</displayName>
  <name>Project</name>
</CostObjectType>

The name attribute is mandatory.

Response data format

text/xml

Response related java object

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

Response data example

200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Link type="Link">
  <title>Project</title>
  <uri>inSPIRED-inTRONICS_Business-Site/-/customers/-/costobjecttypes/A0wKDAB_cmoAAAFScGoZ4KdJ</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
Tickets