WebSphere Commerce Service - Contract and Price
These services provide APIs related to contracts and pricing in either a B2B or B2C store. Use these classes to:
- Get information about currency formatting
- Get contract details
- Get terms and conditions, entitled prices, range prices, and display prices for catalog entries
- Switch contracts Schemes: https
Summary
Tag: Currency Format
A currency format. Contains formatting information on a currency.
Operation Description GET /store/{storeId}/currency_format Get currency format
Tag: Contract
This class provides RESTful services to get contract details.
Operation Description GET /store/{storeId}/contract Get contracts
GET /store/{storeId}/contract/{contractId} Get contract details by contract ID
Tag: Term Condition
A term or condition of an account or contract.
Operation Description GET /store/{storeId}/term_condition/{termConditionId} Get terms and condition by ID
GET /store/{storeId}/term_condition
Tag: Price
This class provides RESTful services to get entitled and range prices.
Operation Description POST /store/{storeId}/price Get prices by query
GET /store/{storeId}/price Get prices by part numbers
Tag: Display Price
This class provides RESTful services to get the display price (list price) for catalog entries. It uses the DisplayPrice noun.
Operation Description GET /store/{storeId}/display_price Get by part number and price rule ID
Tag: Switch Contract
This class provides RESTful services to switch contract.
Operation Description PUT /store/{storeId}/switchContract/switchTo Switch contract
Paths
Get contractsGET /store/{storeId}/contract
Tags: ContractGets contracts to which the current user is eligible.
storeId The store identifier.
path string q The query name.
query string , x ∈ { eligible }
application/json application/xml application/atom+xml application/xhtml+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"contracts": {
"10021": "Contract 1234"
}
}com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary
- 400 Bad Request
Bad request. The request could not be understood by the server due to malformed syntax.
- 401 Unauthorized
Not authenticated. The user session is not valid.
- 403 Forbidden
The user is not authorized to perform the specified request.
- 500 Internal Server Error
Internal server error. For details, see the server log files.
Get contract details by contract ID
GET /store/{storeId}/contract/{contractId}
Tags: ContractGets contract details for a specific contract ID.
storeId The store identifier.
path string contractId The contract identifier.
path string currency The currency code to use for example, currency=USD. If no currency code is specified, the store default currency is used.
query string , x ∈ { JPY , CNY , BRL , EUR , RON , RUB , PLN , USD , KRW , TWD , CAD , GBP } profileName Profile name. Profiles determine the subset of data returned by a query.
query string , x ∈ { IBM_Contract_Detailed }
Get currency format application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"resultList": [
{
"name": "AuroraB2B Contract number 1234",
"referenceNumber": "10021",
"usage": 0
}
]
}com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed
400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
500 Internal Server Error Internal server error. For details, see the server log files.
GET /store/{storeId}/currency_format
Tags: Currency Format
storeId The store identifier.
path string q The query name.
query string , x ∈ { byCurrency } currency The query name.
query string numberUsage The number usage.
query string
Get by part number and price rule ID application/json application/xml application/atom+xml application/xhtml+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"resultList": [
{
"currencyCode": "USD",
"currencySymbol": "$",
"decimalPlaces": "2",
"langId": "-1",
"numberUsage": "-1",
"storeId": "10001"
}
]
}com.ibm.commerce.common.beans.StoreCurrencyFormatDescriptionDataBean_IBM_Store_Details
400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
500 Internal Server Error Internal server error. For details, see the server log files.
GET /store/{storeId}/display_price
Tags: Display PriceGets display prices for catalog entries by part numbers and price rule ID.
storeId The store identifier.
path string q The query name.
query string , x ∈ { byPartNumbersAndPriceRuleId } partNumber The unique id of catalog entry.
query string[] priceRuleId The unique id of price rule.
query string currency The currency of the price.
query string quantity The quantity of the catalog entry.
query string uom The unit of measurement of the quantity.
query string
Get prices by part numbers application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"resourceId": "http://localhost:80/wcs/resources/store/10001/display_price?q=byPartNumbersAndPriceRuleId&partNumber=HTA029_292001&partNumber=AAAZZZ&priceRuleId=10002",
"resourceName": "display_price",
"resultList": [
{
"catalogEntryId": "13011",
"partNumber": "HTA029_292001",
"priceRuleId": "10002",
"unitPrice": [
{
"price": {
"currency": "USD",
"value": 20
},
"quantity": {
"uom": "C62",
"value": 1
}
}
]
}
]
}display_price-IBM_Store_DisplayPrice
400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
500 Internal Server Error Internal server error. For details, see the server log files.
GET /store/{storeId}/price
Tags: PriceGets the entitled and range prices for catalog entries by part numbers.
storeId The store identifier.
path string q The query name.
query string , x ∈ { byPartNumbers } partNumber The part number of the catalog entry.
query string[] contractId The unique id of the contract.
query string currency The currency of the price.
query string , x ∈ { JPY , CNY , BRL , EUR , RON , RUB , PLN , USD , KRW , TWD , CAD , GBP } quantity The quantity of the catalog entry.
query string uom The unit of measurement of the quantity.
query string date The date of the price.
query string checkEntitlement Whether to enable entitlement check when retrieving prices.
query string , x ∈ { true , false } dynamicKitAsItem Whether ot treat dynamic kits as items when retrieving prices.
query string , x ∈ { true , false } profileName Profile name. Profiles determine the subset of data returned by a query.
query string , x ∈ { IBM_Store_EntitledPrice_All , IBM_Store_EntitledPrice_RangePrice_All }
Get prices by query application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"EntitledPrice": [
{
"UnitPrice": [
{
"price": {
"currency": "CAD",
"value": 22.35
},
"quantity": {
"uom": "C62",
"value": 1
}
}
],
"contractId": "10001",
"partNumber": "HTA029_292001",
"productId": "13011"
}
],
"resourceId": "http://localhost:80/wcs/resources/store/10001/price?q=byPartNumbers&partNumber=HTA029_292001&contractId=10001¤cy=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST",
"resourceName": "price"
}400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
500 Internal Server Error Internal server error. For details, see the server log files.
POST /store/{storeId}/price
Tags: PriceFinds prices in a store using a structure that allows multiple results in a single query.
application/json application/xml
The request body for a price query. com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest
storeId The store identifier.
path string currency The currency code to use for example, currency=USD. If no currency code is specified, the store default currency is used. This value is applied to all the queried products unless overridden at the product level.
query string , x ∈ { JPY , CNY , BRL , EUR , RON , RUB , PLN , USD , KRW , TWD , CAD , GBP } profile Setting the 'profile' to 'default' or not specifying the 'profile' will result in normal prices being returned. A 'profile' value of 'range' will return the normal prices, and in addition, will return a list of range prices, which includes the minimum and maximum quantities as well as the price for each range.
query string , x ∈ { default , range } responseFormat The response format. Valid values are json and xml. If the request contains an input body, it must use the format specified in responseFormat. If the responseFormat is not specified, the accept HTTP header determines the format of the response. If the accept HTTP header is not specified then default response format is json.
query string , x ∈ { xml , json } catalogId The catalog identifier. If none is specified, the store default catalog is used.
query string
Switch contract application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"EntitledPrice": [
{
"RangePrice": [
{
"currency": "USD",
"maximumQuantity": {
"uom": "C62",
"value": 5
},
"minimumQuantity": {
"uom": "C62",
"value": 1
},
"priceInRange": {
"currency": "USD",
"value": 60
}
},
{
"currency": "USD",
"minimumQuantity": {
"uom": "C62",
"value": 6
},
"priceInRange": {
"currency": "USD",
"value": 50
}
}
],
"UnitPrice": [
{
"price": {
"currency": "USD",
"value": 50
},
"quantity": {
"uom": "C62",
"value": 7
}
}
],
"contractId": "10001",
"partNumber": "WCL004_041404",
"productId": "11016"
}
],
"resourceId": "https://localhost:443/wcs/resources/store/10001/price?currency=USD&profile=range",
"resourceName": "price"
}400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
404 Not Found The specified resource could not be found.
500 Internal Server Error Internal server error. For details, see the server log files.
PUT /store/{storeId}/switchContract/switchTo
Tags: Switch ContractResponds to the contract change action.
storeId The store identifier.
path string responseFormat The response format. Valid values are json and xml. If the request contains an input body, it must use the format specified in responseFormat. If the responseFormat is not specified, the accept HTTP header determines the format of the response. If the accept HTTP header is not specified then default response format is json.
query string , x ∈ { xml , json }
Get display customization application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Empty
- 400 Bad Request
Bad request. The request could not be understood by the server due to malformed syntax.
- 401 Unauthorized
Not authenticated. The user session is not valid.
- 403 Forbidden
The user is not authorized to perform the specified request.
- 500 Internal Server Error
Internal server error. For details, see the server log files.
GET /store/{storeId}/term_condition
Tags: Term ConditionFinds the display customization term and condition of the account associated with the current user.
storeId The store identifier.
path string q The query name.
query string , x ∈ { displayCustomizationTC }
Get terms and condition by ID application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"resultList": [
{
"accountId": 10022,
"attachmentURL": [
"",
"images/logoAccount1.gif"
],
"displayText": [
""
],
"hasDisplayLogo": true,
"hasDisplayText": false,
"languageId": -1,
"storeId": 10801,
"userId": -1004
}
]
}com.ibm.commerce.tools.contract.beans.DisplayCustomizationTCDataBean_IBM_Store_Details
400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
500 Internal Server Error Internal server error. For details, see the server log files.
GET /store/{storeId}/term_condition/{termConditionId}
Tags: Term ConditionFinds a term condition by its ID.
storeId The store identifier.
path string termConditionId The term condition ID.
path string
application/json application/xml application/xhtml+xml application/atom+xml
- 200 OK
The requested completed successfully. Example for application/json
{
"resultList": [
{
"XMLString": " <TermCondition type = \"CatalogFilterTC\" mandatory = \"false\" changeable = \"false\" >\r\n <Property name = \"catalogFilterId\" value = \"10001\" />\r\n </TermCondition>\r\n",
"changeableFlag": 0,
"mandatoryFlag": 0,
"participants": [
],
"policies": [
],
"tcSequence": 3,
"tcSubType": "CatalogFilterTC",
"termConditionId": "10003",
"timeCreated": "2014-10-29 19:06:18.884",
"timeUpdated": "2014-10-29 19:06:18.884",
"tradingId": "10001"
}
]
}com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details
400 Bad Request Bad request. The request could not be understood by the server due to malformed syntax.
401 Unauthorized Not authenticated. The user session is not valid.
403 Forbidden The user is not authorized to perform the specified request.
404 Not Found The specified resource could not be found.
500 Internal Server Error Internal server error. For details, see the server log files.
Schema definitions
com.ibm.commerce.common.beans.StoreCurrencyFormatDescriptionDataBean_IBM_Store_Details: object
- numberUsage: string
- currencyCode: string
- storeId: string
- langId: string
- currencySymbol: string
- decimalPlaces: string
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed: object
- origin: integer (int32)
- minorVersion: integer (int32)
- timeApproved: string (date)
- referenceNumber: integer (int64)
- markForDelete: integer (int32)
- timeActivated: string (date)
- owner: integer (int64)
- accountId: integer (int64)
- dataBeanKeyReferenceNumber: string
- referredTradingAgreementId: integer (int64)
- timeDeployed: string (date)
- comments: string
- TCs: object[]
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs - state: integer (int32)
- usage: integer (int32)
- storeXMLDefinition: string
- majorVersion: integer (int32)
- ownerReferenceNumber: integer (int64)
- timeCreated: string (date)
- contractLevelParticipants: object[]
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.contractLevelParticipants - timeUpdated: string (date)
- storeXMLString: string
- name: string
- familyId: integer (int64)
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.contractLevelParticipants: object
- information: string
- participantId: integer (int64)
- timeCreated: string (date)
- roleId: integer (int32)
- memberId: integer (int64)
- timeUpdated: string (date)
- tcId: integer (int64)
- tradingId: integer (int64)
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs: object
- priceListIds: integer[]
integer (int64) - XMLString: string
- timeCreated: string (date)
- referenceNumber: integer (int64)
- changeableFlag: integer (int32)
- percentagePriceListIds: integer[]
integer (int64) - tcSequence: integer (int32)
- tcSubType: string
- exclusionProductSets: integer[]
integer (int32) - participants: object[]
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs.participants - entireCatalogSelected: integer (int32)
- policies: object[]
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs.policies - timeUpdated: string (date)
- inclusionProductSets: integer[]
integer (int32) - priceListId: integer (int64)
- productSetId: integer (int32)
- tradingId: integer (int64)
- entireCatalogAdjustment: number (double)
- mandatoryFlag: integer (int32)
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs.participants: object
- information: string
- participantId: integer (int64)
- timeCreated: string (date)
- roleId: integer (int32)
- memberId: integer (int64)
- timeUpdated: string (date)
- tcId: integer (int64)
- tradingId: integer (int64)
com.ibm.commerce.contract.beans.ContractDataBean_IBM_Contract_Detailed.TCs.policies: object
- policyName: string
- endDate: string (date)
- startDate: string (date)
- storeEntityId: integer (int32)
- policyId: integer (int64)
- owner: integer (int64)
- type: string
- properties: string
com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details: object
- termConditionId: string
- XMLString: string
- timeCreated: string
- changeableFlag: integer (int32)
- tcSequence: integer (int32)
- mandatoryFlag: integer (int32)
- participants: object[]
com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details.participants - tcSubType: string
- policies: object[]
com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details.policies - timeUpdated: string
- tradingId: string
com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details.participants: object
- termConditionId: integer (int64)
- participantId: integer (int64)
- timeCreated: string (date)
- information: string
- roleId: integer (int32)
- memberId: integer (int64)
- timeUpdated: string (date)
- tradingId: integer (int64)
com.ibm.commerce.contract.beans.ExtendedTermConditionDataBean_IBM_Store_Details.policies: object
- startDate: string (date)
- endDate: string (date)
- policyName: string
- storeId: integer (int32)
- policyId: integer (int64)
- ownerId: integer (int64)
- type: string
- properties: string
com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType: object
- currency: string
- value: number (double)
com.ibm.commerce.foundation.common.datatypes.QuantityType: object
- value: number (double)
- uom: string
com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary: object
- recordSetCount: integer (int32)
- recordSetCompleteIndicator: boolean
- recordSetStartNumber: integer (int32)
- resultList: object[]
com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary.resultList - recordSetTotal: integer (int32)
com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary.resultList: object
- comment: string
- lastUpdate: string (date)
- description: string
- organizationId: string
- userRegistration: com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary.resultList.userRegistration
- storeId: string
- memberId: string
- orderId: string
- status: string
com.ibm.commerce.order.beans.RequisitionListDataBean_IBM_Store_Summary.resultList.userRegistration: object
- middleName: string
- lastName: string
- firstName: string
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest: object
Price request.
- query: com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Query
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Product: object
Product information.
- dates: string[]
The dates on which to query the product prices.
string - currencies: string[] , x ∈ { JPY , CNY , BRL , EUR , RON , RUB , PLN , USD , KRW , TWD , CAD , GBP }
The currencies to use on specific products. If not currency is specified, the store default is used.
string - contractIds: string[]
The contract identifiers to use on specific products. An exception is thrown if an invalid contract identifier is specified. If left empty, the store default contract is used.
string - quantities: object[]
The quantities for which to query the price. If no quantities are specified, a default quantity of 1.0 and unit of measure of 'C62' is used.
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Quantity - partNumber: string
The product part number to query. Required if the query is set to : byPartNumber.
- productId: string
The product identifier to query. Required if the query is set to : byProductID.
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Quantity: object
Quantity information.
- uom: string
The unit of measure applicable to the quantity.
- quantity: number (double)
The quantity to query.
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Query: object
Query information.
- dates: string[]
The dates on which to query prices on all the products unless overridden at the product level.
string - products: object[]
The products to query.
com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Product - name: string , x ∈ { byProductID , byPartNumber }
The price query name. Valid names are 'byProductID' which requires that product IDs are given for each product and 'byPartNumber' which requires that part numbers are given for each product.
- contractIds: string[]
The contract identifiers to use for all the products unless overridden at the product level. An exception is thrown if an invalid contract identifier is specified. If left empty, the store default contract is used.
string
com.ibm.commerce.tools.contract.beans.DisplayCustomizationTCDataBean_IBM_Store_Details: object
- languageId: integer (int32)
- hasDisplayText: boolean
- storeId: integer (int32)
- userId: integer (int64)
- hasDisplayLogo: boolean
- displayText: string[]
string - accountId: integer (int64)
- attachmentURL: string[]
string
display_price-IBM_Store_DisplayPrice: object
- recordSetCount: integer (int64)
- recordSetComplete: boolean
- recordSetStartNumber: integer (int64)
- resultList: object[]
display_price-IBM_Store_DisplayPrice_item - recordSetTotal: integer (int64)
display_price-IBM_Store_DisplayPrice_item: object
- priceRuleId: string
- priceRuleName: string
- userDataField: object[]
display_price-IBM_Store_DisplayPrice_item.userDataField - unitPrice: object[]
display_price-IBM_Store_DisplayPrice_item.unitPrice - partNumber: string
- catalogEntryId: string
display_price-IBM_Store_DisplayPrice_item.unitPrice: object
- price: com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType
- quantity: com.ibm.commerce.foundation.common.datatypes.QuantityType
display_price-IBM_Store_DisplayPrice_item.userDataField: object
- value: string
- key: string
Empty: object
Empty model. Used as default value when no model is specified.
price-price: object
- recordSetCount: integer (int64)
- recordSetComplete: boolean
- EntitledPrice: object[]
price-price_item - recordSetStartNumber: integer (int64)
- recordSetTotal: integer (int64)
price-price_item: object
- RangePrice: object[]
price-price_item.RangePrice - partNumber: string
- contractId: string
- UnitPrice: object[]
price-price_item.UnitPrice - userDataField: object[]
price-price_item.userDataField - productId: string
price-price_item.RangePrice: object
- currency: string
- maximumQuantity: com.ibm.commerce.foundation.common.datatypes.QuantityType
- minimumQuantity: com.ibm.commerce.foundation.common.datatypes.QuantityType
- priceInRange: com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType
price-price_item.UnitPrice: object
- price: com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType
- quantity: com.ibm.commerce.foundation.common.datatypes.QuantityType
price-price_item.userDataField: object
- value: string
- key: string