Related Documents
Document Properties
Kbid2810N9
Last Modified23-Jun-2020
Added to KB12-Dec-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Get business user's list of cost centers


Note

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

URI

/customers/<customer-id>/users/<user-id>/costcenters

Http Method

GET

Short Description

Returns a list of cost centers of the given user of a business customer

Query Parameters

none

Example Requests

/customers/AgroNet/users/educking@test.intershop.de/costcenters

HTTP Status Codes

200 OK

401 Unauthorized

404 Not Found - if the user is not found or does not support cost centers

Description

This call retrieves the cost centers of a given user of a business customer (only the ones the user participates in as approver or buyer).

Cartridge

app_sf_rest_b2b
Application

SMB Webshop

Product Version

7.8

Product To Version

 
Status

final

JSON

Request data format

Request related java object

n/a

Request data example

n/a

Response data format

application/json

Response related java object

com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resource.UserCostCenterListResource
com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resourceobject.UserCostCenterLinkRO
com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resourceobject.UserCostCenterLinkROCollection

Response data example

{
  "elements": [
    {
      "name": "Agro Net Central",
      "type": "UserCostCenterLink",
      "id": "511288",
      "roles": [
        "Approver",
        "Buyer"
      ],
      "link": {
        "type": "Link",
        "uri": "inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511288",
        "title": "511288"
      }
    },
    {
      "name": "Agro Net North",
      "type": "UserCostCenterLink",
      "id": "511388",
      "roles": [
        "Approver"
      ],
      "link": {
        "type": "Link",
        "uri": "inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511388",
        "title": "511388"
      }
    },
    {
      "name": "Agro Net South",
      "type": "UserCostCenterLink",
      "id": "511488",
      "roles": [
         "Buyer"
      ],
      "link": {
        "type": "Link",
        "uri": "inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511488",
        "title": "511488"
      }
    }
  ],
  "type": "ResourceCollection",
  "name": "CostCenters"
}

XML

Request data format

Request related java object

n/a

Request data example

n/a

Response data format

text/xml

Response related java object

com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resource.UserCostCenterListResource
com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resourceobject.UserCostCenterLinkRO
com.intershop.application.storefront.rest.b2b.capi.user.costcenter.resourceobject.UserCostCenterLinkROCollection

Response data example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<UserCostCenterLinkROCollection type="UserCostCenterLinkROCollection">
    <elements>
        <UserCostCenterLink name="Agro Net Central" type="UserCostCenterLink">
            <id>511288</id>
            <link type="Link">
                <title>511288</title>
                <uri>inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511288</uri>
            </link>
            <roles>Approver</roles>
            <roles>Buyer</roles>
        </UserCostCenterLink>
        <UserCostCenterLink name="Agro Net North" type="UserCostCenterLink">
            <id>511388</id>
            <link type="Link">
                <title>511388</title>
                <uri>inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511388</uri>
            </link>
            <roles>Approver</roles>
        </UserCostCenterLink>
        <UserCostCenterLink name="Agro Net South" type="UserCostCenterLink">
            <id>511488</id>
            <link type="Link">
                <title>511488</title>
                <uri>inSPIRED-inTRONICS_Business-Site/-/customers/AgroNet/users/fbirdo%40test.intershop.de/costcenters/511488</uri>
            </link>
            <roles>Buyer</roles>
        </UserCostCenterLink>
    </elements>
</UserCostCenterLinkROCollection>

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