PATCH /stocks/materials/{materialId}

Update a material

This endpoint allows you to update a specific material.

Operation ID: updateStockMaterial
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
materialId required
path
string

The Material ID

Query Parameters

Name Type Description
expanded
query
string

Comma-separated list of relations to include in the response

material_type warehouse supplier_custom_price

Request Body

Content-Type: application/json · Required fields: material_type_id, name, code, units

name string required

Name of the material

Example: Chair

code string required

Code of the material. It must be unique

Example: CH-0001

description string | null

Description of the material

Example: This is a chair

units string required

What unit should this item be measured with

Example: un

material_type_id integer required

Material type id

Example: 1

observations string | null

Material observations

Example: This is an observation

sku string | null

SKU of the material

Example: SKU-00001

ean_upc string | null

EAN/UPC of the material

Example: 1234567890123

purchase_consumption_type string

Purchase consumption type of the material

INHERIT AUTOMATIC MANUAL

Responses

data object

Material model structure details

id string required read-only

ID of the Material

Example: 1

type string required read-only

Model type

stock-material

Example: stock-material

attributes object required
material_id string read-only

ID of the material

Example: 1

material_type_id string read-only

ID of the material type

Example: 11

name string

Name of the material

Example: Chair

code string

Code of the material

Example: CH-00001

purchase_consumption_type string

Purchase consumption type of the material

INHERIT AUTOMATIC MANUAL

Example: INHERIT

units string

Indicates which kind of unit should this material be measured with

Example: un

observations string | null

Material observations

Example: This is a observation

description string

Description of the material

Example: This is a chair

sku string | null

SKU of the material

Example: SKU-00001

ean_upc string | null

EAN/UPC of the material

Example: 1234567890123

sale_price number

Sale price of the material

Example: 10

sale_vat number

Sale VAT of the material

Example: 23

created_at string | null read-only

Date of creation

Example: 2021-07-21 18:38:00

updated_at string | null read-only

Last update date

Example: 2021-07-21 18:38:00

warehouses_minimum_stocks array<object>
warehouse_id integer

Example: 1

warehouse_name string

Example: Warehouse

minimum_quantity integer

Example: 10

status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
404
message string

Example: Resource not found

more_info string | null
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string