GET v1/SalesOrder?pageNumber={pageNumber}&pageSize={pageSize}&status={status}&createdFrom={createdFrom}&createdTo={createdTo}&modifiedFrom={modifiedFrom}&modifiedTo={modifiedTo}&orderNumber={orderNumber}

This method gets a paged list of sales orders including customer, address and sales order line data as well as shipments associated with each order

Request Information

URI Parameters

Name Description Type Additional information
pageNumber

The page number for the list you wish to retrieve

integer

Optional

Must be greater than 1

Default value is 1 if not specified

pageSize

The page size for the list you wish to retrieve

integer

Optional

Must be greater than 1 and less than 500

Default value is 500 if not specified

status

Filter the list to orders with a particular status value

integer

Optional

createdFrom

Filter the list to orders created after a certain date-time (assumed to be in the time-zone configured on the organisation's Tradevine account)

date

Optional

createdTo

Filter the list to orders created before a certain date-time (assumed to be in the time-zone configured on the organisation's Tradevine account)

date

Optional

modifiedFrom

Filter the list to orders modified after a certain date-time (assumed to be in the time-zone configured on the organisation's Tradevine account)

date

Optional

modifiedTo

Filter the list to orders modified before a certain date-time (assumed to be in the time-zone configured on the organisation's Tradevine account)

date

Optional

orderNumber

Filter the list to a single order with the matching order number e.g. SO3221

string

Optional

Body Parameters

None.

Response Information

Resource Description

A list of sales order data from the Tradevine database

IPagedCollection (of SalesOrder)

Name Description Type
TotalCount

The total number of records in the resultset including those returned on this page

integer
PageNumber

The page number of the current resultset

integer
PageSize

The page size of the current resultset

integer
List

The list of records in this page of the resultset

Collection of SalesOrder

Response Formats

application/json

Sample:

{
  "TotalCount": 1440,
  "PageNumber": 1,
  "PageSize": 10,
  "List": [
    {
      "SalesOrderID": 3499949973482688249,
      "OrganisationID": 3479979772659009354,
      "CustomerID": 3479979797192009324,
      "OrderNumber": "SO1",
      "OrderOrigin": 3000,
      "CustomerOrderReference": null,
      "Status": 12002,
      "IsCompletedWithCancellations": false,
      "TradeMeOrganisationID": null,
      "ExternalListingID": null,
      "ExternalOfferID": null,
      "ShopifyOrganisationID": null,
      "ShopifyOrderID": null,
      "ShopifyOrderNumber": null,
      "ShopifyOrderStatus": null,
      "CustomerBillingAddressID": 3479979797203946031,
      "CustomerShippingAddressID": null,
      "RecipientName": "Belinda Zingaberger",
      "TermsOfTrade": 4000,
      "PaymentDueDate": "2013-03-25T22:00:00Z",
      "IsPaymentReceived": true,
      "PaymentDate": "2013-03-26T23:02:50Z",
      "ManualApprovalNeeded": false,
      "IsManuallyApproved": false,
      "PaymentType": 26001,
      "PaymentReference": null,
      "ShipmentType": 25001,
      "RequestedShippingDate": "2013-03-27T21:12:50Z",
      "Currency": 10109,
      "ApplyTaxes": true,
      "TotalsTaxInclusive": true,
      "TotalCost": 270.6,
      "TotalCostExShipping": 270.6,
      "GrossProfit": 262.23,
      "GrossProfitExShipping": 262.23,
      "GrossMarginPercent": 49.21,
      "GrossMarginPercentExShipping": 49.21,
      "AverageMarkupPercent": 96.91,
      "AverageMarkupPercentExShipping": 96.91,
      "SubTotal": 532.83,
      "TotalDiscount": 0.0,
      "SubTotalExShipping": 532.83,
      "SubTotalApplicableTaxes": 79.92,
      "GrandTotal": 612.75,
      "GrandTotalExShipping": 612.75,
      "InternalNotes": null,
      "ExternalNotes": null,
      "CompletedDate": null,
      "AccountingInvoiceID": null,
      "AccountingPaymentID": null,
      "AccountingCreditNoteID": null,
      "AccountingIsPaid": null,
      "AccountingIsVoided": null,
      "AccountingInvoiceDate": null,
      "TradeMePayNowCommissionTotal": null,
      "IsChaserEmailsDisabled": false,
      "CreatedDate": "2013-03-26T21:12:50Z",
      "CreatedBy": 3479979772662022396,
      "ModifiedDate": "2013-03-26T21:12:50Z",
      "ModifiedBy": 3479979772662022396,
      "ExternalPurchaseID": null,
      "WarehouseID": null,
      "Customer": {
        "CustomerID": 3479979797192009324,
        "OrganisationID": 3479979772659009354,
        "CustomerCode": "CU4",
        "DefaultTermsOfTrade": 4000,
        "FirstName": "Belinda",
        "LastName": "Zingaberga",
        "Email": "belindazingaberga@hub66.com",
        "MobileNumber": "0394444002",
        "PhoneNumber": "224444002",
        "TaxNumber": "111-222-002",
        "TrafficLight": 13003,
        "Notes": null,
        "DefaultBillingAddressID": 3479979797203946031,
        "DefaultShippingAddressID": 3479979797203946031,
        "AccountingContactID": "880DE148-4C36-445D-8A97-017B025C81D5",
        "AccountingContactParentID": "231431",
        "TradeMeMemberID": "34143",
        "TradeMeMemberName": "jimmy56",
        "CreatedDate": "2012-08-06T22:12:50Z",
        "CreatedBy": 1,
        "ModifiedDate": "2012-08-06T22:12:50Z",
        "ModifiedBy": 1,
        "Addresss": null,
        "SalesOrders": null
      },
      "BillingAddress": {
        "AddressID": 3517903675269621331,
        "OrganisationID": 3517903653175081162,
        "CustomerID": 3517903675259250625,
        "SupplierID": null,
        "AddressLine1": "26 Sunny Street",
        "AddressLine2": "Suburbia",
        "AddressLine3": null,
        "TownCity": "Christchurch",
        "RegionState": 60162,
        "PostalCode": "8054",
        "Country": 8157,
        "DeliveryNotes": "Come around to side door",
        "CreatedDate": "2011-08-06T21:12:50Z",
        "CreatedBy": 1,
        "ModifiedDate": "2011-08-06T21:12:50Z",
        "ModifiedBy": 3517903653179089883
      },
      "ShippingAddress": {
        "AddressID": 3517903675269621331,
        "OrganisationID": 3517903653175081162,
        "CustomerID": 3517903675259250625,
        "SupplierID": null,
        "AddressLine1": "26 Sunny Street",
        "AddressLine2": "Suburbia",
        "AddressLine3": null,
        "TownCity": "Christchurch",
        "RegionState": 60162,
        "PostalCode": "8054",
        "Country": 8157,
        "DeliveryNotes": "Come around to side door",
        "CreatedDate": "2011-08-06T21:12:50Z",
        "CreatedBy": 1,
        "ModifiedDate": "2011-08-06T21:12:50Z",
        "ModifiedBy": 3517903653179089883
      },
      "PackLists": [
        {
          "PackListID": 3499949989966809945,
          "OrganisationID": 3479979772659009354,
          "SalesOrderID": 3499949973482688249,
          "Status": 14001,
          "PackListNumber": "SO1/1",
          "ShipmentType": 25001,
          "CustomerShippingAddressID": null,
          "RequestedShippingDate": "2013-03-27T21:12:50Z",
          "ShippedDate": null,
          "Courier": null,
          "TrackingReference": null,
          "TrackingReference2": null,
          "DeliveryNotes": null,
          "PrintedDate": null,
          "IsInvoiceEmailed": null,
          "IsInvoicePrinted": null,
          "IsPackSlipEmailed": null,
          "IsPackSlipPrinted": null,
          "AccountingJournalID": null,
          "CreatedDate": "2013-03-25T22:00:00Z",
          "CreatedBy": 3479979772662022396,
          "ModifiedDate": "2013-03-25T22:00:00Z",
          "ModifiedBy": 3479979772662022396,
          "ConfirmOptions": null,
          "WarehouseID": null,
          "PackListItems": [
            {
              "PackListItemID": null,
              "ProductID": 3479979772717738483,
              "Code": null,
              "LineNumber": null,
              "QuantityRequested": null,
              "QuantityPacked": null,
              "QuantityBackOrder": null,
              "CostPriceFIFO": null
            }
          ]
        }
      ],
      "SalesOrderLines": [
        {
          "SalesOrderLineID": 3499949973485895200,
          "ProductID": 3479979772717738483,
          "Code": null,
          "LineNumber": 1,
          "Quantity": 1.0,
          "CostPrice": 33.8,
          "SellPrice": 56.75,
          "SellPriceExTax": 49.35,
          "SellPriceIncTax": 56.75,
          "TaxClassID": 3479979772669744181,
          "TaxCode": "GST",
          "TaxRate": 15.0,
          "TaxTotal": 7.4,
          "LineTotal": 56.75,
          "LineNotes": null,
          "TargetWarehouseID": null
        }
      ]
    },
    {
      "SalesOrderID": 3499949973482689443,
      "OrganisationID": 3479979772659009354,
      "CustomerID": 3479979797192009324,
      "OrderNumber": "SO2",
      "OrderOrigin": null,
      "CustomerOrderReference": null,
      "Status": null,
      "IsCompletedWithCancellations": null,
      "TradeMeOrganisationID": null,
      "ExternalListingID": null,
      "ExternalOfferID": null,
      "ShopifyOrganisationID": null,
      "ShopifyOrderID": null,
      "ShopifyOrderNumber": null,
      "ShopifyOrderStatus": null,
      "CustomerBillingAddressID": null,
      "CustomerShippingAddressID": null,
      "RecipientName": null,
      "TermsOfTrade": null,
      "PaymentDueDate": null,
      "IsPaymentReceived": null,
      "PaymentDate": null,
      "ManualApprovalNeeded": null,
      "IsManuallyApproved": null,
      "PaymentType": null,
      "PaymentReference": null,
      "ShipmentType": null,
      "RequestedShippingDate": null,
      "Currency": null,
      "ApplyTaxes": null,
      "TotalsTaxInclusive": null,
      "TotalCost": null,
      "TotalCostExShipping": null,
      "GrossProfit": null,
      "GrossProfitExShipping": null,
      "GrossMarginPercent": null,
      "GrossMarginPercentExShipping": null,
      "AverageMarkupPercent": null,
      "AverageMarkupPercentExShipping": null,
      "SubTotal": null,
      "TotalDiscount": null,
      "SubTotalExShipping": null,
      "SubTotalApplicableTaxes": null,
      "GrandTotal": null,
      "GrandTotalExShipping": null,
      "InternalNotes": null,
      "ExternalNotes": null,
      "CompletedDate": null,
      "AccountingInvoiceID": null,
      "AccountingPaymentID": null,
      "AccountingCreditNoteID": null,
      "AccountingIsPaid": null,
      "AccountingIsVoided": null,
      "AccountingInvoiceDate": null,
      "TradeMePayNowCommissionTotal": null,
      "IsChaserEmailsDisabled": null,
      "CreatedDate": null,
      "CreatedBy": null,
      "ModifiedDate": null,
      "ModifiedBy": null,
      "ExternalPurchaseID": null,
      "WarehouseID": null,
      "Customer": null,
      "BillingAddress": null,
      "ShippingAddress": null,
      "PackLists": null,
      "SalesOrderLines": null
    }
  ]
}