> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developer-stage.shipbob.dev/2026-07/api/inventory/restore-lot-exclusion/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer-stage.shipbob.dev/_mcp/server. # Restore Lot Exclusion POST https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore Content-Type: application/json Restores a previously deleted lot exclusion for a specific inventory item. Reverses a soft-delete operation. Reference: https://developer-stage.shipbob.dev/api/inventory/restore-lot-exclusion ## Authentication - `Authorization` header (bearer token, required) — Authentication using Personal Access Token (PAT) token - `Authorization` header (bearer token, required) — OAuth2 authentication using JWT tokens ## Request ### Body (application/json) This endpoint expects an Inventory.Post.Api.V4.Lot.Exclusions.Restore.RestoreLotExclusionRequest. - `lot_number` (string, required) — The lot number of the exclusion to restore - `inventory_id` (integer, optional, nullable) — Unique identifier of the inventory item, either this or sku must be provided - `lot_date` (datetime, optional, nullable) — The date associated with the lot - `sku` (string, optional, nullable) — SKU of the inventory item, either this or inventory_id must be provided ## Response ### 200 Lot exclusion successfully restored - `deleted_timestamp` (datetime, optional, nullable) — Timestamp when the lot exclusion was deleted, null after restore - `inventory_id` (integer, optional) — Unique identifier of the inventory item - `is_deleted` (boolean, optional) — Whether the lot exclusion is still deleted, false after restore - `lot_date` (datetime, optional, nullable) — The date associated with the lot - `lot_number` (string, optional) — The lot number of the restored exclusion ## Errors ### 400 Bad Request Error Invalid request, lot_number is required and either sku or inventory_id must be provided - `detail` (string, optional, nullable) — A human-readable explanation specific to this occurrence of the problem. - `instance` (string, optional, nullable) — A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `status` (integer, optional, nullable) — The HTTP status code for this occurrence of the problem. - `title` (string, optional, nullable) — A short, human-readable summary of the problem type. - `type` (string, optional, nullable) — A URI reference that identifies the problem type. This URI should provide human-readable documentation for the problem. ### 401 Unauthorized Error Authorization missing or invalid - `detail` (string, optional, nullable) — A human-readable explanation specific to this occurrence of the problem. - `instance` (string, optional, nullable) — A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `status` (integer, optional, nullable) — The HTTP status code for this occurrence of the problem. - `title` (string, optional, nullable) — A short, human-readable summary of the problem type. - `type` (string, optional, nullable) — A URI reference that identifies the problem type. This URI should provide human-readable documentation for the problem. ### 403 Forbidden Error The provided credentials are not authorized to access this resource - `detail` (string, optional, nullable) — A human-readable explanation specific to this occurrence of the problem. - `instance` (string, optional, nullable) — A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `status` (integer, optional, nullable) — The HTTP status code for this occurrence of the problem. - `title` (string, optional, nullable) — A short, human-readable summary of the problem type. - `type` (string, optional, nullable) — A URI reference that identifies the problem type. This URI should provide human-readable documentation for the problem. ### 404 Not Found Error Lot exclusion not found for the given inventory item and lot number - `detail` (string, optional, nullable) — A human-readable explanation specific to this occurrence of the problem. - `instance` (string, optional, nullable) — A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - `status` (integer, optional, nullable) — The HTTP status code for this occurrence of the problem. - `title` (string, optional, nullable) — A short, human-readable summary of the problem type. - `type` (string, optional, nullable) — A URI reference that identifies the problem type. This URI should provide human-readable documentation for the problem. ### 500 Internal Server Error Internal Server Error - `any` ### 503 Service Unavailable Error Service Unavailable - `any` ## Examples **Request** ```json { "lot_number": "string", "inventory_id": 123, "lot_date": "2019-08-24T14:15:22+00:00", "sku": "string" } ``` **Response** ```json { "deleted_timestamp": null, "inventory_id": 123, "is_deleted": false, "lot_date": "2019-08-24T14:15:22+00:00", "lot_number": "string" } ``` **SDK Code** ```python default import requests url = "https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore" payload = { "lot_number": "string", "inventory_id": 123, "lot_date": "2019-08-24T14:15:22+00:00", "sku": "string" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript default const url = 'https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"lot_number":"string","inventory_id":123,"lot_date":"2019-08-24T14:15:22+00:00","sku":"string"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go default package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore" payload := strings.NewReader("{\n \"lot_number\": \"string\",\n \"inventory_id\": 123,\n \"lot_date\": \"2019-08-24T14:15:22+00:00\",\n \"sku\": \"string\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") 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 default require 'uri' require 'net/http' url = URI("https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"lot_number\": \"string\",\n \"inventory_id\": 123,\n \"lot_date\": \"2019-08-24T14:15:22+00:00\",\n \"sku\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java default import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"lot_number\": \"string\",\n \"inventory_id\": 123,\n \"lot_date\": \"2019-08-24T14:15:22+00:00\",\n \"sku\": \"string\"\n}") .asString(); ``` ```php default request('POST', 'https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore', [ 'body' => '{ "lot_number": "string", "inventory_id": 123, "lot_date": "2019-08-24T14:15:22+00:00", "sku": "string" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp default using RestSharp; var client = new RestClient("https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); 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:22+00:00\",\n \"sku\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift default import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "lot_number": "string", "inventory_id": 123, "lot_date": "2019-08-24T14:15:22+00:00", "sku": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://sandbox-api.shipbob.com/2026-07/lot-exclusion/restore")! 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() ```