Change a material
/materials/{material}Changes the fields that the body carries, keeps the others, and returns the material. The path names the material by its id, or by its code with by=code. A code in the body is the material's new code. The kind is set when the material is created and cannot change. In processing_capabilities, a slot that the body leaves out keeps its capability, and null clears it. The body names each entity it refers to as {"id": …} or {"code": …}. A reference that names no entity of the shop answers 400 invalid-request pointing at it.
Request Headers
Path Parameters
The material's id, or its code when by=code.
Query Parameters
Which key the path holds: id, the default, or code.
"id"Value in
- "id"
- "code"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
The fields to change. A field that the patch leaves out keeps its value. The kind is set when the material is created and cannot change.
Response Headers
200, 400, 401, 403, 404, 413, 429, default
The channel that served the request: unstable.
Value in
- "unstable"
200, 400, 401, 403, 404, 413, 429, default
The id the server gave the request. A problem carries the same id as request_id. Quote it when you contact support.
uuid200, 400, 403, 404, 429, default
The shop's rate-limit policy, as draft-ietf-httpapi-ratelimit-headers defines it: its name, the requests it allows (q), and its window in seconds (w). Every shop has the policy "standard";q=120;w=60: 120 requests per 60 seconds, counted over all the shop's tokens. Sent with every response to a request that carries a valid token, and with a 429. The server leaves it out when it cannot read the shop's budget.
200, 400, 403, 404, 429, default
The shop's budget in the current window: the requests left (r), and the seconds until the window resets (t), as in "standard";r=117;t=42. Sent with RateLimit-Policy.
429
The number of seconds to wait until the shop's budget resets.
1 <= valueResponse Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PATCH "https://example.com/materials/string" \ -H "Authorization: Bearer ff_shop_…" \ -H "Content-Type: application/json" \ -d '{}'{ "result": { "code": "string", "color": "string", "thickness_mm": 0, "price_ncu_m2": 0, "tile_size_mm": 0, "drawing_padding_mm": 0, "id": "string", "kind": { "id": "string" }, "status": "active", "appearance": { "id": "string" }, "processing_capabilities": { "cutting": { "id": "string" }, "engraving_light": { "id": "string" }, "engraving_medium": { "id": "string" }, "engraving_heavy": { "id": "string" } } }}Get a material GET
Returns one material. The path names the material by its id, or by its code with `by=code`.
Delete a material DELETE
Deletes a material. The path names the material by its id, or by its code with `by=code`. Past orders keep their record of the material. If the material is the default material of a design kind, new designs of that kind start with the first material that the shop offers again.