# Delete key-value pairs from an order data extension

Deletes the key-value pairs you provide in the name query parameter from a data extension for an order.

For example, if your data extension contains the firstTimeOrder and storeLocation keys, you can delete both keys and their values by making the following request:



 {baseURL}/v2.1/orders/{orderRef}/extensions/{dataExtensionName}/fields?name=firstTimeOrder|storeLocation

If you don't provide the query parameter, this operation will empty the data extension: the data extension itself will not be deleted, but all the key-value pairs in it will.

Endpoint: DELETE /v2.1/orders/{orderRef}/extensions/{dataExtensionName}/fields
Version: v2.1
Security: BasicAuth

## Path parameters:

  - `orderRef` (string, required)
    The order reference. This is a unique identifier of the order record. Automatically generated when you created the order. If you don't know the order reference, first list orders.
    Example: "2d7de9df-45a2-45ea-872c-30e45139007d"

  - `dataExtensionName` (string, required)
    The name of the data extension. Set this to ext.
    Example: "ext"

## Query parameters:

  - `name` (array)
    The fields in the data extension object that you want to delete.
    Example: "withWarranty|color"

## Response 200 fields (application/json):

  - `name` (string)
    The name of the data extension.
    Example: "ext"

  - `href` (string)
    The URL of the order extension.
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/orders/f7aabbca-1c1b-4fc2-be72-3e16294a4f03/extensions/ext"

  - `ref` (string)
    The order extension reference.
    Example: "6a5cb3c2-1a4a-56d8-8a01-1ede232b9db2"

  - `key` (string)
    The value "default".
    Example: "default"

  - `createdAt` (string)
    The date and time when the resource was created in Sitecore CDP.
    Example: "2024-01-01T16:17:16Z"

  - `modifiedAt` (string)
    The date and time when the resource was last updated in Sitecore CDP.
    Example: "2024-01-01T16:17:16Z"

  - `{exampleKey1}` (string,boolean,integer,number)
    A key-value pair of your choice.
 Supported data types for the values: string, boolean, integer, floating-point number. 
 Example: "firstTimeOrder": true
    Example: "{exampleValue1}"

  - `{exampleKey2}` (string,boolean,integer,number)
    A key-value pair of your choice. 
 Supported data types for the values: string, boolean, integer, floating-point number. 
 Example:"storeLocation": "London"
    Example: "{exampleValue2}"

  - `order` (object)
    The request's first list of orders URL.

  - `order.href` (string)
    Example: "https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10"


