Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. Also indicates if a shipment has already been confirmed for pre-order.
curl -X POST https://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01 \
-d "AWSAccessKeyId=AWS_ACCESS_KEY_ID" \
-d "Action=GetPreorderInfo" \
-d "MWSAuthToken=MWS_AUTH_TOKEN" \
-d "SellerId=MWS_SELLER_ID" \
-d "SignatureVersion=2" \
-d "Timestamp=CURRENT_DATE_TIME" \
-d "Version=2010-10-01" \
-d "Signature=MWS_SIGNATURE" \
-d "SignatureMethod=HmacSHA256" \
-d "ShipmentId=FBA2F3KCQF"
#include <CkRestW.h>
#include <CkXmlW.h>
void ChilkatSample(void)
{
CkRestW rest;
bool success;
// URL: https://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01
bool bTls = true;
int port = 443;
bool bAutoReconnect = true;
success = rest.Connect(L"mws.amazonaws.com",port,bTls,bAutoReconnect);
if (success != true) {
wprintf(L"ConnectFailReason: %d\n",rest.get_ConnectFailReason());
wprintf(L"%s\n",rest.lastErrorText());
return;
}
rest.AddQueryParam(L"AWSAccessKeyId",L"AWS_ACCESS_KEY_ID");
rest.AddQueryParam(L"Action",L"GetPreorderInfo");
rest.AddQueryParam(L"MWSAuthToken",L"MWS_AUTH_TOKEN");
rest.AddQueryParam(L"SellerId",L"MWS_SELLER_ID");
rest.AddQueryParam(L"SignatureVersion",L"2");
rest.AddQueryParam(L"Version",L"2010-10-01");
rest.AddQueryParam(L"SignatureMethod",L"HmacSHA256");
rest.AddQueryParam(L"ShipmentId",L"FBA2F3KCQF");
rest.put_Host(L"mws.amazonaws.com");
// The AddMwsSignature method adds the Timestamp and Signature query params.
rest.AddMwsSignature(L"POST",L"/FulfillmentInboundShipment/2010-10-01",L"mws.amazonaws.com",L"MWS_SECRET_KEY");
const wchar_t *strResponseBody = rest.fullRequestFormUrlEncoded(L"POST",L"/FulfillmentInboundShipment/2010-10-01");
if (rest.get_LastMethodSuccess() != true) {
wprintf(L"%s\n",rest.lastErrorText());
return;
}
CkXmlW xmlResponse;
xmlResponse.LoadXml(strResponseBody);
const wchar_t *GetPreorderInfoResponse_xmlns = 0;
const wchar_t *tagPath = 0;
const wchar_t *ShipmentContainsPreorderableItems = 0;
const wchar_t *NeedByDate = 0;
const wchar_t *ConfirmedFulfillableDate = 0;
const wchar_t *ShipmentConfirmedForPreorder = 0;
const wchar_t *RequestId = 0;
GetPreorderInfoResponse_xmlns = xmlResponse.getAttrValue(L"xmlns");
ShipmentContainsPreorderableItems = xmlResponse.getChildContent(L"GetPreorderInfoResult|ShipmentContainsPreorderableItems");
NeedByDate = xmlResponse.getChildContent(L"GetPreorderInfoResult|NeedByDate");
ConfirmedFulfillableDate = xmlResponse.getChildContent(L"GetPreorderInfoResult|ConfirmedFulfillableDate");
ShipmentConfirmedForPreorder = xmlResponse.getChildContent(L"GetPreorderInfoResult|ShipmentConfirmedForPreorder");
RequestId = xmlResponse.getChildContent(L"ResponseMetadata|RequestId");
}
<?xml version="1.0" encoding="utf-8" ?>
<GetPreorderInfoResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
<GetPreorderInfoResult>
<ShipmentContainsPreorderableItems>true</ShipmentContainsPreorderableItems>
<NeedByDate>2015-12-27</NeedByDate>
<ConfirmedFulfillableDate>2015-12-31</ConfirmedFulfillableDate>
<ShipmentConfirmedForPreorder>true</ShipmentConfirmedForPreorder>
</GetPreorderInfoResult>
<ResponseMetadata>
<RequestId>4a1a7029-462b-4a27-a04c-4cbe0fd107e3</RequestId>
</ResponseMetadata>
</GetPreorderInfoResponse>