POST v1/SalesOrder/{id}/MakeOrderEditable

This method moves the sales order from Awaiting-Shipment back into Pending status (if possible), deleting any pack-lists in the process. This can only be done if nothing has been shipped yet (i.e. no completed pack-lists)

Request Information

URI Parameters

Name Description Type Additional information
id

integer

Required

Body Parameters

None.

Response Information

Resource Description

Sales order data from the Tradevine database

SalesOrder

Name Description Type
SalesOrderID

The unique internal identifier of each sales order in Tradevine e.g. 34515829112475466365

integer
OrganisationID

The internal identifier of this organisation in Tradevine e.g. 3451460443781171981

integer
CustomerID

The unique internal identifier of each customer in Tradevine e.g. 34515829112467586585

integer
OrderNumber

The more user friendly identifier for the order (normally auto-generated using your auto-numbering settings) e.g. SO453

string
OrderOrigin

The origin lookup value

integer
CustomerOrderReference

The reference that the buyer for this sales order will have i.e. for Trade Me orders this will be the purchase ID e.g. P54645, for Shopify orders it will be the order number #1001

string
Status

The order status lookup value

integer
IsCompletedWithCancellations

Indicates if shipments were partially completed with no back-orders i.e. the full order quantity was not shipped

boolean
TradeMeOrganisationID

The internal identifier of this Trade Me account in Tradevine if this order came from Trade Me e.g. 345146044378132553

integer
ExternalListingID

The Trade Me listing ID if this order came from Trade Me e.g. 581641940

string
ExternalOfferID

The Trade Me fixed-price-offer ID if this order came from a Trade Me FPO e.g. 2434

string
ShopifyOrganisationID

The internal identifier of this Shopify account in Tradevine if this order came from Shopify e.g. 34514604434236363

integer
ShopifyOrderID

The internal order ID from Shopify if this order came from Shopify e.g. 654467

integer
ShopifyOrderNumber

The more user friendly identifier for the order in Shopify e.g. #1001

string
ShopifyOrderStatus

The status of the order in Shopify

string
CustomerBillingAddressID

The internal identifier of the customer's billing address in Tradevine e.g. 3451460547437456

integer
CustomerShippingAddressID

The internal identifier of the customer's shipping address in Tradevine e.g. 3451460547437456

integer
RecipientName

he name of the recipient of the shipment (could be different from the person who bought the item) e.g. Sam Jenkins

string
TermsOfTrade

The payment terms lookup value

integer
PaymentDueDate

The date/time (in UTC) that payment is due

date
IsPaymentReceived

Has payment been received for this order

boolean
PaymentDate

The date/time (in UTC) that payment was received

date
ManualApprovalNeeded

Is manual approval a pre-requisite for transitioning this order from Pending to Awaiting Shipment

boolean
IsManuallyApproved

Has the order been manually approved (only relevant if manual approval is needed)

boolean
PaymentType

The payment type lookup value

integer
PaymentReference

The optional reference made with the payment

string
ShipmentType

The shipment type lookup value

integer
RequestedShippingDate

The date/time (in UTC) that shipping is requested

date
Currency

The order currency lookup value

integer
ApplyTaxes

Whether tax is applicable for this order (defaulted according to seller tax-status and buyer billing address location)

boolean
TotalsTaxInclusive

Whether totals include tax

boolean
TotalCost

The total cost value of the order (excluding tax)

decimal number
TotalCostExShipping

The total cost value of the order minus costs for shipping (excluding tax)

decimal number
GrossProfit

The total gross profit value of the order

decimal number
GrossProfitExShipping

The total gross profit value of the order minus any p/l for shipping

decimal number
GrossMarginPercent

The total gross margin percent value of the order

decimal number
GrossMarginPercentExShipping

The total gross margin percent value of the order excluding shipping margin

decimal number
AverageMarkupPercent

The average mark-up percent of the order

decimal number
AverageMarkupPercentExShipping

The average mark-up percent of the order excluding shipping mark-up

decimal number
SubTotal

The sub-total of the order (excluding taxes)

decimal number
TotalDiscount

The total discount of the order (including or excluding tax depending on TotalsTaxInclusive value)

decimal number
SubTotalExShipping

The sub-total of the order (excluding taxes and shipping)

decimal number
SubTotalApplicableTaxes

The sub total of all tax values for the order

decimal number
GrandTotal

The overall order total to be paid

decimal number
GrandTotalExShipping

The overall order total excluding shipping

decimal number
InternalNotes

Private notes associated with the order

string
ExternalNotes

Public notes associated with the order - if this was from Trade Me the any message the buyer sends will be saved here

string
CompletedDate

The date/time (in UTC) that the order moved to the Completed status

date
AccountingInvoiceID

The internal Xero invoice identifier if integrated with Xero and an invoice has been sent through

string
AccountingPaymentID

The internal Xero payment identifier if integrated with Xero and the invoice has been paid

string
AccountingCreditNoteID

The internal Xero credit note identifier if integrated with Xero and the invoice has been credited

string
AccountingIsPaid

Whether the invoice has been paid according to Xero if integrated with Xero

boolean
AccountingIsVoided

Whether the invoice has been voided according to Xero if integrated with Xero

boolean
AccountingInvoiceDate

The date/time (in UTC) of the invoice according to Xero (Tradevine re-dates the invoice daily until payment is received)

date
TradeMePayNowCommissionTotal

If this order came from Trade Me and was a Pay Now listing then this is the commission payable to Trade Me

decimal number
IsChaserEmailsDisabled

Order level override for whether chaser emails are sent to the buyer if payment and/or delivery address is not received

boolean
CreatedDate

The date and time (in UTC) that the order was created

date
CreatedBy

The internal Tradevine ID of the user that created the order

integer
ModifiedDate

The date and time (in UTC) that the order was last modified

date
ModifiedBy

The internal Tradevine ID of the user that last modified the order

integer
ExternalPurchaseID

integer
WarehouseID

integer
WarehouseCode

string
ExternalClientData

A field for API clients to store any data relevant to them e.g. JSON. Tradevine will not modify this data but merely pass it through. Max 500 chars.

string
SuccessFees

Total success fees if this sales order was a result of a Trade Me sale

decimal number
PaymentFees

Total payment fees if this sales order was a result of a Trade Me sale i.e. Ping or Afterpay commission

decimal number
Customer

Customer
BillingAddress

Address
ShippingAddress

Address
PackLists

Collection of PackList
SalesOrderLines

Collection of SalesOrderLine
Labels

Collection of string

Response Formats

application/json

Sample:

{
  "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,
  "WarehouseCode": null,
  "ExternalClientData": null,
  "SuccessFees": null,
  "PaymentFees": 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,
    "CountryCode": null
  },
  "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,
    "CountryCode": null
  },
  "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,
      "WarehouseID": null,
      "CourierCompanyName": null,
      "ExternalClientData": null,
      "PackListItems": [
        {
          "PackListItemID": null,
          "ProductID": 3479979772717738483,
          "Code": null,
          "Name": null,
          "Barcode": null,
          "PhotoIdentifier": null,
          "TrafficLight": null,
          "TotalStock": null,
          "WarehouseStock": null,
          "QuantityRequested": null,
          "QuantityPacked": null,
          "QuantityBackOrder": null,
          "LineNumber": null,
          "CostPriceFIFO": null
        }
      ],
      "QueueInventorySummaryUpdates": false,
      "ConfirmOptions": null,
      "WarehouseCode": null
    }
  ],
  "SalesOrderLines": [
    {
      "SalesOrderLineID": 3499949973485895200,
      "ProductID": 3479979772717738483,
      "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,
      "Code": null,
      "Name": null,
      "Barcode": null
    }
  ],
  "Labels": null
}