Comment on page
Submitting an order for a private store
Learn how to submit an order for a Private Store.
Prerequisite: A user with the role of a Private Store Manager in Global Commerce must enable Private Stores in Site Settings. See Private Stores under Configuring site settings in the Global Commerce Help for more information.
The following information describes how to submit an order to a Public Store, Private Store, or Friends and Family.
To submit an order for a Private Store:
cURL
curl --location --request POST 'https://api.digitalriver.com/oauth20/token?grant_type=password&sessionToken={{session_token}}' \
--header 'authorization: bearer {{apikey_secret_authr}}\
...
You can apply a Private Store to either a limited access token or a full access token.
An access method determines how a shopper can access the pricing for a purchase plan. The following list describes the available access methods from most restrictive to least restrictive:
- Email Address—The shopper must use their email address to access the Private Store.
- Email Domain—The shopper’s email address must use one of the domains you specified entered for the Private Store. A domain is the end of the email address, such as the "digitalriver.com" in "[email protected]."
- Email Invitation—The shopper can join the Private Store through an email forwarded to them from someone they know. The person who sent the invitation has to approve the invitation if the shopper places an order. A Private Store that uses this access method is also called a "friends and family" plan.
- Generic Identifier—The shopper must enter a name and a PIN created for the Private Store. Private Stores can have multiple names and PIN combinations used to access the plan.
- IP Address—The shopper must be on a network using a specific IP address or an IP address within a defined range.
- Referral URL—The shopper must click a link to access the Private Store.
- Bypass Access Method—Use this option when you don't want to specify the access method parameter. The
bypassAccessRuleType
can be any withinEmailAddress
,EmailDomain
,EmailInvitation
, orIpAddress
.
You can use one of the following options as the authorization method in the request body for a Private Store:
Email address example
Email domain example
IP address example
Email invitation example
Return URL example
Bypass access method example
{
"purchasePlanAuthorize": {
"id": "126668174",
"targetMarketId": "126690174",
"emailAddress": "[email protected]"
}
}
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"emailDomain": "digitalriver.com"
}
}
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"ipAddress": "1.2.3.4"
}
}
{
"purchasePlanAuthorize": {
"id": "126668274",
"targetMarketId": "126690274",
"emailInvitationAddress": "[email protected]",
"emailInvitationPin": "I2wbfVSg"
}
}
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"referralUrl": "http://aaa.bbb.ccc.ddd"
}
}
{
"purchasePlanAuthorize": {
"id": "101558174",
"targetMarketId": "101580174",
"bypassAccessRuleType": "EmailAddress"
}
}
If you view the session, you will see the extended attributes for
marketID
and purchasePlanID
.Once you've added a product to a cart, notice the discounts under
pricing
and the PURCHASEPLAN_INCENTIVE_TOTAL
value under extended attributes.cURL
curl --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active?productId=107845474&quantity=2' \
--header 'authorization: bearer {{apikey_secret_authr}}\
...
cURL
curl --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active.json' \
--header 'authorization: bearer {{apikey_secret_authr}}\
...
--data-raw '{
"cart": {
"billingAddress": {
"firstName": "Anita",
"lastName": "Liu",
"emailAddress":"[email protected]",
"companyName": null,
"line1": "10380 Bren Rd",
"line2": null,
"line3": null,
"city": "Taipei",
"countrySubdivision": "MN",
"postalCode": "10682",
"country": "US"
},
"shippingAddress": {
"firstName": "Anita",
"lastName": "Liu",
"emailAddress":"[email protected]",
"companyName": null,
"line1": "10380 Bren Rd",
"line2": null,
"line3": null,
"city": "Taipei",
"countrySubdivision": "MN",
"postalCode": "10682",
"country": "US"
}
}
}'
Request
curl --location --request POST 'https://api.digitalriver.com/shoppers/me/carts/active/submit-cart.json' \
--header 'authorization: bearer {{apikey_secret_authr}}\
...
Last modified 8mo ago