Creates an inbound shipment.
curl -X POST https://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01 \
-d "AWSAccessKeyId=AWS_ACCESS_KEY_ID" \
-d "Action=CreateInboundShipment" \
-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=FBA0000001" \
-d "InboundShipmentHeader.ShipmentName=SHIPMENT_NAME" \
-d "InboundShipmentHeader.ShipFromAddress.Name=NAME" \
-d "InboundShipmentHeader.ShipFromAddress.AddressLine1=ADDR_LINE1" \
-d "InboundShipmentHeader.ShipFromAddress.City=Seattle" \
-d "InboundShipmentHeader.ShipFromAddress.StateOrProvinceCode=WA" \
-d "InboundShipmentHeader.ShipFromAddress.PostalCode=98121" \
-d "InboundShipmentHeader.ShipFromAddress.CountryCode=US" \
-d "InboundShipmentHeader.DestinationFulfillmentCenterId=ABE2" \
-d "InboundShipmentHeader.ShipmentStatus=WORKING" \
-d "InboundShipmentHeader.LabelPrepPreference=SELLER_LABEL" \
-d "InboundShipmentHeader.IntendedBoxContentsSource=FEED" \
-d "InboundShipmentItems.member.1.QuantityShipped=1" \
-d "InboundShipmentItems.member.1.SellerSKU=SKU00001" \
-d "InboundShipmentItems.member.1.PrepDetailsList.member.1.PrepInstruction=Taping" \
-d "InboundShipmentItems.member.1.PrepDetailsList.member.1.PrepOwner=AMAZON" \
-d "InboundShipmentItems.member.2.QuantityShipped=2" \
-d "InboundShipmentItems.member.2.SellerSKU=SKU00002" \
-d "InboundShipmentItems.member.2.PrepDetailsList.member.1.PrepInstruction=Taping" \
-d "InboundShipmentItems.member.2.PrepDetailsList.member.1.PrepOwner=SELLER"
#import <CkoRest.h>
#import <NSString.h>
#import <CkoXml.h>
CkoRest *rest = [[CkoRest alloc] init];
BOOL success;
// URL: https://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01
BOOL bTls = YES;
int port = 443;
BOOL bAutoReconnect = YES;
success = [rest Connect: @"mws.amazonaws.com" port: [NSNumber numberWithInt: port] tls: bTls autoReconnect: bAutoReconnect];
if (success != YES) {
NSLog(@"%@%d",@"ConnectFailReason: ",[rest.ConnectFailReason intValue]);
NSLog(@"%@",rest.LastErrorText);
return;
}
[rest AddQueryParam: @"AWSAccessKeyId" value: @"AWS_ACCESS_KEY_ID"];
[rest AddQueryParam: @"Action" value: @"CreateInboundShipment"];
[rest AddQueryParam: @"SellerId" value: @"MWS_SELLER_ID"];
[rest AddQueryParam: @"SignatureVersion" value: @"2"];
[rest AddQueryParam: @"Version" value: @"2010-10-01"];
[rest AddQueryParam: @"SignatureMethod" value: @"HmacSHA256"];
[rest AddQueryParam: @"ShipmentId" value: @"FBA0000001"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipmentName" value: @"SHIPMENT_NAME"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.Name" value: @"NAME"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.AddressLine1" value: @"ADDR_LINE1"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.City" value: @"Seattle"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.StateOrProvinceCode" value: @"WA"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.PostalCode" value: @"98121"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipFromAddress.CountryCode" value: @"US"];
[rest AddQueryParam: @"InboundShipmentHeader.DestinationFulfillmentCenterId" value: @"ABE2"];
[rest AddQueryParam: @"InboundShipmentHeader.ShipmentStatus" value: @"WORKING"];
[rest AddQueryParam: @"InboundShipmentHeader.LabelPrepPreference" value: @"SELLER_LABEL"];
[rest AddQueryParam: @"InboundShipmentHeader.IntendedBoxContentsSource" value: @"FEED"];
[rest AddQueryParam: @"InboundShipmentItems.member.1.QuantityShipped" value: @"1"];
[rest AddQueryParam: @"InboundShipmentItems.member.1.SellerSKU" value: @"SKU00001"];
[rest AddQueryParam: @"InboundShipmentItems.member.1.PrepDetailsList.member.1.PrepInstruction" value: @"Taping"];
[rest AddQueryParam: @"InboundShipmentItems.member.1.PrepDetailsList.member.1.PrepOwner" value: @"AMAZON"];
[rest AddQueryParam: @"InboundShipmentItems.member.2.QuantityShipped" value: @"2"];
[rest AddQueryParam: @"InboundShipmentItems.member.2.SellerSKU" value: @"SKU00002"];
[rest AddQueryParam: @"InboundShipmentItems.member.2.PrepDetailsList.member.1.PrepInstruction" value: @"Taping"];
[rest AddQueryParam: @"InboundShipmentItems.member.2.PrepDetailsList.member.1.PrepOwner" value: @"SELLER"];
rest.Host = @"mws.amazonaws.com";
// The AddMwsSignature method adds the Timestamp and Signature query params.
[rest AddMwsSignature: @"POST" uriPath: @"/FulfillmentInboundShipment/2010-10-01" domain: @"mws.amazonaws.com" mwsSecretKey: @"MWS_SECRET_KEY"];
NSString *strResponseBody = [rest FullRequestFormUrlEncoded: @"POST" uriPath: @"/FulfillmentInboundShipment/2010-10-01"];
if (rest.LastMethodSuccess != YES) {
NSLog(@"%@",rest.LastErrorText);
return;
}
CkoXml *xmlResponse = [[CkoXml alloc] init];
[xmlResponse LoadXml: strResponseBody];
NSString *CreateInboundShipmentResponse_xmlns = 0;
NSString *tagPath = 0;
NSString *ShipmentId = 0;
NSString *RequestId = 0;
CreateInboundShipmentResponse_xmlns = [xmlResponse GetAttrValue: @"xmlns"];
ShipmentId = [xmlResponse GetChildContent: @"CreateInboundShipmentResult|ShipmentId"];
RequestId = [xmlResponse GetChildContent: @"ResponseMetadata|RequestId"];
<?xml version="1.0" encoding="UTF-8" ?>
<CreateInboundShipmentResponse xmlns="http://mws.amazonaws.com/FulfillmentInboundShipment/2010-10-01/">
<CreateInboundShipmentResult>
<ShipmentId>FBA2F50GYX</ShipmentId>
</CreateInboundShipmentResult>
<ResponseMetadata>
<RequestId>2a1455aa-c5f9-4993-9b18-dc10407e09ba</RequestId>
</ResponseMetadata>
</CreateInboundShipmentResponse>