Document Properties
Kbid29T598
Last Modified02-Nov-2020
Added to KB03-Sep-2020
Public AccessEveryone
StatusOnline
Doc TypeReferences
ProductICM 7.10

Reference - ICM REST API - B2B Front End - Contract 1.0.0


Product Version

7.10

Product To Version


Status

final

Download Specification 

This API specification is available for download as an Open API 3.0 YAML file: 

API Specification

Introduction

OpenAPI Version: 3.0.1
Contract Management Version: 1.0.0

This is Intershop ICM REST API documentation.

This reference lists the REST API for storefront development. The REST API covers features of both, the B2C (SMB - Small and Medium-sized businesses) and the B2B storefront development.
This reference is intended for developers who want to make use of an easy-to-use API when developing frontend solutions.
You can find more information at Intershop Communications. Contact our Intershop experts at Support - Intershop Communications

Introduction

This API is documented in OpenAPI format.

Contract API

/customers/{CustomerKey}/contracts
GET: Get customer contracts

Description

Using the authentication of currently logged in user of a business customer this resource will return all contracts.

Java Method

public com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO com.intershop.application.storefront.rest.b2b.capi.resource.CustomerContractsResource.listContracts(java.lang.String,java.lang.Integer,java.lang.Integer)

Request Body

--

Request Parameters

LocationNameFormatDescription
in pathCustomerKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in querypageablestringthe pageable-ID
in queryoffsetintegerthe size of a page | Format: int32
in queryamountintegerthe offset of the first element of the current page | Format: int32

Response

200 - OK

ResourceCollectionROLinkRO application/json
ResourceCollectionROLinkRO -> elements -> [..] -> itemId can be used as {CustomerContractKey} in subsequent requests. Links to item of type CustomerContractRO.

401 - Unauthorized

/customers/{CustomerKey}/contracts/{CustomerContractKey}
GET: Get customer contract details

Description

Using the authentication of currently logged in user of a business customer this resource will respond with details of a customer contract. The return attributes for the current and the target revenue are specific for the contract type RevenueBased. Other contract types are not supported.

Java Method

public com.intershop.application.storefront.rest.b2b.capi.resourceobject.CustomerContractRO com.intershop.application.storefront.rest.b2b.capi.resource.CustomerContractItemResource.getContract()

Request Body

--

Request Parameters

LocationNameFormatDescription
in pathCustomerKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathCustomerContractKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

200 - OK

CustomerContractRO application/json

401 - Unauthorized

403 - Forbidden

customer of contract does not match customer of user

404 - Not Found

contract with the given uuid cannot be found
/customers/{CustomerKey}/contracts/{CustomerContractKey}/orders
GET: Get customer contract orders

Description

Using the authentication of currently logged in user of a business customer this resource will respond orders of a customer contract.

Java Method

public com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO com.intershop.application.storefront.rest.b2b.capi.resource.CustomerContractOrdersResource.listOrders()

Request Body

--

Request Parameters

LocationNameFormatDescription
in pathCustomerKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey
in pathCustomerContractKeystringRequired | The key or UUID to resolve a single item | Example: ExampleKey

Response

200 - OK

ResourceCollectionROLinkRO application/json

400 - Bad Request

403 - Forbidden

- customer of contract does not match customer of user

404 - Not Found

- the contract cannot be found

Request and Response Object Schemata

CustomerContractRO application/json{
  • "name":
    string
    The name of an element.
  • "type":
    string
    The type of the object. This is normally a constant that can be used to differentiate objects by their type. | Example: Contract
  • "attributes":
    array
    An array of ResourceAttribute objects. the list of attributes
    [
    ResourceAttribute: An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
    ]
  • "displayName":
    string
    the display name of the contract | Example: 10% Rebate on all Graphics Cards
  • "description":
    string
    the description of the contract | Example: This contract gives 10% rebate on all graphics cards.
  • "contractType":
    string
    the type of the contract | Example: RevenueBased
  • "startDate":
    string
    the start date for the contract | Example: 2015-01-01T00:00:00.000Z
  • "endDate":
    string
    the end date of the contract | Example: 2015-12-31T23:59:00.000Z
  • "currentRevenue":
    object
    A MoneyRO object. Money combines a currency and a money amount.
    {
    • "name":
      string
      The name of an element.
    • "type":
      string
      Readonly | This is a constant: Money | Example: Money
    • "value":
      number
      The monetary value. | Example: 10.99
    • "currencyMnemonic":
      string
      Deprecated
    • "currency":
      string
      Three-letter currency code (ISO 4217) of the monetary value. | Example: USD
    }
  • "targetRevenue":
    object
    A MoneyRO object. Money combines a currency and a money amount.
    {
    • "name":
      string
      The name of an element.
    • "type":
      string
      Readonly | This is a constant: Money | Example: Money
    • "value":
      number
      The monetary value. | Example: 10.99
    • "currencyMnemonic":
      string
      Deprecated
    • "currency":
      string
      Three-letter currency code (ISO 4217) of the monetary value. | Example: USD
    }
  • "id":
    string
    the id of the contract | Example: ZEcKDgBj5cEAAAFPlMgclI6M
  • "attribute":
    object
    A ResourceAttribute object. An attribute
    {
    • "name":
      string
      The attribute's name
    • "type":
      string
      This is a constant: ResourceAttribute | Example: ResourceAttribute
    • "value":
      object
      The attribute's value.
    }
}
ResourceCollectionROLinkRO application/json{
  • "pageable":
    string
    the pageable ID
  • "total":
    integer
    the pageable amount total | Format: int32
  • "offset":
    integer
    the pageable offset | Format: int32
  • "amount":
    integer
    the pageable amount | Format: int32
  • "elements":
    array
    An array of LinkRO objects. the list of elements
    [
    LinkRO: A Link pointing to a resource
    {
    • "name":
      string
      the name of the returned element
    • "type":
      string
      Readonly | This is a constant: Link | Example: Link
    • "attributes":
      array
      An array of ResourceAttribute objects. the list of attributes
      [
      ResourceAttribute: An attribute
      {
      • "name":
        string
        The attribute's name
      • "type":
        string
        This is a constant: ResourceAttribute | Example: ResourceAttribute
      • "value":
        object
        The attribute's value.
      }
      ]
    • "uri":
      string
      The uri
    • "relation":
      string
      The relation of the link | Documentation: Link Relations (www.iana.org) | Possible Values: aboutalternateappendixarchivesauthorbookmarkcanonicalchaptercollectioncontentscopyrightcreate-formcurrentdescribedbydescribesdisclosureduplicateeditedit-formedit-mediaenclosurefirstglossaryhelphostshubiconindexitemlastlatest-versionlicenselrddmonitormonitor-groupnextnext-archivenofollownoreferrerpaymentpredecessor-versionprefetchprevpreviewpreviousprev-archiveprivacy-policyprofilerelatedrepliessearchsectionselfservicestartstylesheetsubsectionsuccessor-versiontagterms-of-servicetypeupversion-historyviaworking-copyworking-copy-of
    • "title":
      string
      The title of the link
    • "description":
      string
      The description of the link
    • "itemId":
      string
      the Id of the linked item
    • "attribute":
      object
      A ResourceAttribute object. An attribute
      {
      • "name":
        string
        The attribute's name
      • "type":
        string
        This is a constant: ResourceAttribute | Example: ResourceAttribute
      • "value":
        object
        The attribute's value.
      }
    }
    ]
  • "type":
    string
    This is a constant: ResourceCollection | Example: ResourceCollection
  • "sortKeys":
    array
    An array of string literals. the keys to sort for
  • "name":
    string
    the name of the returned element
}

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