HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

How to post an Order?

In Commerce/Find Orders, there is a list of orders that is formatted as such:

This seems to be a built-in query sourced from CSOrders. I was trying to make another entry by posting onto the endpoint api/order:

I followed the guide and tried to fill in as much information as possible for Postman; unfortunately, there seems to be numerous fields, in which I only filled out the most relevant sections. Below is the payload that I tried to post; it gave me a response of 201, but no new order showed up in Commerce/Find Orders:


{
    "$type": "Asi.Soa.Commerce.DataContracts.OrderData, Asi.Contracts",
    "OrderNumber": "30476.00",
    "OrderDate": "2024-11-01T08:30:00.000-05:00",
    "SourceCode": "WEB",
    "Lines": [
        {
            "$type": "Asi.Soa.Commerce.DataContracts.OrderLineData, Asi.Contracts",
            "Item": {
                "$type": "Asi.Soa.Commerce.DataContracts.ItemSummaryData, Asi.Contracts",
                "ItemClass": {
                    "$type": "Asi.Soa.Commerce.DataContracts.ItemClassSummaryData, Asi.Contracts",
                    "ItemClassId": "SALES"
                },
                "ItemCode": "VSSER",
                "ItemId": "8a8c6c05-cfb9-437f-bf09-ee6d514091c1",
                "Name": "Visiting Scholar Service Fee"
            },
            "QuantityOrdered": {
                "$type": "System.Nullable`1[[Asi.Soa.Commerce.DataContracts.QuantityData, Asi.Contracts]], mscorlib",
                "Amount": 1
            }
        }
    ],
    "BillToCustomerParty": {
        "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
        "Party": {
            "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
            "UpdateInformation": {
                "$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
                "CreatedBy": "MANAGER",
                "CreatedOn": "2024-11-01T00:00:00.000",
                "UpdatedBy": "MANAGER",
                "UpdatedOn": "2024-11-01T00:00:00.000"
            },
            "PartyId": "907710",
            "Id": "907710",
            "UniformId": "ad4f1ea7-bafd-44cb-8482-c2986d56760f",
            "Status": {
                "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
                "PartyStatusId": "A",
                "Name": "AGNE-B-GA",
                "Description": "Agnes Scott College"
            }
        },
        "PartyId": "907710"
    },
    "Delivery": {
        "$type": "Asi.Soa.Commerce.DataContracts.DeliveryDataCollection, Asi.Contracts",
        "$values": [
            {
                "$type": "Asi.Soa.Commerce.DataContracts.DeliveryData, Asi.Contracts",
                "Address": {
                    "$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": "495750",
                        "AddressLines": {
                            "$type": "Asi.Soa.Membership.DataContracts.AddressLineDataCollection, Asi.Contracts",
                            "$values": [
                                "141 East College Avenue"
                            ]
                        },
                        "CityName": "Decatur",
                        "CountryCode": "US",
                        "CountryName": "United States",
                        "CountrySubEntityCode": "GA",
                        "CountrySubEntityName": "Georgia",
                        "CountyName": "DeKalb",
                        "FullAddress": "141 East College Avenue\r141 East College Avenue\rUNITED STATES",
                        "PostalCode": "30030-3797"
                    },
                    "AddresseeText": "Professor Willie Tolliver, Jr.\r\n141 East College Avenue\r141 East College Avenue\rUNITED STATES",
                    "AddressPurpose": "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]",
                    "FullAddressId": "495750",
                    "Note": "P.S.I. Code 9450",
                    "Phone": "(404) 471-5181",
                    "Salutation": {
                        "$type": "Asi.Soa.Membership.DataContracts.PartySalutationData, Asi.Contracts",
                        "SalutationMethod": {
                            "$type": "Asi.Soa.Membership.DataContracts.PartySalutationMethodSummaryData, Asi.Contracts",
                            "PartySalutationMethodId": "main"
                        },
                        "Text": "Professor Willie Tolliver, Jr."
                    },
                    "DisplayName": "Willie",
                    "DisplayOrganizationName": "Agnes Scott College"
                },
                "AddressId": "495750",
                "CustomerParty": {
                    "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
                    "PartyId": "907710"
                },
                "DeliveryId": "1d2de52d-8cda-4501-8cc9-22b93655dd87",
                "DeliveryMethod": {
                    "$type": "Asi.Soa.Commerce.DataContracts.DeliveryMethodData, Asi.Contracts",
                    "Name": "United Parcel Service",
                    "DeliveryMethodId": "UPS"
                }
            }
        ]
    },
    "SoldToCustomerParty": {
        "$type": "Asi.Soa.Commerce.DataContracts.CustomerPartyData, Asi.Contracts",
        "Party": {
            "$type": "Asi.Soa.Membership.DataContracts.PersonData, Asi.Contracts",
            "UpdateInformation": {
                "$type": "Asi.Soa.Core.DataContracts.EntityUpdateInformationData, Asi.Contracts",
                "CreatedBy": "MANAGER",
                "CreatedOn": "2024-11-01T00:00:00.000",
                "UpdatedBy": "MANAGER",
                "UpdatedOn": "2024-11-01T00:00:00.000"
            },
            "PartyId": "907710",
            "Id": "907710",
            "UniformId": "ad4f1ea7-bafd-44cb-8482-c2986d56760f",
            "Status": {
                "$type": "Asi.Soa.Membership.DataContracts.PartyStatusData, Asi.Contracts",
                "PartyStatusId": "A",
                "Name": "AGNE-B-GA",
                "Description": "Agnes Scott College"
            }
        },
        "PartyId": "907710"
    }
}

I would appreciate if anyone could provide me some feedback or guidance regarding this issue.