POST api/Merchant/v1/ReversePurchaseItems

Method reverse purchase items of one payment.

Request Information

URI Parameters

None.

Body Parameters

ReversePurchaseItemsRequest
NameDescriptionTypeAdditional information
purchaseId

Id of purchase (M)

globally unique identifier

None.

purchaseItems

List of purchase items to reverse. At least one mandatory.

Collection of PurchaseItemReverseData

None.

description

Desccription for reason.

string

None.

OrganizationCode

string

None.

UserName

string

None.

Password

string

None.

Request Formats

application/json, text/json

Sample:
{
  "purchaseId": "0f827c72-5155-4025-8c96-651f07738caf",
  "purchaseItems": [
    {
      "PurchaseItemId": "8f6c43ae-3b32-436f-963c-fa495f02b2b6",
      "MerchantPurchaseItemNumber": "sample string 1",
      "TotalToReverse": 2.0
    },
    {
      "PurchaseItemId": "8f6c43ae-3b32-436f-963c-fa495f02b2b6",
      "MerchantPurchaseItemNumber": "sample string 1",
      "TotalToReverse": 2.0
    }
  ],
  "description": "sample string 2",
  "OrganizationCode": "sample string 3",
  "UserName": "sample string 4",
  "Password": "sample string 5"
}

application/xml, text/xml

Sample:
<ReversePurchaseItemsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers.Merchant">
  <OrganizationCode xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 3</OrganizationCode>
  <Password xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 5</Password>
  <UserName xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 4</UserName>
  <description>sample string 2</description>
  <purchaseId>0f827c72-5155-4025-8c96-651f07738caf</purchaseId>
  <purchaseItems>
    <PurchaseItemReverseData>
      <MerchantPurchaseItemNumber>sample string 1</MerchantPurchaseItemNumber>
      <PurchaseItemId>8f6c43ae-3b32-436f-963c-fa495f02b2b6</PurchaseItemId>
      <TotalToReverse>2</TotalToReverse>
    </PurchaseItemReverseData>
    <PurchaseItemReverseData>
      <MerchantPurchaseItemNumber>sample string 1</MerchantPurchaseItemNumber>
      <PurchaseItemId>8f6c43ae-3b32-436f-963c-fa495f02b2b6</PurchaseItemId>
      <TotalToReverse>2</TotalToReverse>
    </PurchaseItemReverseData>
  </purchaseItems>
</ReversePurchaseItemsRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'ReversePurchaseItemsRequest'.

Response Information

Resource Description

ReversePurchaseItemsReply
NameDescriptionTypeAdditional information
Reply

PurchaseReply

None.

Ok

boolean

None.

ErrorMessage

string

None.

ErrorCode

string

None.

Message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Reply": {
    "Id": "85712665-b2c2-454d-9613-c627fa1ba48a",
    "PurchaseProcessUrl": "sample string 2",
    "Status": 0
  },
  "Ok": true,
  "ErrorMessage": "sample string 2",
  "ErrorCode": "sample string 3",
  "Message": "sample string 4"
}

application/xml, text/xml

Sample:
<ReversePurchaseItemsReply xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers.Merchant">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 3</ErrorCode>
  <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 2</ErrorMessage>
  <Message xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">sample string 4</Message>
  <Ok xmlns="http://schemas.datacontract.org/2004/07/FfApi.Controllers">true</Ok>
  <Reply>
    <Id>85712665-b2c2-454d-9613-c627fa1ba48a</Id>
    <PurchaseProcessUrl>sample string 2</PurchaseProcessUrl>
    <Status>Ok</Status>
  </Reply>
</ReversePurchaseItemsReply>