---
agentTools:
  projectIndex: https://uspacy.readme.io/llms.txt
---

# Update entity product list

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "CRM service",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://{domain}.uspacy.ua",
      "description": "Ukrainian server"
    },
    {
      "url": "https://{domain}.uspacy.eu",
      "description": "EU server"
    },
    {
      "url": "https://{domain}.uspacy.com.br",
      "description": "Brazilian server"
    },
    {
      "url": "https://{domain}.uspacy.com",
      "description": "International server"
    }
  ],
  "tags": [
    {
      "name": "products",
      "description": "Product catalog, categories, pricing, and taxes"
    }
  ],
  "paths": {
    "/crm/v1/static/entity-product-lists/{itemId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/itemId"
        }
      ],
      "patch": {
        "tags": [
          "products"
        ],
        "summary": "Update entity product list",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EntityProductList"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EntityProductList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Access token is missing or invalid"
      },
      "ValidationError": {
        "description": "Validation error response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "errors": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "example": {
                    "field_name": [
                      "The field_name field is required."
                    ]
                  }
                },
                "status": {
                  "type": "boolean",
                  "example": true
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "itemId": {
        "name": "itemId",
        "in": "path",
        "description": "Item ID",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "schemas": {
      "Files": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "example": [
          "path/to/image.jpg",
          "path/to/image.png"
        ]
      },
      "ProductCategory": {
        "properties": {
          "id": {
            "type": "integer",
            "example": 2
          },
          "parent_id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "Main category"
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "created_at": {
            "type": "integer",
            "example": 12156465
          },
          "updated_at": {
            "type": "integer",
            "example": 12156465
          },
          "child_categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductCategory"
            }
          }
        }
      },
      "Product": {
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "product_category_id": {
            "type": "integer",
            "example": 1
          },
          "measurement_unit_id": {
            "type": "integer",
            "example": 1
          },
          "title": {
            "type": "string",
            "example": "Some laptop"
          },
          "article": {
            "type": "string",
            "example": "ART 123456789"
          },
          "type": {
            "type": "string",
            "example": "goods",
            "enum": [
              "goods",
              "service"
            ]
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "availability": {
            "type": "string",
            "example": "available",
            "enum": [
              "available",
              "not_available",
              "pending"
            ]
          },
          "quantity": {
            "type": "number",
            "example": 1.0001
          },
          "reserved_quantity": {
            "type": "number",
            "example": 0.0001
          },
          "description": {
            "type": "string",
            "example": "Some product description"
          },
          "comment": {
            "type": "string",
            "example": "Some product comment"
          },
          "link": {
            "type": "string",
            "example": "www.youtube.com/some_link"
          },
          "created_at": {
            "type": "integer",
            "example": 12156465
          },
          "updated_at": {
            "type": "integer",
            "example": 12156465
          },
          "product_category": {
            "$ref": "#/components/schemas/ProductCategory"
          },
          "measurement_unit": {
            "$ref": "#/components/schemas/MeasurementUnit"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductPrice"
            }
          },
          "files": {
            "$ref": "#/components/schemas/Files"
          }
        }
      },
      "ProductPrice": {
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "price": {
            "type": "integer",
            "example": 10000
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "is_default": {
            "type": "boolean",
            "example": true
          },
          "tax": {
            "$ref": "#/components/schemas/Tax"
          }
        }
      },
      "MeasurementUnit": {
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "Kilograms"
          },
          "abbr": {
            "type": "string",
            "example": "Kg"
          },
          "is_default": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "Tax": {
        "properties": {
          "id": {
            "type": "integer",
            "example": 1
          },
          "name": {
            "type": "string",
            "example": "NDS"
          },
          "rate": {
            "type": "number",
            "example": 25.5
          },
          "is_active": {
            "type": "boolean"
          }
        }
      },
      "EntityProductList": {
        "properties": {
          "id": {
            "type": "integer"
          },
          "entity_type": {
            "type": "string",
            "example": "deals"
          },
          "entity_id": {
            "type": "integer",
            "example": 2
          },
          "is_automatic_calculation": {
            "type": "boolean"
          },
          "amount_before_discount_and_tax": {
            "type": "integer"
          },
          "amount_discount": {
            "type": "integer"
          },
          "amount_tax": {
            "type": "integer"
          },
          "amount_before_tax": {
            "type": "integer"
          },
          "amount_total": {
            "type": "integer"
          },
          "list_products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListProduct"
            }
          }
        }
      },
      "ListProduct": {
        "properties": {
          "id": {
            "type": "integer"
          },
          "entity_product_list_id": {
            "type": "integer"
          },
          "product_id": {
            "type": "integer"
          },
          "title": {
            "type": "string",
            "example": "Macbook air 15 24gb"
          },
          "price": {
            "type": "integer",
            "example": 2000000
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "quantity": {
            "type": "number",
            "example": 5
          },
          "measurement_unit_abbr": {
            "type": "string",
            "example": "psc"
          },
          "discount_value": {
            "type": "number",
            "example": 25
          },
          "discount_type": {
            "type": "string",
            "enum": [
              "relative",
              "absolute"
            ]
          },
          "discount_price": {
            "type": "integer",
            "example": 5000
          },
          "tax_rate": {
            "type": "number",
            "example": 20.5
          },
          "is_tax_included": {
            "type": "boolean"
          },
          "amount": {
            "type": "integer",
            "example": 1500
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 145,
      "2": 108,
      "3": 28,
      "4": 165,
      "5": 162,
      "6": 20,
      "7": 148,
      "8": 43,
      "9": 242,
      "10": 235,
      "11": 56
    }
  }
}
```