REST API - Get customer contract orders


Note

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

URI

/customers/-/contracts/<id>/orders

Http Method

GET

Short Description

Get all orders related to the contract with the given contractUUID

Query Parameters

none

Example Requests

/customers/-/contracts/HrsKDgAbGCoAAAFBVl6D_DUF/orders

HTTP Status Codes

200 OK

400 Bad Request 

401 Unauthorized

403 Forbidden

  • customer of contract does not match customer of user

404 Not Found

  • the contract cannot be found


Description

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

Cartridge

app_sf_rest_b2b

ApplicationSMB Web Shop, SMB Responsive Shop

Product Version

7.6

Product To Version


Status

final

Known Issues

Order link may lead to 403 - Forbidden

The REST API of B2B is not complete and does not allow to retrieve a complete order history of a customer (including order details). Therefor it is not possible to provide proper order links always.

Following the order link leads to a http status 403 (Forbidden) if the authenticated user is not the owner of the order.

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.CustomerContractOrdersResource
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO<LinkRO>

Response Example

{
    "elements": [
        {
            "name": "order",
            "type": "Link",
            "uri": "inSPIRED-inTRONICS_Business-Site/-/orders/okwKDgBjHgcAAAFPoCEn7JNu",
            "title": "00000054",
            "attributes": [
                {
                    "name": "ContractRevenue",
                    "type": "MoneyRO",
                    "value": {
                        "type": "Money",
                        "value": 277.19,
                        "currencyMnemonic": "USD"
                    }
                }
            ]
        }
    ],
    "type": "ResourceCollection",
    "name": "orders"
}

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.CustomerContractOrdersResource
com.intershop.component.rest.capi.resourceobject.ResourceCollectionRO<LinkRO>

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResourceCollection name="orders" type="ResourceCollection">
    <elements>
        <Link name="order" type="Link">
            <attributes>
                <ResourceAttribute name="ContractRevenue" type="MoneyRO">
                    <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="moneyRO" type="Money">
                        <currencyMnemonic>USD</currencyMnemonic>
                        <value>277.19</value>
                    </value>
                </ResourceAttribute>
            </attributes>
            <title>00000054</title>
            <uri>inSPIRED-inTRONICS_Business-Site/-/orders/okwKDgBjHgcAAAFPoCEn7JNu</uri>
        </Link>
    </elements>
</ResourceCollection>

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