For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://developer-stage.shipbob.dev/experimental/api/inventory/llms.txt. For full documentation content, see https://developer-stage.shipbob.dev/experimental/api/inventory/llms-full.txt.

#     Delete Lot Exclusion


POST https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete
Content-Type: application/json

    Soft-deletes a lot exclusion for a specific inventory item. The exclusion can be restored later using the restore endpoint.


Reference: https://developer-stage.shipbob.dev/experimental/api/inventory/delete-lot-exclusion

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: api-experimental
  version: 1.0.0
paths:
  /Experimental/lot-exclusion:delete:
    post:
      operationId: delete-lot-exclusion
      summary: |2
            Delete Lot Exclusion
      description: |2
            Soft-deletes a lot exclusion for a specific inventory item. The exclusion can be restored later using the restore endpoint.
      tags:
        - subpackage_inventory
      parameters:
        - name: Authorization
          in: header
          description: Authentication using Personal Access Token (PAT) token
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Lot exclusion successfully soft-deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory.DeleteLotExclusionResponse'
        '400':
          description: >-
            Invalid request, lot_number is required and either sku or
            inventory_id must be provided
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory.ProblemDetails'
        '401':
          description: Authorization missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory.ProblemDetails'
        '403':
          description: The provided credentials are not authorized to access this resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory.ProblemDetails'
        '404':
          description: Lot exclusion not found for the given inventory item and lot number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Inventory.ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Inventory.Post.Api.V4.Lot.Exclusions.Delete.DeleteLotExclusionRequest
servers:
  - url: https://sandbox-api.shipbob.com
components:
  schemas:
    Inventory.Post.Api.V4.Lot.Exclusions.Delete.DeleteLotExclusionRequest:
      type: object
      properties:
        inventory_id:
          type:
            - integer
            - 'null'
          description: >-
            Unique identifier of the inventory item, either this or sku must be
            provided
        lot_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date associated with the lot
        lot_number:
          type: string
          description: The lot number of the exclusion to delete
        sku:
          type:
            - string
            - 'null'
          description: >-
            SKU of the inventory item, either this or inventory_id must be
            provided
      required:
        - lot_number
      title: Inventory.Post.Api.V4.Lot.Exclusions.Delete.DeleteLotExclusionRequest
    Inventory.DeleteLotExclusionResponse:
      type: object
      properties:
        deleted_timestamp:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp when the lot exclusion was deleted
        inventory_id:
          type: integer
          description: Unique identifier of the inventory item
        is_deleted:
          type: boolean
          description: Whether the lot exclusion has been soft-deleted
        lot_date:
          type:
            - string
            - 'null'
          format: date-time
          description: The date associated with the lot
        lot_number:
          type: string
          description: The lot number of the deleted exclusion
      title: Inventory.DeleteLotExclusionResponse
    Inventory.ProblemDetails:
      type: object
      properties:
        detail:
          type:
            - string
            - 'null'
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          type:
            - string
            - 'null'
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem. It may or may not yield further information if
            dereferenced.
        status:
          type:
            - integer
            - 'null'
          description: The HTTP status code for this occurrence of the problem.
        title:
          type:
            - string
            - 'null'
          description: A short, human-readable summary of the problem type.
        type:
          type:
            - string
            - 'null'
          description: >-
            A URI reference that identifies the problem type. This URI should
            provide human-readable documentation for the problem.
      title: Inventory.ProblemDetails
  securitySchemes:
    PAT:
      type: http
      scheme: bearer
      description: Authentication using Personal Access Token (PAT) token
    OAuth2:
      type: http
      scheme: bearer
      description: OAuth2 authentication using JWT tokens

```

## SDK Code Examples

```python Inventory_deleteLotExclusion_example
import requests

url = "https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete"

payload = {
    "lot_number": "string",
    "inventory_id": 123,
    "lot_date": "2019-08-24T14:15:22Z",
    "sku": "string"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Inventory_deleteLotExclusion_example
const url = 'https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"lot_number":"string","inventory_id":123,"lot_date":"2019-08-24T14:15:22Z","sku":"string"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Inventory_deleteLotExclusion_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete"

	payload := strings.NewReader("{\n  \"lot_number\": \"string\",\n  \"inventory_id\": 123,\n  \"lot_date\": \"2019-08-24T14:15:22Z\",\n  \"sku\": \"string\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Inventory_deleteLotExclusion_example
require 'uri'
require 'net/http'

url = URI("https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"lot_number\": \"string\",\n  \"inventory_id\": 123,\n  \"lot_date\": \"2019-08-24T14:15:22Z\",\n  \"sku\": \"string\"\n}"

response = http.request(request)
puts response.read_body
```

```java Inventory_deleteLotExclusion_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"lot_number\": \"string\",\n  \"inventory_id\": 123,\n  \"lot_date\": \"2019-08-24T14:15:22Z\",\n  \"sku\": \"string\"\n}")
  .asString();
```

```php Inventory_deleteLotExclusion_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete', [
  'body' => '{
  "lot_number": "string",
  "inventory_id": 123,
  "lot_date": "2019-08-24T14:15:22Z",
  "sku": "string"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Inventory_deleteLotExclusion_example
using RestSharp;

var client = new RestClient("https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"lot_number\": \"string\",\n  \"inventory_id\": 123,\n  \"lot_date\": \"2019-08-24T14:15:22Z\",\n  \"sku\": \"string\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Inventory_deleteLotExclusion_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "lot_number": "string",
  "inventory_id": 123,
  "lot_date": "2019-08-24T14:15:22Z",
  "sku": "string"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/Experimental/lot-exclusion:delete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```