curl --request POST \
--url https://{merchant_site_domain}/checkout-validate-cart-stock-url \
--header 'Content-Type: application/json' \
--data '
{
"GlobalECartToken": "1da35dc3-cbe6-4cd8-81d6-ce433466d715",
"PreferredCultureCode": null,
"AuthToken": "34sdfdg43erfg43234fwsedfsdf423",
"SessionId": "12345",
"DateCreated": "0001-01-01T00:00:00",
"CurrencyName": null,
"Parcels": null,
"AllowMailsFromMerchant": false,
"AllowDirectCommunicationFromMerchant": false,
"ClearCart": false,
"UserId": null,
"CurrencyCode": "ILS",
"Products": [
{
"Attributes": null,
"Sku": "648340636",
"Price": 157.7,
"PriceBeforeRoundingRate": null,
"PriceBeforeGlobalEDiscount": null,
"Quantity": 1,
"VATRate": null,
"CustomerVATRate": null,
"InternationalPrice": 649,
"InternationalDiscountedPriceInMerchantCurrency": null,
"CartItemId": "ci21000088",
"ParentCartItemId": null,
"CartItemOptionId": null,
"HandlingCode": null,
"GiftMessage": null,
"RoundingRate": 0,
"IsBackOrdered": false,
"BackOrderDate": null,
"DiscountedPrice": null,
"InternationalDiscountedPrice": null,
"ProductCodeSecondary": "MKC1120A~N~040~~NS",
"Brand": null,
"Categories": null,
"ListPrice": 0,
"InternationalListPrice": 0,
"GenericHSCode": null,
"DiscountedPriceForCustoms": 0,
"InternationalDiscountedPriceForCustoms": 0,
"IsGiftCard": false,
"IsFixedPrice": true
}
],
"Customer": {
"EmailAddress": null,
"IsEndCustomerPrimary": false,
"SendConfirmation": false
},
"PrimaryShipping": {
"FirstName": "sdfsdf",
"LastName": "sdfsdf",
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": "asdasd+234",
"Address2": "",
"City": "asdasd",
"StateCode": null,
"StateOrProvince": null,
"Zip": "1234567",
"Email": "sdfsdf%40asdasd.com",
"Phone1": "0000000000",
"Phone2": null,
"Fax": null,
"CountryCode": "IL",
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"SecondaryShipping": {
"FirstName": "GlobalE",
"LastName": "GE-UK@EMA-Norsk",
"MiddleName": null,
"Salutation": null,
"Company": "",
"Address1": "Building 436, Argosy Road",
"Address2": "East Midlands Airport",
"City": "Derby",
"StateCode": "NN",
"StateOrProvince": null,
"Zip": "DE74 2SA",
"Email": "ema.hub@norsk-global.com",
"Phone1": "01332 818723",
"Phone2": null,
"Fax": null,
"CountryCode": "GB",
"CountryCode3": "GBR",
"CountryName": "United Kingdom",
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"ShippingMethodCode": "Express Courier (Air)",
"Discounts": [],
"Markups": [],
"LoyaltyPointsSpent": null,
"LoyaltyPointsEarned": null,
"SameDayDispatch": false,
"SameDayDispatchCost": 0,
"DoNotChargeVAT": false,
"CustomerComments": null,
"IsFreeShipping": false,
"FreeShippingCouponCode": null,
"ShipToStoreCode": null,
"RoundingRate": 0,
"UrlParameters": "[{\"Key\":\"ClientCookie\",\"Value\":\"JSESSIONID=null\"},{\"Key\":\"userId\",\"Value\":\"1148993\"},{\"Key\":\"orderId\",\"Value\":\"w748807\"},{\"Key\":\"locale\",\"Value\":\"en_IL\"}]",
"OriginalMerchantTotalProductsDiscountedPrice": 0,
"LoyaltyCode": null,
"OTVoucherCode": null,
"OTVoucherAmount": null,
"OTVoucherCurrencyCode": null,
"IsSplitOrder": false,
"PrePayOffered": false,
"InitialCheckoutCultureCode": null,
"CultureCode": null,
"HubId": 0,
"IsReplacementOrder": false,
"OriginalOrder": null,
"ReservationRequestId": null,
"IsSuppressPersonalInformation": false,
"TotalDutiesAndTaxesPrice": 0,
"USSalesTax": 0,
"CCFPrice": 0,
"PaymentDetails": null,
"PrimaryBilling": {
"FirstName": null,
"LastName": null,
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": null,
"Address2": null,
"City": null,
"StateCode": null,
"StateOrProvince": null,
"Zip": null,
"Email": null,
"Phone1": null,
"Phone2": null,
"Fax": null,
"CountryCode": null,
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"SecondaryBilling": {
"FirstName": null,
"LastName": null,
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": null,
"Address2": null,
"City": null,
"StateCode": null,
"StateOrProvince": null,
"Zip": null,
"Email": null,
"Phone1": null,
"Phone2": null,
"Fax": null,
"CountryCode": null,
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"OrderId": null,
"StatusCode": null,
"MerchantGUID": "7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0",
"CartId": "_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116",
"MerchantOrderId": null,
"PriceCoefficientRate": 0,
"CartHash": "94210A58BAC3B3AB292DE94382910C87",
"WebStoreCode": "en_IL",
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"DiscountedShippingPrice": 0,
"InternationalDetails": null,
"GiftCards": null
}
'import requests
url = "https://{merchant_site_domain}/checkout-validate-cart-stock-url"
payload = {
"GlobalECartToken": "1da35dc3-cbe6-4cd8-81d6-ce433466d715",
"PreferredCultureCode": None,
"AuthToken": "34sdfdg43erfg43234fwsedfsdf423",
"SessionId": "12345",
"DateCreated": "0001-01-01T00:00:00",
"CurrencyName": None,
"Parcels": None,
"AllowMailsFromMerchant": False,
"AllowDirectCommunicationFromMerchant": False,
"ClearCart": False,
"UserId": None,
"CurrencyCode": "ILS",
"Products": [
{
"Attributes": None,
"Sku": "648340636",
"Price": 157.7,
"PriceBeforeRoundingRate": None,
"PriceBeforeGlobalEDiscount": None,
"Quantity": 1,
"VATRate": None,
"CustomerVATRate": None,
"InternationalPrice": 649,
"InternationalDiscountedPriceInMerchantCurrency": None,
"CartItemId": "ci21000088",
"ParentCartItemId": None,
"CartItemOptionId": None,
"HandlingCode": None,
"GiftMessage": None,
"RoundingRate": 0,
"IsBackOrdered": False,
"BackOrderDate": None,
"DiscountedPrice": None,
"InternationalDiscountedPrice": None,
"ProductCodeSecondary": "MKC1120A~N~040~~NS",
"Brand": None,
"Categories": None,
"ListPrice": 0,
"InternationalListPrice": 0,
"GenericHSCode": None,
"DiscountedPriceForCustoms": 0,
"InternationalDiscountedPriceForCustoms": 0,
"IsGiftCard": False,
"IsFixedPrice": True
}
],
"Customer": {
"EmailAddress": None,
"IsEndCustomerPrimary": False,
"SendConfirmation": False
},
"PrimaryShipping": {
"FirstName": "sdfsdf",
"LastName": "sdfsdf",
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": "asdasd+234",
"Address2": "",
"City": "asdasd",
"StateCode": None,
"StateOrProvince": None,
"Zip": "1234567",
"Email": "sdfsdf%40asdasd.com",
"Phone1": "0000000000",
"Phone2": None,
"Fax": None,
"CountryCode": "IL",
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"SecondaryShipping": {
"FirstName": "GlobalE",
"LastName": "GE-UK@EMA-Norsk",
"MiddleName": None,
"Salutation": None,
"Company": "",
"Address1": "Building 436, Argosy Road",
"Address2": "East Midlands Airport",
"City": "Derby",
"StateCode": "NN",
"StateOrProvince": None,
"Zip": "DE74 2SA",
"Email": "ema.hub@norsk-global.com",
"Phone1": "01332 818723",
"Phone2": None,
"Fax": None,
"CountryCode": "GB",
"CountryCode3": "GBR",
"CountryName": "United Kingdom",
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"ShippingMethodCode": "Express Courier (Air)",
"Discounts": [],
"Markups": [],
"LoyaltyPointsSpent": None,
"LoyaltyPointsEarned": None,
"SameDayDispatch": False,
"SameDayDispatchCost": 0,
"DoNotChargeVAT": False,
"CustomerComments": None,
"IsFreeShipping": False,
"FreeShippingCouponCode": None,
"ShipToStoreCode": None,
"RoundingRate": 0,
"UrlParameters": "[{\"Key\":\"ClientCookie\",\"Value\":\"JSESSIONID=null\"},{\"Key\":\"userId\",\"Value\":\"1148993\"},{\"Key\":\"orderId\",\"Value\":\"w748807\"},{\"Key\":\"locale\",\"Value\":\"en_IL\"}]",
"OriginalMerchantTotalProductsDiscountedPrice": 0,
"LoyaltyCode": None,
"OTVoucherCode": None,
"OTVoucherAmount": None,
"OTVoucherCurrencyCode": None,
"IsSplitOrder": False,
"PrePayOffered": False,
"InitialCheckoutCultureCode": None,
"CultureCode": None,
"HubId": 0,
"IsReplacementOrder": False,
"OriginalOrder": None,
"ReservationRequestId": None,
"IsSuppressPersonalInformation": False,
"TotalDutiesAndTaxesPrice": 0,
"USSalesTax": 0,
"CCFPrice": 0,
"PaymentDetails": None,
"PrimaryBilling": {
"FirstName": None,
"LastName": None,
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": None,
"Address2": None,
"City": None,
"StateCode": None,
"StateOrProvince": None,
"Zip": None,
"Email": None,
"Phone1": None,
"Phone2": None,
"Fax": None,
"CountryCode": None,
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"SecondaryBilling": {
"FirstName": None,
"LastName": None,
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": None,
"Address2": None,
"City": None,
"StateCode": None,
"StateOrProvince": None,
"Zip": None,
"Email": None,
"Phone1": None,
"Phone2": None,
"Fax": None,
"CountryCode": None,
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"OrderId": None,
"StatusCode": None,
"MerchantGUID": "7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0",
"CartId": "_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116",
"MerchantOrderId": None,
"PriceCoefficientRate": 0,
"CartHash": "94210A58BAC3B3AB292DE94382910C87",
"WebStoreCode": "en_IL",
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"DiscountedShippingPrice": 0,
"InternationalDetails": None,
"GiftCards": None
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
GlobalECartToken: '1da35dc3-cbe6-4cd8-81d6-ce433466d715',
PreferredCultureCode: null,
AuthToken: '34sdfdg43erfg43234fwsedfsdf423',
SessionId: '12345',
DateCreated: '0001-01-01T00:00:00',
CurrencyName: null,
Parcels: null,
AllowMailsFromMerchant: false,
AllowDirectCommunicationFromMerchant: false,
ClearCart: false,
UserId: null,
CurrencyCode: 'ILS',
Products: [
{
Attributes: null,
Sku: '648340636',
Price: 157.7,
PriceBeforeRoundingRate: null,
PriceBeforeGlobalEDiscount: null,
Quantity: 1,
VATRate: null,
CustomerVATRate: null,
InternationalPrice: 649,
InternationalDiscountedPriceInMerchantCurrency: null,
CartItemId: 'ci21000088',
ParentCartItemId: null,
CartItemOptionId: null,
HandlingCode: null,
GiftMessage: null,
RoundingRate: 0,
IsBackOrdered: false,
BackOrderDate: null,
DiscountedPrice: null,
InternationalDiscountedPrice: null,
ProductCodeSecondary: 'MKC1120A~N~040~~NS',
Brand: null,
Categories: null,
ListPrice: 0,
InternationalListPrice: 0,
GenericHSCode: null,
DiscountedPriceForCustoms: 0,
InternationalDiscountedPriceForCustoms: 0,
IsGiftCard: false,
IsFixedPrice: true
}
],
Customer: {EmailAddress: null, IsEndCustomerPrimary: false, SendConfirmation: false},
PrimaryShipping: {
FirstName: 'sdfsdf',
LastName: 'sdfsdf',
MiddleName: null,
Salutation: null,
Company: null,
Address1: 'asdasd+234',
Address2: '',
City: 'asdasd',
StateCode: null,
StateOrProvince: null,
Zip: '1234567',
Email: 'sdfsdf%40asdasd.com',
Phone1: '0000000000',
Phone2: null,
Fax: null,
CountryCode: 'IL',
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
SecondaryShipping: {
FirstName: 'GlobalE',
LastName: 'GE-UK@EMA-Norsk',
MiddleName: null,
Salutation: null,
Company: '',
Address1: 'Building 436, Argosy Road',
Address2: 'East Midlands Airport',
City: 'Derby',
StateCode: 'NN',
StateOrProvince: null,
Zip: 'DE74 2SA',
Email: 'ema.hub@norsk-global.com',
Phone1: '01332 818723',
Phone2: null,
Fax: null,
CountryCode: 'GB',
CountryCode3: 'GBR',
CountryName: 'United Kingdom',
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
ShippingMethodCode: 'Express Courier (Air)',
Discounts: [],
Markups: [],
LoyaltyPointsSpent: null,
LoyaltyPointsEarned: null,
SameDayDispatch: false,
SameDayDispatchCost: 0,
DoNotChargeVAT: false,
CustomerComments: null,
IsFreeShipping: false,
FreeShippingCouponCode: null,
ShipToStoreCode: null,
RoundingRate: 0,
UrlParameters: '[{"Key":"ClientCookie","Value":"JSESSIONID=null"},{"Key":"userId","Value":"1148993"},{"Key":"orderId","Value":"w748807"},{"Key":"locale","Value":"en_IL"}]',
OriginalMerchantTotalProductsDiscountedPrice: 0,
LoyaltyCode: null,
OTVoucherCode: null,
OTVoucherAmount: null,
OTVoucherCurrencyCode: null,
IsSplitOrder: false,
PrePayOffered: false,
InitialCheckoutCultureCode: null,
CultureCode: null,
HubId: 0,
IsReplacementOrder: false,
OriginalOrder: null,
ReservationRequestId: null,
IsSuppressPersonalInformation: false,
TotalDutiesAndTaxesPrice: 0,
USSalesTax: 0,
CCFPrice: 0,
PaymentDetails: null,
PrimaryBilling: {
FirstName: null,
LastName: null,
MiddleName: null,
Salutation: null,
Company: null,
Address1: null,
Address2: null,
City: null,
StateCode: null,
StateOrProvince: null,
Zip: null,
Email: null,
Phone1: null,
Phone2: null,
Fax: null,
CountryCode: null,
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
SecondaryBilling: {
FirstName: null,
LastName: null,
MiddleName: null,
Salutation: null,
Company: null,
Address1: null,
Address2: null,
City: null,
StateCode: null,
StateOrProvince: null,
Zip: null,
Email: null,
Phone1: null,
Phone2: null,
Fax: null,
CountryCode: null,
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
OrderId: null,
StatusCode: null,
MerchantGUID: '7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0',
CartId: '_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116',
MerchantOrderId: null,
PriceCoefficientRate: 0,
CartHash: '94210A58BAC3B3AB292DE94382910C87',
WebStoreCode: 'en_IL',
WebStoreInstanceCode: 'GlobalEDefaultStoreInstance',
DiscountedShippingPrice: 0,
InternationalDetails: null,
GiftCards: null
})
};
fetch('https://{merchant_site_domain}/checkout-validate-cart-stock-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{merchant_site_domain}/checkout-validate-cart-stock-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'GlobalECartToken' => '1da35dc3-cbe6-4cd8-81d6-ce433466d715',
'PreferredCultureCode' => null,
'AuthToken' => '34sdfdg43erfg43234fwsedfsdf423',
'SessionId' => '12345',
'DateCreated' => '0001-01-01T00:00:00',
'CurrencyName' => null,
'Parcels' => null,
'AllowMailsFromMerchant' => false,
'AllowDirectCommunicationFromMerchant' => false,
'ClearCart' => false,
'UserId' => null,
'CurrencyCode' => 'ILS',
'Products' => [
[
'Attributes' => null,
'Sku' => '648340636',
'Price' => 157.7,
'PriceBeforeRoundingRate' => null,
'PriceBeforeGlobalEDiscount' => null,
'Quantity' => 1,
'VATRate' => null,
'CustomerVATRate' => null,
'InternationalPrice' => 649,
'InternationalDiscountedPriceInMerchantCurrency' => null,
'CartItemId' => 'ci21000088',
'ParentCartItemId' => null,
'CartItemOptionId' => null,
'HandlingCode' => null,
'GiftMessage' => null,
'RoundingRate' => 0,
'IsBackOrdered' => false,
'BackOrderDate' => null,
'DiscountedPrice' => null,
'InternationalDiscountedPrice' => null,
'ProductCodeSecondary' => 'MKC1120A~N~040~~NS',
'Brand' => null,
'Categories' => null,
'ListPrice' => 0,
'InternationalListPrice' => 0,
'GenericHSCode' => null,
'DiscountedPriceForCustoms' => 0,
'InternationalDiscountedPriceForCustoms' => 0,
'IsGiftCard' => false,
'IsFixedPrice' => true
]
],
'Customer' => [
'EmailAddress' => null,
'IsEndCustomerPrimary' => false,
'SendConfirmation' => false
],
'PrimaryShipping' => [
'FirstName' => 'sdfsdf',
'LastName' => 'sdfsdf',
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => 'asdasd+234',
'Address2' => '',
'City' => 'asdasd',
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => '1234567',
'Email' => 'sdfsdf%40asdasd.com',
'Phone1' => '0000000000',
'Phone2' => null,
'Fax' => null,
'CountryCode' => 'IL',
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'SecondaryShipping' => [
'FirstName' => 'GlobalE',
'LastName' => 'GE-UK@EMA-Norsk',
'MiddleName' => null,
'Salutation' => null,
'Company' => '',
'Address1' => 'Building 436, Argosy Road',
'Address2' => 'East Midlands Airport',
'City' => 'Derby',
'StateCode' => 'NN',
'StateOrProvince' => null,
'Zip' => 'DE74 2SA',
'Email' => 'ema.hub@norsk-global.com',
'Phone1' => '01332 818723',
'Phone2' => null,
'Fax' => null,
'CountryCode' => 'GB',
'CountryCode3' => 'GBR',
'CountryName' => 'United Kingdom',
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'ShippingMethodCode' => 'Express Courier (Air)',
'Discounts' => [
],
'Markups' => [
],
'LoyaltyPointsSpent' => null,
'LoyaltyPointsEarned' => null,
'SameDayDispatch' => false,
'SameDayDispatchCost' => 0,
'DoNotChargeVAT' => false,
'CustomerComments' => null,
'IsFreeShipping' => false,
'FreeShippingCouponCode' => null,
'ShipToStoreCode' => null,
'RoundingRate' => 0,
'UrlParameters' => '[{"Key":"ClientCookie","Value":"JSESSIONID=null"},{"Key":"userId","Value":"1148993"},{"Key":"orderId","Value":"w748807"},{"Key":"locale","Value":"en_IL"}]',
'OriginalMerchantTotalProductsDiscountedPrice' => 0,
'LoyaltyCode' => null,
'OTVoucherCode' => null,
'OTVoucherAmount' => null,
'OTVoucherCurrencyCode' => null,
'IsSplitOrder' => false,
'PrePayOffered' => false,
'InitialCheckoutCultureCode' => null,
'CultureCode' => null,
'HubId' => 0,
'IsReplacementOrder' => false,
'OriginalOrder' => null,
'ReservationRequestId' => null,
'IsSuppressPersonalInformation' => false,
'TotalDutiesAndTaxesPrice' => 0,
'USSalesTax' => 0,
'CCFPrice' => 0,
'PaymentDetails' => null,
'PrimaryBilling' => [
'FirstName' => null,
'LastName' => null,
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => null,
'Address2' => null,
'City' => null,
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => null,
'Email' => null,
'Phone1' => null,
'Phone2' => null,
'Fax' => null,
'CountryCode' => null,
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'SecondaryBilling' => [
'FirstName' => null,
'LastName' => null,
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => null,
'Address2' => null,
'City' => null,
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => null,
'Email' => null,
'Phone1' => null,
'Phone2' => null,
'Fax' => null,
'CountryCode' => null,
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'OrderId' => null,
'StatusCode' => null,
'MerchantGUID' => '7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0',
'CartId' => '_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116',
'MerchantOrderId' => null,
'PriceCoefficientRate' => 0,
'CartHash' => '94210A58BAC3B3AB292DE94382910C87',
'WebStoreCode' => 'en_IL',
'WebStoreInstanceCode' => 'GlobalEDefaultStoreInstance',
'DiscountedShippingPrice' => 0,
'InternationalDetails' => null,
'GiftCards' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{merchant_site_domain}/checkout-validate-cart-stock-url"
payload := strings.NewReader("{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{merchant_site_domain}/checkout-validate-cart-stock-url")
.header("Content-Type", "application/json")
.body("{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{merchant_site_domain}/checkout-validate-cart-stock-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}"
response = http.request(request)
puts response.read_body{
"AmendedProducts": [],
"ReservationRequestId": null,
"Error": null
}Validate Stock (from Global-e)
The Merchant Cart Validation checks basic cart validity and validates the product’s stock availability.
curl --request POST \
--url https://{merchant_site_domain}/checkout-validate-cart-stock-url \
--header 'Content-Type: application/json' \
--data '
{
"GlobalECartToken": "1da35dc3-cbe6-4cd8-81d6-ce433466d715",
"PreferredCultureCode": null,
"AuthToken": "34sdfdg43erfg43234fwsedfsdf423",
"SessionId": "12345",
"DateCreated": "0001-01-01T00:00:00",
"CurrencyName": null,
"Parcels": null,
"AllowMailsFromMerchant": false,
"AllowDirectCommunicationFromMerchant": false,
"ClearCart": false,
"UserId": null,
"CurrencyCode": "ILS",
"Products": [
{
"Attributes": null,
"Sku": "648340636",
"Price": 157.7,
"PriceBeforeRoundingRate": null,
"PriceBeforeGlobalEDiscount": null,
"Quantity": 1,
"VATRate": null,
"CustomerVATRate": null,
"InternationalPrice": 649,
"InternationalDiscountedPriceInMerchantCurrency": null,
"CartItemId": "ci21000088",
"ParentCartItemId": null,
"CartItemOptionId": null,
"HandlingCode": null,
"GiftMessage": null,
"RoundingRate": 0,
"IsBackOrdered": false,
"BackOrderDate": null,
"DiscountedPrice": null,
"InternationalDiscountedPrice": null,
"ProductCodeSecondary": "MKC1120A~N~040~~NS",
"Brand": null,
"Categories": null,
"ListPrice": 0,
"InternationalListPrice": 0,
"GenericHSCode": null,
"DiscountedPriceForCustoms": 0,
"InternationalDiscountedPriceForCustoms": 0,
"IsGiftCard": false,
"IsFixedPrice": true
}
],
"Customer": {
"EmailAddress": null,
"IsEndCustomerPrimary": false,
"SendConfirmation": false
},
"PrimaryShipping": {
"FirstName": "sdfsdf",
"LastName": "sdfsdf",
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": "asdasd+234",
"Address2": "",
"City": "asdasd",
"StateCode": null,
"StateOrProvince": null,
"Zip": "1234567",
"Email": "sdfsdf%40asdasd.com",
"Phone1": "0000000000",
"Phone2": null,
"Fax": null,
"CountryCode": "IL",
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"SecondaryShipping": {
"FirstName": "GlobalE",
"LastName": "GE-UK@EMA-Norsk",
"MiddleName": null,
"Salutation": null,
"Company": "",
"Address1": "Building 436, Argosy Road",
"Address2": "East Midlands Airport",
"City": "Derby",
"StateCode": "NN",
"StateOrProvince": null,
"Zip": "DE74 2SA",
"Email": "ema.hub@norsk-global.com",
"Phone1": "01332 818723",
"Phone2": null,
"Fax": null,
"CountryCode": "GB",
"CountryCode3": "GBR",
"CountryName": "United Kingdom",
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"ShippingMethodCode": "Express Courier (Air)",
"Discounts": [],
"Markups": [],
"LoyaltyPointsSpent": null,
"LoyaltyPointsEarned": null,
"SameDayDispatch": false,
"SameDayDispatchCost": 0,
"DoNotChargeVAT": false,
"CustomerComments": null,
"IsFreeShipping": false,
"FreeShippingCouponCode": null,
"ShipToStoreCode": null,
"RoundingRate": 0,
"UrlParameters": "[{\"Key\":\"ClientCookie\",\"Value\":\"JSESSIONID=null\"},{\"Key\":\"userId\",\"Value\":\"1148993\"},{\"Key\":\"orderId\",\"Value\":\"w748807\"},{\"Key\":\"locale\",\"Value\":\"en_IL\"}]",
"OriginalMerchantTotalProductsDiscountedPrice": 0,
"LoyaltyCode": null,
"OTVoucherCode": null,
"OTVoucherAmount": null,
"OTVoucherCurrencyCode": null,
"IsSplitOrder": false,
"PrePayOffered": false,
"InitialCheckoutCultureCode": null,
"CultureCode": null,
"HubId": 0,
"IsReplacementOrder": false,
"OriginalOrder": null,
"ReservationRequestId": null,
"IsSuppressPersonalInformation": false,
"TotalDutiesAndTaxesPrice": 0,
"USSalesTax": 0,
"CCFPrice": 0,
"PaymentDetails": null,
"PrimaryBilling": {
"FirstName": null,
"LastName": null,
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": null,
"Address2": null,
"City": null,
"StateCode": null,
"StateOrProvince": null,
"Zip": null,
"Email": null,
"Phone1": null,
"Phone2": null,
"Fax": null,
"CountryCode": null,
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"SecondaryBilling": {
"FirstName": null,
"LastName": null,
"MiddleName": null,
"Salutation": null,
"Company": null,
"Address1": null,
"Address2": null,
"City": null,
"StateCode": null,
"StateOrProvince": null,
"Zip": null,
"Email": null,
"Phone1": null,
"Phone2": null,
"Fax": null,
"CountryCode": null,
"CountryCode3": null,
"CountryName": null,
"AddressBookId": null,
"AddressBookName": null,
"SaveAddress": false
},
"OrderId": null,
"StatusCode": null,
"MerchantGUID": "7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0",
"CartId": "_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116",
"MerchantOrderId": null,
"PriceCoefficientRate": 0,
"CartHash": "94210A58BAC3B3AB292DE94382910C87",
"WebStoreCode": "en_IL",
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"DiscountedShippingPrice": 0,
"InternationalDetails": null,
"GiftCards": null
}
'import requests
url = "https://{merchant_site_domain}/checkout-validate-cart-stock-url"
payload = {
"GlobalECartToken": "1da35dc3-cbe6-4cd8-81d6-ce433466d715",
"PreferredCultureCode": None,
"AuthToken": "34sdfdg43erfg43234fwsedfsdf423",
"SessionId": "12345",
"DateCreated": "0001-01-01T00:00:00",
"CurrencyName": None,
"Parcels": None,
"AllowMailsFromMerchant": False,
"AllowDirectCommunicationFromMerchant": False,
"ClearCart": False,
"UserId": None,
"CurrencyCode": "ILS",
"Products": [
{
"Attributes": None,
"Sku": "648340636",
"Price": 157.7,
"PriceBeforeRoundingRate": None,
"PriceBeforeGlobalEDiscount": None,
"Quantity": 1,
"VATRate": None,
"CustomerVATRate": None,
"InternationalPrice": 649,
"InternationalDiscountedPriceInMerchantCurrency": None,
"CartItemId": "ci21000088",
"ParentCartItemId": None,
"CartItemOptionId": None,
"HandlingCode": None,
"GiftMessage": None,
"RoundingRate": 0,
"IsBackOrdered": False,
"BackOrderDate": None,
"DiscountedPrice": None,
"InternationalDiscountedPrice": None,
"ProductCodeSecondary": "MKC1120A~N~040~~NS",
"Brand": None,
"Categories": None,
"ListPrice": 0,
"InternationalListPrice": 0,
"GenericHSCode": None,
"DiscountedPriceForCustoms": 0,
"InternationalDiscountedPriceForCustoms": 0,
"IsGiftCard": False,
"IsFixedPrice": True
}
],
"Customer": {
"EmailAddress": None,
"IsEndCustomerPrimary": False,
"SendConfirmation": False
},
"PrimaryShipping": {
"FirstName": "sdfsdf",
"LastName": "sdfsdf",
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": "asdasd+234",
"Address2": "",
"City": "asdasd",
"StateCode": None,
"StateOrProvince": None,
"Zip": "1234567",
"Email": "sdfsdf%40asdasd.com",
"Phone1": "0000000000",
"Phone2": None,
"Fax": None,
"CountryCode": "IL",
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"SecondaryShipping": {
"FirstName": "GlobalE",
"LastName": "GE-UK@EMA-Norsk",
"MiddleName": None,
"Salutation": None,
"Company": "",
"Address1": "Building 436, Argosy Road",
"Address2": "East Midlands Airport",
"City": "Derby",
"StateCode": "NN",
"StateOrProvince": None,
"Zip": "DE74 2SA",
"Email": "ema.hub@norsk-global.com",
"Phone1": "01332 818723",
"Phone2": None,
"Fax": None,
"CountryCode": "GB",
"CountryCode3": "GBR",
"CountryName": "United Kingdom",
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"ShippingMethodCode": "Express Courier (Air)",
"Discounts": [],
"Markups": [],
"LoyaltyPointsSpent": None,
"LoyaltyPointsEarned": None,
"SameDayDispatch": False,
"SameDayDispatchCost": 0,
"DoNotChargeVAT": False,
"CustomerComments": None,
"IsFreeShipping": False,
"FreeShippingCouponCode": None,
"ShipToStoreCode": None,
"RoundingRate": 0,
"UrlParameters": "[{\"Key\":\"ClientCookie\",\"Value\":\"JSESSIONID=null\"},{\"Key\":\"userId\",\"Value\":\"1148993\"},{\"Key\":\"orderId\",\"Value\":\"w748807\"},{\"Key\":\"locale\",\"Value\":\"en_IL\"}]",
"OriginalMerchantTotalProductsDiscountedPrice": 0,
"LoyaltyCode": None,
"OTVoucherCode": None,
"OTVoucherAmount": None,
"OTVoucherCurrencyCode": None,
"IsSplitOrder": False,
"PrePayOffered": False,
"InitialCheckoutCultureCode": None,
"CultureCode": None,
"HubId": 0,
"IsReplacementOrder": False,
"OriginalOrder": None,
"ReservationRequestId": None,
"IsSuppressPersonalInformation": False,
"TotalDutiesAndTaxesPrice": 0,
"USSalesTax": 0,
"CCFPrice": 0,
"PaymentDetails": None,
"PrimaryBilling": {
"FirstName": None,
"LastName": None,
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": None,
"Address2": None,
"City": None,
"StateCode": None,
"StateOrProvince": None,
"Zip": None,
"Email": None,
"Phone1": None,
"Phone2": None,
"Fax": None,
"CountryCode": None,
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"SecondaryBilling": {
"FirstName": None,
"LastName": None,
"MiddleName": None,
"Salutation": None,
"Company": None,
"Address1": None,
"Address2": None,
"City": None,
"StateCode": None,
"StateOrProvince": None,
"Zip": None,
"Email": None,
"Phone1": None,
"Phone2": None,
"Fax": None,
"CountryCode": None,
"CountryCode3": None,
"CountryName": None,
"AddressBookId": None,
"AddressBookName": None,
"SaveAddress": False
},
"OrderId": None,
"StatusCode": None,
"MerchantGUID": "7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0",
"CartId": "_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116",
"MerchantOrderId": None,
"PriceCoefficientRate": 0,
"CartHash": "94210A58BAC3B3AB292DE94382910C87",
"WebStoreCode": "en_IL",
"WebStoreInstanceCode": "GlobalEDefaultStoreInstance",
"DiscountedShippingPrice": 0,
"InternationalDetails": None,
"GiftCards": None
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
GlobalECartToken: '1da35dc3-cbe6-4cd8-81d6-ce433466d715',
PreferredCultureCode: null,
AuthToken: '34sdfdg43erfg43234fwsedfsdf423',
SessionId: '12345',
DateCreated: '0001-01-01T00:00:00',
CurrencyName: null,
Parcels: null,
AllowMailsFromMerchant: false,
AllowDirectCommunicationFromMerchant: false,
ClearCart: false,
UserId: null,
CurrencyCode: 'ILS',
Products: [
{
Attributes: null,
Sku: '648340636',
Price: 157.7,
PriceBeforeRoundingRate: null,
PriceBeforeGlobalEDiscount: null,
Quantity: 1,
VATRate: null,
CustomerVATRate: null,
InternationalPrice: 649,
InternationalDiscountedPriceInMerchantCurrency: null,
CartItemId: 'ci21000088',
ParentCartItemId: null,
CartItemOptionId: null,
HandlingCode: null,
GiftMessage: null,
RoundingRate: 0,
IsBackOrdered: false,
BackOrderDate: null,
DiscountedPrice: null,
InternationalDiscountedPrice: null,
ProductCodeSecondary: 'MKC1120A~N~040~~NS',
Brand: null,
Categories: null,
ListPrice: 0,
InternationalListPrice: 0,
GenericHSCode: null,
DiscountedPriceForCustoms: 0,
InternationalDiscountedPriceForCustoms: 0,
IsGiftCard: false,
IsFixedPrice: true
}
],
Customer: {EmailAddress: null, IsEndCustomerPrimary: false, SendConfirmation: false},
PrimaryShipping: {
FirstName: 'sdfsdf',
LastName: 'sdfsdf',
MiddleName: null,
Salutation: null,
Company: null,
Address1: 'asdasd+234',
Address2: '',
City: 'asdasd',
StateCode: null,
StateOrProvince: null,
Zip: '1234567',
Email: 'sdfsdf%40asdasd.com',
Phone1: '0000000000',
Phone2: null,
Fax: null,
CountryCode: 'IL',
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
SecondaryShipping: {
FirstName: 'GlobalE',
LastName: 'GE-UK@EMA-Norsk',
MiddleName: null,
Salutation: null,
Company: '',
Address1: 'Building 436, Argosy Road',
Address2: 'East Midlands Airport',
City: 'Derby',
StateCode: 'NN',
StateOrProvince: null,
Zip: 'DE74 2SA',
Email: 'ema.hub@norsk-global.com',
Phone1: '01332 818723',
Phone2: null,
Fax: null,
CountryCode: 'GB',
CountryCode3: 'GBR',
CountryName: 'United Kingdom',
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
ShippingMethodCode: 'Express Courier (Air)',
Discounts: [],
Markups: [],
LoyaltyPointsSpent: null,
LoyaltyPointsEarned: null,
SameDayDispatch: false,
SameDayDispatchCost: 0,
DoNotChargeVAT: false,
CustomerComments: null,
IsFreeShipping: false,
FreeShippingCouponCode: null,
ShipToStoreCode: null,
RoundingRate: 0,
UrlParameters: '[{"Key":"ClientCookie","Value":"JSESSIONID=null"},{"Key":"userId","Value":"1148993"},{"Key":"orderId","Value":"w748807"},{"Key":"locale","Value":"en_IL"}]',
OriginalMerchantTotalProductsDiscountedPrice: 0,
LoyaltyCode: null,
OTVoucherCode: null,
OTVoucherAmount: null,
OTVoucherCurrencyCode: null,
IsSplitOrder: false,
PrePayOffered: false,
InitialCheckoutCultureCode: null,
CultureCode: null,
HubId: 0,
IsReplacementOrder: false,
OriginalOrder: null,
ReservationRequestId: null,
IsSuppressPersonalInformation: false,
TotalDutiesAndTaxesPrice: 0,
USSalesTax: 0,
CCFPrice: 0,
PaymentDetails: null,
PrimaryBilling: {
FirstName: null,
LastName: null,
MiddleName: null,
Salutation: null,
Company: null,
Address1: null,
Address2: null,
City: null,
StateCode: null,
StateOrProvince: null,
Zip: null,
Email: null,
Phone1: null,
Phone2: null,
Fax: null,
CountryCode: null,
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
SecondaryBilling: {
FirstName: null,
LastName: null,
MiddleName: null,
Salutation: null,
Company: null,
Address1: null,
Address2: null,
City: null,
StateCode: null,
StateOrProvince: null,
Zip: null,
Email: null,
Phone1: null,
Phone2: null,
Fax: null,
CountryCode: null,
CountryCode3: null,
CountryName: null,
AddressBookId: null,
AddressBookName: null,
SaveAddress: false
},
OrderId: null,
StatusCode: null,
MerchantGUID: '7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0',
CartId: '_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116',
MerchantOrderId: null,
PriceCoefficientRate: 0,
CartHash: '94210A58BAC3B3AB292DE94382910C87',
WebStoreCode: 'en_IL',
WebStoreInstanceCode: 'GlobalEDefaultStoreInstance',
DiscountedShippingPrice: 0,
InternationalDetails: null,
GiftCards: null
})
};
fetch('https://{merchant_site_domain}/checkout-validate-cart-stock-url', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{merchant_site_domain}/checkout-validate-cart-stock-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'GlobalECartToken' => '1da35dc3-cbe6-4cd8-81d6-ce433466d715',
'PreferredCultureCode' => null,
'AuthToken' => '34sdfdg43erfg43234fwsedfsdf423',
'SessionId' => '12345',
'DateCreated' => '0001-01-01T00:00:00',
'CurrencyName' => null,
'Parcels' => null,
'AllowMailsFromMerchant' => false,
'AllowDirectCommunicationFromMerchant' => false,
'ClearCart' => false,
'UserId' => null,
'CurrencyCode' => 'ILS',
'Products' => [
[
'Attributes' => null,
'Sku' => '648340636',
'Price' => 157.7,
'PriceBeforeRoundingRate' => null,
'PriceBeforeGlobalEDiscount' => null,
'Quantity' => 1,
'VATRate' => null,
'CustomerVATRate' => null,
'InternationalPrice' => 649,
'InternationalDiscountedPriceInMerchantCurrency' => null,
'CartItemId' => 'ci21000088',
'ParentCartItemId' => null,
'CartItemOptionId' => null,
'HandlingCode' => null,
'GiftMessage' => null,
'RoundingRate' => 0,
'IsBackOrdered' => false,
'BackOrderDate' => null,
'DiscountedPrice' => null,
'InternationalDiscountedPrice' => null,
'ProductCodeSecondary' => 'MKC1120A~N~040~~NS',
'Brand' => null,
'Categories' => null,
'ListPrice' => 0,
'InternationalListPrice' => 0,
'GenericHSCode' => null,
'DiscountedPriceForCustoms' => 0,
'InternationalDiscountedPriceForCustoms' => 0,
'IsGiftCard' => false,
'IsFixedPrice' => true
]
],
'Customer' => [
'EmailAddress' => null,
'IsEndCustomerPrimary' => false,
'SendConfirmation' => false
],
'PrimaryShipping' => [
'FirstName' => 'sdfsdf',
'LastName' => 'sdfsdf',
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => 'asdasd+234',
'Address2' => '',
'City' => 'asdasd',
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => '1234567',
'Email' => 'sdfsdf%40asdasd.com',
'Phone1' => '0000000000',
'Phone2' => null,
'Fax' => null,
'CountryCode' => 'IL',
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'SecondaryShipping' => [
'FirstName' => 'GlobalE',
'LastName' => 'GE-UK@EMA-Norsk',
'MiddleName' => null,
'Salutation' => null,
'Company' => '',
'Address1' => 'Building 436, Argosy Road',
'Address2' => 'East Midlands Airport',
'City' => 'Derby',
'StateCode' => 'NN',
'StateOrProvince' => null,
'Zip' => 'DE74 2SA',
'Email' => 'ema.hub@norsk-global.com',
'Phone1' => '01332 818723',
'Phone2' => null,
'Fax' => null,
'CountryCode' => 'GB',
'CountryCode3' => 'GBR',
'CountryName' => 'United Kingdom',
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'ShippingMethodCode' => 'Express Courier (Air)',
'Discounts' => [
],
'Markups' => [
],
'LoyaltyPointsSpent' => null,
'LoyaltyPointsEarned' => null,
'SameDayDispatch' => false,
'SameDayDispatchCost' => 0,
'DoNotChargeVAT' => false,
'CustomerComments' => null,
'IsFreeShipping' => false,
'FreeShippingCouponCode' => null,
'ShipToStoreCode' => null,
'RoundingRate' => 0,
'UrlParameters' => '[{"Key":"ClientCookie","Value":"JSESSIONID=null"},{"Key":"userId","Value":"1148993"},{"Key":"orderId","Value":"w748807"},{"Key":"locale","Value":"en_IL"}]',
'OriginalMerchantTotalProductsDiscountedPrice' => 0,
'LoyaltyCode' => null,
'OTVoucherCode' => null,
'OTVoucherAmount' => null,
'OTVoucherCurrencyCode' => null,
'IsSplitOrder' => false,
'PrePayOffered' => false,
'InitialCheckoutCultureCode' => null,
'CultureCode' => null,
'HubId' => 0,
'IsReplacementOrder' => false,
'OriginalOrder' => null,
'ReservationRequestId' => null,
'IsSuppressPersonalInformation' => false,
'TotalDutiesAndTaxesPrice' => 0,
'USSalesTax' => 0,
'CCFPrice' => 0,
'PaymentDetails' => null,
'PrimaryBilling' => [
'FirstName' => null,
'LastName' => null,
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => null,
'Address2' => null,
'City' => null,
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => null,
'Email' => null,
'Phone1' => null,
'Phone2' => null,
'Fax' => null,
'CountryCode' => null,
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'SecondaryBilling' => [
'FirstName' => null,
'LastName' => null,
'MiddleName' => null,
'Salutation' => null,
'Company' => null,
'Address1' => null,
'Address2' => null,
'City' => null,
'StateCode' => null,
'StateOrProvince' => null,
'Zip' => null,
'Email' => null,
'Phone1' => null,
'Phone2' => null,
'Fax' => null,
'CountryCode' => null,
'CountryCode3' => null,
'CountryName' => null,
'AddressBookId' => null,
'AddressBookName' => null,
'SaveAddress' => false
],
'OrderId' => null,
'StatusCode' => null,
'MerchantGUID' => '7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0',
'CartId' => '_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116',
'MerchantOrderId' => null,
'PriceCoefficientRate' => 0,
'CartHash' => '94210A58BAC3B3AB292DE94382910C87',
'WebStoreCode' => 'en_IL',
'WebStoreInstanceCode' => 'GlobalEDefaultStoreInstance',
'DiscountedShippingPrice' => 0,
'InternationalDetails' => null,
'GiftCards' => null
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{merchant_site_domain}/checkout-validate-cart-stock-url"
payload := strings.NewReader("{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{merchant_site_domain}/checkout-validate-cart-stock-url")
.header("Content-Type", "application/json")
.body("{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{merchant_site_domain}/checkout-validate-cart-stock-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"GlobalECartToken\": \"1da35dc3-cbe6-4cd8-81d6-ce433466d715\",\n \"PreferredCultureCode\": null,\n \"AuthToken\": \"34sdfdg43erfg43234fwsedfsdf423\",\n \"SessionId\": \"12345\",\n \"DateCreated\": \"0001-01-01T00:00:00\",\n \"CurrencyName\": null,\n \"Parcels\": null,\n \"AllowMailsFromMerchant\": false,\n \"AllowDirectCommunicationFromMerchant\": false,\n \"ClearCart\": false,\n \"UserId\": null,\n \"CurrencyCode\": \"ILS\",\n \"Products\": [\n {\n \"Attributes\": null,\n \"Sku\": \"648340636\",\n \"Price\": 157.7,\n \"PriceBeforeRoundingRate\": null,\n \"PriceBeforeGlobalEDiscount\": null,\n \"Quantity\": 1,\n \"VATRate\": null,\n \"CustomerVATRate\": null,\n \"InternationalPrice\": 649,\n \"InternationalDiscountedPriceInMerchantCurrency\": null,\n \"CartItemId\": \"ci21000088\",\n \"ParentCartItemId\": null,\n \"CartItemOptionId\": null,\n \"HandlingCode\": null,\n \"GiftMessage\": null,\n \"RoundingRate\": 0,\n \"IsBackOrdered\": false,\n \"BackOrderDate\": null,\n \"DiscountedPrice\": null,\n \"InternationalDiscountedPrice\": null,\n \"ProductCodeSecondary\": \"MKC1120A~N~040~~NS\",\n \"Brand\": null,\n \"Categories\": null,\n \"ListPrice\": 0,\n \"InternationalListPrice\": 0,\n \"GenericHSCode\": null,\n \"DiscountedPriceForCustoms\": 0,\n \"InternationalDiscountedPriceForCustoms\": 0,\n \"IsGiftCard\": false,\n \"IsFixedPrice\": true\n }\n ],\n \"Customer\": {\n \"EmailAddress\": null,\n \"IsEndCustomerPrimary\": false,\n \"SendConfirmation\": false\n },\n \"PrimaryShipping\": {\n \"FirstName\": \"sdfsdf\",\n \"LastName\": \"sdfsdf\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": \"asdasd+234\",\n \"Address2\": \"\",\n \"City\": \"asdasd\",\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": \"1234567\",\n \"Email\": \"sdfsdf%40asdasd.com\",\n \"Phone1\": \"0000000000\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"IL\",\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryShipping\": {\n \"FirstName\": \"GlobalE\",\n \"LastName\": \"GE-UK@EMA-Norsk\",\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": \"\",\n \"Address1\": \"Building 436, Argosy Road\",\n \"Address2\": \"East Midlands Airport\",\n \"City\": \"Derby\",\n \"StateCode\": \"NN\",\n \"StateOrProvince\": null,\n \"Zip\": \"DE74 2SA\",\n \"Email\": \"ema.hub@norsk-global.com\",\n \"Phone1\": \"01332 818723\",\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": \"GB\",\n \"CountryCode3\": \"GBR\",\n \"CountryName\": \"United Kingdom\",\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"ShippingMethodCode\": \"Express Courier (Air)\",\n \"Discounts\": [],\n \"Markups\": [],\n \"LoyaltyPointsSpent\": null,\n \"LoyaltyPointsEarned\": null,\n \"SameDayDispatch\": false,\n \"SameDayDispatchCost\": 0,\n \"DoNotChargeVAT\": false,\n \"CustomerComments\": null,\n \"IsFreeShipping\": false,\n \"FreeShippingCouponCode\": null,\n \"ShipToStoreCode\": null,\n \"RoundingRate\": 0,\n \"UrlParameters\": \"[{\\\"Key\\\":\\\"ClientCookie\\\",\\\"Value\\\":\\\"JSESSIONID=null\\\"},{\\\"Key\\\":\\\"userId\\\",\\\"Value\\\":\\\"1148993\\\"},{\\\"Key\\\":\\\"orderId\\\",\\\"Value\\\":\\\"w748807\\\"},{\\\"Key\\\":\\\"locale\\\",\\\"Value\\\":\\\"en_IL\\\"}]\",\n \"OriginalMerchantTotalProductsDiscountedPrice\": 0,\n \"LoyaltyCode\": null,\n \"OTVoucherCode\": null,\n \"OTVoucherAmount\": null,\n \"OTVoucherCurrencyCode\": null,\n \"IsSplitOrder\": false,\n \"PrePayOffered\": false,\n \"InitialCheckoutCultureCode\": null,\n \"CultureCode\": null,\n \"HubId\": 0,\n \"IsReplacementOrder\": false,\n \"OriginalOrder\": null,\n \"ReservationRequestId\": null,\n \"IsSuppressPersonalInformation\": false,\n \"TotalDutiesAndTaxesPrice\": 0,\n \"USSalesTax\": 0,\n \"CCFPrice\": 0,\n \"PaymentDetails\": null,\n \"PrimaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"SecondaryBilling\": {\n \"FirstName\": null,\n \"LastName\": null,\n \"MiddleName\": null,\n \"Salutation\": null,\n \"Company\": null,\n \"Address1\": null,\n \"Address2\": null,\n \"City\": null,\n \"StateCode\": null,\n \"StateOrProvince\": null,\n \"Zip\": null,\n \"Email\": null,\n \"Phone1\": null,\n \"Phone2\": null,\n \"Fax\": null,\n \"CountryCode\": null,\n \"CountryCode3\": null,\n \"CountryName\": null,\n \"AddressBookId\": null,\n \"AddressBookName\": null,\n \"SaveAddress\": false\n },\n \"OrderId\": null,\n \"StatusCode\": null,\n \"MerchantGUID\": \"7f132fc6-bdbc-420e-a2ce-fd35ab5c06d0\",\n \"CartId\": \"_2S0DVucAbjgfHAR-SUmRshWaS3pB5F9Bk7OfgWBR9ujllKrTw5H!17426857!1596453641116\",\n \"MerchantOrderId\": null,\n \"PriceCoefficientRate\": 0,\n \"CartHash\": \"94210A58BAC3B3AB292DE94382910C87\",\n \"WebStoreCode\": \"en_IL\",\n \"WebStoreInstanceCode\": \"GlobalEDefaultStoreInstance\",\n \"DiscountedShippingPrice\": 0,\n \"InternationalDetails\": null,\n \"GiftCards\": null\n}"
response = http.request(request)
puts response.read_body{
"AmendedProducts": [],
"ReservationRequestId": null,
"Error": null
}order.Products does not have full stock availability for the specified quantity, this cart item is included in the AmendedProducts array with an indication of the quantity actually available. If all items are in stock, the AmendedProducts array is empty.
If required, the ValidateStock API is called when the shopper is in the Global‑e checkout. If the AmendedProducts array is not empty, the list of out-of-stock products is displayed to the shopper.
GetCheckoutCartInfo API may be reused for stock validation purposes.Body
Provides information related to the order.
The required additional documents for shipping. When the information is provided, the Merchant must wait for the documents to be provided before starting fulfilment.
Show child attributes
Show child attributes
Indicates if the end customer has opted on the Global‑e checkout page to receive emails from the Merchant. TRUE - Customer opted to receive emails FALSE - Customer did not opt to receive emails
Cart hash originally specified in the merchantCartHash argument for the SendCart method for the cart converted to this order on Global‑e.
Identifier of the cart on the Merchant’s site originally specified in merchantCartToken argument for SendCart method for the cart converted to this order on Global‑e.
Cash On Delivery fee amount in Merchant’s currency.
Customs Clearance Fees (CCF), in the Merchant currency.
Indicates if the end customer’s cart must be cleared before this method finishes execution on the Merchant’s site. TRUE - The end customer’s cart must be cleared FALSE - The end customer's cart does not have to be cleare
3-char ISO currency code for the order being posted. By default, this is set to the original Merchant’s currency.
Customer currency name. Returned by GetOrdersDetails API only
The paying customer’s preferences (Global-e acts as a paying customer).
Show child attributes
Show child attributes
Comments text entered by the end customer in Global‑e checkout.
Contains the duties and tax parts the customer paid for the order.
Show child attributes
Show child attributes
Order creation date and time. Returned by GetOrdersDetails API only.
The shipping price paid by the customer converted to the Merchant’s currency. Total Shipping price reducing Order Discounts (InternationalDetails.DiscountedShippingPrice price converted to the Merchant currency).
The list of discounts being applied to the order, according to the original list of discounts received in SendCart for this order, and to the Merchant shipping configuration on Global‑e.
Show child attributes
Show child attributes
Indicates if the end customer hasn’t been charged VAT in Global‑e checkout, as specified in the doNotChargeVAT argument for the SendCart method for the cart converted to this order on Global‑e. TRUE - VAT is not charged TRUE - VAT is charged
The Tax reference number of the GE Entity at the destination country. Should only be provided when the order is tax-collected. Otherwise, the field should be Null. The value should be Null if the order destination is for an EU country.
Indicates whether the Merchant can use the destination Registration number. TRUE - Merchant can use destination Registration number (ExporterDetails.DestinationRegistrationNumber) FALSE - Merchant cannot use destination Registration number.
Merchant’s free shipping CouponCode applied by the end customer, as specified in the FreeShippingCouponCode argument for the SendCart method for the cart converted to this order on Global‑e.
Details referring to the end customer’s order placed on the Global‑e side. These details apply only to the Merchants dealing with international customers’ support themselves.
Show child attributes
Show child attributes
Indicates if the order has a Company name and VAT registration number. TRUE - Order contains a company name and VAT registration number FALSE - Order does not contain a company name and VAT registration number
Indicates if the Merchant offers free international shipping to the end customer, as specified in the IsFreeShipping argument for the SendCart method for the cart converted to this order on Global‑e. TRUE - Shipping is free. FALSE - Shipping is not free.
Indicates if the the customer is a customer support agent and an “Offline order” took place TRUE - The customer is a customer support agent and an “Offline order” took place FALSE - The customer is a regular customer
Indicates if the order is a replacement. TRUE - The order is a replacement FALSE - The order is not a replacement
Indicates if the order should be handled as a split order (i.e. without consolidation). TRUE - Order will be split FALSE - Order is not to be split
Indicates if the order has a tax exemption. TRUE - Order has a tax exemption FALSE - Order does not have a tax exemption
Loyalty code applicable to the Merchant’s site entered by the end customer in Global‑e checkout.
The number of loyalty points to be earned for this purchase by the end customer on the Merchant’s site, as specified in the loyaltyPointsEarned argument for the SendCart method for the cart converted to this order on Global-e.
The number of loyalty points spent for this purchase. The existing loyalty points handling procedure must be applied to the end customer’s user account. Therefore, the “Loyalty points” type discount must not be applied to the order directly but can be used for display purposes elsewhere in the system (i.e. on the end user’s My Account page).
The list of markups being applied to the order, according to the Merchant shipping configuration on Global‑e. Effectively Markup is a “negative Discount”. The main use case for markups is when the end customer is charged in Global‑e checkout, a flat shipping rate, which is higher than the shipping rate, calculated for the respective order. In this case, Global‑e pays the difference to the Merchant in the form of Markups applied to the order. Unlike Discounts, Markups may be only passed to the Merchant’s back-end ERP system for reconciliation purposes, and may not be displayed to the end customer.
Show child attributes
Show child attributes
Contains the duties and tax parts that the Merchant subsidized for the order.
Show child attributes
Show child attributes
Unique identifier of the Merchant on Global-e.
Order unique identifier on the Merchant’s site returned from a previous call to the SendOrderToMerchant method for this order.
Holds the product’s SKU
One of the values of OrderCreationSource enumeration denoting a type of discount shown in the OrderCreationSource Table.
Always contains a single document - it can be either a VAT Invoice or a Customer Receipt, depends if it is within the EU or not.
Show child attributes
Show child attributes
Global‑e order unique identifier.
List of payment methods the customer use (Credit card, Gift Cards)
Show child attributes
Show child attributes
Reason for the order status, why it was cancelled.
Show child attributes
Show child attributes
Details that refer to the original order if the current order is a replacement.
Show child attributes
Show child attributes
Currency of the one-time voucher code used to place the order.
The amount taken off the voucher when applicable.
One-time voucher code used to place the order
The list of parcels created for the order. Returned by GetOrdersDetails API only.
Show child attributes
Show child attributes
The paying customer’s payment details.
Show child attributes
Show child attributes
Indicates if the prepayment option for duties and taxes was offered to the customer. TRUE - Prepayment option offered. FALSE - Prepayment option not offered.
CountryCoefficient rate applied to the prices in this order.
The primary customer’s billing details. If IsEndCustomerPrimary is set to TRUE, then the primary customer is the payer and his details are indicated in the URL-encoded form.
Show child attributes
Show child attributes
Primary customer’s shipping details. If Customer.IsEndCustomerPrimary is TRUE, this field contains the end customers' shipping details. this field contains the Global-e hub's shipping address in the URL-encoded form.
Show child attributes
Show child attributes
The list of products being purchased.
Show child attributes
Show child attributes
The average conversion rate applied to the prices paid by the end customer when calculating the prices paid by Global‑e to the Merchant in the original Merchant’s currency. This rate includes “FX conversion” and “marketing rounding” factors.
Indicates if the end customer has requested “Same Day Dispatch” on Global‑e checkout. TRUE - Customer requested "Same Day Dispatch" FALSE - Customer did not request "Same Day Dispatch"
Cost of the “Same Day Dispatch” option selected by the end customer on Global‑e checkout, in the original Merchant’s currency.
Secondary customer’s billing details. If Customer.IsEndCustomerPrimary is FALSE, this contains attributes of the end customer’s details indicated in the URL-encoded form.
Show child attributes
Show child attributes
Secondary customer’s shipping details. If Customer.IsEndCustomerPrimary is FALSE, this field contains the end customers' shipping details.
Show child attributes
Show child attributes
Code denoting the local shipping method selected from the list of available shipping options provided in the shippingOptionsList argument for the SendCart method for the cart converted to this order on Global‑e.
Code denoting the Merchant’s store specified by the customer for “ship to shop” shipping destination (to be mapped on the Global‑e side).
Code denoting the order status on the Merchant’s site (to be mapped on the Global‑e side).
Contains Sub orders related to Mixed order. This list is defined only in case the order is Mixed.
Total Duties & Taxes value including Customs Clearance Fees, in the Merchant currency. This amount is the total amount, regardless of whether the customer or the Merchant paid it.
The total amount of duties paid by the customer in the Merchant’s currency.
Internal User identifier on the Merchant’s site originally specified in the shippingDetails. UserId argument for SendCart method for the cart converted to this order on Global‑e.
Sales tax value for USA in the Merchant currency. This value is included in TotalDutiesAndTaxesPrice.
Code used on the Merchant’s side to identify the web store, as specified in the WebStoreCode argument for the SendCart method for the cart converted to this order on Global‑e.
Response
Provides information related to validating that stock exists.
Provides information related to validating that stock exists.
The list of products that don’t have full stock availability for the Product.Quantity specified in the respective ValidateStock API request.
Show child attributes
Show child attributes
Dictionary with custom resources for error and oos popup. Keys for the dictionary: TitleTextResourceId , BodyTextResourceId , ButtonTextResourceId , RedirectUrl.
Show child attributes
Show child attributes
The error message returned from the Merchant
The stock reservation code returned from the Merchant if the stock has been actually reserved as a result of the ValidateStock API call.
Dictionary with placeholders which need to be replaced in text resources for error and oos popup which was passed in CustomResources (except RedirectUrl key).
Show child attributes
Show child attributes

