HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

_Validate on ComboOrder Returning Empty Lines Array

(edited)

Hi all,

I've been trying to get the pricing data for a combo order from iMIS using the REST API. Unfortunately, every time I try to make a call with the relevant customer Id and the event code, I get an empty lines array back. The event code does exist and does currently allow registrations. I'm not sure if this is an issue with the request I'm making or if it's got something to do with the pricing data in the desktop client.

Has anyone got any ComboOrder examples that I can use as a basis? Is there any documentation I haven't found that I could potentially use to help me?

The HTTP request/response is below.

Request:

{
	"$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts",
	"Currency": {
		"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
		"CurrencyCode": "AUD",
		"DecimalPositions": 2
	},
	"Order": {
		"$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
		"BillToCustomerParty": {
			"$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
			"Id": 671147
		},
		"Currency": {
			"$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
			"CurrencyCode": "AUD",
			"DecimalPositions": 2
		},
		"Lines": {
			"$type":"Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts",
			"$values": [
				{
					"$type": "Asi.Soa.Core.DataContracts.EventOrderLineData, Asi.Contracts",
					"Event": {
						"$type": "Asi.Soa.Core.DataContracts.EventSummaryData, Asi.Contracts",
						"EventCode": "T18104-07"
					}
				}
			]
		}
	}
}

Response:

{
  "$type": "Asi.Soa.Core.DataContracts.ValidateResults`1[[Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts]], Asi.Contracts",
  "Entity": {
    "$type": "Asi.Soa.Commerce.DataContracts.ComboOrderData, Asi.Contracts",
    "Currency": {
      "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
      "CurrencyCode": "AUD",
      "DecimalPositions": 2,
      "ExtensionData": null
    },
    "Order": {
      "$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
      "BillToCustomerParty": {
        "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
        "Id": "671147",
        "Party": {
          "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
          "Gender": 0,
          "PersonName": {
            "$type": "Asi.Soa.Membership.DataContracts.PersonNameData, Asi.Contracts",
            "FirstName": "John",
            "InformalName": "John",
            "LastName": "Smith",
            "NamePrefix": "Mr",
            "FullName": "Mr John Smith"
          },
          "AdditionalAttributes": {
            "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "CustomerTypeDescription",
                "Value": "Individual/Employee"
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "IsMemberRecord",
                "Value": {
                  "$type": "System.Boolean",
                  "$value": false
                }
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "CustomerTypeCode",
                "Value": "IND"
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "IsMember",
                "Value": {
                  "$type": "System.Boolean",
                  "$value": false
                }
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "IsInactiveMember",
                "Value": {
                  "$type": "System.Boolean",
                  "$value": false
                }
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "AllowAdvanceRenewal",
                "Value": {
                  "$type": "System.Boolean",
                  "$value": false
                }
              },
              {
                "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
                "Name": "JoinDate",
                "Value": "0001-01-01T00:00:00"
              }
            ]
          },
          "Addresses": {
            "$type": "Asi.Soa.Membership.DataContracts.FullAddressDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Membership.DataContracts.FullAddressData, Asi.Contracts",
                "AdditionalLines": {
                  "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
                  "$values": []
                },
                "Address": {
                  "$type": "Asi.Soa.Membership.DataContracts.AddressData, Asi.Contracts",
                  "AddressId": "450093",
                  "AddressLines": {
                    "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
                    "$values": [
                      "123 John St"
                    ]
                  },
                  "CarrierRoute": "",
                  "CityName": "Perth",
                  "CountryCode": "AU",
                  "CountryName": "Australia",
                  "CountrySubEntityCode": "WA",
                  "CountrySubEntityName": "Western Australia",
                  "FullAddress": "123 John St\rPerth, WA  6000\rAUSTRALIA",
                  "PostalCode": "6000",
                  "VerificationStatus": 0
                },
                "AddresseeText": "Mr John Smith\r\n123 John St\rPerth, WA  6000\rAUSTRALIA",
                "AddressPurpose": "Postal Address",
                "CommunicationPreferences": {
                  "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceDataCollection, Asi.Contracts",
                  "$values": [
                    {
                      "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                      "Reason": "default"
                    },
                    {
                      "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                      "Reason": "mail"
                    },
                    {
                      "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                      "Reason": "bill"
                    },
                    {
                      "$type": "Asi.Soa.Membership.DataContracts.CommunicationPreferenceData, Asi.Contracts",
                      "Reason": "ship"
                    }
                  ]
                },
                "Email": "[email protected]",
                "Fax": "123456789",
                "FullAddressId": "450093",
                "Phone": "123456789",
                "Salutation": {
                  "$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
                  "SalutationMethod": {
                    "$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
                    "PartySalutationMethodId": "main"
                  },
                  "Text": "Mr John Smith"
                },
                "DisplayName": "John"
              }
            ]
          },
          "AlternateIds": {
            "$type": "Asi.Soa.Core.DataContracts.AlternateIdDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Core.DataContracts.AlternateIdData, Asi.Contracts",
                "Id": "671147",
                "IdType": "Id"
              }
            ]
          },
          "Emails": {
            "$type": "Asi.Soa.Membership.DataContracts.EmailDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Membership.DataContracts.EmailData, Asi.Contracts",
                "Address": "[email protected]",
                "EmailType": "Postal Address"
              }
            ]
          },
          "FinancialInformation": {
            "$type": "Asi.Soa.Membership.DataContracts.FinancialInformationData, Asi.Contracts"
          },
          "Phones": {
            "$type": "Asi.Soa.Membership.DataContracts.PhoneDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Membership.DataContracts.PhoneData, Asi.Contracts",
                "Number": "123456789",
                "PhoneType": "Postal Address"
              },
              {
                "$type": "Asi.Soa.Membership.DataContracts.PhoneData, Asi.Contracts",
                "Number": "123456789",
                "PhoneType": "Postal Address Fax"
              }
            ]
          },
          "Salutations": {
            "$type": "Asi.Soa.Membership.DataContracts.PartySalutationDataCollection, Asi.Contracts",
            "$values": [
              {
                "$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
                "SalutationId": "671147:LIST_AS",
                "SalutationMethod": {
                  "$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
                  "PartySalutationMethodId": "LIST_AS"
                },
                "Text": "Mr John Smith"
              }
            ]
          },
          "SocialNetworks": {
            "$type": "Asi.Soa.Membership.DataContracts.PartySocialNetworkDataCollection, Asi.Contracts",
            "$values": []
          },
          "CommunicationTypePreferences": {
            "$type": "Asi.Soa.Membership.DataContracts.PartyCommunicationTypePreferenceDataCollection, Asi.Contracts",
            "$values": []
          },
          "SortIsOverridden": false,
          "UpdateInformation": {
            "$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
            "CreatedBy": "MANAGER",
            "CreatedOn": "2019-03-15T15:00:12.547",
            "UpdatedBy": "MANAGER",
            "UpdatedOn": "2019-03-15T15:00:13.827"
          },
          "PartyId": "671147",
          "Id": "671147",
          "UniformId": "62ad5092-65ee-4662-97e7-7fabd8db0755",
          "Status": {
            "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
            "PartyStatusId": "A",
            "Name": "Active",
            "Description": "Active"
          },
          "Name": "Mr John Smith",
          "Sort": "Smith, John"
        },
        "PartyId": "671147"
      },
      "Currency": {
        "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
        "CurrencyCode": "AUD",
        "DecimalPositions": 2,
        "ExtensionData": null
      },
      "OrderDiscount": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "LineDiscountTotal": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "Lines": {
        "$type": "Asi.Soa.Commerce.DataContracts.OrderLineDataCollection, Asi.Contracts",
        "$values": []
      },
      "LineTotal": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "MiscellaneousChargesTotal": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "OrderDate": "2019-03-15T15:16:31.9553096Z",
      "OrderTotal": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "ShippingTotal": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "AdditionalCharges": {
        "$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeDataCollection, Asi.Contracts",
        "$values": [
          {
            "$type": "Asi.Soa.Commerce.DataContracts.AdditionalChargeData, Asi.Contracts",
            "AdditionalChargeId": "EventCredits",
            "Description": "Credits",
            "TotalAmount": {
              "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
              "Currency": {
                "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
                "CurrencyCode": "AUD",
                "DecimalPositions": 2,
                "ExtensionData": null
              },
              "IsAmountDefined": true
            },
            "Tax": {
              "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxData, Asi.Contracts",
              "Details": {
                "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDetailDataCollection, Asi.Contracts",
                "$values": []
              },
              "TaxTotal": {
                "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
                "Currency": {
                  "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
                  "CurrencyCode": "AUD",
                  "DecimalPositions": 2,
                  "ExtensionData": null
                },
                "IsAmountDefined": true
              },
              "InclusiveTaxTotal": {
                "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
                "Currency": {
                  "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
                  "CurrencyCode": "AUD",
                  "DecimalPositions": 2,
                  "ExtensionData": null
                },
                "IsAmountDefined": true
              }
            }
          }
        ]
      },
      "TaxInformation": {
        "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxInformationData, Asi.Contracts",
        "InclusiveTaxTotal": {
          "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
          "Currency": {
            "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
            "CurrencyCode": "AUD",
            "DecimalPositions": 2,
            "ExtensionData": null
          },
          "IsAmountDefined": true
        },
        "TaxTotal": {
          "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
          "Currency": {
            "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
            "CurrencyCode": "AUD",
            "DecimalPositions": 2,
            "ExtensionData": null
          },
          "IsAmountDefined": true
        },
        "OrderTaxes": {
          "$type": "Asi.Soa.Commerce.DataContracts.OrderTaxDataCollection, Asi.Contracts",
          "$values": []
        }
      },
      "TotalBasePrice": {
        "$type": "System.Nullable`1[[Asi.Soa.Core.DataContracts.MonetaryAmountData, Asi.Contracts]], mscorlib",
        "Currency": {
          "$type": "Asi.Soa.Core.DataContracts.CurrencyData, Asi.Contracts",
          "CurrencyCode": "AUD",
          "DecimalPositions": 2,
          "ExtensionData": null
        },
        "IsAmountDefined": true
      },
      "AdditionalAttributes": {
        "$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
        "$values": [
          {
            "$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
            "Name": "OrderTotalExcludingCredits",
            "Value": {
              "$type": "System.Decimal",
              "$value": 0.0
            }
          }
        ]
      }
    }
  },
  "IsValid": true,
  "ValidationResults": {
    "$type": "Asi.Soa.Core.DataContracts.ValidationResultsData, Asi.Contracts",
    "Errors": {
      "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts",
      "$values": []
    },
    "Warnings": {
      "$type": "Asi.Soa.Core.DataContracts.ValidationResultDataCollection, Asi.Contracts",
      "$values": []
    }
  }
}

Cheers,
Jordan.