> For the complete documentation index, see [llms.txt](https://docs.enlyze.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enlyze.com/enlyze-api/api-referenz/products.md).

# Products

## Get Products

> Returns a list of all products in your organization.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Products"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"PaginatedProducts":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Product"},"type":"array","title":"Data"},"metadata":{"$ref":"#/components/schemas/Metadata","description":"This field contains pagination metadata."}},"additionalProperties":false,"type":"object","required":["data","metadata"],"title":"PaginatedProducts"},"Product":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the product."},"external_id":{"type":"string","title":"External id","description":"The identifier of the product in the ERP/MES."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["uuid","external_id","name"],"title":"Product"},"Metadata":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pagination continuation point. Specify its value as the `cursor` parameter in a request with otherwise the same parameters to fetch the next page. `None`, if there is no more data to be fetched from the server."}},"additionalProperties":false,"type":"object","required":["next_cursor"],"title":"Metadata"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/products":{"get":{"tags":["Products"],"summary":"Get Products","description":"Returns a list of all products in your organization.","operationId":"get_products_v2_products_get","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","title":"Get page starting at cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"title":"Maximum number of results to return","description":"Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected.","default":1000},"description":"Caps the page size. Defaults to 1000, which is also the maximum; a value below 1 or above 1000 is rejected."},{"name":"uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"array","uniqueItems":true,"items":{"type":"string","format":"uuid"},"maxItems":50},{"type":"null"}],"title":"Filter by one or more product UUIDs.","description":"If not set, all products will be considered."},"description":"If not set, all products will be considered."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedProducts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Product

> Create a product.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Products"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"CreateProduct":{"properties":{"external_id":{"type":"string","minLength":1,"title":"External id","description":"The identifier of the product in the ERP/MES."},"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["external_id"],"title":"CreateProduct"},"Product":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the product."},"external_id":{"type":"string","title":"External id","description":"The identifier of the product in the ERP/MES."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["uuid","external_id","name"],"title":"Product"},"ProductExternalIdCollisionError":{"properties":{"type":{"type":"string","const":"external_id_collision","title":"Type","default":"external_id_collision"},"conflict":{"$ref":"#/components/schemas/ConflictingProduct","title":"Conflicting Product","description":"The product already holding the requested external id."}},"type":"object","required":["conflict"],"title":"ProductExternalIdCollisionError"},"ConflictingProduct":{"properties":{"product":{"type":"string","format":"uuid","title":"Conflicting Product UUID"}},"type":"object","required":["product"],"title":"ConflictingProduct"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/products":{"post":{"tags":["Products"],"summary":"Create Product","description":"Create a product.","operationId":"create_product_v2_products_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProduct"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductExternalIdCollisionError"}],"discriminator":{"propertyName":"type","mapping":{"external_id_collision":"#/components/schemas/ProductExternalIdCollisionError"}},"title":"Response 409 Create Product V2 Products Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Get Product

> Returns details for a specific product.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Products"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Product":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the product."},"external_id":{"type":"string","title":"External id","description":"The identifier of the product in the ERP/MES."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["uuid","external_id","name"],"title":"Product"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/products/{uuid}":{"get":{"tags":["Products"],"summary":"Get Product","description":"Returns details for a specific product.","operationId":"get_product_v2_products__uuid__get","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the product."}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Delete Product

> Delete a product. Refused while it is referenced by any production run.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Products"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"ProductNotFoundError":{"properties":{"type":{"type":"string","const":"product_not_found","title":"Type","default":"product_not_found"}},"type":"object","title":"ProductNotFoundError"},"ProductReferencedByProductionRunError":{"properties":{"type":{"type":"string","const":"product_referenced_by_production_run","title":"Type","default":"product_referenced_by_production_run"}},"type":"object","title":"ProductReferencedByProductionRunError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/products/{uuid}":{"delete":{"tags":["Products"],"summary":"Delete Product","description":"Delete a product. Refused while it is referenced by any production run.","operationId":"delete_product_v2_products__uuid__delete","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the product."}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"product_not_found":"#/components/schemas/ProductNotFoundError"}},"title":"Response 404 Delete Product V2 Products  Uuid  Delete"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductReferencedByProductionRunError"}],"discriminator":{"propertyName":"type","mapping":{"product_referenced_by_production_run":"#/components/schemas/ProductReferencedByProductionRunError"}},"title":"Response 409 Delete Product V2 Products  Uuid  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update Product

> Update a product. Changing the \`external\_id\` is refused if the product is synchronized from an external system.

```json
{"openapi":"3.1.0","info":{"title":"ENLYZE API","version":"v2"},"tags":[{"name":"Products"}],"servers":[{"url":"/api"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"UpdateProduct":{"properties":{"external_id":{"type":"string","minLength":1,"title":"External Id"},"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name"}},"type":"object","title":"UpdateProduct"},"Product":{"properties":{"uuid":{"type":"string","format":"uuid","title":"UUID","description":"The UUID of the product."},"external_id":{"type":"string","title":"External id","description":"The identifier of the product in the ERP/MES."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional, more verbose name or description of the product."}},"type":"object","required":["uuid","external_id","name"],"title":"Product"},"ProductNotFoundError":{"properties":{"type":{"type":"string","const":"product_not_found","title":"Type","default":"product_not_found"}},"type":"object","title":"ProductNotFoundError"},"ProductExternalIdCollisionError":{"properties":{"type":{"type":"string","const":"external_id_collision","title":"Type","default":"external_id_collision"},"conflict":{"$ref":"#/components/schemas/ConflictingProduct","title":"Conflicting Product","description":"The product already holding the requested external id."}},"type":"object","required":["conflict"],"title":"ProductExternalIdCollisionError"},"ConflictingProduct":{"properties":{"product":{"type":"string","format":"uuid","title":"Conflicting Product UUID"}},"type":"object","required":["product"],"title":"ConflictingProduct"},"SynchronizedFromExternalSystemError":{"properties":{"type":{"type":"string","const":"synchronized_from_external_system","title":"Type","default":"synchronized_from_external_system"}},"type":"object","title":"SynchronizedFromExternalSystemError"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v2/products/{uuid}":{"patch":{"tags":["Products"],"summary":"Update Product","description":"Update a product. Changing the `external_id` is refused if the product is synchronized from an external system.","operationId":"update_product_v2_products__uuid__patch","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"The UUID of the product."}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProduct"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductNotFoundError"}],"discriminator":{"propertyName":"type","mapping":{"product_not_found":"#/components/schemas/ProductNotFoundError"}},"title":"Response 404 Update Product V2 Products  Uuid  Patch"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProductExternalIdCollisionError"},{"$ref":"#/components/schemas/SynchronizedFromExternalSystemError"}],"discriminator":{"propertyName":"type","mapping":{"external_id_collision":"#/components/schemas/ProductExternalIdCollisionError","synchronized_from_external_system":"#/components/schemas/SynchronizedFromExternalSystemError"}},"title":"Response 409 Update Product V2 Products  Uuid  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
