Dynamic Pricing API product

Preview

Dynamic Pricing API product

+ Day(s) remaining in the trial

Overview

IBM Dynamic Pricing product helps online retailers respond in real time to changes in competitive prices, product demand and market conditions. It drives improvements in revenue, margin and customer loyalty. This cloud-based offering automatically recommends an online retailer’s best response. It combines web data, such as page views and cart abandonment, and along with sales, inventory and the latest competitive pricing information. It uses pricing intelligence to recommend the most appropriate pricing action. This API can be used to send competitor pricing information to Dynamic Pricing.

Security

Keys

Pick a key to use with this API. Make sure you are logged in with your IBM id for your keys to be populated in the dropdown below. By selecting a key, it will be pre-filled for each endpoint in the Documentation section that can be used with the built-in testing. If you want to change which key to use for a particular endpoint, you can do so at the endpoint in the Documentation section.
You can manage your API keys in the <MyAPIs> section. API keys authenticate you to your subscription, so make sure to keep them secret. Do not share the X-IBM-Client-Secret portion of any API key in publicly accessible places such as GitHub, or client-side code.



Manage your keys
 

Documentation

Dynamic Pricing API product:

Dynamic Pricing Access Token

endpoint for Authorization Code and Implicit grants
description

GET   /dptoken/oauth2/authorize

			https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/authorize
		
Keys
Header parameters

client_id

STRING , required

application's client_id

Path and Query parameters

redirect_uri

STRING , optional

URI where user is redirected to after authorization

response_type

STRING , required

request an authorization code or or access token (implicit)

scope

STRING , required

Scope being requested

state

STRING , optional

This string will be echoed back to application when user is redirected

Request code
								
curl --request GET \ --url 'https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/authorize?response_type=string&scope=string&redirect_uri=string&state=string' \ --header 'accept: text/html' \ --header 'client_id: REPLACE_KEY_VALUE'
Response model

200

An HTML form for authentication or authorization of this request.

302

Redirect to the clients redirect_uri containing one of the following - **authorization code** for Authorization code grant - **access token** for Implicity grant - **error** in case of errors, such as the user has denied the request

Response example

200

An HTML form for authentication or authorization of this request.

302

Redirect to the clients redirect_uri containing one of the following - **authorization code** for Authorization code grant - **access token** for Implicity grant - **error** in case of errors, such as the user has denied the request

Request Access Tokens
This endpoint allows requesting an access token following one of the flows below: - Authorization Code (exchange code for access token) - Client Credentials (2-legged, there isnt resource owner information) - Resource Owner Password Credentials (2-legged, client provides resource owner name and password) - Refresh Token (exchange refresh token for a new access code) The table below indicates the required parameters for each specific grant_type options. Empty cells indicate a parameter is ignored for that specific grant type. Client authentication: - Confidential clients should authenticate using HTTP Basic Authentication. Alternatively, they may post their client_id and client_secret information as a formData parameter. - Public clients should send their client_id as formData parameter. | grant_type | code | client_credentials | password | refresh_token | |----------------------|------------|--------------------|-------------|---------------| | client_id | required* | required* | required* | required* | | client_secret | required* | required* | required* | required* | | code | required | | | | | redirect_uri | required | | | | | username | | | required | | | password | | | required | | | scope | | optional | optional | | | refresh_token | | | | required | The implicit grant requests, see /oauth2/authorize.

POST   /dptoken/oauth2/token

			https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/token
		
Keys
Header parameters

client_id

STRING , required

application's client_id

FormData parameters

client_id

STRING , optional

Application client ID, can be provided in formData or using HTTP Basic Authentication

client_secret

STRING , optional

Application secret, must be provided in formData or using HTTP Basic Authentication

code

STRING , optional

Authorization code provided by the /oauth2/authorize endpoint

grant_type

STRING , required

Type of grant

password

STRING , optional

Resource owner password

redirect_uri

STRING , optional

required only if the redirect_uri parameter was included in the authorization request /oauth2/authorize; their values MUST be identical.

refresh_token

STRING , optional

The refresh token that the client wants to exchange for a new access token (refresh_token grant_type)

scope

STRING , optional

Scope being requested

username

STRING , optional

Resource owner username

Request code
								
curl --request POST \ --url https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/token \ --header 'accept: application/json' \ --header 'client_id: REPLACE_KEY_VALUE' \ --header 'content-type: application/x-www-form-urlencoded' \ --data grant_type=string \ --data client_id=string \ --data client_secret=string \ --data code=string \ --data redirect_uri=string \ --data username=string \ --data password=string \ --data scope=string \ --data refresh_token=string
Response model

200

json document containing token, etc.

Body

access_token

STRING , required

expires_in

INTEGER , required

refresh_token

STRING , optional

scope

STRING , optional

token_type

STRING , required

400

json document that may contain additional details about the failure

Response example

200

json document containing token, etc.

								{
  "access_token" : string,
  "expires_in" : integer,
  "refresh_token" : string,
  "scope" : string,
  "token_type" : [bearer]
}
							

400

json document that may contain additional details about the failure

submit approval to authorization code or access token
Submit resource owners approval (or rejection) for the OAuth2 Server to issue an authorization code or access token to the application.

POST   /dptoken/oauth2/authorize

			https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/authorize
		
Keys
Header parameters

client_id

STRING , required

application's client_id

FormData parameters

client_id

STRING , required

application requesting the access code or token

dp-data

STRING , required

state information provided in the authorization form

dp-state

STRING , required

state information provided in the authorization form

original-url

STRING , required

URL of the original authorization request

redirect_uri

STRING , required

URI the application is requesting this code or token to be redirected to

resource-owner

STRING , required

resource owners user name

scope

STRING , required

requested scope of this authorization

Request code
								
curl --request POST \ --url https://api.ibm.com/dynamicpricing/run/dptoken/oauth2/authorize \ --header 'accept: text/html' \ --header 'client_id: REPLACE_KEY_VALUE' \ --header 'content-type: application/x-www-form-urlencoded' \ --data client_id=string \ --data scope=string \ --data resource-owner=string \ --data redirect_uri=string \ --data original-url=string \ --data dp-state=string \ --data dp-data=string
Response model

200

A consent form for oauth processing.

Response example

200

A consent form for oauth processing.

Loading content...