Skip to content

Purchased items

Partial update of a purchased item. Two equivalent lookups:

  • Call by id — Fairly Made id (UUID v4) from the 201 response
  • Call by unique identifier — your uniqueIdentifier from creation

Updates are locked once traceability collection starts. If you run traceability collection (SDC) with Fairly Made, a PATCH on this entity is taken into account only until the collection is launched for its uniqueIdentifier. Collection can be launched only once per uniqueIdentifier — after that launch, PATCH calls on this entity are no longer taken into account. (Brand products are the exception: they can be updated at any time.)

Call by unique identifier

Request

Call by: uniqueIdentifier — your internal reference from POST /purchased-items.

Partial update with the same body and rules as Call by id. uniqueIdentifier, buyerKind, and buyer/seller identity fields must not be included in the body.

If the item belongs to another client → 404 (PurchasedItemNotFoundByUniqueIdentifier).

Path
uniqueIdentifierstring, non-emptyrequired

Your resource uniqueIdentifier (same value as on the corresponding POST endpoint). Any non-empty URL-encoded string is accepted; it is not validated as a UUID.

Bodyapplication/jsonrequired
itemIdstring, (uuid)

System UUID of the purchased entity. Provide exactly one of itemId or itemUniqueIdentifier.

itemUniqueIdentifierstring

Client uniqueIdentifier of the purchased entity. Mutually exclusive with itemId.

purchaseOrderstring or null
purchaseOrderDatestring or null, (date)
transportsArray of objects(Transport)
purchasedQuantityobject or null(Quantity)
certificationsArray of objects(Certification)
curl -i -X PATCH \
  'https://doc.api.fairlymade.com/_mock/swagger-fairlymadeapi-v3/purchased-items/by-unique-identifier/{uniqueIdentifier}' \
  -H 'Content-Type: application/json' \
  -d '{
    "itemId": "f11b669d-7201-4c21-88af-d85092f0c005",
    "itemUniqueIdentifier": "string",
    "purchaseOrder": "string",
    "purchaseOrderDate": "2019-08-24",
    "transports": [
      {
        "name": "BARGE",
        "usagePercentage": 0
      }
    ],
    "purchasedQuantity": {
      "value": 0,
      "unit": "GRAMS"
    },
    "certifications": [
      {
        "certificationName": "string"
      }
    ]
  }'

Responses

Updated purchased item record (full DTO).

Bodyapplication/json
property name*anyadditional property
Response
{}