POST api/Merchant/v1/ReversePurchaseItems
Method reverse purchase items of one payment.
Request Information
URI Parameters
None.
Body Parameters
ReversePurchaseItemsRequest| Name | Description | Type | Additional 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": "827157e6-a59d-4213-9588-117e030063bc",
"purchaseItems": [
{
"PurchaseItemId": "53e0e1cb-d23c-431b-a8c2-9806e3415088",
"MerchantPurchaseItemNumber": "sample string 1",
"TotalToReverse": 2.0
},
{
"PurchaseItemId": "53e0e1cb-d23c-431b-a8c2-9806e3415088",
"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>827157e6-a59d-4213-9588-117e030063bc</purchaseId>
<purchaseItems>
<PurchaseItemReverseData>
<MerchantPurchaseItemNumber>sample string 1</MerchantPurchaseItemNumber>
<PurchaseItemId>53e0e1cb-d23c-431b-a8c2-9806e3415088</PurchaseItemId>
<TotalToReverse>2</TotalToReverse>
</PurchaseItemReverseData>
<PurchaseItemReverseData>
<MerchantPurchaseItemNumber>sample string 1</MerchantPurchaseItemNumber>
<PurchaseItemId>53e0e1cb-d23c-431b-a8c2-9806e3415088</PurchaseItemId>
<TotalToReverse>2</TotalToReverse>
</PurchaseItemReverseData>
</purchaseItems>
</ReversePurchaseItemsRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
ReversePurchaseItemsReply| Name | Description | Type | Additional 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": "a89001e2-1242-403a-b3ff-0035797abf4c",
"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>a89001e2-1242-403a-b3ff-0035797abf4c</Id>
<PurchaseProcessUrl>sample string 2</PurchaseProcessUrl>
<Status>Ok</Status>
</Reply>
</ReversePurchaseItemsReply>