---
updatedAt: 2026-07-09T18:25:51.000Z
agentTools:
  projectIndex: https://developer.thinklp.com/llms.txt
---

# Create a new Item record

Creates a new canonical Item. The SKU number is required (`SKU_REQUIRED` otherwise).

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Item API",
    "version": "1.1.0",
    "description": "Internal REST API for Item records in the Theft Standard package: load, update, create, and find-by-sku. Verbs other than GET, PUT, and POST return the SDK router's default response (typically 405 Method Not Allowed)."
  },
  "servers": [
    {
      "url": "https://{instance}.my.salesforce.com/services/apexrest/ThinkSDK/thinklp/api/v1",
      "variables": {
        "instance": {
          "default": "yourorg",
          "description": "Salesforce instance hostname"
        }
      }
    }
  ],
  "security": [
    {
      "oauth2": []
    }
  ],
  "tags": [
    {
      "name": "Items",
      "description": "Create, retrieve, update, and look up items."
    }
  ],
  "paths": {
    "/items": {
      "post": {
        "tags": [
          "Items"
        ],
        "summary": "Create a new Item record",
        "description": "Creates a new canonical Item. The SKU number is required (`SKU_REQUIRED` otherwise).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ItemDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Item envelope with generated Id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemEnvelope"
                },
                "example": {
                  "detail": {
                    "department": "Test Department",
                    "description": "Created via API example",
                    "id": "a0qG1000007F5EpIAK",
                    "itemImageUrl": null,
                    "itemPrice": 9.99,
                    "name": "Sample Item",
                    "skuNumber": "SAMPLE-SKU-0001"
                  },
                  "fieldSpecs": [
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "SKU Number",
                      "layoutHint": null,
                      "name": "skuNumber",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": true,
                      "section": "Item Details",
                      "type": "STRING",
                      "updateable": true
                    },
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "SKU",
                      "layoutHint": null,
                      "name": "name",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": false,
                      "section": "Item Details",
                      "type": "STRING",
                      "updateable": true
                    },
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "Description",
                      "layoutHint": null,
                      "name": "description",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": false,
                      "section": "Item Details",
                      "type": "STRING",
                      "updateable": true
                    },
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "Department",
                      "layoutHint": null,
                      "name": "department",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": false,
                      "section": "Item Details",
                      "type": "STRING",
                      "updateable": true
                    },
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "Item Price",
                      "layoutHint": null,
                      "name": "itemPrice",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": false,
                      "section": "Item Details",
                      "type": "CURRENCY",
                      "updateable": true
                    },
                    {
                      "controlledOptions": null,
                      "controllingFieldName": null,
                      "createable": true,
                      "label": "Item Image URL",
                      "layoutHint": null,
                      "name": "itemImageUrl",
                      "options": null,
                      "readOnly": null,
                      "referenceTo": null,
                      "required": false,
                      "section": "Item Details",
                      "type": "STRING",
                      "updateable": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/FlsDenied"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 Client Credentials. Request an access token from your Salesforce org's token endpoint using your connected app's consumer key and secret, then send it as `Authorization: Bearer <token>`.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/services/oauth2/token",
            "scopes": {}
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Malformed request, validation failure, SKU-required violation, or immutable-field violation",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardError"
            },
            "example": {
              "code": "IMMUTABLE_FIELD",
              "message": "SKU cannot be changed once persisted."
            }
          }
        }
      },
      "FlsDenied": {
        "description": "Field-level security denial. The running user lacks CRUD or FLS on a required field, or a mapping names a field that does not exist. The message names the column. The response body carries no separate field list.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardError"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error. Check the Salesforce platform logs.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardError"
            }
          }
        }
      }
    },
    "schemas": {
      "ItemEnvelope": {
        "type": "object",
        "required": [
          "detail",
          "fieldSpecs"
        ],
        "properties": {
          "detail": {
            "$ref": "#/components/schemas/ItemDto"
          },
          "fieldSpecs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldSpec"
            }
          }
        }
      },
      "ItemDto": {
        "type": "object",
        "required": [
          "skuNumber"
        ],
        "properties": {
          "id": {
            "type": "string",
            "nullable": true
          },
          "skuNumber": {
            "type": "string",
            "description": "Required SKU number. The API trims and uppercases it for comparison and storage. Immutable once persisted. An attempt to change it through PUT is rejected with `IMMUTABLE_FIELD`."
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "department": {
            "type": "string",
            "nullable": true
          },
          "itemPrice": {
            "type": "number",
            "nullable": true,
            "description": "Item price as a decimal value"
          },
          "itemImageUrl": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "FieldSpec": {
        "type": "object",
        "description": "Per-field metadata for form rendering. One shared shape across all domains. Each domain populates the keys it has, and leaves the rest null.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Domain property name (e.g. narrative)."
          },
          "label": {
            "type": "string",
            "description": "Display label."
          },
          "type": {
            "type": "string",
            "description": "Field type (e.g. string, boolean, date, picklist, reference)."
          },
          "required": {
            "type": "boolean",
            "nullable": true
          },
          "readOnly": {
            "type": "boolean",
            "nullable": true,
            "description": "Populated by theft and person. Null for vehicle, item, and location."
          },
          "createable": {
            "type": "boolean",
            "nullable": true,
            "description": "Populated by vehicle, item, and location. Null for theft and person."
          },
          "updateable": {
            "type": "boolean",
            "nullable": true,
            "description": "Populated by vehicle, item, and location. Null for theft and person."
          },
          "section": {
            "type": "string",
            "nullable": true
          },
          "referenceTo": {
            "type": "string",
            "nullable": true,
            "description": "For reference fields, the related SObject API name."
          },
          "options": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/FieldSpecOption"
            },
            "description": "Structured picklist options."
          },
          "controlledOptions": {
            "type": "array",
            "nullable": true,
            "items": {
              "$ref": "#/components/schemas/FieldSpecControlledOption"
            },
            "description": "Dependent-picklist option sets, keyed by the controlling value. Theft only."
          },
          "controllingFieldName": {
            "type": "string",
            "nullable": true
          },
          "layoutHint": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "FieldSpecOption": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "FieldSpecControlledOption": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Controlling field value this option set applies to."
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldSpecOption"
            }
          }
        }
      },
      "StandardError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "BAD_REQUEST",
              "INVARIANT_VIOLATION",
              "IMMUTABLE_FIELD",
              "SKU_REQUIRED",
              "FLS_DENIED",
              "NOT_FOUND",
              "INTERNAL_SERVER_ERROR"
            ]
          },
          "message": {
            "type": "string",
            "description": "Sanitized human-readable message"
          }
        }
      }
    }
  }
}
```