CreateOrderReferenceForId

Creates an order reference for the given object.

Description

The CreateOrderReferenceForId operation is used to create an Order Reference object from the object represented by the Id and IdType request parameters.

For order references created from a Billing Agreement object, only one order reference can be created while the billing agreement is in the Draft state. Any number of order references can be created when the billing agreement is in the Open state. The buyer, shipping address, and payment method for the order reference are populated from the billing agreement. To create an Order Reference object in the Confirmed state, set the ConfirmNow request parameter to true.

This operation has a maximum request quota of 10 and a restore rate of one request every second in the production environment. It has a maximum request quota of two and a restore rate of one request every two seconds in the sandbox environment. For definitions of throttling terminology and for a complete explanation of throttling, see Throttling: Limits to how often you can submit requests in the Amazon MWS Developer Guide.

Request parameters

For more information about the request parameters that are required for all Amazon MWS operations, see Required request parameters in the Amazon MWS Developer Guide.

Parameter name Description
Id

Required
xs:string
The identifier of the object to be used to create an order reference.

Currently, the only accepted value is a billing agreement identifier. This value is retrieved from the Amazon Button, AddressBook, or Wallet widgets.
IdType

Required
xs:string
The type of the object represented by the Id request parameter.

A value of BillingAgreement specifies that Id is a Billing Agreement identifier.
InheritShippingAddress

Optional
xs:boolean
Specifies whether to inherit the shipping address details from the object represented by the Id request parameter.

Default: false

Note: Set this value to true if the order is shipping physical products.
ConfirmNow

Optional
xs:boolean
Indicates whether to directly confirm the requested order reference.
  • true-The order reference is directly confirmed. You do not need to call the ConfirmOrderReference operation.
  • false-You must call the ConfirmOrderReference operation to confirm the order reference.
Default: false
OrderReferenceAttributes

Required only if ConfirmNow is true OrderReferenceAttributes
The merchant-specified attributes of the order reference.

Response elements

Element name Description
OrderReferenceDetails Encapsulates details about the Order Reference object and its current state.

Type: OrderReferenceDetails

Examples

Sample query request


POST /OffAmazonPayments/2013-01-01 HTTP/1.1
  Content-Type: x-www-form-urlencoded
  Host: mws.amazonservices.com
  User-Agent: <Your User Agent Header>

  AWSAccessKeyId=AKIAJKYFSJU7PEXAMPLE
  &Action=CreateOrderReferenceForId
  &Id=C01-1234567-1234567
  &IdType=BillingAgreement
  &SellerId=YOUR_SELLER_ID_HERE
  &SignatureMethod=HmacSHA256
  &SignatureVersion=2
  &Timestamp=2012-10-03T19%3A01%3A11Z
  &Version=2013-01-01
  &Signature=WlQ708aqyHXMkoUBk69Hjxj8qdh3aDcqpY71hVgEXAMPLE
    

Sample response


<CreateOrderReferenceForIdResponse
    xmlns="http://mws.amazonservices.com/
          schema/OffAmazonPayments_Sandbox/2013-01-01">
  <CreateOrderReferenceForIdResult>
    <OrderReferenceDetails>
      <AmazonOrderReferenceId>S01-1234567-1234567</AmazonOrderReferenceId>
      <CreationTimestamp>2013-12-05T00:21:19Z</CreationTimestamp>
      <ExpirationTimestamp>2014-05-05T00:21:19Z</ExpirationTimestamp>
      <OrderReferenceStatus>
        <State>Draft</State>
      </OrderReferenceStatus>
      <Destination>
        <DestinationType>Physical</DestinationType>
        <PhysicalDestination>
          <City>New York</City>
          <StateOrRegion>NY</StateOrRegion>
          <PostalCode>10101-9876</PostalCode>
          <CountryCode>US</CountryCode>
        </PhysicalDestination>
      </Destination>
      <ReleaseEnvironment>Live</ReleaseEnvironment>
    </OrderReferenceDetails>
  </CreateOrderReferenceForIdResult>
  <ResponseMetadata>
    <RequestId>5f20169b-7ab2-11df-bcef-d35615e2b044</RequestId>
  </ResponseMetadata>
  </CreateOrderReferenceForIdResponse>
    

See also