Skip to content

Create manufactured material *

Request

Optional endpoint. Calling this endpoint is optional. If you use it, create a manufactured material and optionally define processing steps; you must include either the owner (ownerKind, ownerId) or the processing step address, but not both.

rawMaterialName and rawMaterialAttribute are optional. When you send them, provide both as a single taxonomy pair at the root of the object (not a list). Use the Fairly Made Material Selector to pick the allowed attribute for that name (Step 1 = material, Step 2 = attributes).

Traceability collection: to link purchased inputs for Fairly Made supplier data collection, reference them via purchasedItems (each purchased item must include a purchaseOrder on POST /purchased-items). Links made only through usedMaterials are not taken into account for that analysis.

Bodyapplication/jsonrequired
uniqueIdentifierstring, [ 15 .. 255 ] charactersrequired

This identifier will make each material unique in our systems.

ownerKindstring
Value:"SUPPLIER"
ownerIdstring, (uuid)

System UUID of the material supplier. Provide exactly one of ownerId or ownerUniqueIdentifier (with ownerKind = SUPPLIER), or use address instead — not both owner and address.

ownerUniqueIdentifierstring

Client uniqueIdentifier of the material supplier. Requires ownerKind = SUPPLIER. Mutually exclusive with ownerId and with address.

addressobject(Address)

Postal address of an entity.

rawMaterialNamestring(RawMaterialName)

Raw material name taxonomy (from official material–attribute pairs; each name must be combined with a valid attribute for that material). Use the Fairly Made Material Selector spreadsheet to see which attributes are allowed for each name (Step 1 = material, Step 2 = allowed attributes), then align with the enums here. Fairly Made Material Selector.

Enum:"ABACÁ""ACETAL""ACETATE""ACRYLIC""ACRYLIC RESIN""ACRYLONITRILE BUTADIENE RUBBER""ACRYLONITRILE BUTADIENE STYRENE""ALCANTARA""ALGINATE""ALLIGATOR LEATHER"
rawMaterialAttributestring(RawMaterialAttribute)

Raw material attribute taxonomy. Values are only valid in combination with a given raw material name; each material name accepts only the attributes defined in the official material–attribute pairs. To choose the correct attribute for a given material name, use the Fairly Made Material Selector (Google Sheets): Step 1 — select the material; Step 2 — lists the attributes you may use with that name. Then send the exact enum value from this schema. Fairly Made Material Selector.

Enum:"BIO_BASED""CHROME_FREE""CONVENTIONAL""FARMED""MIXED_TANNING""ORGANIC""RECYCLED""REGENERATIVE""VEGETABLE""WILD"
stepsArray of objects(MaterialStep)
purchasedItemsArray of objects(MaterialPurchasedItem)

Purchased material inputs to produce this material. Each item represents a purchased material and its contribution percentage. Only applicable when the entity is linked with an owner (ownerKind with ownerId or ownerUniqueIdentifier); not used when providing a processing step address. Sum of purchased items and used items usagePercentage must equal 100. For Fairly Made traceability / supplier data collection, use purchasedItems (each related purchased item must have a purchaseOrder). Links made only through usedMaterials are not taken into account for that analysis.

usedMaterialsArray of objects(UsedMaterial)

Materials used as inputs for this material along with their usage percentage. Not taken into account for Fairly Made supplier data collection — use purchasedItems instead.

Creation of a material with a single supplier (owner). Owner is specified via ownerKind and ownerId; no processing step address.

curl -i -X POST \
  https://doc.api.fairlymade.com/_mock/swagger-fairlymadeapi-v3/manufactured-materials \
  -H 'Content-Type: application/json' \
  -d '{
    "uniqueIdentifier": "FM-MATERIAL-COTTON-0001",
    "ownerKind": "SUPPLIER",
    "ownerId": "a5765369-b42c-4e6f-849b-0c3873e8deb5",
    "rawMaterialName": "COTTON",
    "rawMaterialAttribute": "CONVENTIONAL"
  }'

Responses

Material created

Bodyapplication/json
materialIdstring, (uuid)

Identifier of the created material. UUID v4 format.

Response
{ "materialId": "30cdab3c-3e2b-44f4-8415-c6dd88ed4261" }