Skip to content

Call by unique identifier

Request

Call by: uniqueIdentifier — your internal reference (same value as on POST /brand-products).

Partial update with the same body and rules as Call by id (PATCH /brand-products/{id}). uniqueIdentifier must not be included in the request body.

If the product belongs to another client, the response is 404 (BrandProductNotFoundByUniqueIdentifier) — existence is not revealed (contrast with Call by id, which returns 403 when the id exists but is out of scope).

Side effects: introducing a product link on update may trigger traceability or legacy migration. Failures return 422 without rollback — the record is kept; retry the request.

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
manufacturedProductIdstring, (uuid)

System UUID link to a manufactured product. Mutually exclusive with manufacturedProductUniqueIdentifier, purchasedItemId, and purchasedItemUniqueIdentifier.

manufacturedProductUniqueIdentifierstring

Client uniqueIdentifier link to a manufactured product. Mutually exclusive with other product link fields.

purchasedItemIdstring, (uuid)

System UUID link to a purchased item. Mutually exclusive with other product link fields.

purchasedItemUniqueIdentifierstring

Client uniqueIdentifier link to a purchased item. Mutually exclusive with other product link fields.

refstring
colorCodestring
collectionstring
productNamestring or null
packagingIdsArray of strings or null, (uuid)

System UUIDs of the associated packagings. Mutually exclusive with packagingUniqueIdentifiers. Replaces the previous list in full when sent.

packagingUniqueIdentifiersArray of strings or null

Client uniqueIdentifiers of the associated packagings. Mutually exclusive with packagingIds. Replaces the previous list in full when sent.

gtinsArray of strings
marketSegmentstring or null
productPricenumber or null
ecoModulationstring
producedQuantitynumber or null
weightnumber or null
warehouseobject or null(Warehouse)

Warehouse: provide either supplierId or supplierUniqueIdentifier, or a postal address with country — not both supplier reference and address in the same object. Send null to clear the warehouse on the brand product.

curl -i -X PATCH \
  'https://doc.api.fairlymade.com/_mock/swagger-fairlymadeapi-v3/brand-products/by-unique-identifier/{uniqueIdentifier}' \
  -H 'Content-Type: application/json' \
  -d '{}'

Responses

Updated brand product record (full DTO).

Bodyapplication/json
idstring, (uuid)
customerIdstring, (uuid)

Your customer id.

uniqueIdentifierstringread-only

Assigned at creation; returned for reference only — not accepted in PATCH request bodies.

collectionstring
categorystring
colorCodestring
marketSegmentstring or null
ecoModulationstring or null
refstring
productNamestring or null

Commercial or internal product name on your side.

manufacturedProductIdstring or null, (uuid)

System UUID of the linked manufactured product, or null. Mutually exclusive with purchasedItemId.

purchasedItemIdstring or null, (uuid)

System UUID of the linked purchased item, or null. Mutually exclusive with manufacturedProductId.

productPricenumber or null
weightnumber or null
producedQuantitynumber or null
warehouseobject or null(Warehouse)

Information about the destination warehouse for brand product data. Provide either a warehouse supplier (supplierId or supplierUniqueIdentifier) or an address with country — not both in the same object.

hasCommunicationPackageboolean

Whether the product's communication pack is active. Governs whether links are returned.

gtinsArray of objects
packagingIdsArray of strings, (uuid)
createdAtstring, (date-time)
updatedAtstring, (date-time)
Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac", "uniqueIdentifier": "string", "collection": "string", "category": "string", "colorCode": "string", "marketSegment": "string", "ecoModulation": "string", "ref": "string", "productName": "string", "manufacturedProductId": "06dee5c1-8885-4d10-bf9a-14a0957b1487", "purchasedItemId": "c71367fd-41b4-4f55-a878-880751ae6d3a", "productPrice": 0, "weight": 0, "producedQuantity": 0, "warehouse": { "supplierId": "e01eb4c4-8eb9-4fb7-b625-61f58c6148db", "supplierUniqueIdentifier": "string", "address": { … } }, "hasCommunicationPackage": true, "links": { "qrCode": "http://example.com", "web": "http://example.com" }, "gtins": [ { … } ], "packagingIds": [ "497f6eca-6276-4993-bfeb-53cbbbba6f08" ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }