Increases the company credit with an Allocate

POST /V1/companyCredits/{creditId}/increaseBalance

Increases the company credit with an Allocate, Update, Refund, Revert, or Reimburse transaction. This transaction decreases company's outstanding balance and increases company's available credit.

Path parameters

  • creditId integer Required

Body

  • value number Required
  • currency string Required
  • operationType integer Required
  • comment string

    [optional]

  • options object

    Credit balance data transfer object interface.

    Hide options attributes Show options attributes object
    • purchase_order string Required

      Purchase order number.

    • custom_reference_number string

      Custom Reference number.

    • order_increment string Required

      Order increment.

    • currency_display string Required

      Currency display.

    • currency_base string Required

      Currency base.

Responses

  • 200

    200 Success.

    true on success

  • 401

    401 Unauthorized

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

  • default

    Unexpected error

    Hide response attributes Show response attributes object
    • message string Required

      Error message

    • errors array[object]

      Error details

      Error details

      Hide errors attributes Show errors attributes object
      • message string

        Error message

      • parameters array[object]

        Error parameters item

        Error parameters item

        Hide parameters attributes Show parameters attributes object
        • resources string

          ACL resource

        • fieldName string

          Missing or invalid field name

        • fieldValue string

          Incorrect field value

    • code integer

      Error code

    • parameters array[object]

      Error parameters item

      Error parameters item

      Hide parameters attributes Show parameters attributes object
      • resources string

        ACL resource

      • fieldName string

        Missing or invalid field name

      • fieldValue string

        Incorrect field value

    • trace string

      Stack trace

POST /V1/companyCredits/{creditId}/increaseBalance
curl \
 --request POST 'https://magento2.winkelstraat.mac/rest/all/V1/companyCredits/{creditId}/increaseBalance' \
 --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"}}'
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"
  }
}
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 (default)
{
  "message": "string",
  "errors": [
    {
      "message": "string",
      "parameters": [
        {
          "resources": "string",
          "fieldName": "string",
          "fieldValue": "string"
        }
      ]
    }
  ],
  "code": 42,
  "parameters": [
    {
      "resources": "string",
      "fieldName": "string",
      "fieldValue": "string"
    }
  ],
  "trace": "string"
}