POST api/bfg/v1/orders/{orderID}/amendments

Create an order amendment or cancellation for the specified order.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
orderID

Order ID to amend or cancel.

integer

Required

Body Parameters

Amendment request. Set to to cancel, or to amend quantity, price, and price type.

CreateOrderAmendmentRequest
NameDescriptionTypeAdditional information
CreatorID

integer

Required

OrderAmendmentType

enOrderAmendmentType

Required

Quantity

integer

None.

Price

decimal number

None.

PriceType

enOrderPriceType

None.

Request Formats

application/json, text/json

Sample:
{
  "CreatorID": 1,
  "OrderAmendmentType": 1,
  "Quantity": 1,
  "Price": 1.0,
  "PriceType": 1
}

application/xml, text/xml

Sample:
<CreateOrderAmendmentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPP.B2B.Webservices2.Contracts2.BFG.Order">
  <CreatorID>1</CreatorID>
  <OrderAmendmentType>Original</OrderAmendmentType>
  <Price>1</Price>
  <PriceType>Limit</PriceType>
  <Quantity>1</Quantity>
</CreateOrderAmendmentRequest>

Response Information

Resource Description

<see cref="T:TPP.B2B.Webservices2.Contracts2.BFG.Order.CreateOrderAmendmentResult" /> with common result fields always populated. <see cref="P:TPP.B2B.Webservices2.Contracts2.BFG.Order.CreateOrderAmendmentResult.Amendment" /> is set only for amendment requests.

CreateOrderAmendmentResult
NameDescriptionTypeAdditional information
OrderAmendmentType

enOrderAmendmentType

None.

OrderID

integer

None.

Success

boolean

None.

Errors

Collection of string

None.

Amendment

AmendmentCreationResult

None.

Response Formats

application/json, text/json

Sample:
{
  "OrderAmendmentType": 1,
  "OrderID": 1,
  "Success": true,
  "Errors": [
    "sample string 1",
    "sample string 2"
  ],
  "Amendment": {
    "OrderID": 1,
    "Success": true,
    "Errors": [
      "sample string 1",
      "sample string 2"
    ]
  }
}

application/xml, text/xml

Sample:
<CreateOrderAmendmentResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TPP.B2B.Webservices2.Contracts2.BFG.Order">
  <Amendment xmlns:d2p1="http://schemas.datacontract.org/2004/07/TPP.Contracts.Services.Order">
    <d2p1:Errors xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>sample string 1</d3p1:string>
      <d3p1:string>sample string 2</d3p1:string>
    </d2p1:Errors>
    <d2p1:OrderID>1</d2p1:OrderID>
    <d2p1:Success>true</d2p1:Success>
  </Amendment>
  <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Errors>
  <OrderAmendmentType>Original</OrderAmendmentType>
  <OrderID>1</OrderID>
  <Success>true</Success>
</CreateOrderAmendmentResult>

Error Response Information

Resource Description

<see cref="T:TPP.B2B.Webservices2.Contracts2.BFG.Order.CreateOrderAmendmentResult" /> with common result fields always populated. <see cref="P:TPP.B2B.Webservices2.Contracts2.BFG.Order.CreateOrderAmendmentResult.Amendment" /> is set only for amendment requests.

string

Error Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>