HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

Set Pledge Source Code via REST API

How do we set the source code correctly when creating a pledge using the REST API?

When using the "api/ComboOrder" endpoint, the source code value set does not stick for pledges whereas it does for gifts.

For example:

{
    "$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts",
    "Order": {
        "$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
        "Lines": {
            "$type": "Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts",
            "$values": [
                {
                    "$type": "Asi.Soa.Fundraising.DataContracts.GiftOrderLineData, Asi.Contracts",
                    "IsGiftAidExcluded": false,
                    "IsPledge": true,
                    "DoNotReceipt": false,
                    "InvoiceReferenceNumber": 0,
                    "PledgeWithPaymentInvolved": false,
                    "Item": {
                        "$type": "Asi.Soa.Fundraising.DataContracts.GiftItemData, Asi.Contracts",
                        "ItemId": "GEN"
                    },
                    "UnitPrice": {
                        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
                        "Amount": 1.00,
                        "Currency": {
                            "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
                            "DecimalPositions": 2
                        }
                    },
                    "SourceCode": "List A"
                }
            ]
        },
        "SoldToCustomerParty": {
            "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
            "Id": "28331"
        }
    },
    "Payments": {
        "$type": "Asi.Soa.Commerce.DataContracts.RemittanceDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Commerce.DataContracts.RemittanceData, Asi.Contracts",
                "PaymentToken": {
                    "$type": "Asi.Soa.Commerce.DataContracts.AutoPayAccountData, Asi.Contracts",
                    "PaymentMethodIsReadOnly": false
                },
                "PaymentMethod": {
                    "$type": "Asi.Soa.Commerce.DataContracts.PaymentMethodData, Asi.Contracts"
                }
            }
        ]
    }
}

The end result shows a different source code: "BOOK" instead of "List A" in our example

Note: The source code value is set appropriately when creating gifts.

What are we missing?

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