REST API - Get customer contract details


Note

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

URI

/customers/-/contracts/<contractUUID>

Http Method

GET

Short Description

Get detailed information about the contract with the given contractUUID

Query Parameters

none

Example Requests

customers/-/contracts/HrsKDgAbGCoAAAFBVl6D_DUF

HTTP Status Codes

200 OK
401 Unauthorized

403 Forbidden

      customer of contract does not match customer of user

404 Not Found

      contract with the given uuid cannot be found


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.

Cartridge

app_sf_rest_b2b

ApplicationSMB Web Shop, SMB Responsive Shop



Product Version

7.6

Product To Version


Status

final

JSON

Request Data Format

Request related java object

n/a

Request Example

n/a

Response Data Format

application/json

Response related java object

com.intershop.application.storefront.rest.b2b.capi.resource.CustomerContractItemResource
com.intershop.application.storefront.rest.b2b.capi.resourceobject.CustomerContractRO

Response Example

{
    "name": "10-off-graphic-cards",
    "type": "Contract",
    "displayName": "10% Rebate on all Graphic Cards",
    "id": "ZEcKDgBj5cEAAAFPlMgclI6M",
    "description": "This contract gives 10% rebate on all graphic cards.",
    "contractType": "RevenueBased",
    "targetRevenue": {
        "type": "Money",
        "value": 10000,
        "currencyMnemonic": "USD"
    },
    "startDate": "2015-01-01T00:00:00",
    "endDate": "2015-12-31T23:59:00",
    "currentRevenue": {
        "type": "Money",
        "value": 2494.71,
        "currencyMnemonic": "USD"
    }
}


XML

XML Request Data Format

XML Request Java Objects

n/a

XML Request Example

n/a

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.application.storefront.rest.b2b.capi.resource.CustomerContractItemResource
com.intershop.application.storefront.rest.b2b.capi.resourceobject.CustomerContractRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Contract name="10-off-graphic-cards" type="Contract">
    <contractType>RevenueBased</contractType>
    <currentRevenue type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>2494.71</value>
    </currentRevenue>
    <description>This contract gives 10% rebate on all graphic cards.</description>
    <displayName>10% Rebate on all Graphic Cards</displayName>
    <endDate>2015-12-31T23:59:00</endDate>
    <id>ZEcKDgBj5cEAAAFPlMgclI6M</id>
    <startDate>2015-01-01T00:00:00</startDate>
    <targetRevenue type="Money">
        <currencyMnemonic>USD</currencyMnemonic>
        <value>10000</value>
    </targetRevenue>
    <type>Contract</type>
</Contract>



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