Material kinds

Change a material kind

PATCH/material-kinds/{material_kind}

Changes the fields that the body carries, keeps the others, and returns the material kind. The path names the material kind by its id, or by its code with by=code. A code in the body is the kind's new code. The body names the category and each compatibility group as {"id": …} or {"code": …}. A reference that names no entity of the shop answers 400 invalid-request pointing at it.

Request Headers

Bearer <token>

Path Parameters

material_kind*string

The material kind's id, or its code when by=code.

Query Parameters

by?string

Which key the path holds: id, the default, or code.

Default"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, and compatibility_groups replaces the whole list. A patch that changes compatibility_mode away from groups removes the kind's groups.

Response Headers

200, 400, 401, 403, 404, 413, 429, default

200, 400, 401, 403, 404, 413, 429, default

200, 400, 403, 404, 429, default

200, 400, 403, 404, 429, default

429

Response 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/material-kinds/string" \  -H "Authorization: Bearer ff_shop_…" \  -H "Content-Type: application/json" \  -d '{}'
{  "result": {    "title": "string",    "code": "string",    "compatibility_mode": "universal",    "id": "string",    "category": {      "id": "string"    },    "compatibility_groups": [      {        "id": "string"      }    ]  }}