Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/textile/yarns | List yarns, optionally filtered by supplierId |
GET | /api/v1/textile/yarns/{id} | Get a single yarn |
POST | /api/v1/textile/yarns | Create a yarn product |
PATCH | /api/v1/textile/yarns/{id} | Partially update a yarn |
DELETE | /api/v1/textile/yarns/{id} | Delete a yarn |
GET /api/v1/textile/yarns
| Query parameter | Type | Required |
|---|---|---|
supplierId | uuid | — |
Shell
curl "{{BASE_URL}}/api/v1/textile/yarns?supplierId=3f2b9a1c-…"
Response 200 OK — JSON array of YarnProductDto.
POST /api/v1/textile/yarns
See the Textile concept page for the shared core fields.
Yarn-specific fields
| Field | Type | Description |
|---|---|---|
yarnCount | number | Linear-density value |
yarnCountUnit | enum | NM, NE, TEX, DTEX, DEN |
twist | string | Twist direction / level (free-form) |
ply | integer | Number of plies |
yarnType | string | e.g. RING_SPUN, OPEN_END, COMBED |
Example
Shell
curl -X POST {{BASE_URL}}/api/v1/textile/yarns \-H "Content-Type: application/json" \-d '{"name": "Ne 30/1 Organic Cotton","code": "YRN-OC-30","supplierId": "3f2b9a1c-…","composition": "100% organic cotton","productOriginCountry": "IN","gotsCertified": true,"organicContentPct": 100,"unitOfMeasure": "KG","yarnCount": 30,"yarnCountUnit": "NE","ply": 1,"yarnType": "RING_SPUN","pricePerUnit": "9.80","currency": "EUR","available": true,"leadTimeDays": 14}'
Response 201 Created — YarnProductDto.
GET /api/v1/textile/yarns/{id}
200 OK—YarnProductDto.404 Not Found— yarn does not exist in your tenant.
PATCH /api/v1/textile/yarns/{id}
Partial update over any of the documented fields.
DELETE /api/v1/textile/yarns/{id}
204 No Content— deleted.404 Not Found— yarn does not exist in your tenant.
Yarn schema
YarnProductDto has textileCategory fixed to YARN.
JSON
{"id": "yrn-uuid…","supplierId": "3f2b9a1c-…","companyId": null,"userId": null,"name": "Ne 30/1 Organic Cotton","code": "YRN-OC-30","textileCategory": "YARN","description": null,"technicalSpecs": null,"composition": "100% organic cotton","productOriginCountry": "IN","rawMaterialOriginCountry": null,"gotsCertified": true,"grsCertified": false,"oekoTexCertified": false,"cradleToCradle": false,"betterCotton": false,"otherCertifications": null,"recycledContentPct": null,"organicContentPct": 100,"sustainabilityNotes": null,"available": true,"minimumOrder": null,"pricePerUnit": "9.80","currency": "EUR","productWeightKg": null,"quantityAvailable": null,"leadTimeDays": 14,"unitOfMeasure": "KG","metadata": null,"yarnCount": 30,"yarnCountUnit": "NE","twist": null,"ply": 1,"yarnType": "RING_SPUN","createdAt": "2026-04-21T10:00:00.000Z","updatedAt": "2026-04-21T10:00:00.000Z"}