POST v1/Product/SaveSupplierProducts/{id}

This method saves a collection of product supplier records against a parituclar product - adding, updating or removing where appropriate

Request Information

URI Parameters

Name Description Type Additional information
id

The unique identifier of the product

integer

Optional

Body Parameters

The collection of product supplier records to insert/update/delete

Collection of ProductSupplier

Name Description Type
ProductSupplierID

The internal identifier for this product supplier mapping e.g. 347934252454623664

integer
SupplierID

The internal identifier for this supplier e.g. 33793436364578343

integer
SupplierCode

The user-friendly code for the supplier (either user supplier or auto-generated) e.g. SU-543

string
SupplierName

The name of the supplier

string
SupplierProductCode

The code the product is known by at the supplier

string
Price

Price the Tradevine seller pays to the supplier for the product per unit

decimal number
IsPriceIncTax

Is the supplier price inclusive of tax like GST

boolean
IsPreferredSupplier

Is this the preferred supplier (which gets used above other when auto-reordering)

boolean
DefaultPurchaseOrderQuantity

The quantity used when re-ordering the product using auto-generated purchase orders

decimal number
CreatedDate

The date and time (in UTC) that the product supplier mapping was created

date
CreatedBy

The internal Tradevine ID of the user that created the product supplier mapping

integer
ModifiedDate

The date and time (in UTC) that the product supplier mapping was last modified

date
ModifiedBy

The internal Tradevine ID of the user that last modified the product supplier mapping

integer

Request Formats

application/json

Sample:

[
  {
    "ProductSupplierID": 1,
    "SupplierID": 1,
    "SupplierCode": "sample string 1",
    "SupplierName": "sample string 2",
    "SupplierProductCode": "sample string 3",
    "Price": 1.0,
    "IsPriceIncTax": true,
    "IsPreferredSupplier": true,
    "DefaultPurchaseOrderQuantity": 1.0,
    "CreatedDate": "2024-04-19T12:07:13.5563524+12:00",
    "CreatedBy": 1,
    "ModifiedDate": "2024-04-19T12:07:13.5563524+12:00",
    "ModifiedBy": 1
  },
  {
    "ProductSupplierID": 1,
    "SupplierID": 1,
    "SupplierCode": "sample string 1",
    "SupplierName": "sample string 2",
    "SupplierProductCode": "sample string 3",
    "Price": 1.0,
    "IsPriceIncTax": true,
    "IsPreferredSupplier": true,
    "DefaultPurchaseOrderQuantity": 1.0,
    "CreatedDate": "2024-04-19T12:07:13.5563524+12:00",
    "CreatedBy": 1,
    "ModifiedDate": "2024-04-19T12:07:13.5563524+12:00",
    "ModifiedBy": 1
  }
]

Response Information

Resource Description

The product data from the Tradevine database

Product

Name Description Type
ProductID

The unique internal identifier of each product in Tradevine e.g. 3451582911247567682

integer
OrganisationID

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

integer
Code

The product code e.g. PR432

string
Name

The product name e.g. ABE Chemical Fire Extinguisher

string
Description

The long description of the product

string
AlternateCode

The alternate product code if used e.g. ACME_CHEM_9860

string
EnableInventory

Whether this product is inventory-tracked or not i.e. true or false

boolean
UnitOfMeasure

The unit of measure the product is sold in e.g. each, box or crate

string
Barcode

The product barcode or GTIN or ISBN

string
ManufacturerCode

The manufacturer's code for the product

string
Brand

The brand name of the product e.g. Sony

string
InternalNotes

Internal (private) notes

string
ExternalNotes

External (public) notes

string
ProductCategoryID

The internal Tradevine product category identifier

integer
Weight

The product weight (either gram or ounce - depending on measurement system defined in the organisation settings)

decimal number
Length

The product length (either millimetre or inch - depending on measurement system defined in the organisation settings)

decimal number
Width

The product width (either millimetre or inch - depending on measurement system defined in the organisation settings)

decimal number
Height

The product height (either millimetre or inch - depending on measurement system defined in the organisation settings)

decimal number
Currency

The product currency lookup value

integer
TaxClassID

The internal Tradevine identifier for the tax type of this organisation. This is used as the product's default tax type/rate

integer
TaxCode

The tax type description for this tax type for this organisation e.g. GST. This is used as the product's default tax type/rate

string
QuantityInStock

The current Stock on Hand (SOH) value for this product if it is inventory tracked e.g. 10 if I physically hold 10 at the moment

decimal number
QuantityAvailableToSell

The current Available To Sell value for this product - this is the SOH minus any allocations for sales orders, open listings, open FPOs etc.

decimal number
QuantityAvailableToShip

The current Available To Ship value for this product - this is the SOH minus any allocations for printed shipments not yet confirmed

decimal number
CostPrice

This is the cost price (excluding tax) for the product. For an inventory-tracked product this will be the weighted average cost of all transactions. For non-inventory tracked products this will be whatever cost-price is configured against the product

decimal number
SellPriceIncTax

This is the default selling price (excluding tax) for the product

decimal number
SellPriceExTax

This is the default selling price (including tax) for the product

decimal number
MinimumStockQuantity

For inventory-tracked products, this is the ATS level that will trigger re-order alerts

decimal number
OverrideSalesGLAccountCode

For products that are not inventory-tracked and where Xero integration is on, this is the general ledger account code that will be used for sales i.e. accounts receivable invoices

string
OverrideSalesGLAccountName

For products that are not inventory-tracked and where Xero integration is on, this is the general ledger account name that will be used for sales i.e. accounts receivable invoices

string
OverridePurchaseGLAccountCode

For products that are not inventory-tracked and where Xero integration is on, this is the general ledger account code that will be used for purchases i.e. accounts payable invoices

string
OverridePurchaseGLAccountName

For products that are not inventory-tracked and where Xero integration is on, this is the general ledger account name that will be used for purchases i.e. accounts payable invoices

string
PhotoIdentifier

This field is used in product CSV import file to link products to photo names that will be subsequently uploaded (via file or downloaded from Trade Me or an external web-site) e.g. 'FireEx1.jpg;FireExt2.jpg'

string
IsManualOrderApprovalNeeded

This is a product level flag which indicates that sales orders that contain this product should require manual approval before transitioning from Pending to Awaiting Shipment

boolean
IsBoM

This is a product level flag which says if this product if a Bill Of Materials (BoM) container products

boolean
IsBoMComponent

This is a product level flag which says if this product if a component of one or more Bill Of Materials (BoM) container products

boolean
IsBoMWeightAutocalculated

This is a product level flag which can be set on BoM products and have its weight calculated based on its components and auto-updated whenever the weight of any components change

boolean
IsArchived

This is a product level flag which determines if it appears by default in your products list (archived products also don't auto-list in Trade Me or appear in Shopify)

boolean
CreatedDate

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

date
CreatedBy

The internal Tradevine ID of the user that created the product

integer
ModifiedDate

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

date
ModifiedBy

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

integer
QuantityAvailableForShipmentAllocation

The level of free inventory available for creating new shipments

decimal number
QuantityReorderBalance

The value of stock incoming and outgoing that gets compared to the ReorderPoint to trigger new purchases

decimal number
TradeMeListings

The level of inventory currently on open Trade Me listings

decimal number
TradeMeOffers

The level of inventory currently on open Trade Me FPOs

decimal number
SoftAllocated

The level of inventory currently on all open sales orders

decimal number
MediumAllocated

The level of inventory currently on non-pending sales orders

decimal number
HardAllocated

The level of inventory currently on printed shipments

decimal number
SoftPurchase

The level of inventory currently on all open purchase orders (draft included)

decimal number
HardPurchase

The level of inventory currently on all open, confirmed purchase orders

decimal number
BoMSoftAllocated

The level of inventory currently on any sales orders containing BoM products that contain this product as a component

decimal number
BoMTradeMeListings

The level of inventory currently on any Trade Me listings for BoM products that contain this product as a component

decimal number
BoMTradeMeOffers

The level of inventory currently on any Trade Me FPOs for BoM products that contain this product as a component

decimal number
Photos

The list of photos of the product

Collection of Photo
PerWarehouseInventory

The list of inventory records for each warehouse of the product

Collection of PerWarehouseInventory
ProductSuppliers

The list of remote product details for each supplier of the product

Collection of ProductSupplier
BoMComponents

The list of BoM components that make up this BoM parent if IsBoM is true

Collection of ProductBoMComponent
Labels

The list of labels applied to the product

Collection of string

Response Formats

application/json

Sample:

{
  "ProductID": 3451582911247567682,
  "OrganisationID": 3479979772659009354,
  "Code": "MSP-152",
  "Name": "Baking Powder 1kg",
  "Description": "Baking Powder 1kg - for all your cooking needs. Widely usable in all baking recipes",
  "AlternateCode": "EDMNDS4535",
  "EnableInventory": true,
  "UnitOfMeasure": "Each",
  "Barcode": "68568957899",
  "ManufacturerCode": null,
  "Brand": null,
  "InternalNotes": "Private note so say this powder leads to dense cakes that often result in indigestion",
  "ExternalNotes": "Public note so say this powder is sure to leave your sponge nice and fluffy",
  "ProductCategoryID": 3479979772660940830,
  "Weight": 1000.0,
  "Length": 140.0,
  "Width": 80.0,
  "Height": 60.0,
  "Currency": 10109,
  "TaxClassID": 3479979772669744181,
  "TaxCode": "GST",
  "QuantityInStock": 100.0,
  "QuantityAvailableToSell": 78.0,
  "QuantityAvailableToShip": 90.0,
  "CostPrice": 90.0,
  "SellPriceIncTax": 114.89,
  "SellPriceExTax": 99.9,
  "MinimumStockQuantity": 10.0,
  "OverrideSalesGLAccountCode": null,
  "OverrideSalesGLAccountName": null,
  "OverridePurchaseGLAccountCode": null,
  "OverridePurchaseGLAccountName": null,
  "PhotoIdentifier": null,
  "IsManualOrderApprovalNeeded": false,
  "IsBoM": false,
  "IsBoMComponent": false,
  "IsBoMWeightAutocalculated": null,
  "IsArchived": false,
  "CreatedDate": "2012-08-07T11:42:52Z",
  "CreatedBy": 3479979772662022396,
  "ModifiedDate": "2013-03-02T00:04:52Z",
  "ModifiedBy": 3479979772662022396,
  "QuantityAvailableForShipmentAllocation": null,
  "QuantityReorderBalance": null,
  "TradeMeListings": null,
  "TradeMeOffers": null,
  "SoftAllocated": null,
  "MediumAllocated": null,
  "HardAllocated": null,
  "SoftPurchase": null,
  "HardPurchase": null,
  "BoMSoftAllocated": null,
  "BoMTradeMeListings": null,
  "BoMTradeMeOffers": null,
  "Photos": [
    {
      "PhotoID": null,
      "OrganisationID": null,
      "FileName": null,
      "ContentsBase64": null,
      "TradevineUrl": "https://nz.tradevine.com/my-account-name/ProductPhoto/GetPhoto?photoID=3602768739505780893",
      "PublicUrl": "https://nz.tradevine.com/BlobStorage/GetFullPhoto?photoID=3602768739505780893&organisationID=3479979772659009354",
      "PublicThumbnailUrl": "https://nz.tradevine.com/BlobStorage/GetPhotoThumbnail?photoID=3602768739505780893&organisationID=3479979772659009354&size=100",
      "CreatedDate": null,
      "CreatedBy": null,
      "ModifiedDate": null,
      "ModifiedBy": null
    }
  ],
  "PerWarehouseInventory": [
    {
      "QuantityInStockSnapshot": 312.0,
      "AverageFIFOCost": 85.0,
      "TotalInventoryValueSnapshot": null,
      "WarehouseID": 3479979772662022613,
      "WarehouseCode": "WH1",
      "ProductID": null,
      "Code": null,
      "Name": null,
      "QuantityAvailableToSell": null,
      "QuantityAvailableForShipmentAllocation": null,
      "QuantityAvailableToShip": null,
      "QuantityReorderBalance": null,
      "TradeMeListings": null,
      "TradeMeOffers": null,
      "SoftAllocated": null,
      "MediumAllocated": null,
      "HardAllocated": null,
      "SoftPurchase": null,
      "HardPurchase": null,
      "BoMSoftAllocated": null,
      "BoMTradeMeListings": null,
      "BoMTradeMeOffers": null
    }
  ],
  "ProductSuppliers": [
    {
      "ProductSupplierID": 33546957475474,
      "SupplierID": 3487940363376548,
      "SupplierCode": "SU-231",
      "SupplierName": "ACME Enterpises Ltd",
      "SupplierProductCode": "ACME-79867-233",
      "Price": 90.0,
      "IsPriceIncTax": false,
      "IsPreferredSupplier": true,
      "DefaultPurchaseOrderQuantity": 100.0,
      "CreatedDate": "2012-08-07T11:42:52Z",
      "CreatedBy": 3479979772662022396,
      "ModifiedDate": "2013-03-02T00:04:52Z",
      "ModifiedBy": 3479979772662022396
    }
  ],
  "BoMComponents": null,
  "Labels": null
}