Decreases the company credit with an Update, Reimburse, or Purchase transaction. This transaction increases company's outstanding balance and decreases company's available credit.
application/json
POST
/V1/companyCredits/{creditId}/decreaseBalance
cURL (application/json)
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/companyCredits/{creditId}/decreaseBalance' \
--header "Content-Type: application/json" \
--data '{"value":42.0,"currency":"string","operationType":42,"comment":"string","options":{"purchase_order":"string","custom_reference_number":"string","order_increment":"string","currency_display":"string","currency_base":"string"}}'
curl \
--request POST 'https://magento2.winkelstraat.mac/rest/all/V1/companyCredits/{creditId}/decreaseBalance' \
--header "Content-Type: application/xml"
Request examples
{
"value": 42.0,
"currency": "string",
"operationType": 42,
"comment": "string",
"options": {
"purchase_order": "string",
"custom_reference_number": "string",
"order_increment": "string",
"currency_display": "string",
"currency_base": "string"
}
}
Request examples
<?xml version="1.0" encoding="UTF-8"?>
<root>
<value type="float">42.0</value>
<currency>string</currency>
<operationType type="integer">42</operationType>
<comment>string</comment>
<options>
<purchase-order>string</purchase-order>
<custom-reference-number>string</custom-reference-number>
<order-increment>string</order-increment>
<currency-display>string</currency-display>
<currency-base>string</currency-base>
</options>
</root>
Response examples (200)
true
Response examples (200)
true
Response examples (401)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (401)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>
Response examples (default)
{
"message": "string",
"errors": [
{
"message": "string",
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
]
}
],
"code": 42,
"parameters": [
{
"resources": "string",
"fieldName": "string",
"fieldValue": "string"
}
],
"trace": "string"
}
Response examples (default)
<?xml version="1.0" encoding="UTF-8"?>
<root>
<message>string</message>
<errors type="array">
<error>
<message>string</message>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
</error>
</errors>
<code type="integer">42</code>
<parameters type="array">
<parameter>
<resources>string</resources>
<fieldName>string</fieldName>
<fieldValue>string</fieldValue>
</parameter>
</parameters>
<trace>string</trace>
</root>