POST api/magento/orders/{orderId}/credit
Issues a credit against the order (creates a credit memo)
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| orderId |
order id |
string |
Required |
Body Parameters
credit memo request
SuiteBridge.Models.Magento.CreditMemoRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| creditmemoData |
credit memo data |
SuiteBridge.MagentoWebService.salesOrderCreditmemoData |
None. |
Request Formats
application/json, text/json
Sample:
{
"creditmemoData": {
"qtys": [
{
"order_item_id": 1,
"qty": 2.1
},
{
"order_item_id": 1,
"qty": 2.1
}
],
"shipping_amount": 1.1,
"shipping_amountSpecified": true,
"adjustment_positive": 3.1,
"adjustment_positiveSpecified": true,
"adjustment_negative": 5.1,
"adjustment_negativeSpecified": true
}
}
application/xml, text/xml
Sample:
<CreditMemoRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<creditmemoData>
<qtys>
<complexObjectArray>
<order_item_id>1</order_item_id>
<qty>2.1</qty>
</complexObjectArray>
<complexObjectArray>
<order_item_id>1</order_item_id>
<qty>2.1</qty>
</complexObjectArray>
</qtys>
<shipping_amount>1.1</shipping_amount>
<adjustment_positive>3.1</adjustment_positive>
<adjustment_negative>5.1</adjustment_negative>
</creditmemoData>
</CreditMemoRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
credit memo reference and adds a url link in the header to the created credit memo with 201 Created response
SuiteBridge.Models.Magento.ResourceRef| Name | Description | Type | Additional information |
|---|---|---|---|
| increment_id |
resource id |
string |
None. |
| type |
resource type |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"increment_id": "sample string 1",
"type": "sample string 2"
}
application/xml, text/xml
Sample:
<ResourceRef xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <increment_id>sample string 1</increment_id> <type>sample string 2</type> </ResourceRef>