DELETE api/Product/{id}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

integer

Required

Body Parameters

None.

Response Information

Resource Description

Product
NameDescriptionTypeAdditional information
ProductID

integer

None.

ProductName

string

None.

SupplierID

integer

None.

CategoryID

integer

None.

QuantityPerUnit

string

None.

UnitPrice

decimal number

None.

UnitsInStock

integer

None.

UnitsOnOrder

integer

None.

ReorderLevel

integer

None.

Discontinued

boolean

None.

Category

Category

None.

Order_Details

Collection of Order_Detail

None.

Supplier

Supplier

None.

Response Formats

application/json, text/json

Sample:
{
  "productID": 1,
  "productName": "sample string 2",
  "supplierID": 1,
  "categoryID": 1,
  "quantityPerUnit": "sample string 3",
  "unitPrice": 1.0,
  "unitsInStock": 1,
  "unitsOnOrder": 1,
  "reorderLevel": 1,
  "discontinued": true,
  "category": {
    "categoryID": 1,
    "categoryName": "sample string 2",
    "description": "sample string 3",
    "picture": "QEA=",
    "products": []
  },
  "order_Details": [
    {
      "orderID": 1,
      "productID": 2,
      "unitPrice": 3.0,
      "quantity": 4,
      "discount": 5.1,
      "order": {
        "orderID": 1,
        "customerID": "sample string 2",
        "employeeID": 1,
        "orderDate": "2018-12-13T02:38:11.0562798+01:00",
        "requiredDate": "2018-12-13T02:38:11.0562798+01:00",
        "shippedDate": "2018-12-13T02:38:11.0562798+01:00",
        "shipVia": 1,
        "freight": 1.0,
        "shipName": "sample string 3",
        "shipAddress": "sample string 4",
        "shipCity": "sample string 5",
        "shipRegion": "sample string 6",
        "shipPostalCode": "sample string 7",
        "shipCountry": "sample string 8",
        "customer": {
          "customerID": "sample string 1",
          "companyName": "sample string 2",
          "contactName": "sample string 3",
          "contactTitle": "sample string 4",
          "address": "sample string 5",
          "city": "sample string 6",
          "region": "sample string 7",
          "postalCode": "sample string 8",
          "country": "sample string 9",
          "phone": "sample string 10",
          "fax": "sample string 11",
          "orders": [],
          "customerDemographics": [
            {
              "customerTypeID": "sample string 1",
              "customerDesc": "sample string 2",
              "customers": []
            },
            {
              "customerTypeID": "sample string 1",
              "customerDesc": "sample string 2",
              "customers": []
            }
          ]
        },
        "employee": {
          "employeeID": 1,
          "lastName": "sample string 2",
          "firstName": "sample string 3",
          "title": "sample string 4",
          "titleOfCourtesy": "sample string 5",
          "birthDate": "2018-12-13T02:38:11.0562798+01:00",
          "hireDate": "2018-12-13T02:38:11.0562798+01:00",
          "address": "sample string 6",
          "city": "sample string 7",
          "region": "sample string 8",
          "postalCode": "sample string 9",
          "country": "sample string 10",
          "homePhone": "sample string 11",
          "extension": "sample string 12",
          "photo": "QEA=",
          "notes": "sample string 13",
          "reportsTo": 1,
          "photoPath": "sample string 14",
          "employees1": [],
          "orders": [],
          "territories": [
            {
              "territoryID": "sample string 1",
              "territoryDescription": "sample string 2",
              "regionID": 3,
              "region": {
                "regionID": 1,
                "regionDescription": "sample string 2",
                "territories": []
              },
              "employees": []
            },
            {
              "territoryID": "sample string 1",
              "territoryDescription": "sample string 2",
              "regionID": 3,
              "region": {
                "regionID": 1,
                "regionDescription": "sample string 2",
                "territories": []
              },
              "employees": []
            }
          ]
        },
        "order_Details": [],
        "shipper": {
          "shipperID": 1,
          "companyName": "sample string 2",
          "phone": "sample string 3",
          "orders": []
        }
      }
    },
    {
      "orderID": 1,
      "productID": 2,
      "unitPrice": 3.0,
      "quantity": 4,
      "discount": 5.1,
      "order": {
        "orderID": 1,
        "customerID": "sample string 2",
        "employeeID": 1,
        "orderDate": "2018-12-13T02:38:11.0562798+01:00",
        "requiredDate": "2018-12-13T02:38:11.0562798+01:00",
        "shippedDate": "2018-12-13T02:38:11.0562798+01:00",
        "shipVia": 1,
        "freight": 1.0,
        "shipName": "sample string 3",
        "shipAddress": "sample string 4",
        "shipCity": "sample string 5",
        "shipRegion": "sample string 6",
        "shipPostalCode": "sample string 7",
        "shipCountry": "sample string 8",
        "customer": {
          "customerID": "sample string 1",
          "companyName": "sample string 2",
          "contactName": "sample string 3",
          "contactTitle": "sample string 4",
          "address": "sample string 5",
          "city": "sample string 6",
          "region": "sample string 7",
          "postalCode": "sample string 8",
          "country": "sample string 9",
          "phone": "sample string 10",
          "fax": "sample string 11",
          "orders": [],
          "customerDemographics": [
            {
              "customerTypeID": "sample string 1",
              "customerDesc": "sample string 2",
              "customers": []
            },
            {
              "customerTypeID": "sample string 1",
              "customerDesc": "sample string 2",
              "customers": []
            }
          ]
        },
        "employee": {
          "employeeID": 1,
          "lastName": "sample string 2",
          "firstName": "sample string 3",
          "title": "sample string 4",
          "titleOfCourtesy": "sample string 5",
          "birthDate": "2018-12-13T02:38:11.0562798+01:00",
          "hireDate": "2018-12-13T02:38:11.0562798+01:00",
          "address": "sample string 6",
          "city": "sample string 7",
          "region": "sample string 8",
          "postalCode": "sample string 9",
          "country": "sample string 10",
          "homePhone": "sample string 11",
          "extension": "sample string 12",
          "photo": "QEA=",
          "notes": "sample string 13",
          "reportsTo": 1,
          "photoPath": "sample string 14",
          "employees1": [],
          "orders": [],
          "territories": [
            {
              "territoryID": "sample string 1",
              "territoryDescription": "sample string 2",
              "regionID": 3,
              "region": {
                "regionID": 1,
                "regionDescription": "sample string 2",
                "territories": []
              },
              "employees": []
            },
            {
              "territoryID": "sample string 1",
              "territoryDescription": "sample string 2",
              "regionID": 3,
              "region": {
                "regionID": 1,
                "regionDescription": "sample string 2",
                "territories": []
              },
              "employees": []
            }
          ]
        },
        "order_Details": [],
        "shipper": {
          "shipperID": 1,
          "companyName": "sample string 2",
          "phone": "sample string 3",
          "orders": []
        }
      }
    }
  ],
  "supplier": {
    "supplierID": 1,
    "companyName": "sample string 2",
    "contactName": "sample string 3",
    "contactTitle": "sample string 4",
    "address": "sample string 5",
    "city": "sample string 6",
    "region": "sample string 7",
    "postalCode": "sample string 8",
    "country": "sample string 9",
    "phone": "sample string 10",
    "fax": "sample string 11",
    "homePage": "sample string 12",
    "products": []
  }
}

application/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'application/xml'. Exception message: Le graphique de l'objet pour le type 'System.Collections.Generic.List`1[[Mvc5Ef6WebApiDataFirstNthW.Models.Product, NorthWind, Version=1.2.8.5361, Culture=neutral, PublicKeyToken=null]]' contient des cycles et il est impossible de le sérialiser si le suivi de référence est désactivé.

text/xml

Sample:

An exception has occurred while using the formatter 'XmlMediaTypeFormatter' to generate sample for media type 'text/xml'. Exception message: Le graphique de l'objet pour le type 'System.Collections.Generic.List`1[[Mvc5Ef6WebApiDataFirstNthW.Models.Product, NorthWind, Version=1.2.8.5361, Culture=neutral, PublicKeyToken=null]]' contient des cycles et il est impossible de le sérialiser si le suivi de référence est désactivé.