Adjusting invoices

How to adjust, reverse, write off, and refund invoices using the Invoice _execute endpoint

The Invoice _execute endpoint allows you to perform various adjustment and reversal operations on invoices. This guide provides working JSON examples for the most commonly used operations.

POST https://{{URL}}/api/Invoice/_execute

All operations use the GenericExecuteRequest wrapper. The key properties are:

  • OperationName — the name of the operation to execute
  • EntityTypeName — always "Invoice"
  • Parameters — an array containing the operation-specific data object
  • ParameterTypeName — an array of the .NET type names for each parameter

Writing off an invoice

Writes off the remaining balance of an invoice. This creates a write-off transaction that zeroes out the balance.

InvoiceActionWriteOffData properties:

  • InvoiceId (string, required) — The invoice ID to write off
  • AdjustmentDate (datetime, required) — The date to record the write-off
  • AdjustmentReason (string, optional) — Reason for the write-off

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessWriteOff",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionWriteOffData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Unable to collect"
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionWriteOffData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Recording a refund

Records a refund against an invoice that has already been paid.

InvoiceActionRecordRefundData properties:

  • InvoiceId (string, required) — The invoice ID
  • AdjustmentDate (datetime, required) — The date to record the refund
  • AdjustmentReason (string, optional) — Reason for the refund
  • PaymentMethodId (string, required) — Payment method used for the refund (e.g., "CASH", "CHECK", "VISA")
  • PaymentMethodDescription (string, optional) — Check number or last 4 digits of credit card
  • RefundAmount (decimal, required) — The amount to refund
  • OriginalPaymentId (int, optional) — Payment ID of the original payment, if known

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessRecordRefund",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionRecordRefundData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Customer requested refund",
        "PaymentMethodId": "CHECK",
        "PaymentMethodDescription": "10542",
        "RefundAmount": 95.00,
        "OriginalPaymentId": 0
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionRecordRefundData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Adjusting a cash invoice

Adjusts a persisted cash invoice by changing line item prices, or removing lines entirely.

InvoiceActionCashAdjustmentData properties:

  • InvoiceId (string, required) — The invoice ID
  • AdjustmentDate (datetime, required) — The date to record the adjustment
  • AdjustmentReason (string, optional) — Reason for the adjustment
  • DeliveryId (string, optional) — The delivery ID
  • InvoiceLineAdjustments (collection, required) — Collection of PartialInvoiceLine

PartialInvoiceLine properties:

  • ProductCode (string, required) — Product code of the line being adjusted
  • IsRemoved (bool, optional) — Set to true to remove the line entirely
  • OriginalUnitPrice (decimal, optional) — The original unit price
  • NewUnitPrice (decimal, optional) — The new unit price
  • AdjustmentPrice (decimal, optional) — Signed adjustment value. Use this or OriginalUnitPrice/NewUnitPrice, not both.

📘

AdjustmentPrice vs OriginalUnitPrice/NewUnitPrice

You can adjust a line in two ways:

  1. Set OriginalUnitPrice and NewUnitPrice to specify the old and new price
  2. Set AdjustmentPrice to a signed decimal (e.g., -20.00 to reduce by $20)

When AdjustmentPrice is provided, OriginalUnitPrice and NewUnitPrice are ignored.

Example: Adjust the price of a line item

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessCashAdjustment",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionCashAdjustmentData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Price correction",
        "DeliveryId": "",
        "InvoiceLineAdjustments": [
          {
            "ProductCode": "JOUR",
            "IsRemoved": false,
            "OriginalUnitPrice": 95.00,
            "NewUnitPrice": 75.00
          }
        ]
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionCashAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Example: Remove a line from a cash invoice

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessCashAdjustment",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionCashAdjustmentData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Remove subscription",
        "DeliveryId": "",
        "InvoiceLineAdjustments": [
          {
            "ProductCode": "INSIDMAG",
            "IsRemoved": true
          }
        ]
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionCashAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Reversing a cash invoice

Fully reverses a persisted cash invoice.

InvoiceActionCashReversalData properties:

  • InvoiceId (string, required) — The invoice ID to reverse
  • ShipToPartyId (string, optional) — Party ID of one membership to reverse. Omit to reverse all lines.
  • BillDate (datetime, optional) — Bill date for the subscription term to be reversed
  • AdjustmentDate (datetime, required) — The date to record the reversal
  • AdjustmentReason (string, optional) — Reason for the reversal
  • DoNotCancelMembership (bool, optional) — Set to true if the invoice only needs reversal (membership should not be cancelled)

📘

Checking eligibility

You can first call CanCashInvoiceBeReversed (shown below) to verify the invoice is eligible for reversal before attempting it.

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessCashReversal",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionCashReversalData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Billing error - reversing invoice",
        "DoNotCancelMembership": true
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionCashReversalData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Reversing an accrual invoice

Reverses an accrual (traditional) dues invoice.

InvoiceActionDuesReversalData properties:

  • InvoiceId (string, required) — The invoice ID to reverse
  • AdjustmentDate (datetime, required) — The date to record the reversal
  • AdjustmentReason (string, optional) — Reason for the reversal
  • DeliveryId (string, optional) — The delivery ID
  • DoNotCancelMembership (bool, optional) — Set to true for reversal only (membership should not be cancelled)

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessAccrualReversal",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionDuesReversalData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Reversing incorrect billing",
        "DoNotCancelMembership": true
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionDuesReversalData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Adjusting an accrual invoice

Adjusts an accrual dues invoice by changing line item prices or removing lines.

InvoiceActionAccrualAdjustmentData properties:

  • InvoiceId (string, required) — The invoice ID
  • AdjustmentDate (datetime, required) — The date to record the adjustment
  • AdjustmentReason (string, optional) — Reason for the adjustment
  • DeliveryId (string, optional) — The delivery ID
  • InvoiceLineAdjustments (collection, required) — Collection of PartialInvoiceLine

PartialInvoiceLine properties (each item in InvoiceLineAdjustments):

  • ProductCode (string, required) — Product code
  • IsRemoved (bool, optional) — Set to true to remove the line entirely
  • OriginalUnitPrice (decimal, optional) — Original unit price
  • NewUnitPrice (decimal, optional) — New unit price (for price adjustments)
  • AdjustmentPrice (decimal, optional) — Signed adjustment value. Use this or OriginalUnitPrice/NewUnitPrice, not both.

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessAccrualAdjustment",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionAccrualAdjustmentData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Price adjustment for renewal",
        "DeliveryId": "",
        "InvoiceLineAdjustments": [
          {
            "ProductCode": "DUES",
            "OriginalUnitPrice": 250.00,
            "NewUnitPrice": 200.00
          }
        ]
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionAccrualAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Reversing a commerce order invoice

Reverses a commerce order invoice (e.g., product sales). This operation can optionally reverse shipping, handling, and inventory.

InvoiceActionOrderReversalData properties:

  • InvoiceId (string, required) — The invoice ID to reverse
  • AdjustmentDate (datetime, required) — The date to record the reversal
  • AdjustmentReason (string, optional) — Reason for the reversal
  • ReverseShipping (bool, optional) — Whether to reverse shipping charges
  • ReverseHandling (bool, optional) — Whether to reverse handling charges
  • AffectsInventory (bool, optional) — Whether the reversal should update inventory

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessOrderReversal",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionOrderReversalData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Order returned by customer",
        "ReverseShipping": true,
        "ReverseHandling": true,
        "AffectsInventory": true
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionOrderReversalData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Adjusting a commerce order invoice

Adjusts a commerce order invoice — change prices, quantities, or shipping/handling amounts.

InvoiceActionOrderAdjustmentData properties:

  • InvoiceId (string, required) — The invoice ID
  • AdjustmentDate (datetime, required) — The date to record the adjustment
  • AdjustmentReason (string, optional) — Reason for the adjustment
  • OrderLineAdjustments (collection, required) — Collection of PartialOrderLine
  • OriginalShipping (decimal, optional) — Original shipping amount
  • NewShipping (decimal, optional) — New shipping amount
  • OriginalHandling (decimal, optional) — Original handling amount
  • NewHandling (decimal, optional) — New handling amount
  • ShipMethodId (string, optional) — Shipping method ID
  • AffectsInventory (bool, optional) — Whether the adjustment updates inventory

PartialOrderLine properties:

  • ProductCode (string, required) — Product code
  • ProductName (string, optional) — Display name of the product
  • OriginalQuantity (int, optional) — Original quantity
  • NewQuantity (int, optional) — New quantity
  • OriginalUnitPrice (decimal, optional) — Original unit price
  • NewUnitPrice (decimal, optional) — New unit price (required unless component-priced kit)
  • IsNewLine (bool, optional) — Whether this is a new line being added

Example: Adjust a line item price and reduce shipping

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessOrderAdjustment",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionOrderAdjustmentData, Asi.Contracts",
        "InvoiceId": "8158",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Discount applied after purchase",
        "OriginalShipping": 15.00,
        "NewShipping": 10.00,
        "OriginalHandling": 5.00,
        "NewHandling": 5.00,
        "AffectsInventory": false,
        "OrderLineAdjustments": [
          {
            "ProductCode": "BOOK001",
            "OriginalQuantity": 2,
            "NewQuantity": 2,
            "OriginalUnitPrice": 49.95,
            "NewUnitPrice": 39.95,
            "IsNewLine": false
          }
        ]
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionOrderAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Reversing a fundraising invoice

Reverses a fundraising or pledge invoice.

InvoiceActionFundraisingAdjustmentData properties:

  • InvoiceId (string, required) — The invoice ID
  • ScheduledPaymentId (string, optional) — Specific scheduled payment ID to reverse
  • AdjustmentDate (datetime, required) — The date to record the reversal
  • AdjustmentReason (string, optional) — Reason for the reversal
  • DeliveryId (string, optional) — The delivery ID
  • ReverseAll (bool, optional) — Whether this is a reversal of all scheduled payments or a single one

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessFundraisingReversal",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionFundraisingAdjustmentData, Asi.Contracts",
        "InvoiceId": "8200",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Pledge cancelled by donor",
        "ReverseAll": true
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionFundraisingAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Adjusting a fundraising invoice

Adjusts a fundraising invoice. Uses the same InvoiceActionFundraisingAdjustmentData data contract as the reversal.

Additional properties for adjustments:

  • Adjustments (collection, optional) — Collection of ScheduledPaymentAdjustmentData for adjusting installment amounts
  • DueDateAdjustments (dictionary, optional) — Dictionary of scheduled payment ID to new due date for adjusting due dates

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "ProcessFundraisingAdjustment",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionFundraisingAdjustmentData, Asi.Contracts",
        "InvoiceId": "8200",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Adjusted pledge amount"
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionFundraisingAdjustmentData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Checking if an invoice can be reversed or adjusted

Before performing a reversal or adjustment, you can check whether the invoice is eligible. These operations return a boolean result.

CanInvoiceBeReversed

Checks whether an accrual invoice can be reversed. The parameter is the invoice reference number (an integer, not the invoice ID string).

📘

Finding the invoice reference number

You can get the invoice reference number by calling GetTransactionsInvoiceReferenceNumber with the invoice ID, or by looking at the InvoiceNumber property on the InvoiceSummary.

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "CanInvoiceBeReversed",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      2317
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "System.Int32"
    ]
  },
  "UseJson": false
}

CanCashInvoiceBeReversed

Checks whether a cash invoice can be reversed. The parameter is the invoice ID (a string).

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "CanCashInvoiceBeReversed",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      "8158"
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "System.String"
    ]
  },
  "UseJson": false
}

CanOrderInvoiceBeAdjusted

Checks whether an order invoice can be adjusted. The parameter is the invoice reference number (an integer).

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "CanOrderInvoiceBeAdjusted",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      2317
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "System.Int32"
    ]
  },
  "UseJson": false
}

CanDuesInvoiceBeAdjusted

Checks whether a dues invoice can be adjusted. The parameter is the invoice reference number (an integer).

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "CanDuesInvoiceBeAdjusted",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      2317
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "System.Int32"
    ]
  },
  "UseJson": false
}

CanInvoiceBeRefunded

Checks whether an invoice can be refunded. The invoice must be an accrual invoice with a negative balance. The parameter is the invoice reference number (an integer).

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "CanInvoiceBeRefunded",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      2317
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "System.Int32"
    ]
  },
  "UseJson": false
}

Updating the bill-to on an event invoice

Changes the bill-to contact on an event invoice.

InvoiceActionUpdateBillToIdData properties:

  • InvoiceId (string, required) — The invoice ID
  • AdjustmentDate (datetime, required) — The date of the change
  • AdjustmentReason (string, optional) — Reason for changing the bill-to
  • NewBillToId (string, required) — The new bill-to party ID

POST https://{{URL}}/api/Invoice/_execute

{
  "$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
  "OperationName": "UpdateEventInvoiceBillToId",
  "EntityTypeName": "Invoice",
  "Parameters": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.Object, mscorlib]], mscorlib",
    "$values": [
      {
        "$type": "Asi.Soa.Commerce.DataContracts.InvoiceActionUpdateBillToIdData, Asi.Contracts",
        "InvoiceId": "8300",
        "AdjustmentDate": "2026-04-23T00:00:00",
        "AdjustmentReason": "Transferring invoice to employer",
        "NewBillToId": "23500"
      }
    ]
  },
  "ParameterTypeName": {
    "$type": "System.Collections.ObjectModel.Collection`1[[System.String, mscorlib]], mscorlib",
    "$values": [
      "Asi.Soa.Commerce.DataContracts.InvoiceActionUpdateBillToIdData, Asi.Contracts"
    ]
  },
  "UseJson": false
}

Typical workflow

  1. Check if the invoice can be adjusted/reversed using the appropriate Can* operation
  2. Get the invoice details via GET https://{{URL}}/api/InvoiceSummary/{invoiceId} to find the current balance, lines, and reference number
  3. Execute the adjustment/reversal using the appropriate Process* operation
  4. Verify the result by re-fetching the invoice to confirm the balance has changed

📘

See also


Contact us
Copyright © Advanced Solutions International, All rights reserved.